[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <qrtcanwfokvc5x6xtgxhi2fs6fcibhnnhenegrdialx7cgy7u3@ea4v3woh5gki>
Date: Wed, 22 Jan 2025 20:56:15 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Damon Ding <damon.ding@...k-chips.com>
Cc: heiko@...ech.de, robh@...nel.org, krzk+dt@...nel.org,
conor+dt@...nel.org, rfoss@...nel.org, vkoul@...nel.org,
sebastian.reichel@...labora.com, cristian.ciocaltea@...labora.com, l.stach@...gutronix.de,
andy.yan@...k-chips.com, hjc@...k-chips.com, algea.cao@...k-chips.com,
kever.yang@...k-chips.com, dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-phy@...ts.infradead.org
Subject: Re: [PATCH v5 12/20] drm/rockchip: analogix_dp: Add support to get
panel from the DP AUX bus
On Wed, Jan 22, 2025 at 05:37:53PM +0800, Damon Ding wrote:
> Hi Dmitry,
>
> On 2025/1/22 16:17, Damon Ding wrote:
> > Hi Dmitry,
> >
> > On 2025/1/9 20:48, Dmitry Baryshkov wrote:
> > > On Thu, Jan 09, 2025 at 11:27:17AM +0800, Damon Ding wrote:
> > > > Move drm_of_find_panel_or_bridge() a little later and combine it with
> > > > component_add() into a new function rockchip_dp_link_panel().
> > > > The function
> > > > will serve as done_probing() callback of devm_of_dp_aux_populate_bus(),
> > > > aiding to support for obtaining the eDP panel via the DP AUX bus.
> > > >
> > > > If failed to get the panel from the DP AUX bus, it will then try
> > > > the other
> > > > way to get panel information through the platform bus.
> > > >
> > > > In addition, use dev_err() instead of drm_err() in rockchip_dp_poweron()
> > > > , which will be called before rockchip_dp_bind().
> > > >
> > > > Signed-off-by: Damon Ding <damon.ding@...k-chips.com>
> > > >
> > > > ---
> > > >
> > > > Changes in v4:
> > > > - Use done_probing() to call drm_of_find_panel_or_bridge() and
> > > > component_add() when getting panel from the DP AUX bus
> > > >
> > > > Changes in v5:
> > > > - Use the functions exported by the Analogix side to get the pointers of
> > > > struct analogix_dp_plat_data and struct drm_dp_aux.
> > > > - Use dev_err() instead of drm_err() in rockchip_dp_poweron().
> > > >
> > > > ---
> > > > .../gpu/drm/rockchip/analogix_dp-rockchip.c | 41 ++++++++++++++-----
> > > > 1 file changed, 30 insertions(+), 11 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/
> > > > drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > > > index 0957d3c5d31d..3ae01b870f49 100644
> > > > --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > > > +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c
> > > > @@ -124,13 +124,13 @@ static int rockchip_dp_poweron(struct
> > > > analogix_dp_plat_data *plat_data)
> > > > ret = clk_prepare_enable(dp->pclk);
> > > > if (ret < 0) {
> > > > - drm_err(dp->drm_dev, "failed to enable pclk %d\n", ret);
> > > > + dev_err(dp->dev, "failed to enable pclk %d\n", ret);
> > >
> > >
> > > why?
> > >
> >
> > The &rockchip_dp_device.drm_dev will be assigned in rockchip_dp_bind(),
> > which is called after probing process. The PM operations have been
> > advanced to the probing for the AUX transmission, so the dev_err() may
> > be better than drm_err().
> >
>
> Using drm_...() uniformly may be better [0].
Yes
>
> > > > return ret;
> > > > }
> > > > ret = rockchip_dp_pre_init(dp);
> > > > if (ret < 0) {
> > > > - drm_err(dp->drm_dev, "failed to dp pre init %d\n", ret);
> > > > + dev_err(dp->dev, "failed to dp pre init %d\n", ret);
> > > > clk_disable_unprepare(dp->pclk);
> > > > return ret;
> > > > }
> > >
>
> Best regards,
> Damon
>
> [0]https://patchwork.kernel.org/project/linux-rockchip/patch/20250109032725.1102465-6-damon.ding@rock-chips.com/#26209891
>
--
With best wishes
Dmitry
Powered by blists - more mailing lists