From patchwork Thu Mar 16 07:10:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dhinakaran Pandiyan X-Patchwork-Id: 9627673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8A5A860244 for ; Thu, 16 Mar 2017 08:46:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E6D928652 for ; Thu, 16 Mar 2017 08:46:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71C3B28658; Thu, 16 Mar 2017 08:46:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F16F28652 for ; Thu, 16 Mar 2017 08:46:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4BAE16EA38; Thu, 16 Mar 2017 08:46:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 29BD16E9FB; Thu, 16 Mar 2017 07:12:21 +0000 (UTC) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP; 16 Mar 2017 00:12:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,170,1486454400"; d="scan'208";a="76000705" Received: from nuc-skylake.jf.intel.com ([10.54.75.136]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2017 00:12:20 -0700 From: Dhinakaran Pandiyan To: intel-gfx@lists.freedesktop.org Subject: [PATCH v4 1/8] drm/dp: Kill total_pbn and total_slots in struct drm_dp_mst_topology_mgr Date: Thu, 16 Mar 2017 00:10:24 -0700 Message-Id: <1489648231-30700-2-git-send-email-dhinakaran.pandiyan@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489648231-30700-1-git-send-email-dhinakaran.pandiyan@intel.com> References: <1489648231-30700-1-git-send-email-dhinakaran.pandiyan@intel.com> X-Mailman-Approved-At: Thu, 16 Mar 2017 08:46:31 +0000 Cc: Daniel Vetter , dri-devel@lists.freedesktop.org, "Pandiyan, Dhinakaran" X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: "Pandiyan, Dhinakaran" The total vcpi time slots is always 63 and does not depend on the link BW, remove total_slots from MST topology manager struct. The next change is to remove total_pbn which is hardcoded to 2560. The total PBN that the topology manager allocates from depends on the link rate and is not a constant. So, fix this by removing the total_pbn member itself. Cc: Daniel Vetter Cc: Archit Taneja Cc: Maarten Lankhorst Cc: Chris Wilson Cc: Harry Wentland Signed-off-by: Dhinakaran Pandiyan --- drivers/gpu/drm/drm_dp_mst_topology.c | 5 ++--- include/drm/drm_dp_mst_helper.h | 9 +-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index f2cc375..66a611a 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -2042,9 +2042,8 @@ int drm_dp_mst_topology_mgr_set_mst(struct drm_dp_mst_topology_mgr *mgr, bool ms goto out_unlock; } - mgr->total_pbn = 2560; - mgr->total_slots = DIV_ROUND_UP(mgr->total_pbn, mgr->pbn_div); - mgr->avail_slots = mgr->total_slots; + /* max. time slots - one slot for MTP header */ + mgr->avail_slots = 63; /* add initial branch device at LCT 1 */ mstb = drm_dp_add_mst_branch_device(1, NULL); diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index f4b4d15..1a7e0f4 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -479,18 +479,11 @@ struct drm_dp_mst_topology_mgr { * @pbn_div: PBN to slots divisor. */ int pbn_div; - /** - * @total_slots: Total slots that can be allocated. - */ - int total_slots; + /** * @avail_slots: Still available slots that can be allocated. */ int avail_slots; - /** - * @total_pbn: Total PBN count. - */ - int total_pbn; /** * @qlock: protects @tx_msg_downq, the &drm_dp_mst_branch.txslost and