From patchwork Thu Jul 4 19:05:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Li X-Patchwork-Id: 11031859 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 911FE912 for ; Thu, 4 Jul 2019 19:06:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 81A8228A78 for ; Thu, 4 Jul 2019 19:06:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 762D228A7E; Thu, 4 Jul 2019 19:06: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 769A528A78 for ; Thu, 4 Jul 2019 19:06:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B301F6E3D2; Thu, 4 Jul 2019 19:06:37 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-eopbgr790080.outbound.protection.outlook.com [40.107.79.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2403A6E3C7; Thu, 4 Jul 2019 19:06:34 +0000 (UTC) Received: from BN8PR12CA0019.namprd12.prod.outlook.com (2603:10b6:408:60::32) by BYAPR12MB2854.namprd12.prod.outlook.com (2603:10b6:a03:12c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Thu, 4 Jul 2019 19:06:32 +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:31 +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:31 +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:23 -0500 From: To: , Subject: [PATCH 07/10] drm/i915: Implement MST Aux device registration Date: Thu, 4 Jul 2019 15:05:16 -0400 Message-ID: <20190704190519.29525-8-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)(346002)(376002)(396003)(136003)(39860400002)(2980300002)(428003)(199004)(189003)(68736007)(2870700001)(77096007)(110136005)(26005)(36756003)(2876002)(14444005)(76176011)(2906002)(8676002)(54906003)(5660300002)(486006)(186003)(49486002)(47776003)(50466002)(51416003)(81156014)(81166006)(305945005)(476003)(86362001)(446003)(11346002)(426003)(2616005)(72206003)(8936002)(478600001)(70206006)(4326008)(316002)(336012)(70586007)(50226002)(48376002)(53936002)(1076003)(126002)(6666004)(356004); DIR:OUT; SFP:1101; SCL:1; SRVR:BYAPR12MB2854; 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: 2d68e1c3-d5b9-4eae-ec01-08d700b2b9a1 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(2017052603328); SRVR:BYAPR12MB2854; X-MS-TrafficTypeDiagnostic: BYAPR12MB2854: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1332; X-Forefront-PRVS: 0088C92887 X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Message-Info: 2ACy4uQfEPUXKYjfj8pJ4d0/+p2keLpDCbdehZO8STOW3rbyi0v9pjDiaUW73MBzPD3LKYsBQKrJeR4vlQEm3HhrSRdZ5wzco+gPO8vDe9QGFLnxCrJpgjRpp4MckdHzgQ6ci2cD5eUCc1rPkdnKwuG/g1eEnOvLou6p6IIAT9JvA6K4m4L/hKhteRYCTmEQmlucdiQKIWIZ2rvRhoCZ7vI6CutmuI7iKHKJ5PKQQ36Tch4egxdAHHgrYrtzWtl8ADSJFPxWSfP81aHFRmIjrMCuEMJachuLbz6GdpIYOdDwI06rb5EjCS+ggd1/4wiFxj1FuhMIVNXJ6uFTaMZPGMGHQj8/ocKF0QCroeeT06RvmqMr3/9dXmG36F1fM+jpShS4v0slRO9ZHrMumcbSCcnCH4nebxzvBI+0ieYbGnY= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jul 2019 19:06:31.1427 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2d68e1c3-d5b9-4eae-ec01-08d700b2b9a1 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: BYAPR12MB2854 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=P/xbAwEqipqurBk+/l7aEwleZzUyoatfx9xtGXdQdiI=; b=Sw3wpjKxHmHYnU18hVdlQTwSFpwUhjroLPj8kh2OhWqzgh4mD2tQKkxhmRfc/zKuZqEy7AsyVawXKozDRL5YoZx1hVtBqEDiuIHFTWU/YdW5NVwfjqrTctt28MWEKn7vQf76HnLR2e2FWyZmn1Nk7IXrfzRGokLFGvr6QDNUB60= 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 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. Signed-off-by: Leo Li --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 29 +++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 60652ebbdf61..be309016f746 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -400,13 +400,38 @@ intel_dp_mst_detect(struct drm_connector *connector, bool force) intel_connector->port); } +static int +intel_dp_mst_connector_late_register(struct drm_connector *connector) +{ + struct intel_connector *intel_connector = to_intel_connector(connector); + struct drm_dp_mst_port *port = intel_connector->port; + + int ret; + + ret = intel_connector_register(connector); + if (ret) + return ret; + + return drm_dp_mst_connector_late_register(connector, port); +} + +static void +intel_dp_mst_connector_early_unregister(struct drm_connector *connector) +{ + struct intel_connector *intel_connector = to_intel_connector(connector); + struct drm_dp_mst_port *port = intel_connector->port; + + drm_dp_mst_connector_early_unregister(connector, port); + intel_connector_unregister(connector); +} + static const struct drm_connector_funcs intel_dp_mst_connector_funcs = { .detect = intel_dp_mst_detect, .fill_modes = drm_helper_probe_single_connector_modes, .atomic_get_property = intel_digital_connector_atomic_get_property, .atomic_set_property = intel_digital_connector_atomic_set_property, - .late_register = intel_connector_register, - .early_unregister = intel_connector_unregister, + .late_register = intel_dp_mst_connector_late_register, + .early_unregister = intel_dp_mst_connector_early_unregister, .destroy = intel_connector_destroy, .atomic_destroy_state = drm_atomic_helper_connector_destroy_state, .atomic_duplicate_state = intel_digital_connector_duplicate_state,