mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Doug Anderson <dianders@chromium.org>
Cc: Pengpeng Hou <pengpeng@iscas.ac.cn>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Luca Ceresoli <luca.ceresoli@bootlin.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] drm/bridge: ps8640: propagate AUX transfer register errors
Date: Thu, 30 Jul 2026 11:38:33 +0300	[thread overview]
Message-ID: <b962d68e6640787a539690edf022b338a9b47bbe@intel.com> (raw)
In-Reply-To: <CAD=FV=Wo-ps+aStGn5vCvb08tKx-rKDeu-r0bRVABL8zgg4Lhw@mail.gmail.com>

On Wed, 29 Jul 2026, Doug Anderson <dianders@chromium.org> wrote:
> Hi,
>
> On Mon, Jul 27, 2026 at 4:40 AM Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>
>> On Thu, 23 Jul 2026, Pengpeng Hou <pengpeng@iscas.ac.cn> 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 <pengpeng@iscas.ac.cn>
>> > ---
>> > Changes since v1: https://lore.kernel.org/all/20260623060635.16064-1-pengpeng@iscas.ac.cn/
>> > - 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.

BR,
Jani.


-- 
Jani Nikula, Intel

  reply	other threads:[~2026-07-30  8:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23  2:38 Pengpeng Hou
2026-07-25  0:55 ` Doug Anderson
2026-07-27 11:40 ` Jani Nikula
2026-07-30  1:41   ` Doug Anderson
2026-07-30  8:38     ` Jani Nikula [this message]
2026-07-30 21:26       ` Doug Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b962d68e6640787a539690edf022b338a9b47bbe@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dianders@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.ceresoli@bootlin.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=pengpeng@iscas.ac.cn \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome