From patchwork Wed Feb 28 11:09:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 129947 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp893068lja; Wed, 28 Feb 2018 03:10:13 -0800 (PST) X-Google-Smtp-Source: AH8x2248CnrGrYBd5333hjnDne83BiB41ocUdGNBMTd9NyyG3ghhyEHAY5/ZBps3CFarc7E/cxWo X-Received: by 2002:a17:902:9a98:: with SMTP id w24-v6mr17168870plp.188.1519816213588; Wed, 28 Feb 2018 03:10:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519816213; cv=none; d=google.com; s=arc-20160816; b=SDLChwENWttMrV5WBpqdE8Secld1KKhr+Phv8WjywOITDyeyP5fPvTaEzx75dRMg6P Z+eqyP48aWwzY6qwjzKwIrIBj7awst5I/Anqmouk4U/yM72vm+hvnvIyocG5HeBHvN4C qB+iXgVKjPd0AbZ9pvlPeeRpWDGGo4IRIhL1S3LAs17RsWQX++Enety6ROCyM/S+3a8l N2UXbRkDzYE8XOsx3kpi3C2oflOAl1vrTz84/v++nNt8k9McWRxZow1+PIDGSRaJFyWp KF9u1VvqyGaot4RFmPrxiR3MiFF2H48fKYGMY9xmf/OOUCS81ibYa532Pxf66o3naDer utoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=9t7nRxcEvq7n6ZtjdyOAauCkzF9LTADHPiODtdtaIxY=; b=ukaBQFhJfGseLm2qGCASDqnQiwbnGVhvGy9HygC9taLmEJd1qKGRKYktSJ+1nC0nxr mL35VJUkrQ+aiabekRCKAJ+Moz/2Kkyou6NpFvFxAy7PPapWr5RPkLeubHpUW6XILDQ7 5OUOy5T+q+g6u1Z1afHHvQ4wTZhuPG7XG1LY78TbrNqwZpGBMMtkz5v0Ga1jVfiA3so5 DLC++fA8VxSNAs24ILeYbCzJhTx5xTIZHlptEEnE6i2wfz3AB+gnMv/JSbqjrMMV27A6 PyArGg/gvDdGOdYsysBONU2REwLPMhw8i7l5rgNs9f3r/VUKnT38HE6cevcnh68TRT6M wAPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Ny6sgzOL; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id o6-v6si1121817plk.820.2018.02.28.03.10.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 03:10:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=Ny6sgzOL; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 321A46E93A; Wed, 28 Feb 2018 11:09:42 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6A9EB6E93A for ; Wed, 28 Feb 2018 11:09:38 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1SB9blu001482; Wed, 28 Feb 2018 05:09:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519816177; bh=B4paBGy+bhDDkLPdMzmlQkmmdzb471CUlIOGLG77Unk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Ny6sgzOLj38HFon0Xz1ywdIsQRGftKk/rYq4Nv1BjdiBiNfrkinKbuTgaLiDPozEc LLKwgmgx1U0fR6wU6nRaJpibCP+wnOYqEvdsEWxrRxaJBV3eFgk6YpFNqOnaXbmp7C ec/V9Rg1UJNfQn7WXVMK08fYzPe1v/MRbpOW3sus= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SB9ba5010498; Wed, 28 Feb 2018 05:09:37 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 28 Feb 2018 05:09:36 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 28 Feb 2018 05:09:36 -0600 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SB9WKF009418; Wed, 28 Feb 2018 05:09:35 -0600 From: Jyri Sarha To: Subject: [PATCH v2 1/2] drm/panel: Remove drm_panel_detach() calls from all panel drives Date: Wed, 28 Feb 2018 13:09:29 +0200 Message-ID: <94922d2b5feed117354b5c0a42b4b56f643f73d9.1519815150.git.jsarha@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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: airlied@linux.ie, Jyri Sarha , tomi.valkeinen@ti.com, thierry.reding@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Setting the connector and drm to NULL when the drm panel device is going away hardly serves any purpose. Usually the the whole memory stucture is freed right after the remove call. Signed-off-by: Jyri Sarha --- drivers/gpu/drm/panel/panel-innolux-p079zca.c | 1 - drivers/gpu/drm/panel/panel-jdi-lt070me05000.c | 1 - drivers/gpu/drm/panel/panel-lvds.c | 1 - drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c | 1 - drivers/gpu/drm/panel/panel-seiko-43wvf1g.c | 1 - drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 1 - drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c | 1 - drivers/gpu/drm/panel/panel-simple.c | 1 - drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 1 - 9 files changed, 9 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-innolux-p079zca.c b/drivers/gpu/drm/panel/panel-innolux-p079zca.c index 57df39b..bb53e08 100644 --- a/drivers/gpu/drm/panel/panel-innolux-p079zca.c +++ b/drivers/gpu/drm/panel/panel-innolux-p079zca.c @@ -292,7 +292,6 @@ static int innolux_panel_remove(struct mipi_dsi_device *dsi) DRM_DEV_ERROR(&dsi->dev, "failed to detach from DSI host: %d\n", err); - drm_panel_detach(&innolux->base); innolux_panel_del(innolux); return 0; diff --git a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c index 0a94ab7..99caa78 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c +++ b/drivers/gpu/drm/panel/panel-jdi-lt070me05000.c @@ -500,7 +500,6 @@ static int jdi_panel_remove(struct mipi_dsi_device *dsi) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); - drm_panel_detach(&jdi->base); jdi_panel_del(jdi); return 0; diff --git a/drivers/gpu/drm/panel/panel-lvds.c b/drivers/gpu/drm/panel/panel-lvds.c index b5e3994..e8bc356 100644 --- a/drivers/gpu/drm/panel/panel-lvds.c +++ b/drivers/gpu/drm/panel/panel-lvds.c @@ -282,7 +282,6 @@ static int panel_lvds_remove(struct platform_device *pdev) { struct panel_lvds *lvds = dev_get_drvdata(&pdev->dev); - drm_panel_detach(&lvds->panel); drm_panel_remove(&lvds->panel); panel_lvds_disable(&lvds->panel); diff --git a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c index 74a8061..cb4dfb9 100644 --- a/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c +++ b/drivers/gpu/drm/panel/panel-panasonic-vvx10f034n00.c @@ -299,7 +299,6 @@ static int wuxga_nt_panel_remove(struct mipi_dsi_device *dsi) if (ret < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); - drm_panel_detach(&wuxga_nt->base); wuxga_nt_panel_del(wuxga_nt); return 0; diff --git a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c index 71c09ed..75f9253 100644 --- a/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c +++ b/drivers/gpu/drm/panel/panel-seiko-43wvf1g.c @@ -292,7 +292,6 @@ static int seiko_panel_remove(struct platform_device *pdev) { struct seiko_panel *panel = dev_get_drvdata(&pdev->dev); - drm_panel_detach(&panel->base); drm_panel_remove(&panel->base); seiko_panel_disable(&panel->base); diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 6bf8730..02fc0f5 100644 --- a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c +++ b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c @@ -418,7 +418,6 @@ static int sharp_panel_remove(struct mipi_dsi_device *dsi) if (err < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err); - drm_panel_detach(&sharp->base); sharp_panel_del(sharp); return 0; diff --git a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c index 494aa9b..e5cae00 100644 --- a/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c +++ b/drivers/gpu/drm/panel/panel-sharp-ls043t1le01.c @@ -327,7 +327,6 @@ static int sharp_nt_panel_remove(struct mipi_dsi_device *dsi) if (ret < 0) dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", ret); - drm_panel_detach(&sharp_nt->base); sharp_nt_panel_del(sharp_nt); return 0; diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 3b0ba9f..5aa736c 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -364,7 +364,6 @@ static int panel_simple_remove(struct device *dev) { struct panel_simple *panel = dev_get_drvdata(dev); - drm_panel_detach(&panel->base); drm_panel_remove(&panel->base); panel_simple_disable(&panel->base); diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c index 358c64e..74284e5 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c @@ -419,7 +419,6 @@ static int st7789v_remove(struct spi_device *spi) { struct st7789v *ctx = spi_get_drvdata(spi); - drm_panel_detach(&ctx->panel); drm_panel_remove(&ctx->panel); if (ctx->backlight) From patchwork Wed Feb 28 11:09:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 129945 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp892603lja; Wed, 28 Feb 2018 03:09:45 -0800 (PST) X-Google-Smtp-Source: AG47ELvQ/U2ixKs8raP6Jfr+M63/PJQ3EYgQHcHMJ6SYO83y1yfbET+ZSHzan0yBujjWuAWYOri0 X-Received: by 10.167.129.129 with SMTP id g1mr3783227pfi.224.1519816185751; Wed, 28 Feb 2018 03:09:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519816185; cv=none; d=google.com; s=arc-20160816; b=BgaQaV/BH/fxEMI7cVurgIy/SzHyTfNTrozuZM7/8fHfxeENn+PiSp2scLoy49f8yb NDk1I3ib2I/KdEQg6cRAHg30E69mE+c1qe5b/TsFId9CtGCzdCJQnNtNtIrmiOA5AssD uOBT4Dxl1fECH/JdSmH82JxD+ReCirrhM5yu1auKMOygt6nJwWGT0ChveuC/ONd/kK1s p7wC5xNR6jj7gJqi8bB/degGXMszOk/J8Fx5YFv27gSxnw/LIH6hKAwNBsQRRS+tOSPt 1Xk9pFav2ABUed8v3oGxz9eUa8AQnUmvfoGjLbzqnojbi4rAUfCecBqmt8wQ5z95J8PF SY9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=VczypQkcLXU1Qqy2qvWg91eNJqLj0g2R91G3bkcpPTk=; b=UQqk9ii2y5UW7HrM4iqJjSAiBPnw2Ysdr83HObf/8OKWIcfRZlgCj0tgEOnYYMjpPr ezmADqI9A9iR8ZB3ANhDjvBHCjt1asGweO7GRGEQINTCnt8IMoJvGBuOGfZzNgF3yS5c 0Ej5UaipQ0c13Fi/F5AMn/F4ENGD2qcwMmo6FLpKacOjIwv5DV6spf81oE6J3hO9+ADs sEE3adNzaVnUn8Wf9NYFQ3Wm1fXslloWk5lhDniFlH1ekS4US1lWHCiaqGgQ7PwDhYie W+fMuTf7AUierwsBfW7IRDrhEXFRiqehW2v7/ST66n3tMMI2Uugne1BNln7k6HWeGCkX XfsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=MDsUtA6p; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id v31-v6si1131155plg.570.2018.02.28.03.09.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 03:09:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=MDsUtA6p; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 941766E943; Wed, 28 Feb 2018 11:09:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx210.ext.ti.com (fllnx210.ext.ti.com [198.47.19.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id A11B06E93A for ; Wed, 28 Feb 2018 11:09:40 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1SB9cMc020331; Wed, 28 Feb 2018 05:09:38 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519816179; bh=hlhkMp/yZ0KDQa9HcqUca3cNYKb7QFwCwf5ttdi9CPU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=MDsUtA6pazB3S0HL+gGPXTIZvnfrFj3zZQxkMhN9fFgY49hsmW8J5W/fw8hPgkdBR a0jNJXjSNCqMCfNutHf6eP7doGPuNvT3aRBwpPwBDu6wlCbl9P1qdFPW78vW8ylECW 4R7TOpItanvwQ7ACdsU5dZmDNPuggF2IgaYZHCCI= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SB9cV7010522; Wed, 28 Feb 2018 05:09:38 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 28 Feb 2018 05:09:38 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 28 Feb 2018 05:09:38 -0600 Received: from jadmar.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SB9WKG009418; Wed, 28 Feb 2018 05:09:37 -0600 From: Jyri Sarha To: Subject: [PATCH v2 2/2] drm/panel: Add device_link from panel device to drm device Date: Wed, 28 Feb 2018 13:09:30 +0200 Message-ID: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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: airlied@linux.ie, Jyri Sarha , tomi.valkeinen@ti.com, thierry.reding@gmail.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add device_link from panel device (supplier) to drm device (consumer) with DL_FLAG_AUTOREMOVE when drm_panel_attach() is called. Currently the master drm driver is not protected against the attached. The device_link with DL_FLAG_AUTOREMOVE should make sure the drm device is unbound before the panel driver becomes unavailable. The device_link is removed when drm_panel_detach() is called. The drm_panel_detach() should be called by the panel driver it self when it is removed. Otherwise the both driver are racing to delete the same link. Signed-off-by: Jyri Sarha Reviewed-by: Eric Anholt --- drivers/gpu/drm/drm_panel.c | 12 ++++++++++++ include/drm/drm_panel.h | 1 + 2 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index 308d442..afa8337 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -24,6 +24,7 @@ #include #include +#include #include #include @@ -98,9 +99,18 @@ EXPORT_SYMBOL(drm_panel_remove); */ int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector) { + u32 flags = DL_FLAG_AUTOREMOVE; + if (panel->connector) return -EBUSY; + panel->link = device_link_add(connector->dev->dev, panel->dev, flags); + if (!panel->link) { + dev_err(panel->dev, "failed to link panel to %s\n", + dev_name(connector->dev->dev)); + return -EINVAL; + } + panel->connector = connector; panel->drm = connector->dev; @@ -119,6 +129,8 @@ EXPORT_SYMBOL(drm_panel_attach); */ int drm_panel_detach(struct drm_panel *panel) { + device_link_del(panel->link); + panel->connector = NULL; panel->drm = NULL; diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 14ac240..26a1b5f 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -89,6 +89,7 @@ struct drm_panel { struct drm_device *drm; struct drm_connector *connector; struct device *dev; + struct device_link *link; const struct drm_panel_funcs *funcs;