Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965228AbeAJJOv (ORCPT + 1 other); Wed, 10 Jan 2018 04:14:51 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58046 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751827AbeAJJOs (ORCPT ); Wed, 10 Jan 2018 04:14:48 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5CB736021C Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=architt@codeaurora.org Subject: Re: [PATCH v7 6/8] drm/bridge/synopsys: dw-hdmi: Add missing bridge detach To: Thierry Escande , Rob Herring , Daniel Vetter , Neil Armstrong , Laurent Pinchart , Sandy Huang Cc: Jeffy Chen , Sean Paul , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org References: <20180109144853.32536-1-thierry.escande@collabora.com> <20180109144853.32536-7-thierry.escande@collabora.com> From: Archit Taneja Message-ID: <7002caef-7b73-763a-22eb-4a526cf854b9@codeaurora.org> Date: Wed, 10 Jan 2018 14:44:40 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20180109144853.32536-7-thierry.escande@collabora.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On 01/09/2018 08:18 PM, Thierry Escande wrote: > From: Jeffy Chen > > We inited connector in attach(), so need a detach() to cleanup. > > Also fix wrong use of dw_hdmi_remove() in bind(). > > Signed-off-by: Jeffy Chen > Signed-off-by: Thierry Escande Reviewed-by: Archit Taneja > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index a38db40ce990..1cc63a18b7d5 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -1967,6 +1967,13 @@ static int dw_hdmi_bridge_attach(struct drm_bridge *bridge) > return 0; > } > > +static void dw_hdmi_bridge_detach(struct drm_bridge *bridge) > +{ > + struct dw_hdmi *hdmi = bridge->driver_private; > + > + drm_connector_cleanup(&hdmi->connector); > +} > + > static enum drm_mode_status > dw_hdmi_bridge_mode_valid(struct drm_bridge *bridge, > const struct drm_display_mode *mode) > @@ -2023,6 +2030,7 @@ static void dw_hdmi_bridge_enable(struct drm_bridge *bridge) > > static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { > .attach = dw_hdmi_bridge_attach, > + .detach = dw_hdmi_bridge_detach, > .enable = dw_hdmi_bridge_enable, > .disable = dw_hdmi_bridge_disable, > .mode_set = dw_hdmi_bridge_mode_set, > @@ -2616,7 +2624,7 @@ int dw_hdmi_bind(struct platform_device *pdev, struct drm_encoder *encoder, > > ret = drm_bridge_attach(encoder, &hdmi->bridge, NULL); > if (ret) { > - dw_hdmi_remove(pdev); > + __dw_hdmi_remove(hdmi); > DRM_ERROR("Failed to initialize bridge with drm\n"); > return ret; > } > -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project