Re: [PATCH v2] drm/bridge: ps8640: propagate AUX transfer register errors

Doug Anderson <[email protected]>
Newsgroups org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <CAD=FV=Vi7+-_7yhTsOs6y0XEPR3cRmFB6bwkFMOrtvfgsuCMuQ@mail.gmail.com>
Hi,

On Thu, Jul 30, 2026 at 1:38 AM Jani Nikula <[email protected]> wrote:
>
> On Wed, 29 Jul 2026, Doug Anderson <[email protected]> wrote:
> > Hi,
> >
> > On Mon, Jul 27, 2026 at 4:40 AM Jani Nikula <[email protected]> wrote:
> >>
> >> On Thu, 23 Jul 2026, Pengpeng Hou <[email protected]> wrote:
> >> > ps8640_aux_transfer_msg() programs the AUX address registers, starts the
> >> > AUX transfer, waits for SWAUX_SEND to clear, and reads the AUX status
> >> > register. Several of those regmap operations have return values, but the
> >> > function only checks a stale ret after the status read.
> >> >
> >> > Propagate failures from the address write, transfer start, completion
> >> > poll, and status read. This avoids returning a transfer length when the
> >> > bridge register transaction or AUX completion wait failed.
> >> >
> >> > Fixes: 13afcdd7277e ("drm/bridge: parade-ps8640: Add support for AUX channel")
> >> > Signed-off-by: Pengpeng Hou <[email protected]>
> >> > ---
> >> > Changes since v1: https://lore.kernel.org/all/[email protected]/
> >> > - include the AUX address and length in the address-write diagnostic
> >> > - describe poll failures without assuming that every error is a timeout
> >> > - add the Fixes tag suggested by Doug
> >> > - rebase onto the current drm-misc-next tree
> >> >
> >> >  drivers/gpu/drm/bridge/parade-ps8640.c | 27 +++++++++++++++++++++------
> >> >  1 file changed, 21 insertions(+), 6 deletions(-)
> >> >
> >> > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c b/drivers/gpu/drm/bridge/parade-ps8640.c
> >> > index 96332721cb69..56b48f8feab6 100644
> >> > --- a/drivers/gpu/drm/bridge/parade-ps8640.c
> >> > +++ b/drivers/gpu/drm/bridge/parade-ps8640.c
> >> > @@ -257,8 +257,14 @@ static ssize_t ps8640_aux_transfer_msg(struct drm_dp_aux *aux,
> >> >       addr_len[PAGE0_SWAUX_LENGTH - base] = (len == 0) ? SWAUX_NO_PAYLOAD :
> >> >                                             ((len - 1) & SWAUX_LENGTH_MASK);
> >> >
> >> > -     regmap_bulk_write(map, PAGE0_SWAUX_ADDR_7_0, addr_len,
> >> > -                       ARRAY_SIZE(addr_len));
> >> > +     ret = regmap_bulk_write(map, PAGE0_SWAUX_ADDR_7_0, addr_len,
> >> > +                             ARRAY_SIZE(addr_len));
> >> > +     if (ret) {
> >> > +             DRM_DEV_ERROR(dev,
> >>
> >> DRM_DEV_ERROR() is deprecated in favour of drm_err() or dev_err().
> >
> > Good point. I'm inclined to land this anyway, though, since this is
> > nominally a bugfix and it matches the error printing in the rest of
> > the function. Any objections? It would be a nice future cleanup to fix
> > the error printing in this driver overall to use the non-deprecated
> > functions...
>
> Up to you.

OK, pushed to drm-misc-fixes.

[1/1] drm/bridge: ps8640: propagate AUX transfer register errors
      commit: 20697ecb299cd77b4cf8b28f655e56606b0472d8

It would be great if someone wanted to update the error prints. :-)

-Doug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.