From patchwork Tue Jul 23 23:28:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 11055451 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 E6CDB1399 for ; Tue, 23 Jul 2019 23:29:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D91C028741 for ; Tue, 23 Jul 2019 23:29:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CADFD28749; Tue, 23 Jul 2019 23:29:34 +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 7FDB228741 for ; Tue, 23 Jul 2019 23:29:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A059C6E3F7; Tue, 23 Jul 2019 23:29:31 +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-eopbgr820085.outbound.protection.outlook.com [40.107.82.85]) by gabe.freedesktop.org (Postfix) with ESMTPS id 9A8926E3E3; Tue, 23 Jul 2019 23:29:12 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WcyKJyTwJfC+KlsB1SQCVIuKBpakccjio5mpTK6Uunup8HPGO89SStoToIPZzJmaZoB0tmGCAswMmB7E8SKID+sFgUT07BVnmmLZG4DYVKx7/jcPhJVUXpmozGsgpDyFp7YX5/9dxKrHqtQmVZoL6rymU5eP0aY0CQL/fgYEWAk0zGoXm5iFJ3Mq7wrsxliIFvmVQiDWk7OMC1/oYkPq8LDCiDiY44PVpTf3yrJ4794tfp/d0fWFltDcM50Pm+Rom3tAH0MU3ZQxg1V8CocWcRTcwOXno92FdHlYFv7IP8XyHGxvD5qBvCBrTTwraBT+1SdFtv4cHbAuoyAgs305fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Hl2yLcIgazvjzdeTvxWcxAwsUFugSPa+9nidH+VzVGU=; b=ZC7RufMIjUIOsbqlT/3FK2t5oZCV80GMtdHwS+/lFg2q3OAhVTAxESlZgQe8E9+Ke0qNLSl8h8Lpgm4vMvBvoOExw7gf+Uq16s4qJHTMuYdOR4biMRceKdhgdJTxww4/pJn7aGFUTq17dPv4U8FxzETWFV+qbB+ZnbeKrzGI+NVwauGvrpWeWFhwK31JeafLpjwFdKge+W575isTkBCfIN3jJfvZjn35sCJrlU9fkRdBfeqygClVBPwpdrGDGIhc4UGBpQMt9T/SfUzxqE1Mkqtnw2eK5syOu2lxeti3rjVroaMdchGvqNLYGfsvbZMG+6VH4O08AxrGbnF99CK/4Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=none (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.intel.com smtp.mailfrom=amd.com;dmarc=permerror action=none header.from=amd.com;dkim=none (message not signed);arc=none Received: from CY4PR1201CA0018.namprd12.prod.outlook.com (2603:10b6:910:16::28) by DM5PR12MB1579.namprd12.prod.outlook.com (2603:10b6:4:c::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.15; Tue, 23 Jul 2019 23:29:10 +0000 Received: from DM3NAM03FT038.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::203) by CY4PR1201CA0018.outlook.office365.com (2603:10b6:910:16::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.12 via Frontend Transport; Tue, 23 Jul 2019 23:29:10 +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 DM3NAM03FT038.mail.protection.outlook.com (10.152.83.95) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.2052.18 via Frontend Transport; Tue, 23 Jul 2019 23:29:10 +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; Tue, 23 Jul 2019 18:29:06 -0500 From: To: , Subject: [PATCH 7/9] drm/nouveau/kms/nv50: Implement MST Aux device registration Date: Tue, 23 Jul 2019 19:28:06 -0400 Message-ID: <20190723232808.28128-8-sunpeng.li@amd.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190723232808.28128-1-sunpeng.li@amd.com> References: <20190723232808.28128-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)(39860400002)(376002)(396003)(346002)(2980300002)(428003)(199004)(189003)(68736007)(8936002)(50226002)(478600001)(110136005)(81166006)(81156014)(54906003)(47776003)(356004)(48376002)(2906002)(50466002)(1076003)(2870700001)(316002)(305945005)(70586007)(476003)(53936002)(76176011)(86362001)(5660300002)(51416003)(8676002)(336012)(2876002)(486006)(26005)(186003)(36756003)(49486002)(126002)(446003)(2616005)(4326008)(70206006)(426003)(11346002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1579; 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: 7ebe039d-03a2-4ced-61a3-08d70fc5909e X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:DM5PR12MB1579; X-MS-TrafficTypeDiagnostic: DM5PR12MB1579: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:110; X-Forefront-PRVS: 0107098B6C X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 2vTP26h2TM5C4S8eKBM+lO7Cru0vb1t4w92pLamvKqAZD2pmlP1mtmHX7wmnX8pTqsDvqko9PI7Fvu+E8MI0HMX/rZ1Xh/D0jNfhMGlYrq7WbAWXDcqixojftAEfv87ESu9Fk2n+RWvf5TJRMOxBv1oBlVts7nEt+x5jVvd4sSRtg7oMkHojDDeKU7zHaNVx0vdrYTxSFcSu1P7v9FR1qNa+QrzCY4OkaDhaly+gcFZD0zP6D28xAVt8bQWDPHu9fY68EOYdY5vq6Hh1dfudatsOwcNwzziCKI4lvXWfbdlsyYBxpkzi/NcnuU2tkRT76Bt1WEuI9xuaYssmOpDSMUtHc9qtORv11bxfoQ/ZWUJb+peBBOYwefL9uQO08VRiKbSXXdCB62gTq5NIemOtKtEud4614F8HpnOUgZx+exk= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jul 2019 23:29:10.3235 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ebe039d-03a2-4ced-61a3-08d70fc5909e 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: DM5PR12MB1579 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=Hl2yLcIgazvjzdeTvxWcxAwsUFugSPa+9nidH+VzVGU=; b=K9yL+W0aNOu1obwnIlpiDbGFG5RufvIYNLwZIjZlY2x22bmLOZarEa8UXtO1g5i+pC7sdRtcSrmG3Yw1hTUaMf1BguevjCmrRwSW7c/7F68qleVVqmmX4cBnK9MbKNGaqQPryD86LjkUKMOL0v5Qk2GwZZcGGGAumpgg/FDHxoQ= X-Mailman-Original-Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; linux.intel.com; dkim=none (message not signed) header.d=none;linux.intel.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 , Ben Skeggs , nicholas.kazlauskas@amd.com 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: Ben Skeggs Signed-off-by: Leo Li Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/disp.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c index 8497768f1b41..0d6e9350ba44 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c @@ -1024,6 +1024,24 @@ nv50_mstc_destroy(struct drm_connector *connector) kfree(mstc); } +static int +nv50_mstc_late_register(struct drm_connector *connector) +{ + struct nv50_mstc *mstc = nv50_mstc(connector); + struct drm_dp_mst_port *port = mstc->port; + + return drm_dp_mst_connector_late_register(connector, port); +} + +static void +nv50_mstc_early_unregister(struct drm_connector *connector) +{ + struct nv50_mstc *mstc = nv50_mstc(connector); + struct drm_dp_mst_port *port = mstc->port; + + drm_dp_mst_connector_early_unregister(connector, port); +} + static const struct drm_connector_funcs nv50_mstc = { .reset = nouveau_conn_reset, @@ -1034,6 +1052,8 @@ nv50_mstc = { .atomic_destroy_state = nouveau_conn_atomic_destroy_state, .atomic_set_property = nouveau_conn_atomic_set_property, .atomic_get_property = nouveau_conn_atomic_get_property, + .late_register = nv50_mstc_late_register, + .early_unregister = nv50_mstc_early_unregister, }; static int