[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YyAvSKTBGdVIjaHW@hovoldconsulting.com>
Date: Tue, 13 Sep 2022 09:20:40 +0200
From: Johan Hovold <johan@...nel.org>
To: Steev Klimaszewski <steev@...i.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>,
Johan Hovold <johan+linaro@...nel.org>,
Douglas Anderson <dianders@...omium.org>,
Rob Clark <robdclark@...il.com>,
Andrzej Hajda <andrzej.hajda@...el.com>,
Neil Armstrong <neil.armstrong@...aro.org>,
Robert Foss <robert.foss@...aro.org>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jonas Karlman <jonas@...boo.se>,
Jernej Skrabec <jernej.skrabec@...il.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Sean Paul <sean@...rly.run>,
Stephen Boyd <swboyd@...omium.org>,
Bjorn Andersson <andersson@...nel.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
dri-devel@...ts.freedesktop.org, linux-arm-msm@...r.kernel.org,
freedreno@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
stable@...r.kernel.org
Subject: Re: [PATCH 4/7] drm/msm/dp: fix aux-bus EP lifetime
On Mon, Sep 12, 2022 at 04:55:58PM -0500, Steev Klimaszewski wrote:
>
> On 9/12/22 1:10 PM, Dmitry Baryshkov wrote:
> > On 12/09/2022 18:40, Johan Hovold wrote:
> >> Device-managed resources allocated post component bind must be tied to
> >> the lifetime of the aggregate DRM device or they will not necessarily be
> >> released when binding of the aggregate device is deferred.
> >>
> >> This can lead resource leaks or failure to bind the aggregate device
> >> when binding is later retried and a second attempt to allocate the
> >> resources is made.
> >>
> >> For the DP aux-bus, an attempt to populate the bus a second time will
> >> simply fail ("DP AUX EP device already populated").
> >>
> >> Fix this by amending the DP aux interface and tying the lifetime of the
> >> EP device to the DRM device rather than DP controller platform device.
> >
> > Doug, could you please take a look?
> >
> > For me this is another reminder/pressure point that we should populate
> > the AUX BUS from the probe(), before binding the components together.
> >
> >>
> >> Fixes: c3bf8e21b38a ("drm/msm/dp: Add eDP support via aux_bus")
> >> Cc: stable@...r.kernel.org # 5.19
> >> Signed-off-by: Johan Hovold <johan+linaro@...nel.org>
> >> ---
> >> drivers/gpu/drm/bridge/parade-ps8640.c | 2 +-
> >> drivers/gpu/drm/display/drm_dp_aux_bus.c | 5 +++--
> >> drivers/gpu/drm/msm/dp/dp_display.c | 3 ++-
> >> include/drm/display/drm_dp_aux_bus.h | 6 +++---
> >> 4 files changed, 9 insertions(+), 7 deletions(-)
> This breaks builds which have ti-sn65dsi86 included:
>
> drivers/gpu/drm/bridge/ti-sn65dsi86.c:628:50: error: passing argument 1
> of 'devm_of_dp_aux_populate_ep_devices' from incompatible argument type.
>
> As well,
>
> drivers/gpu/drm/bridge/ti-sn65dsi86.c:628:15: error: too few arguments
> to function 'devm_of_dp_aux_populate_ep_devices'
Thanks for reporting this. I messed up and apparently only grepped for
devm_of_dp_aux_populate_bus() and not the
devm_of_dp_aux_populate_ep_devices() wrapper when searching for users.
Johan
Powered by blists - more mailing lists