Message ID | 1451031288-40242-3-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@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DFE2A9F350 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EA8C620259 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 9890620254 for <patchwork-dri-devel@patchwork.kernel.org>; Tue, 29 Dec 2015 10:54:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E0C786E07F; Tue, 29 Dec 2015 02:54:15 -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-by2on0095.outbound.protection.outlook.com [207.46.100.95]) by gabe.freedesktop.org (Postfix) with ESMTPS id 888E86E219 for <dri-devel@lists.freedesktop.org>; Fri, 25 Dec 2015 00:16:30 -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:27 +0000 From: Mykola Lysenko <Mykola.Lysenko@amd.com> To: <dri-devel@lists.freedesktop.org> Subject: [PATCH 2/2] drm/dp/mst: fix in RAD element access Date: Fri, 25 Dec 2015 16:14:48 +0800 Message-ID: <1451031288-40242-3-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:qPBAH1mBxzQyYFCsbHlQnjuvwWjOdus+h5y1EbIzgMaywDjwRGLCV8RZ+K0CbLkQgCFnowD2GqL2Z1FQEhWFI/FZcAJLvGMRSPL6GnZ7DblHAdzE/n3vXP3K1oyGvRVDlK6L/e31riCh54BzWmHQhg==; 3:0iVJDZC/ZN9UsWPqddPAnW+gLRYwUPd2hSC8zVImePc/qMPiKI0ycsy4K93l/lvIFoz+Lxx4UACgdcRcNp6EZ8Qgiz0taPSUdb+/DdB3w5U2JlcucYklDjVacD1E7ZMW; 25:rIMhsu0Yz+h1m8xiMWJaLD/+t87L8BFoX7/aHZfBpiDezG8h4b3l6EY2xd8axWWxCWtKZFW0wFAWWTYAgX70F92LNJQF29bUKsXLCB2V54Hqmh/2rjZgSa8wdXT2Hgla6vF2Rf0naYEm3QNogJKclJeHrgXYXNkdaVZQ/Y6OT1yToxByPqeS6coy8P0oJt71u8Xai1W8hUgqPmedExty2tnnACMVF9Jc7T4BunSQ7ceD3iRTp14sR+3EwhpOLhJjoNOuTTP6AfhC6ukVQ35jHA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM3PR12MB0860; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 20:fn8LlKHSW+X21myYNEMviS1vPKKm+eUe2SzG8UT88HlPxj+jyFLAdPEzexSRXMhhZwsEtE9izc2Y7SAJwX7EQ3PIB57pd06f6HEkfqlzNmDj3XFLO3tL0nPNzVhsCU+MXQvicHDvolCizJVUA8LQ9OToMIL8O5JaajpUaGB0uzdiiHa54OTO8oljSEwppmlnNZhXgnsxu2/6dxxs1VDOu0dKJskmTBa2ODk8s58f+ZFG92S+9L6cbSKYZZT7vOdaS9jGa6lL28+YNCuoKmEFoht7Meyyg8j0Cyzx73BJSTSaaydoSBaThS35v+nlaxDNm3hO9Ewbzro4/2nkzgRDCKYsthxH4AHtRk0s/fHdff48O5uvC8mps3Gm0fzaj/x8h9c9aeJVEozj3Fhh2rxwKKX0xhC5Y0Nw0ZTSPj8EvaJ8juuNgWp4RCAQ+fldhULwWjctfGTo/Opb0qLepx2Yluz7g2eFHdOTGoVwekPTxQLIKt3hOstUL45qC9L9VSD+; 4:cOlb06WMNDVGUJweER1xOjTso+WHvckfCCHMJuiI7etOODH79RaBCkhXIGGFHTWAU9FjZrhUV7fe1dKeGZo4qe4F6UKWAxvCohsG+gIs9+DKRGJvu6TcUiPeDkL1rbLs5UY8/tS7LrgJcxKN15yXo8DlA33HfDRTdwVn5V87eDJT+ujwVIHYcPnt8nhublMMQoYIrjIncI6M7Fj32z1ocdivIzdTy8Yj0sGH7qEtjIFUV1LgJAq1iqsu70ZebyzXbzdAls+YBIqRpEZWTdmj5SBxS47mTLNPfVHHUz6/zdAm9IDkEbcECkzx3d9Ao2GQoc1OJVYv6m7vZvqzSQtbQ/LhAATB3KElF6q3OlGspJRqQmztVzQDZev7LdHaB5WZZZlya6ecJSSyVs8b5vtyxE7MzdXQ/i3sm8J1Y7L5WXw= X-Microsoft-Antispam-PRVS: <DM3PR12MB086040487D378E546E09723C87F80@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); 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:X0avXK9fUM1xy0TZpQPY9bwG9QLpkOp/fDs2YLgV5?= =?us-ascii?Q?IY+0mb5Koe49gGNH66+slv3eEHvOUXV29fp0dJ5gphLZ8SM26PF8WsUA3Pm5?= =?us-ascii?Q?bOQsr+D7iTel8IUapRqJqDnyGtkGI7pBJ7eb2V0HPZbfgPeyLSU3RBdqtl/8?= =?us-ascii?Q?ChS9vLhyRIpqhAmyT9gh0kyuEZOFFxag1dCBtYN6OqqCuQtchP+MCo5Xgs9B?= =?us-ascii?Q?49y9JJaPjp/mgbE7lobJtC4s3fBzMjf0Gv0wRC0IIDbwc4s6Ja60vPWNql41?= =?us-ascii?Q?l3nQPTnmWFDIQbbqXQDyug4e1JqetUsfX0iV1W5e4J6D+tAug25T8/i2L+tM?= =?us-ascii?Q?k26K2mIh8JsFGbTdcqV0ykugDj/33mOpx2o5VUpQjPwl/EkWaO0l81KzfR1V?= =?us-ascii?Q?nxQCDCX663GU6j50z0JXXCxC5UA3Zxrr7q+w4L/0ngTuvaecVp4XkWyBQK/t?= =?us-ascii?Q?OwN1KxDjwBCPtvmMb/+M9gFLOlnjuC28nJtX+Lx47Jy2J4JLpRm6k9/rRT5V?= =?us-ascii?Q?+rk878sHqff03Mqp7lw3yDVtl/94hphfrFI8ccl2KVteF35BMY5/fbneG6iK?= =?us-ascii?Q?yalHnWO3Guyx0lT3IyI73sG/EDFq0xwlTGLxoK/z8y64aVJaaqLhGoZVzq/O?= =?us-ascii?Q?OJx6bwI5IYRCIDY8llCvfNhS5K6WWnMs0mkaYYEwNF7tVK6rya81bqL3nKui?= =?us-ascii?Q?rnysewic4PlL8m+zbAhP41VPHVlOM3MfmR+OpfAWGgn3VT0qxLQc0ityRnQ8?= =?us-ascii?Q?i9YJgrPKi3y2K2wST8lrd2293EuOU7RA4G/wpHGo5JqX7XLYxupI7H+N+58b?= =?us-ascii?Q?eiUsIYnx+ZxMgkJ5gkszqsFw1T1bypYemHxreL+qkVoZKwJlSW973TAuGiAh?= =?us-ascii?Q?kMt97Vhx2vCZ67kYqmhYL4ljcoZz37QY+7Lshm2YmziOdw7ZnhPVBk3nCfkQ?= =?us-ascii?Q?PLpfV7DplVkGFkObTC+bmLzaLFDHcny+EO3V1uOkPPebizy/rLpYk79WXJk5?= =?us-ascii?Q?/lszPrN7T1wTonNOED6T9QwooCdedEmemTmadTMoQEhBw=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0860; 5:jO8cYl6OwoeWh9pUuHsP+Ox41ZPYnXQThS4GtLMDvStnsnjxG1fad8V6TsSLqm9MwhqY6qdNkEuF7mbYAiaoFijDhnpBMfaqVTIP+YOBOzrSSWS3XCY2suQyDfwWzZ0DDcJWv+VPqWLY1aSvV2IVSw==; 24:VXGAXSoHWVKmHbIVzLK211wOLqZSFQlhCeub9K0zhz119hvNTf07P1bNGkEK55EeJdVvG9nTgF8MryA/Ra4Y5H/w4Mh3jxXIrY9U6P8W2pM=; 20:cCGaJi0prsnt6zFWTwg57tXY7/LAvwNlHvf2KtztbyPTO2LccwzcjH0pa4aviP77VYYpEPKTthdRdOOs/rwS6vRYXEr1+03gm2BmH59eDmT0alxGtH1CA38dLqIteaXksXgd09o1V/7pfWPI2+YLR059JAN4yGo/DKwP3vxNecbbe/to2BY020ofjh0RxKNi9S1XKetLke069fq1grhF+3ZheBKLWkxq0LiRzh4+nlTNguJRboZRBruFmGCSMKlo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Dec 2015 08:16:27.9160 (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 fd72d9b..3880d13 100644 --- a/drivers/gpu/drm/drm_dp_mst_topology.c +++ b/drivers/gpu/drm/drm_dp_mst_topology.c @@ -1048,7 +1048,7 @@ static void build_mst_prop_path(const struct drm_dp_mst_branch *mstb, snprintf(proppath, proppath_size, "mst:%d", mstb->mgr->conn_base_id); for (i = 0; i < (mstb->lct - 1); i++) { int shift = (i % 2) ? 0 : 4; - int port_num = mstb->rad[i / 2] >> shift; + int port_num = (mstb->rad[i / 2] >> shift) & 0xf; snprintf(temp, sizeof(temp), "-%d", port_num); strlcat(proppath, temp, proppath_size); } @@ -1197,7 +1197,7 @@ static struct drm_dp_mst_branch *drm_dp_get_mst_branch_device(struct drm_dp_mst_ for (i = 0; i < lct - 1; i++) { int shift = (i % 2) ? 0 : 4; - int port_num = rad[i / 2] >> shift; + int port_num = (rad[i / 2] >> shift) & 0xf; list_for_each_entry(port, &mstb->ports, next) { if (port->port_num == port_num) {
This is needed to receive correct port number from RAD, so MSTB could be found Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com> --- drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)