From patchwork Thu Jul 4 19:05:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 11031863 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 BAC0114C0 for ; Thu, 4 Jul 2019 19:06:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AB2A728A78 for ; Thu, 4 Jul 2019 19:06:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F44928A7E; Thu, 4 Jul 2019 19:06:48 +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 5158828A78 for ; Thu, 4 Jul 2019 19:06:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7C5796E3DB; Thu, 4 Jul 2019 19:06:41 +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-eopbgr820054.outbound.protection.outlook.com [40.107.82.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id E6CB36E3DB; Thu, 4 Jul 2019 19:06:38 +0000 (UTC) Received: from BN8PR12CA0019.namprd12.prod.outlook.com (20.178.208.32) by BN8PR12MB2851.namprd12.prod.outlook.com (20.179.64.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.16; Thu, 4 Jul 2019 19:06:35 +0000 Received: from DM3NAM03FT017.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::200) by BN8PR12CA0019.outlook.office365.com (2603:10b6:408:60::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2008.16 via Frontend Transport; Thu, 4 Jul 2019 19:06:35 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV02.amd.com (165.204.84.17) by DM3NAM03FT017.mail.protection.outlook.com (10.152.82.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Thu, 4 Jul 2019 19:06:35 +0000 Received: from localhost.localdomain (10.180.168.240) by SATLEXCHOV02.amd.com (10.181.40.72) with Microsoft SMTP Server id 14.3.389.1; Thu, 4 Jul 2019 14:06:24 -0500 From: To: , Subject: [PATCH 10/10] drm/amd/display: Implement MST Aux device registration Date: Thu, 4 Jul 2019 15:05:19 -0400 Message-ID: <20190704190519.29525-11-sunpeng.li@amd.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190704190519.29525-1-sunpeng.li@amd.com> References: <20190704190519.29525-1-sunpeng.li@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)(4636009)(136003)(376002)(346002)(396003)(39860400002)(2980300002)(428003)(199004)(189003)(110136005)(11346002)(54906003)(305945005)(8936002)(49486002)(50226002)(36756003)(53936002)(486006)(126002)(336012)(476003)(2616005)(446003)(4326008)(76176011)(14444005)(426003)(186003)(2906002)(48376002)(1076003)(8676002)(72206003)(77096007)(2870700001)(316002)(68736007)(5660300002)(50466002)(70206006)(47776003)(51416003)(2876002)(70586007)(26005)(6666004)(86362001)(81166006)(81156014)(356004)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN8PR12MB2851; H:SATLEXCHOV02.amd.com; FPR:; SPF:None; LANG:en; PTR:InfoDomainNonexistent; A:1; MX:1; X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0b446187-94f2-46df-7bb7-08d700b2bbfe X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:BN8PR12MB2851; X-MS-TrafficTypeDiagnostic: BN8PR12MB2851: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1091; X-Forefront-PRVS: 0088C92887 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: lcwwVuCWFANRzGQQlfLsl4MLgPGHI/3pgx2/nF5A1OTBi1IeYiGhGWtcqHxnkU2A/d6K6eAJErpRMVgnzJKhFH2JjTRARDHo5E8RPE7tyGfIOyGSENtJyOvesLRdBBknZ3ksrgcSASUA6QwIqRXlL31esBPEaijf1gVCK8gyrodlsPrWc3GrfMF9uUKp7LUU+IX5+3kJI+wXBFcOWhj04iQ4xxHhFnaJ15SVuwo1sTJlOY8DquO68k5vw4H5Cy9I9QW3bF9arAF2HwWkMhpqCRYrf28wQjyWApKQvp1Txgq24AA5PeHZqPpmrVAGT43FG5jraWfE+9ArQJszbifDnOm2XXDN/qub/ptYY1eeY1J+BijfNemDgv+/2klNRUBtX1L8sXXrxT6AmsXE3XxSK/6tZI5BF9yH1J/wR96/Zfs= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2019 19:06:35.1573 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0b446187-94f2-46df-7bb7-08d700b2bbfe 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: BN8PR12MB2851 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BGbz64FOm7IKpvZhMdz6SsYWNclo1MCz/vAqKmtOKkQ=; b=i2M8OtzvgnLKqv2xGfkvlRU8YfZLkG8lGrnTTcz9U0JqOwYVEwBYBzCwDqEBhxEuaW4sRaI0v/9o5pTh4tQJo3tCGUkcfVEgFpQsnQ1a5nVWsdjxOlvuBYW2QRi0FdKNKFkqJREGSXgkkgXVVsWNURTfxvLIcKWupDwxeSlg6X4= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; redhat.com; dkim=none (message not signed) header.d=none;redhat.com; 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 , Nicholas Kazlauskas Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Leo Li Implement late_register and early_unregister hooks for MST connectors. Call drm helpers for MST connector registration, which registers the AUX devices. Cc: Jerry Zuo Cc: Nicholas Kazlauskas Signed-off-by: Leo Li --- .../display/amdgpu_dm/amdgpu_dm_mst_types.c | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c index 53d2cfe62e13..16218a202b59 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c @@ -156,6 +156,26 @@ dm_dp_mst_connector_destroy(struct drm_connector *connector) kfree(amdgpu_dm_connector); } +static int +amdgpu_dm_mst_connector_late_register(struct drm_connector *connector) +{ + struct amdgpu_dm_connector *amdgpu_dm_connector = + to_amdgpu_dm_connector(connector); + struct drm_dp_mst_port *port = amdgpu_dm_connector->port; + + return drm_dp_mst_connector_late_register(connector, port); +} + +static void +amdgpu_dm_mst_connector_early_unregister(struct drm_connector *connector) +{ + struct amdgpu_dm_connector *amdgpu_dm_connector = + to_amdgpu_dm_connector(connector); + struct drm_dp_mst_port *port = amdgpu_dm_connector->port; + + drm_dp_mst_connector_early_unregister(connector, port); +} + static const struct drm_connector_funcs dm_dp_mst_connector_funcs = { .detect = dm_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, @@ -164,7 +184,9 @@ static const struct drm_connector_funcs dm_dp_mst_connector_funcs = { .atomic_duplicate_state = amdgpu_dm_connector_atomic_duplicate_state, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_set_property = amdgpu_dm_connector_atomic_set_property, - .atomic_get_property = amdgpu_dm_connector_atomic_get_property + .atomic_get_property = amdgpu_dm_connector_atomic_get_property, + .late_register = amdgpu_dm_mst_connector_late_register, + .early_unregister = amdgpu_dm_mst_connector_early_unregister, }; static int dm_dp_mst_get_modes(struct drm_connector *connector)