Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp958335imm; Tue, 3 Jul 2018 03:04:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfaTKvB7QbA1XBm7hgB01Ujix7TwfHuyHsMOAQGt7eeD1VvslbzM/kjvxKebkEf0sVzotvn X-Received: by 2002:a63:4811:: with SMTP id v17-v6mr3732035pga.379.1530612270654; Tue, 03 Jul 2018 03:04:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530612270; cv=none; d=google.com; s=arc-20160816; b=VMOM6t4JGZW34lFTcycrv6E9nIJx28MSSWIboePrrTplYxGsCpILnkZCaXWr8jhSl8 Ym3/Vb20JdhMVjVAU6t+rHvrZt8jt76SFGLI9+N3WNGoGQziHIdQ/1Qe91mhwgK6Qidb E9yX3+iFhdCHY2DJaihcG4gnZIUlxTMVRq9DQ1Ue4IkaQG/x+x8ENcIzUmV1ZkrLSngR 3oGVA57ULS5niGsIlEaOIgCK7+WiKYWSDCUxvhsTJVBVsDNq4r+o+wVfiAA3RF4KawjH IFploRGBgkH2052Ielu3rySdW3yPvqADFnv5nXf546JrjVh97S2aPDjcu48iN4Udpp/b KzTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature:arc-authentication-results; bh=h4wwCI/iTuSDTEo0aqXg8jkCrtX1dw4O3Qemzjs2l4o=; b=mCPpn9T4+XJjODw4Muvv6VL/59Y7EU5eS3RZC1vLVArI4BUQ6xlv0rfxe2Yob6CPHB Ki3Z3OMaQIGWZq/b5YlemmwnzPEjvHO5e/YgiIxOC/luS3/dXsk8MqSABcAMsm8mAvx3 652L0ruDKDgvlDCn/1qAg91hrA4+7qJULPmq9KubtiFJcDN6gOG9abaLqCXljofhbuhU EM+eKq8lsZdd7W4Kol1aL5mT9PQFTE7NjTa4v9mpOLWUgCRJa5cYQxCnS+Zzu9z5qycN I++G1O0M26NuADd8UM0d2GK521o33Zg7g1rnIpBt1WTWtbCRCCChzODB73mD2vJ1s8Tm EBHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@cadence.com header.s=selector1 header.b=ORyjSMRj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 23-v6si720619pgx.323.2018.07.03.03.04.15; Tue, 03 Jul 2018 03:04:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@cadence.com header.s=selector1 header.b=ORyjSMRj; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=cadence.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933746AbeGCKD1 (ORCPT + 99 others); Tue, 3 Jul 2018 06:03:27 -0400 Received: from mail-sn1nam02on0082.outbound.protection.outlook.com ([104.47.36.82]:56148 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933565AbeGCKDT (ORCPT ); Tue, 3 Jul 2018 06:03:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cadence.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=h4wwCI/iTuSDTEo0aqXg8jkCrtX1dw4O3Qemzjs2l4o=; b=ORyjSMRjpPpH/7hb9d6zHaWcRVNNA4So2EQzBp3jiQMl/dMV46x7NYmfklTPg9WL7uEB18MU8Y0duJXzEcw1RAlRDOqIUZzBM3aiN/65FQ+8IIZWMLqh5w1xFFgMlCNP8SesFDLDb9yqOJQGe7aJEcplYAE9PAQ1QDTDkZg6Des= Received: from BYAPR07CA0045.namprd07.prod.outlook.com (2603:10b6:a03:60::22) by SN6PR07MB4717.namprd07.prod.outlook.com (2603:10b6:805:3b::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.906.25; Tue, 3 Jul 2018 10:03:17 +0000 Received: from CO1NAM05FT030.eop-nam05.prod.protection.outlook.com (2a01:111:f400:7e50::200) by BYAPR07CA0045.outlook.office365.com (2603:10b6:a03:60::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.930.18 via Frontend Transport; Tue, 3 Jul 2018 10:03:16 +0000 Authentication-Results: spf=softfail (sender IP is 199.43.4.28) smtp.mailfrom=cadence.com; linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.com; dmarc=fail action=none header.from=cadence.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning cadence.com discourages use of 199.43.4.28 as permitted sender) Received: from rmmaillnx1.cadence.com (199.43.4.28) by CO1NAM05FT030.mail.protection.outlook.com (10.152.96.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.930.2 via Frontend Transport; Tue, 3 Jul 2018 10:03:15 +0000 Received: from maileu3.global.cadence.com (maileu3.cadence.com [10.160.88.99]) by rmmaillnx1.cadence.com (8.14.4/8.14.4) with ESMTP id w63A3Br2018940 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=FAIL); Tue, 3 Jul 2018 06:03:13 -0400 X-CrossPremisesHeadersFilteredBySendConnector: maileu3.global.cadence.com Received: from maileu3.global.cadence.com (10.160.88.99) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Tue, 3 Jul 2018 12:03:27 +0200 Received: from lvloginb.cadence.com (10.165.177.11) by maileu3.global.cadence.com (10.160.88.99) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Tue, 3 Jul 2018 12:03:27 +0200 Received: from lvloginb.cadence.com (localhost [127.0.0.1]) by lvloginb.cadence.com (8.14.4/8.14.4) with ESMTP id w63A3BIg029148; Tue, 3 Jul 2018 11:03:11 +0100 Received: (from dkos@localhost) by lvloginb.cadence.com (8.14.4/8.14.4/Submit) id w63A3A3k029141; Tue, 3 Jul 2018 11:03:10 +0100 From: Damian Kos To: David Airlie , Rob Herring , "Mark Rutland" , Gustavo Padovan , Maarten Lankhorst , Sean Paul , Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Damian Kos , , , , , CC: , , , "Quentin Schulz" Subject: [PATCH 03/12] drm/dp: add helpers for drm_dp_set_adjust_request_pre_emphasis and drm_dp_set_adjust_request_voltage Date: Tue, 3 Jul 2018 11:02:14 +0100 Message-ID: <1530612152-27555-4-git-send-email-dkos@cadence.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1530612152-27555-1-git-send-email-dkos@cadence.com> References: <1530612152-27555-1-git-send-email-dkos@cadence.com> MIME-Version: 1.0 Content-Type: text/plain X-OrganizationHeadersPreserved: maileu3.global.cadence.com X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:199.43.4.28;IPV:CAL;SCL:-1;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(396003)(376002)(136003)(39860400002)(346002)(2980300002)(3190300001)(199004)(36092001)(189003)(42186006)(476003)(105596002)(316002)(106466001)(305945005)(2906002)(26826003)(446003)(26005)(11346002)(2616005)(426003)(336012)(126002)(54906003)(486006)(16586007)(110136005)(5660300001)(50466002)(7416002)(69596002)(36756003)(4326008)(356003)(478600001)(87636003)(48376002)(50226002)(81156014)(8676002)(81166006)(8936002)(97736004)(76176011)(53936002)(47776003)(51416003)(186003)(86362001)(14444005)(2201001)(921003)(83996005)(2101003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:SN6PR07MB4717;H:rmmaillnx1.cadence.com;FPR:;SPF:SoftFail;LANG:en;PTR:ErrorRetry;A:1;MX:1; X-Microsoft-Exchange-Diagnostics: 1;CO1NAM05FT030;1:QP9ueWEQYatk+6zNn/43K7udpLn1Naay7SUwTIO1yZrI1POLx14B1IJt0syzTJvAiMWzD4KXcxQiR9ZCWNlYP3WP26rq3ch7IfIPQ9i82lwDk/NV+Ql7Yx3Jt29CoW51 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 99189246-8203-496a-b747-08d5e0cc320a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652040)(8989117)(5600053)(711020)(4534165)(4627221)(201703031133081)(201702281549075)(8990107)(2017052603328)(7153060);SRVR:SN6PR07MB4717; X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4717;3:VuSYRJqGExqyKL/16NJ2UIx287g0BpCZQMwOD+sCOMfmTFDBUitoe2TVlAqzJ8w3raYLInwQFJyra0b+9KB2ZzvirFmq13piGEAQgh0nT1UjW9atnhHekdVyiXpn0XnhCB14Y6TUexBCgko2rZQTmuSfCcsoiUDsl3WGcySBQrDO9bKifESxDpjZu/r2oQn/w9VNXlPJHEN+awEVIWJjxXRhcxnXx93HUdsW0jdCQofSYKxkFulqQ6l9gZQiltd2IK4DVfPG4o6G8zhzZ+U9m0p/zdaeGoZG1qxrvWxo0oWrCl/0PfmFgPrQylCax1RfqQ1hrLw7X5uy3PgJLecGEQ==;25:EQuyyrPDOwW8DA1s25mmM0BWxOqSmRNO7gMNQIhIkR4zmwBwzbLzxvbPHmbUAbuuySy9AUn9WvlWpBNRqt0M6k7taqRYDRWX2zdj+m09aLIXX1AgSoGPkMDTwHpKB2lkVoWjIgUGU+AM6I5yFaARTAX/jGNmSb/9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X79/xBxrCJt5OpeC05fYyAlG+rCcthXmgZ7Gcpm0nb/qHf3riLdSobG6xg1341M0HNdKdjBsH91BNCO1ESks9abWQeYswShMmVVongdgqQy1o3mk0Bv84uDJFvsLS/VeuNb99aXPOb7D7JQz9OZU5wW+Pgs7fQ+ACVCczx58ffjHuxK8jaJHGOBRaI99GoQfFo2X3jhnxAe4+op71Cb3ZMKLkMKxOk//5kk8Zp4xrkVtTqdyTx6iUzwiV6I30VCbOH8duc8x63Smq38JY5s= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(58145275503218)(72806322054110); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(93006095)(93003095)(10201501046)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123558120)(20161123562045)(6072148)(201708071742011)(7699016);SRVR:SN6PR07MB4717;BCL:0;PCL:0;RULEID:;SRVR:SN6PR07MB4717; X-Forefront-PRVS: 0722981D2A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;SN6PR07MB4717;23:riC6+ClP9qMvuABCwM5EKVgXwkspJlgCn3ZtVBTKR?= =?us-ascii?Q?6uE39Ft484wYwdTg6rapJlRIZtaH2nsFcYrYdcPKs0KnsJwOWVLpnaXZTFVi?= =?us-ascii?Q?9qSH5kbx9pjaGSSgR5Iuj6aUhq+BQ6DsGbkenPLD7sH7gfiUgTEF7QYS5yHH?= =?us-ascii?Q?zYzU9vKsGmU84/A8CPqrkAWFy6/nT/n4xSVX7ktl8SvnO5962MZ50d8JM7Yq?= =?us-ascii?Q?8VL+j7RAoeNHbTG0Q0Wksd/PJDVsbnYJYpJtsblsLJ+Npt3UsEdpaA1H4f6O?= =?us-ascii?Q?ZfLivkjFraLKTiPcOKaozzdi2itTEh0cG8jycNVEAUx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KFw901kagFMAHrUH5U8K940++EL3HiSqmQVXFkegRhvTVjKn1fKyoDAa3FmOT0JoaH6QW49cBrla0T2VO/7W22p7uynqkvlABmP4cIfkx1QVrfL6oVeqvkSAHNhy5y6nKlk=;24:dep16G+K54msc0HsRQhgkxw81xt0E422pITrLFI9O3uSw/ZV46TsTl2PzdZHeeZi3T0SEHo4OZGl6ravrCFUWA2uNEzujjAZmkpuF9+NLt0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;SN6PR07MB4717;7:hy4BlkysM+PxMR3ENqhlaRF50C36v8VAca+pJ7Y79vJJxm5CwMvSsKQcqWeuhLf0H2nzPFOQ0AeKXu388MFPP41dQzGGzBFBXz8uB/qaOXQj76DCUvTKiaMAH/br7X2Y1RvF90745XVJ/omcnraQkcQH/GLOX39P3XDcPblQuNecMYFdxsS9+7pleR2HMfJZqzNdmj3JLT4kxKAPLLI+oYopzTJCeRkZuwJyPFMZDIVLVg1upBxWvhXRu80FbM1S;20:AKGE3ceuUc9Nfhcjw3QLI4n35vIARCb1zlrUWnjH3ykxMxUEGBgz7KuCSBwF1Ce0d7ay6s/9L5nbNYfgXKKZJZCVBpVckz+AQzlg1NchT3OyV7rWeZfel4yTKzmjlyCdJfb96aNvBwWeRKBjkuY7wWbK1iCVqpiYIEILIkoGlqVu+w35HNFLStt0mtKCmxt/OZxQYeXyOrI2hnQJX9oSPRKOdghhGwv3cu7pngSwiszwVcOOhC/r9FqSfBQAuTPA X-OriginatorOrg: cadence.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2018 10:03:15.4212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 99189246-8203-496a-b747-08d5e0cc320a X-MS-Exchange-CrossTenant-Id: d36035c5-6ce6-4662-a3dc-e762e61ae4c9 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=d36035c5-6ce6-4662-a3dc-e762e61ae4c9;Ip=[199.43.4.28];Helo=[rmmaillnx1.cadence.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR07MB4717 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Quentin Schulz We already have functions to get the adjust request voltage and pre-emphasis for a lane so it makes also sense to be able to set them so that we can then easily update them via a DPCD write. Add helpers for drm_dp_set_adjust_request_pre_emphasis and drm_dp_set_adjust_request_voltage that respectively set the pre-emphasis and voltage of a lane in the link status array. Signed-off-by: Quentin Schulz Signed-off-by: Damian Kos --- drivers/gpu/drm/drm_dp_helper.c | 28 ++++++++++++++++++++++++++++ include/drm/drm_dp_helper.h | 4 ++++ 2 files changed, 32 insertions(+), 0 deletions(-) diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c index 3bc2e98..ca2f469 100644 --- a/drivers/gpu/drm/drm_dp_helper.c +++ b/drivers/gpu/drm/drm_dp_helper.c @@ -120,6 +120,34 @@ u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SI } EXPORT_SYMBOL(drm_dp_get_adjust_request_pre_emphasis); +void drm_dp_set_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE], + int lane, u8 volt) +{ + int i = DP_ADJUST_REQUEST_LANE0_1 + (lane >> 1); + int s = ((lane & 1) ? + DP_ADJUST_VOLTAGE_SWING_LANE1_SHIFT : + DP_ADJUST_VOLTAGE_SWING_LANE0_SHIFT); + int idx = i - DP_LANE0_1_STATUS; + + link_status[idx] &= ~(DP_ADJUST_VOLTAGE_SWING_LANE0_MASK << s); + link_status[idx] |= volt << s; +} +EXPORT_SYMBOL(drm_dp_set_adjust_request_voltage); + +void drm_dp_set_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE], + int lane, u8 pre_emphasis) +{ + int i = DP_ADJUST_REQUEST_LANE0_1 + (lane >> 1); + int s = ((lane & 1) ? + DP_ADJUST_PRE_EMPHASIS_LANE1_SHIFT : + DP_ADJUST_PRE_EMPHASIS_LANE0_SHIFT); + int idx = i - DP_LANE0_1_STATUS; + + link_status[idx] &= ~(DP_ADJUST_PRE_EMPHASIS_LANE0_MASK << s); + link_status[idx] |= pre_emphasis << s; +} +EXPORT_SYMBOL(drm_dp_set_adjust_request_pre_emphasis); + void drm_dp_link_train_clock_recovery_delay(const u8 dpcd[DP_RECEIVER_CAP_SIZE]) { if (dpcd[DP_TRAINING_AUX_RD_INTERVAL] == 0) udelay(100); diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index a488af0..6e64b2a 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -946,6 +946,10 @@ u8 drm_dp_get_adjust_request_voltage(const u8 link_status[DP_LINK_STATUS_SIZE], int lane); u8 drm_dp_get_adjust_request_pre_emphasis(const u8 link_status[DP_LINK_STATUS_SIZE], int lane); +void drm_dp_set_adjust_request_voltage(u8 link_status[DP_LINK_STATUS_SIZE], + int lane, u8 volt); +void drm_dp_set_adjust_request_pre_emphasis(u8 link_status[DP_LINK_STATUS_SIZE], + int lane, u8 pre_emphasis); #define DP_BRANCH_OUI_HEADER_SIZE 0xc #define DP_RECEIVER_CAP_SIZE 0xf -- 1.7.1