Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933936AbdDFHUH (ORCPT ); Thu, 6 Apr 2017 03:20:07 -0400 Received: from mailout4.w1.samsung.com ([210.118.77.14]:60145 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752487AbdDFHT5 (ORCPT ); Thu, 6 Apr 2017 03:19:57 -0400 X-AuditID: cbfec7f5-f792f6d0000063e9-94-58e5ec1a2308 Subject: Re: [PATCH v3 3/9] drm: bridge: analogix: Destroy connector when unbinding To: Jeffy Chen , linux-kernel@vger.kernel.org Cc: Caesar Wang , Tomeu Vizoso , Daniel Vetter , briannorris@chromium.org, dianders@chromium.org, dri-devel@lists.freedesktop.org, tfiga@chromium.org, zyw@rock-chips.com, Baoyou Xie From: Andrzej Hajda Message-id: Date: Thu, 06 Apr 2017 09:19:52 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-version: 1.0 In-reply-to: <1491380967-28570-4-git-send-email-jeffy.chen@rock-chips.com> Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA01Sa0hTYRjm2zk7HmeT05z2ppWxCLqoqVkeLLQi4dSvIoRRlI12UFOnbE6y H7EsNaalTEPzkrN0iBjGvLRS80bOSnNeWkVeK8W0sJpm/lDadhT893zf8zzf8z4vH4mJnvK9 yThFCqtUyBIkhABv6l7u9/f+MSUNfJ7hQ0/bzIg2/p7n0xWToxjdZ+gg6OHFeYJe+thH0EMv SgnalrFK0PeeDBJ01i0Djy6fMGHH3JgSzQDOmEYrEdP6V48zI9YWghnPNvOYleI2nLEZd5xx OS84KmcT4lJZ5YHwy4LYvrmbvORawbX56SW+BllILXIlgQqBrGYbwWEvsIzVObGIqkKQ35qq RQI7tiFonW3H1w0T2V04RxgQPK7pRtxhGsHrqXd2hiQ9qCgYad7qMIgpBvqHu3gODUaV8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wayl1lAXWLKlFyI8fISm9e8ZZ7A KDALSccshKpZSKoWMDKvYhRJLS3OTc8tNtIrTswtLs1L10vOz93ECIzKbcd+btnB2PUu+BCj AAejEg/vgqdPIoRYE8uKK3MPMUpwMCuJ8Bo+ehohxJuSWFmVWpQfX1Sak1p8iNEU6IWJzFKi yfnAhJFXEm9oYmhuaWhkbGFhbmSkJM479cOVcCGB9MSS1OzU1ILUIpg+Jg5OqQbGSpcg1btm rvNn1q9kf1+Wd/HnAfU8LveUtfcdLXyzPPOm9R39Gbgkxck9IfnqqWV7VaO+utf5X3zFbWbe 527YECrpbGPXViyi8ShL1nEC29Erk77cyWqSyJr5Lnbql6L7O3IuiB48fFrxJqfaSrb5/eJV k+bvWfR0fqHMTza5+rCLR36tP1ShxFKckWioxVxUnAgA9CZyveACAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170406071953eucas1p2c6cecffd16f5ccec1e1d06f7d14c1891 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170405165949epcas1p30c7d5d13cff9886a6faf0d529fcb1ab1 X-RootMTR: 20170405165949epcas1p30c7d5d13cff9886a6faf0d529fcb1ab1 References: <1491380967-28570-1-git-send-email-jeffy.chen@rock-chips.com> <1491380967-28570-4-git-send-email-jeffy.chen@rock-chips.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1282 Lines: 40 On 05.04.2017 10:29, Jeffy Chen wrote: > Normally we do this in drm_mode_config_cleanup. But analogix dp's > connector is allocated in bind, and freed after unbind. So we need > to destroy it in unbind to avoid further access. > > Signed-off-by: Jeffy Chen Reviewed-by: Andrzej Hajda One comment below > --- > > Changes in v3: None > Changes in v2: None > > drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > index 7b75f82..a96fd55 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c > @@ -1439,6 +1439,7 @@ void analogix_dp_unbind(struct device *dev, struct device *master, > struct analogix_dp_device *dp = dev_get_drvdata(dev); > > analogix_dp_bridge_disable(dp->bridge); Not related to the patch, but what about bridge, above it is only disabled, but not detached, encoder cleanup code should do it but it is also missing. Regards Andrzej > + dp->connector.funcs->destroy(&dp->connector); > > if (dp->plat_data->panel) { > if (drm_panel_unprepare(dp->plat_data->panel))