From patchwork Mon Oct 2 09:34:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 114570 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp474870qgn; Mon, 2 Oct 2017 02:35:26 -0700 (PDT) X-Received: by 10.99.126.23 with SMTP id z23mr11960038pgc.4.1506936926832; Mon, 02 Oct 2017 02:35:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506936926; cv=none; d=google.com; s=arc-20160816; b=pYjeODduY+ReR/SATL8EgPFF6uyvSlkWOqDcn5fbC41dYuTS1HGeDlsMi81AICjZ/r UnYk/AMWFoWeW3R7OGtW1rwrl/7KuQlgWFZblnAjsw5Q5tf5smJVNpxzEBrBL7wUAT5V OAbGxFD2+xQYwKvCqPCSzlQj9SAVD/i26GDpoUzhk3qDARZmQ6T0czlYMZd1ycbyNrDB CPViQlHagrMQxT2RyPSZeOE7ABegI/TeT8ixGCn5NA2Hvl1HJv/SMU4LPC85ML0IvqrE YP/FNnx6rGppobleXGPdxorjb1jsvy6F8bN4M+LEZyzoNQDirBLnlp7Jf7s8NnVAsaMu EgNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=eeoLJu7OPnkyTduxewysehyKuW5MGiUs9/lHFG+2VZ4=; b=rf/iwyVA+qP0UrOTg0XNBArqQ/9oPS9YaOUeW8TXZKz/wTPnATHqbYleysag7I1Wyj az6ETarEWlQXXjDZ3esDdbOWsEinQNwJisDSsbgMD1g6c4WwJYeXGbLan75bifMOoWMD 5GMEkrUgWRevK6lpk+0Ilrb915etcHyc487PqzdmR2eoZFFqOZC6k3uelqmUwvircRK0 Q2UGENZX00bs0iBhFZspDN71bJEbOEU7scEGGRYvh94/SrZGUC3M1iu+97wcMgKL8jdi 37YwRWOCNq8kMCrumkCIFb9EPjCDAYzrTmFeNIxOQ/a0z1/TwImKhoFImdUAdhg9MRU7 xJdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jg1n/xrN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si7963363plt.273.2017.10.02.02.35.26; Mon, 02 Oct 2017 02:35:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Jg1n/xrN; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751241AbdJBJfY (ORCPT + 26 others); Mon, 2 Oct 2017 05:35:24 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:50611 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751104AbdJBJfV (ORCPT ); Mon, 2 Oct 2017 05:35:21 -0400 Received: by mail-wr0-f180.google.com with SMTP id b21so3437274wrg.7 for ; Mon, 02 Oct 2017 02:35:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eeoLJu7OPnkyTduxewysehyKuW5MGiUs9/lHFG+2VZ4=; b=Jg1n/xrNd977cJ2SgxrxZuZQq3fV5N0sKUTTrSmnkffCbUHw/eP53CzNQ5shs2mpjD ahM5IQk7miQFFMbIkKq99lgBVp+QDyz+sJvWjwp/wKUNkF4Wa6c9Lm8pckNdAYrKjS7M ikpJ4R6FIa0GvxrJEEd8OL6ka9KsY9AAI7+Ss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eeoLJu7OPnkyTduxewysehyKuW5MGiUs9/lHFG+2VZ4=; b=bsn5wgqRbhKorZu3p04AgrwJUbe90DftOac88CnlE782dQtEyljWjCeVX9Ej6MXwza hJ4e4gQBzwPRr+Y9/Lp9JjvVW1njnnpHwAiDqco+wVQa8kktcThrDEvwYoLlsbRtjN+k Cj1xCFiYRGrtSMbiXL7xZ4WbEBITCsVb2xuJ4k6hKqyg27KLQPQaOCsF5QX/SvX0lrxl XVjWL7QvK8aICZQNRhyNyUnX0HKj7PE1nbo30c2ZkaWF5p50kZIO1mKgP9Mh44rvjQ64 jITgY1/sWtPgxquTGhZzbXkctlrc7Ph4yVS0o0lodKt7wZs1e3OX2B+BYyepvhM+MCDN x+7g== X-Gm-Message-State: AHPjjUjrdEPwkCsy7SJgQfShRMyhiB+LoXj9zYBrJuOvrp9IFTfUf1il 4RbGSxMoMbz7ZIScJENgjrygWA== X-Google-Smtp-Source: AOwi7QBC+c93CWcWdwmys91NWUweRpFw53nKfJEvQ1FX0CUvvQhcOuisKiID+Reb4FMs+iBFaWfakA== X-Received: by 10.223.161.23 with SMTP id o23mr15143662wro.103.1506936919935; Mon, 02 Oct 2017 02:35:19 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.199.139]) by smtp.gmail.com with ESMTPSA id l4sm6516856wrb.74.2017.10.02.02.35.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 02:35:19 -0700 (PDT) From: Benjamin Gaignard To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, yannick.fertre@st.com, philippe.cornu@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v2 3/5] drm/stm: ltdc: remove bridge from driver internal structure Date: Mon, 2 Oct 2017 11:34:46 +0200 Message-Id: <1506936888-23844-4-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> References: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With a call to drm_of_panel_bridge_remove() we could remove the bridge without store it in ldtc internal driver structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu --- drivers/gpu/drm/stm/ltdc.c | 16 +++++----------- drivers/gpu/drm/stm/ltdc.h | 2 -- 2 files changed, 5 insertions(+), 13 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index d394a03..735c908 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -791,9 +791,8 @@ static const struct drm_encoder_funcs ltdc_encoder_funcs = { .destroy = drm_encoder_cleanup, }; -static int ltdc_encoder_init(struct drm_device *ddev) +static int ltdc_encoder_init(struct drm_device *ddev, struct drm_bridge *bridge) { - struct ltdc_device *ldev = ddev->dev_private; struct drm_encoder *encoder; int ret; @@ -807,7 +806,7 @@ static int ltdc_encoder_init(struct drm_device *ddev) drm_encoder_init(ddev, encoder, <dc_encoder_funcs, DRM_MODE_ENCODER_DPI, NULL); - ret = drm_bridge_attach(encoder, ldev->bridge, NULL); + ret = drm_bridge_attach(encoder, bridge, NULL); if (ret) { drm_encoder_cleanup(encoder); return -EINVAL; @@ -936,12 +935,9 @@ int ltdc_load(struct drm_device *ddev) ret = PTR_ERR(bridge); goto err; } - ldev->is_panel_bridge = true; } - ldev->bridge = bridge; - - ret = ltdc_encoder_init(ddev); + ret = ltdc_encoder_init(ddev, bridge); if (ret) { DRM_ERROR("Failed to init encoder\n"); goto err; @@ -972,8 +968,7 @@ int ltdc_load(struct drm_device *ddev) return 0; err: - if (ldev->is_panel_bridge) - drm_panel_bridge_remove(bridge); + drm_panel_bridge_remove(bridge); clk_disable_unprepare(ldev->pixel_clk); @@ -986,8 +981,7 @@ void ltdc_unload(struct drm_device *ddev) DRM_DEBUG_DRIVER("\n"); - if (ldev->is_panel_bridge) - drm_panel_bridge_remove(ldev->bridge); + drm_of_panel_bridge_remove(ddev->dev->of_node, 0, 0); clk_disable_unprepare(ldev->pixel_clk); } diff --git a/drivers/gpu/drm/stm/ltdc.h b/drivers/gpu/drm/stm/ltdc.h index bc6d6f6..ae43755 100644 --- a/drivers/gpu/drm/stm/ltdc.h +++ b/drivers/gpu/drm/stm/ltdc.h @@ -24,8 +24,6 @@ struct ltdc_device { struct drm_fbdev_cma *fbdev; void __iomem *regs; struct clk *pixel_clk; /* lcd pixel clock */ - struct drm_bridge *bridge; - bool is_panel_bridge; struct mutex err_lock; /* protecting error_status */ struct ltdc_caps caps; u32 error_status; From patchwork Mon Oct 2 09:34:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 114571 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp474914qgn; Mon, 2 Oct 2017 02:35:30 -0700 (PDT) X-Received: by 10.159.242.194 with SMTP id x2mr3285342plw.244.1506936930328; Mon, 02 Oct 2017 02:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506936930; cv=none; d=google.com; s=arc-20160816; b=x+1Z0VJgCRUkmq48Si4KiP0ZIZTpHZiFE0HOWFBcHdmB24SPAxVkdvoPW6o5i5Yeds GkNWmXnFCXAowCneMVVoC9gyy1806zWERMFVVH+s4Z0mBwfDnJnfspKJWv3INj35R+n3 +zjNCUUrCobCZaOTLqN2HYZMRNC6uDaFmD6EaJG0RFz0A7PGHa/fsVGTT+hdVRueUXfG C/OljfgbvpW3Qv3xxWGD2VQ/kC/FJq0PaeDpf/Qifj5bywYp3fLtS2NtAVItRsh80PE4 QHwnr7FqZuVyrwGUPCyKgJ9qRyK4MYCi54WPkdF/F/9lV2IVgJBR6+aKaTYChhn61Gf1 7tEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=KaMdpbkfWbz5jhb2FFnLSXsXieqyM9vAuBryBmblHkE=; b=nAub5OGMwUYN7rIPaXzzYpdwMoSHQwnJeRZvK/UnqwBDCwTFsOjTvQNkhgRzsVRdCh 20GNYiwJGjitqFCcMH1G+PTsZPJsWo8Vqor5x9fkdEdrEDQSBtQuUcw7n4RyMA8BEKWV Lp2EQCiO3e94kvlN1vl+wYjLN7KK0emztOxMR5un/pVhHkYeBjBdbsKSuSU68QUWvEpW f+6m4W2PrzrPey4F+D1YwT9oH405acDK7mHQVuvv0QnLaZP0MY1NeCm+qyvAhldIlObR ZlXK50qeBTVuGeukFW1cRD0zmL0hYBG+/VT6+hs2awBJ4sNQUI4Uu7LXoxxL5YvZo7Ma J2lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HXZkAv7V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si7963363plt.273.2017.10.02.02.35.29; Mon, 02 Oct 2017 02:35:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HXZkAv7V; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751315AbdJBJf1 (ORCPT + 26 others); Mon, 2 Oct 2017 05:35:27 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:46563 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbdJBJfY (ORCPT ); Mon, 2 Oct 2017 05:35:24 -0400 Received: by mail-wm0-f41.google.com with SMTP id m72so9352624wmc.1 for ; Mon, 02 Oct 2017 02:35:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=KaMdpbkfWbz5jhb2FFnLSXsXieqyM9vAuBryBmblHkE=; b=HXZkAv7ViIJSqM8EifaEHQ8VxAegk79KfXzF9UUORbAGiuUkT9pdpqUxZMQBzq2PL+ 4xOLIVF4zUBgReC4jtO8Us4PZLA9i1CG1X60gCBWxpaIaJvEfIfYjJFRxcMKt7KtNc73 jPXeezOxhPdvMEmELxu2nwTNQoN49GwVhiy5I= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KaMdpbkfWbz5jhb2FFnLSXsXieqyM9vAuBryBmblHkE=; b=g4c1ZBz1CoRcKtPeaCftHbH+RycK7f9qdIWXs9DLCouVu2MjAyr8u3vb5zhNsI4aBW w33cIZumc5NtufuCjVij/8FCfffTrcrh+KGl98JMOObcDap9cupYg2NK4SsrcMtan8lU aAO/WuuyJW0SJ/PnM3ZlWc8zmub1Liq7UWx5PulN0MP2W+MRxWvd+wA5AHp8OVNwQyfa 56NEdJtrUrNY2u/0UGy8w8kzMERe0H981oudLEnk6PSdZVUnH7oyzKF3VouXMkYGAr48 3wb3HBNL9rjZdREmtOpm1gLEKPYmT/bxyqwgh0m2FmGh7cA5KfFMTKpzd/grR0oe0TYb gI5g== X-Gm-Message-State: AMCzsaUjPR4HdXZtMWakd0LUbjp+CRB0+O7o0yZQuZZVLwGrvpg/WecK SlwfK5sGXxs1InCdmaMjrDoong== X-Google-Smtp-Source: AOwi7QC71V846Vt9spn1me+65QczpKIk5607idLcH+n79P/m85IZ/BjtHxoGDNfg4V5zRNREAt1Cww== X-Received: by 10.28.214.206 with SMTP id n197mr9513615wmg.21.1506936923401; Mon, 02 Oct 2017 02:35:23 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.199.139]) by smtp.gmail.com with ESMTPSA id l4sm6516856wrb.74.2017.10.02.02.35.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 02:35:22 -0700 (PDT) From: Benjamin Gaignard To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, yannick.fertre@st.com, philippe.cornu@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v2 4/5] drm/vc4: remove bridge from driver internal structure Date: Mon, 2 Oct 2017 11:34:47 +0200 Message-Id: <1506936888-23844-5-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> References: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org With a call to drm_of_panel_bridge_remove() we could remove the bridge without store it in vc4_dpi internal driver structure. Signed-off-by: Benjamin Gaignard --- drivers/gpu/drm/vc4/vc4_dpi.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/vc4/vc4_dpi.c b/drivers/gpu/drm/vc4/vc4_dpi.c index 519cefe..72c9dbd 100644 --- a/drivers/gpu/drm/vc4/vc4_dpi.c +++ b/drivers/gpu/drm/vc4/vc4_dpi.c @@ -97,8 +97,6 @@ struct vc4_dpi { struct drm_encoder *encoder; struct drm_connector *connector; - struct drm_bridge *bridge; - bool is_panel_bridge; void __iomem *regs; @@ -251,10 +249,11 @@ static int vc4_dpi_init_bridge(struct vc4_dpi *dpi) { struct device *dev = &dpi->pdev->dev; struct drm_panel *panel; + struct drm_bridge *bridge; int ret; ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, - &panel, &dpi->bridge); + &panel, &bridge); if (ret) { /* If nothing was connected in the DT, that's not an * error. @@ -265,13 +264,10 @@ static int vc4_dpi_init_bridge(struct vc4_dpi *dpi) return ret; } - if (panel) { - dpi->bridge = drm_panel_bridge_add(panel, - DRM_MODE_CONNECTOR_DPI); - dpi->is_panel_bridge = true; - } + if (panel) + bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DPI); - return drm_bridge_attach(dpi->encoder, dpi->bridge, NULL); + return drm_bridge_attach(dpi->encoder, bridge, NULL); } static int vc4_dpi_bind(struct device *dev, struct device *master, void *data) @@ -352,8 +348,7 @@ static void vc4_dpi_unbind(struct device *dev, struct device *master, struct vc4_dev *vc4 = to_vc4_dev(drm); struct vc4_dpi *dpi = dev_get_drvdata(dev); - if (dpi->is_panel_bridge) - drm_panel_bridge_remove(dpi->bridge); + drm_of_panel_bridge_remove(dev->of_node, 0, 0); drm_encoder_cleanup(dpi->encoder); From patchwork Mon Oct 2 09:34:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 114572 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp474940qgn; Mon, 2 Oct 2017 02:35:33 -0700 (PDT) X-Received: by 10.101.92.6 with SMTP id u6mr12348381pgr.198.1506936932976; Mon, 02 Oct 2017 02:35:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1506936932; cv=none; d=google.com; s=arc-20160816; b=bprogHTxPO3+pjN70+afXnUdvZr0GGWZLdLF2fXeM2p3lT8JgSLAMIwP8H3WgdL8ar 9MB89gNwEFU1T3XPS7Z3JZ6KJqs71iux6HNQfeVsJgbE5BZenrjlyawYC59j34weilpr lMnWgp8hE+F9DlhqJtmlao1uffFBa3qA+j0ANk6vedp3JByyP6jpfkX+yeF1H+XZ1uzR wg80XCG3rDyZhQAMG1iGGj22JdxoR/W2cJCsCtYbmwftCm0sbaHImu9bB+L/8lNYv0rl bOf8sH1TwSjTGyVPL+T6K5O4YG3aX3TgOG2sMh1mffROMGtMqhJwZHa2nSqdW3pzQANX ZEhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=VcvizztyB3l0HfCGlPQ15vxBGD8cG1YHubi1VJZQLaM=; b=XmK/2bnB6QPy65Xz1hYHu7+4Nj2j2haexx8WFex8EH7UC50JP93rFJ0eb8UVCcdyYh 6tSGmbmQ32xvBeBQLhSv43QF6Sc48AreRDBiwoPGzMPUJaq3o2oDnXaJ3rmzWUk7p1RJ ddIhrwHo2M9y6RAT117/CPBwnkDPWFABqilUtLyFrbyYqdaUTid09qSm8YV3oVLkyn5+ fOtIrb4FaGcqPjbIdYxfkZO8iaEBfM3tG/1+hQiMbrrRJlNXJI5sfsughN4N2YFbpPmF A7mUjNo92SOAYbC5/SgOJ89k4bCzxbz+aWChZuscOqVWjCUCbr5f2O9D6GvjwuKQxnzC CJHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eY8xymJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si7963363plt.273.2017.10.02.02.35.32; Mon, 02 Oct 2017 02:35:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eY8xymJE; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751420AbdJBJfb (ORCPT + 26 others); Mon, 2 Oct 2017 05:35:31 -0400 Received: from mail-wm0-f52.google.com ([74.125.82.52]:45397 "EHLO mail-wm0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132AbdJBJf2 (ORCPT ); Mon, 2 Oct 2017 05:35:28 -0400 Received: by mail-wm0-f52.google.com with SMTP id q124so9358895wmb.0 for ; Mon, 02 Oct 2017 02:35:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VcvizztyB3l0HfCGlPQ15vxBGD8cG1YHubi1VJZQLaM=; b=eY8xymJEWdikkBRk8aoyShopYi+UqSqQrHA8sHD2HyboXbEVwmHLtlPDKWnfL5nGQb ffQjmkDpsNe5qLYJ77VNyFnexQK/+1NhYD1W2y7LW1uSWBXvK/DA4oQlkIgg8PJmcy0P 1K7HKVrMQj09aV/KLeceMPsKx7kFfp2Q8Oa34= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VcvizztyB3l0HfCGlPQ15vxBGD8cG1YHubi1VJZQLaM=; b=Y7VpvQW+77974mCqV8fXsJ2j2lSFrqVkrTowpPMykvpCYSChL3epvvJjGQ/iGzDl02 eL0+h7asOHOBUKB3j4Z1DhjO6g6XMw9Qsq6/gF53unX48+15hxKl5koaCPneHaovi0dw BYes8GRCRAl97PRtqgkJujl+MFp+lQypJSI16OZsj6ZDm3jThjrNkN3jXnVbpghIJRzG U2QECphltunZjwSPFXfgPXC9PXQguCcfcbqBxbWUFDzx8Faysx9s20kSJCv0LIN0grhN 5GzVShZdDjJvKzIohak1NPM4GURrlHSPPbLb5drXaHFXhpK7JOTmtmJpEOeop1e9aer1 vl6A== X-Gm-Message-State: AMCzsaUhpevVq/N8QFP2f5Suq8R4vwadhHhZ68OLddUVBeT0isNSs20W UlQJ6gYM7vW1MUFvzkhSYuP5KA== X-Google-Smtp-Source: AOwi7QBLyWgExh071CgB3rt1BHfwytSG233Wo/BYuCFuQv+5/u4EniJRfmBQdpv8EhRyGIR3U7Pq0g== X-Received: by 10.28.35.9 with SMTP id j9mr1891645wmj.109.1506936927753; Mon, 02 Oct 2017 02:35:27 -0700 (PDT) Received: from lmecxl0911.lme.st.com ([80.215.199.139]) by smtp.gmail.com with ESMTPSA id l4sm6516856wrb.74.2017.10.02.02.35.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Oct 2017 02:35:27 -0700 (PDT) From: Benjamin Gaignard To: architt@codeaurora.org, a.hajda@samsung.com, Laurent.pinchart@ideasonboard.com, airlied@linux.ie, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org, yannick.fertre@st.com, philippe.cornu@st.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Benjamin Gaignard Subject: [PATCH v2 5/5] drm/bridge/synopsys: dsi :remove is_panel_bridge Date: Mon, 2 Oct 2017 11:34:48 +0200 Message-Id: <1506936888-23844-6-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> References: <1506936888-23844-3-git-send-email-benjamin.gaignard@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When using drm_of_panel_bridge_remove() we can simplify the code and remove is_panel_bridge from dw_mipi_dsi structure. Signed-off-by: Benjamin Gaignard Reviewed-by: Philippe Cornu Tested-by: Philippe Cornu --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.7.4 diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index f4f633a..d9cca4f 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -221,7 +221,6 @@ struct dw_mipi_dsi { struct drm_bridge bridge; struct mipi_dsi_host dsi_host; struct drm_bridge *panel_bridge; - bool is_panel_bridge; struct device *dev; void __iomem *base; @@ -297,7 +296,6 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DSI); if (IS_ERR(bridge)) return PTR_ERR(bridge); - dsi->is_panel_bridge = true; } dsi->panel_bridge = bridge; @@ -312,8 +310,7 @@ static int dw_mipi_dsi_host_detach(struct mipi_dsi_host *host, { struct dw_mipi_dsi *dsi = host_to_dsi(host); - if (dsi->is_panel_bridge) - drm_panel_bridge_remove(dsi->panel_bridge); + drm_of_panel_bridge_remove(host->dev->of_node, 1, 0); drm_bridge_remove(&dsi->bridge);