From patchwork Wed Sep 27 19:46:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harry Wentland X-Patchwork-Id: 9974637 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 8327C60365 for ; Wed, 27 Sep 2017 19:47:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C6832930E for ; Wed, 27 Sep 2017 19:47:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 60F0929312; Wed, 27 Sep 2017 19:47:03 +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.1 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham 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 D36392930E for ; Wed, 27 Sep 2017 19:47:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF13A6E05B; Wed, 27 Sep 2017 19:46:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0055.outbound.protection.outlook.com [104.47.32.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1E126E7F4; Wed, 27 Sep 2017 19:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=LzIgMalQovIXOWkMjEYvh5FaxW2AqwDv+bdIr6ejcrE=; b=cPiBYlfKTOVQ8rFxgbLIvwRrIpCjYxKsXXuncmDRwZlEcpQGCL+OiUoQL+W596inGfsN/VS6nqz0HY2SdCLAabmg9HrvCZKzrCn0PCLt/u9nnuBxIzaMKpb/lXGW4hWXOUAd5WE4Vo0QnGu1OvNu1q4Ny202jgkJ79k6TF8CqdE= Received: from BN6PR1201CA0008.namprd12.prod.outlook.com (10.174.238.18) by BN6PR12MB1443.namprd12.prod.outlook.com (10.172.24.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 27 Sep 2017 19:46:52 +0000 Received: from DM3NAM03FT021.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::207) by BN6PR1201CA0008.outlook.office365.com (2603:10b6:405:4c::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.9 via Frontend Transport; Wed, 27 Sep 2017 19:46:51 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT021.mail.protection.outlook.com (10.152.82.187) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.56.11 via Frontend Transport; Wed, 27 Sep 2017 19:46:51 +0000 Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server (TLS) id 14.3.361.1; Wed, 27 Sep 2017 14:46:47 -0500 Received: from localhost.localdomain (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.361.1; Wed, 27 Sep 2017 15:46:47 -0400 From: Harry Wentland To: , Subject: [PATCH 3/3] drm/amd/display: DC I2C review Date: Wed, 27 Sep 2017 15:46:41 -0400 Message-ID: <20170927194641.29146-4-harry.wentland@amd.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170927194641.29146-1-harry.wentland@amd.com> References: <20170927194641.29146-1-harry.wentland@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(39860400002)(2980300002)(428002)(199003)(189002)(305945005)(1076002)(72206003)(76176999)(106466001)(2950100002)(5003940100001)(6666003)(4326008)(478600001)(105586002)(101416001)(81166006)(81156014)(8676002)(8936002)(48376002)(50466002)(33646002)(50226002)(2906002)(5660300001)(36756003)(356003)(47776003)(86362001)(68736007)(110136005)(316002)(97736004)(54906003)(16586007)(49486002)(53936002)(77096006)(50986999)(189998001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR12MB1443; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3NAM03FT021; 1:2m1PmUZlW9wfSq8Te0MwrIBIZ/+K58eZzMrlIHV5yI15T7ENh2UlawWiVBYFyjctZa4XgL7wQ/iADW0MJ5lt3qoqjO5FDZ5xRc/LMQp6ePSN6jK9CSyDI3QRRyOED9HC X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fe0a3279-3b83-44cf-56e3-08d505e07fd5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR: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midEMtLl04ar2taXH3A9ZuZ4oHWX+lg572z0+NKr8eAA2+XaDv9TeXmjEY+X3gOLNVWn/3xJYDK8nAt1qUIAHjt0A17bqVR0QdxfkKbQsFbw1d0EKJyYJ1ApzyECzp36JKyuIakHeY6jpWpxwGynqkzS11TKj5KKLo1QDNAfuAjjEKKzJfaz2D02h1XYrYLO9ALqeVvx/WQbGV7U4T0xLMlaVRuL+gEmQXTceDf7RxlwKGqfMW2DWqAydZe6/JIaXWGDb8ysDC4QPnfsqg5LLmUphSCsh06U1tL+8ZtNcr+hJ3cK4R0OEoY66/tedL7pqi2tLoQ8jPCpCecCZZ5aR3I8m381Pcfdo6GXDO7hPNbiM82TmnOMfAXf/sVD7tmI4z2Tz3NCf2+uT1QN0EmifOSknVTPYjD0wpbWA410lNaMH3big+N/uP2Y904njPm01HHTpMH3JtgkKZImMH3BaYSK/4lZJa58RTFPJN9bw5veLcvODV6N86MZhzYy X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(100000703101)(100105400095)(93006095)(93003095)(3002001)(6055026)(6041248)(20161123555025)(20161123558100)(20161123560025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR12MB1443; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR12MB1443; X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1443; 4:4llbrgAnh8DKnIUMH5MKPCfGs32MpS4LtHf3jSahcZftYQ/ux13tJa/mZGg/qSL95/tBhV2DpZLZVQGGhaBaehRXI1hHJScn2pRALbAuLnlGXxMejclv+z+exZrnZQKHXd1thayL5g+1sFYoYMXDw3/1ubj0e9cx6o31ZRkd+5u34E6jLzMpF5xDO7vlSQxhvTB8xe4deS2G+vIcnbcd7pNcTj/OxGxVNP3qSPA68qc0Mjl790KasyHJFK9ri7Dlz2UGd6cUIZJLA7MIN/IA6yyd8Uz3PIjVSfKEUdPHSmw= X-Forefront-PRVS: 04433051BF X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR12MB1443; 23:2sDwt17SUWuF7zqc+FIiDxRQOPx/Id3KIuspYdPN9?= =?us-ascii?Q?NORk5Vk4Pq8kG9pzumk9oD2xZS423DBnq8BHJ6quARmvAjrMFFcR+QVw+1uT?= =?us-ascii?Q?tDym41Aj0VoueNFwi6sI8eIvS621UhwtisqkAC7pgnsJn1viqiVxD9dE5ANX?= =?us-ascii?Q?0Z6zMiGLZigf2B5qqopkjJW+803+oJhN1DgNPoj5X1QheywCOxr/3xAt5xKV?= =?us-ascii?Q?rUxryH1OF6AkX6emL/mRBM2AIFiQ75khiqTwtXYmsHEl8BBsBfw5+A1ws7IZ?= =?us-ascii?Q?kKsF/ewkSOo7LerOYbT34CgY0Pdf5Hq2Bvl6dze93Da1Z8/JDFcUM62XXOCO?= =?us-ascii?Q?z2YwXXr6bnR5TcfxlntahcIpNwm7fPqbVOf8Cy/RaBw+9t8XaV2eji3I+NEa?= =?us-ascii?Q?EpUep3fHRzfMAgjv3dzNDjtDac/3o2S4d0wMt4lhkwvfnItwbnAiAaSN3U8U?= =?us-ascii?Q?ac09uXgaQA22WV98S4eVYCpshaignAbE235/9Zm5BbUbPx+OWWT3P0PuwlfD?= =?us-ascii?Q?o84VRxMAkyhSdpvdFDmm1s2O6AWJaaQnMKn/oudBG9uAORuy/dR3EfGB61EY?= =?us-ascii?Q?ITJgfrlKzsEirKVQG3gHyWW9TGNW7eG+kF+RgaLK4Kk6nWv9P10A/dwAulx6?= =?us-ascii?Q?mEe2tfWcqojkSjNI43MZvrYWAo9qhW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4m7N7VxqzQDS/Xhkra/DFR1V8rxbe0W1LzJ/gy3im0RZjsAyiPL51s/aYjW3r8M7vj1rFGazcOYqlTUuvbXN2Io=; 7:8QCNYR2MRAq4Xa5141iXVeXF/SWOew7JARWg3+Bo56OSv5oQ1ecHVTRGTZWFFXcGCYywrQYLIP/2N+klBADr6SHKDv7b7n6+1yBCQ1N2q5QIEfd7rEfBgxE3mTCVn+vKT4Kai/6PLjciNJ/YKiBpw1Gn9UDMf7OaBf91TaLeAxciDbguaTfcOCffUq2q8Ciq+ANla6lkF7AbHMhNQZUVkxql8Td8gBNmIM5r+dpb1Fg= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN6PR12MB1443; 20:8kIVL8qlICcWXRqy7Ym1BJ0PHAQ8Ib0zj3ZD25GSSHee7PnfWEUL9njNW3HC/i3X+0PpT8RFTRIXYfwWjjm/I91CBR7pCy9jqWaxNKw68GoWxmIJVBlN6JUzDEqXDN5wqMat5ny76zeGT8nEl8XpzmpNlgsw00Pmdi5gETqywmiXLuWwMjJ0wV46UYGtt9gTVhqzoEBZ41hW5QjqTEOnc6DJ42J7MhgF1LBhu84OS2X8NanFKShvNUnvQ2qh7Gim X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2017 19:46:51.4075 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXCHOV02.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR12MB1443 Cc: alexander.deucher@amd.com, daniel.vetter@ffwll.ch, daniel.vetter@intel.com 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP While reviewing I2C in DC identified a few places. Added a couple to the TODO list. 1) Connector info read See get_ext_display_connection_info On some boards the connector information has to be read through a special I2C channel. This line is only used for this purpose and only on driver init. 2) SCDC stuff This should all be reworked to go through DRM's SCDC code. When this is done some unnecessary I2C code can be retired as well. 3) Max TMDS clock read See dal_ddc_service_i2c_query_dp_dual_mode_adaptor This should happen in DRM as well. I haven't checked if there's currently functionality in DRM. If not we can propose something. 4) HDMI retimer programming Some boards have an HDMI retimer that we need to program to pass PHY compliance. 1 & 3 might be a good exercise if someone is looking for things to do. Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/TODO | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/display/TODO b/drivers/gpu/drm/amd/display/TODO index eea645b102a1..981352bc95f0 100644 --- a/drivers/gpu/drm/amd/display/TODO +++ b/drivers/gpu/drm/amd/display/TODO @@ -62,20 +62,10 @@ TODOs ~ Daniel Vetter -11. Remove existing i2c implementation from DC - - "Similar story for i2c, it uses the kernel's i2c code now, but there's - still a full i2c implementation hidden beneath that in - display/dc/i2caux. Kinda not cool, but imo ok if you fix that - post-merging (perhaps by not including any of this in the linux DC - code in the upstream kernel, but as an aux module in your internal - codebase since there you probably need that, same applies to the edid - parsing DC still does. For both cases I assume that the minimal shim - you need on linux (bit banging and edid parsing isn't rocket since) is - a lot less than the glue code to interface with the dc-provided - abstraction." - ~ Daniel Vetter - +11. Remove dc/i2caux. This folder can be somewhat misleading. It's basically an +overy complicated HW programming function for sendind and receiving i2c/aux +commands. We can greatly simplify that and move it into dc/dceXYZ like other +HW blocks. 12. drm_modeset_lock in MST should no longer be needed in recent kernels * Adopt appropriate locking scheme @@ -110,3 +100,11 @@ guilty. stuff just isn't up to the challenges either. We need to figure out something that integrates better with DRM and linux debug printing, while not being useless with filtering output. dynamic debug printing might be an option. + +20. Move Max TMDS clock read to DRM. See +dal_ddc_service_i2c_query_dp_dual_mode_adaptor. I haven't checked if there's +currently functionality in DRM. If not we can propose something. + +21. Use kernel i2c device to program HDMI retimer. Some boards have an HDMI +retimer that we need to program to pass PHY compliance. Currently that's +bypassing the i2c device and goes directly to HW. This should be changed.