Message ID | 1451031288-40242-2-git-send-email-Mykola.Lysenko@amd.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2911CBEEED for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41EE8202BE for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id C169A2026D for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5687B6E0CE; Tue, 29 Dec 2015 02:54:18 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0088.outbound.protection.outlook.com [207.46.100.88]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1D086E219 for <dri-devel@lists.freedesktop.org>; Fri, 25 Dec 2015 00:16:26 -0800 (PST) Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Mykola.Lysenko@amd.com; Received: from sweethome.localdomain (165.204.68.36) by DM3PR12MB0860.namprd12.prod.outlook.com (10.164.7.142) with Microsoft SMTP Server (TLS) id 15.1.361.13; Fri, 25 Dec 2015 08:16:24 +0000 From: Mykola Lysenko <Mykola.Lysenko@amd.com> To: <dri-devel@lists.freedesktop.org> Subject: [PATCH 1/2] drm/dp/mst: fix in MSTB RAD initialization Date: Fri, 25 Dec 2015 16:14:47 +0800 Message-ID: <1451031288-40242-2-git-send-email-Mykola.Lysenko@amd.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1451031288-40242-1-git-send-email-Mykola.Lysenko@amd.com> References: <1451031288-40242-1-git-send-email-Mykola.Lysenko@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.68.36] X-ClientProxiedBy: SG2PR0199CA0027.apcprd01.prod.exchangelabs.com (25.162.195.37) To DM3PR12MB0860.namprd12.prod.outlook.com (25.164.7.142) X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 2:+bZ9q4jkCtRt2PdvKpyr+FA8VWLUMA+BtzsOS9onBtd4Pmod8CSa7qLy2aFkz0ia8np9D+zGb/i6pmGnqgBCcpCCTKj31PwjbBnduz34+U04FNQe1FZxt/Mxg3oKeZ+2PblGX38wdqjl+j5BtdQmRQ==; 3:2HXgsbsNGvDxgXBenFl8Mv/0OPwWhaXE6Ua9QPoJDQEI5YscA1FHFI4GGgsAnjNn132xlmKGClCUs9mn1aebSceiIEIw7g2tRYQXnBQo1DZpY38iqS8zki0ziGAO+jDw; 25:TxLtL288B+zVlA+meS+UOec7Ki+kCG8Fh07Yi6Tq9wd3p8owu5Pq2uoir+AU80KkX//WMi++jFCTGRk8ztSIbsd4sFLT+PHsgWdvV8yS7/WeU3JBPaMWhDgdIbOFrVw5PCAhVZ93H1Sk4xMCFX/6kNERlW7+QjvZAQeiVLFlYDtiX7juSP9dL2bu+gkID+3xiwRoy7t7zQrFRGHzjoRHAbr+f3pHzdsbOmgnLIQ1JAW03OOIjt1NvPG0AQIkgRlZAm17BxUWXx9Le7ZGBmL7pQ== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR12MB0860; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 20:N2R+7Iz5Jtgz6uhnoZFfT5pM8juw2fb7TcwGNUoRbvQauVAaVjw10JonANGnn8rQJX2DDHqm/cGhNUljTYYNpFw/bMFcEMBwJI5zwfsMSothE76SFJXh6y4+kla8YP9SBd/sqbTUwESwsC2PA71OGNR58vEbqT46k9GFQXYkaiHaea0AvXqFJMyjuSZwQ1qh7EwRlkYddwetGavy3fVCQrIeFWR0uimGt0r9lM550oPXjojvIJK7hNRhVQtaTS4wj6KKyOJPZrtuws+fhhX2tLsUnzZemuSp7vAaFMZ6xdi+nBRYWps6+/fPRkHXh92HT9kjvwLH9pqzatv5+sOjtG6CbqYfLngklspdBtK0vkjHf1DwJtic/uU8CKxlMFHmEQhbKiDHg+bM4JG5J89muIb7WLhCZqA+f4h9sSEGfcTJA7ozo0ZYxnu19qMvluFqTqYANCDZFkHBDLF5KRzopMPLvbxaST40LcXuFjbjNdIh0SpKjVwNSL56DAdauntD; 4:hHBwD4y9gSOwJ0IGnl3nTzpfMpKxg5+6M1671xgxCFxpIHrb9E3QcFGnx3QuZfOBlV7ygIlZo5q7y8qb5nU2f9jofVc5NzE8VmGHHvtytcualLEcHTypXNJfwDrtg9O13dd8XPWeJyLsWjiA0DrVM3LN+aPnjB4dmsSt7rcU8RKIvPewO1dUDhPKqGzxyvDrIQ8cQunUPSgByM+QADoGe0x2pZCm8PuUS4Mn7y1Dq+tPrHmXoNrEcn+RZJFrrwadWNLywNTV/0OsrU5zblLZwjVC9JBK6osswgsiE/nFOAW3vwlIg0Y6JyRtVujOAFrxvzlX6ZGHA/JhCZRweIc3nLGUQAROqxaVqNXChRtJBSza3yjUAoyKtq6efpAxpvD0pnN2lU14aCfnTtOV1tqb6Uv9eTaIJs7dAoJBG79gueI= X-Microsoft-Antispam-PRVS: <DM3PR12MB0860C96E1B9F0DBB6397747E87F80@DM3PR12MB0860.namprd12.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(520078)(8121501046)(10201501046)(3002001); SRVR:DM3PR12MB0860; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0860; X-Forefront-PRVS: 0801F2E62B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(66066001)(40100003)(122386002)(86362001)(106356001)(48376002)(50226001)(19580405001)(42186005)(105586002)(19580395003)(2351001)(450100001)(2950100001)(229853001)(50986999)(77096005)(101416001)(1096002)(189998001)(36756003)(5001960100002)(586003)(3846002)(5008740100001)(5003940100001)(81156007)(110136002)(50466002)(5004730100002)(97736004)(76176999)(47776003)(87976001)(6116002)(92566002)(217873001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0860; H:sweethome.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR12MB0860; 23:aTdcZ+u2is+bJtyVtEwg5YFwEk2rS2NXcRAW1yWt2?= =?us-ascii?Q?vmmQUPsl2IGs/scWPJT0AETFtwVz/2bvbNehlQpd9TKSYVMVCYoboP5qBgbg?= =?us-ascii?Q?+MLfDrj4A2PY5QGl+7JFG+iys24CGFM1sZ0wTnEIT29SAiacPbnBbrzUf0BK?= =?us-ascii?Q?F8jKllSu64tQ3pAzbXUyk9DmFnHUxpGxcUvmIyVziecrA1flxe6PuScc77uS?= =?us-ascii?Q?6ofZqxXoFmghJGWJfdfXP+iX6tgt5hhQlmF9+BQxXyjyEllH63UDpvVFOmJR?= =?us-ascii?Q?ndo3mnoGvpefWGhjNj12orCD3NY6jzWE36lvQH384bZPtBNc1BNF1vMA1jou?= =?us-ascii?Q?6w6X+is65iFZi+tEZcsAjV6csR7PIhxbJgeUsdEN6ZKMVt1T1vdJDhijPJmh?= =?us-ascii?Q?tJEeX3+FExxxdkRFSRVGo73n2zy7nK0VpiPgzg+US11hj0e9vyD4z41Mx1ci?= =?us-ascii?Q?91V0xRt7DF22gcdUHFd797Dh9I3LeWB5XtqLGnFPXyH7icRu6WSxxgK+Aepl?= =?us-ascii?Q?GQ6F6P76U4fJpp4Q8Bd0xDRlyOFTv3qMaaLP/Hefes3mYD3FVoVAQBLN9r1M?= =?us-ascii?Q?gMrxCJbpJE819rbYQZIlZqlXIJ7aKl4InWvuLTJcILMNuEUF4M3a7wPJqT5/?= =?us-ascii?Q?y0+xHbCtTbtqexjiXziIWIpd0HlnFODuXCSuyCnDDURE9xbq/Sou4saz1rw2?= =?us-ascii?Q?Um4ggzJQXxfeHDEuNdSuztXpBGgWjvAdQ7n7vqe59kegcSzFQIMQcAoj1ZaG?= =?us-ascii?Q?ofm7I1y6vMmtIO8vyNMdIiT5BipJ8gWnp/mhsQUbc8qgiGuxQe7+No8YTMNq?= =?us-ascii?Q?3DNsMM61V9kI3nSTtIuLo/v1YTV5asYXHX2dgWAcjJBf2RKih3K1Mgne7YhS?= =?us-ascii?Q?oyEmv/4XCegDo79HLhui/RZKnR3RpuL1jg5USOak6+jguGvuO3uhKg2rirS4?= =?us-ascii?Q?X/DnxS+Oo/is2lCvcQJC4AxxUFMbFidU4tbcmAn/V32ZF1RezIHi3ZunAu8Q?= =?us-ascii?Q?XAoimi3Yc5/Vqnee+Tk9KTuQGiD18eObtrCtiYB0mEL/OaRidOEGzSOKqJRM?= =?us-ascii?Q?uZmJjs=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 5:b7HEeoJLde1fSSyrBHs1un/MklZ5Pbl14m43H8HDok7Up60ua+qHRhr6kxul9fKTBpg3Sfh6VdgnfIpX60howMVepbA/ILRm9POYQf9xuvRyXIALbF2kK7EyEexcwHeP3/5QLu3kJIsYY50iftH02A==; 24:xSwa4QtzxdcC5/jzz3QW1vOlJnjWlG4uGoRIt07MtPEoxtZrYAEMilSHt/xhuSgm8tinow2XUpSoHry6gEgO29ncyjsn9RROwxzDSNIato0=; 20:j/XF7StEEJRbT0xMiADpkRq3t4DmfR39y3adNUR5b3v/RtfBKF4jvz7sTzSua9EaLW1b2iiodCTU7iIqgXtbKLOd7zfI9c2FnyC+oCpUoe4l05xX/XaQddR/iqoBwfziK9twA9sWG36JlbL5jIIkG7JMCKioK97/k17si33CWPaUWItTpRU2rd0N2SRoB73yVJiearoOWX5TEUB+aNTZdlPeY2XVvdD/lsJSWtqQzDHWppEUClLu/tpVUoqZEsPV X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2015 08:16:24.1503 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB0860 X-Mailman-Approved-At: Tue, 29 Dec 2015 02:54:15 -0800 Cc: Mykola Lysenko <Mykola.Lysenko@amd.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <http://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <http://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <http://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c index d04437e..fd72d9b 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -982,17 +982,17 @@ static struct drm_dp_mst_port *drm_dp_get_port(struct drm_dp_mst_branch *mstb, u static u8 drm_dp_calculate_rad(struct drm_dp_mst_port *port, u8 *rad) { - int lct = port->parent->lct; + int parent_lct = port->parent->lct; int shift = 4; - int idx = lct / 2; - if (lct > 1) { - memcpy(rad, port->parent->rad, idx); - shift = (lct % 2) ? 4 : 0; + int idx = (parent_lct - 1) / 2; + if (parent_lct > 1) { + memcpy(rad, port->parent->rad, idx + 1); + shift = (parent_lct % 2) ? 4 : 0; } else rad[0] = 0; rad[idx] |= port->port_num << shift; - return lct + 1; + return parent_lct + 1; } /*
This fix is needed to support more then two branch displays, so RAD address consist at least of 2 elements Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com> --- drivers/gpu/drm/drm_dp_mst_topology.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)