From patchwork Fri Apr 12 16:05:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 10898677 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C4EB922 for ; Fri, 12 Apr 2019 16:05:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 821E428EA4 for ; Fri, 12 Apr 2019 16:05:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 76C8928EB6; Fri, 12 Apr 2019 16:05:45 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 25A2828EA4 for ; Fri, 12 Apr 2019 16:05:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 01D57899A5; Fri, 12 Apr 2019 16:05:44 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-eopbgr750043.outbound.protection.outlook.com [40.107.75.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id DBD26899A3; Fri, 12 Apr 2019 16:05:42 +0000 (UTC) Received: from DM3PR12CA0108.namprd12.prod.outlook.com (2603:10b6:0:55::28) by BYAPR12MB2966.namprd12.prod.outlook.com (2603:10b6:a03:d5::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1792.19; Fri, 12 Apr 2019 16:05:41 +0000 Received: from BY2NAM03FT043.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::204) by DM3PR12CA0108.outlook.office365.com (2603:10b6:0:55::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1792.16 via Frontend Transport; Fri, 12 Apr 2019 16:05:40 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by BY2NAM03FT043.mail.protection.outlook.com (10.152.85.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1771.16 via Frontend Transport; Fri, 12 Apr 2019 16:05:40 +0000 Received: from SATLEXDAG04.amd.com (10.181.40.9) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.389.1; Fri, 12 Apr 2019 11:05:39 -0500 Received: from leodev.amd.com (10.180.168.240) by satlexdag04.amd.com (10.181.40.9) with Microsoft SMTP Server id 14.3.389.1; Fri, 12 Apr 2019 12:05:38 -0400 From: To: , Subject: [RFC 0/2] Add AUX device entries for DP MST devices Date: Fri, 12 Apr 2019 12:05:29 -0400 Message-ID: <1555085131-8716-1-git-send-email-sunpeng.li@amd.com> X-Mailer: git-send-email 2.7.4 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)(39860400002)(396003)(376002)(136003)(346002)(2980300002)(428003)(199004)(189003)(53754006)(2906002)(2870700001)(5660300002)(8936002)(106466001)(105586002)(53416004)(81166006)(8676002)(81156014)(2876002)(36756003)(50226002)(50466002)(68736007)(86362001)(478600001)(72206003)(966005)(54906003)(110136005)(6306002)(316002)(47776003)(97736004)(186003)(86152003)(476003)(426003)(126002)(356004)(486006)(336012)(2616005)(6666004)(53936002)(7696005)(23676004)(66574012)(26005)(305945005)(4326008)(5820100001)(77096007); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB2966; H:SATLEXCHOV01.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 43c3d047-e946-468e-bcbb-08d6bf60b5c6 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600139)(711020)(4605104)(2017052603328); SRVR:BYAPR12MB2966; X-MS-TrafficTypeDiagnostic: BYAPR12MB2966: X-MS-Exchange-PUrlCount: 1 X-Microsoft-Antispam-PRVS: X-Forefront-PRVS: 0005B05917 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: mfUqdkIp/IQcraOVf4p8DOdumMRqS77xfDWQLYVo1XKkBjwGTJRePtsleIvrmKc+/caryyS7oj2VWY8N3O1WZVVUzgDyiPVHUlmmVqFj+nW10/minvrJXCMiySO9tuSyPOvhSMy3yL9wTBTggfDbemSZRMYHMsb+GHBBu9k9caLNbAvuEgEqPf3kYsWRb1Ygb0nE18SGOgrAnQnFyBBMZSjx1gRdKKzNxMMj/TKNP4ZO9NF4vUqda6Di7Vt1p22YvIRvXk6FtqMuPj3ua7jaRtSPhqB9DI+hsfE8SjZSzljsQmzsDVWhYlqF+kiKkwhDX/13JfB2vtUrbdx9bvkoSCoQzdrc1PgDWETVgBWdeEVm1BeOFChiO4NqrPOVbttBh6D1xStAHUWQDEJhT9jrDyPB3IEPZI1zorxO5rnsBCY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2019 16:05:40.4207 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 43c3d047-e946-468e-bcbb-08d6bf60b5c6 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=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB2966 X-Mailman-Original-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:X-MS-Exchange-SenderADCheck; bh=WgP0FGMqpfK1EMeKxW1aAi5JfDqXBsDWdKx/PH9qTp0=; b=lylk65RAPlgNTwIGbK3tlmrEBDkvD4P39yHQ1xR7ny7qkdkXqdRprdvYVIjJ/fLF2HaCKK0cj8S8huukS5rBBKbDaIzHxfYowC7AUSUOIgtmK2epjYw6Mxo5+k90jPhxTQGIUgk3xR5Ldj1loTYcHD/dfEGwxaGnESLJe13dBJM= X-Mailman-Original-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; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Leo Li , jerry.zuo@amd.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Li Hi all, This is a follup to this change made by Ville to add MST aux nodes: https://github.com/vsyrjala/linux/commit/cac63f799ee2f5fbbe4f0a375383f13e03d640a5 Patch 2/2 describes what I added on top. Sending as an RFC since there are some items I'm not certain on: 1) Only expose aux devices for physical ports. FWICT, only DPTX and DPRX can handle AUX transactions, leaving logical ports out. 2) Naming of exposed AUX devices. I'm not sure if the scheme implemented here is the best approach. Let me know your thoughts, Leo Leo Li (1): drm/dp_mst: Use non-cyclic idr, add suffix option for aux device Ville Syrjälä (1): drm/dp_mst: Register aux-dev nodes for MST ports drivers/gpu/drm/drm_crtc_helper_internal.h | 5 +- drivers/gpu/drm/drm_dp_aux_dev.c | 21 ++++-- drivers/gpu/drm/drm_dp_helper.c | 2 +- drivers/gpu/drm/drm_dp_mst_topology.c | 109 +++++++++++++++++++++++++---- include/drm/drm_dp_helper.h | 4 ++ include/drm/drm_dp_mst_helper.h | 6 ++ 6 files changed, 125 insertions(+), 22 deletions(-)