dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Dave Airlie" <airlied@gmail.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] nouveau/connector: set no zero sized all displayport on nouveau
Date: Thu, 27 Aug 2026 01:57:57 +0000	[thread overview]
Message-ID: <20260827015758.0B4FB1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260827015038.3483865-1-airlied@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Enabling `no_zero_sized` globally exposes pre-existing bugs in `drm_dp_i2c_xfer()`, breaking REPEATED START for multi-message transfers (e.g., EDID reads) and causing phantom devices during I2C probing.
--

commit bbcbb4f64ad839a36fe04a07743e9aaa99d1aec1
Author: Dave Airlie <airlied@redhat.com>

nouveau/connector: set no zero sized all displayport on nouveau

This commit removes the architecture generation check for the no_zero_sized
flag on DisplayPort/eDP connectors. It applies the flag unconditionally for
all Nvidia GPUs in nouveau.

> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index b0b0ad9a0c248..9b9c9ea2bce12 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -1404,8 +1404,7 @@ nouveau_connector_create(struct drm_device *dev, int index)
>  		nv_connector->aux.drm_dev = dev;
>  		nv_connector->aux.transfer = nouveau_connector_aux_xfer;
>  		nv_connector->aux.name = connector->name;
> -		if (disp->disp.object.oclass >= GB202_DISP)
> -			nv_connector->aux.no_zero_sized = true;
> +		nv_connector->aux.no_zero_sized = true;
                ^^^^

[Severity: High]
This isn't a bug introduced by this patch, but enabling no_zero_sized
unconditionally for all DisplayPort/eDP connections exposes a pre-existing
bug in drm_dp_i2c_xfer() for multi-message transfers.

When no_zero_sized is true, drm_dp_i2c_xfer() erroneously clears the MOT
(Middle-Of-Transfer) bit at the end of every message rather than only at
the end of the final message.

In drivers/gpu/drm/display/drm_dp_helper.c:drm_dp_i2c_xfer():

	for (j = 0; j < msgs[i].len; j += msg.size) {
		...
		if (j + msg.size == msgs[i].len && aux->no_zero_sized)
			msg.request &= ~DP_AUX_I2C_MOT;
		...
	}

By clearing DP_AUX_I2C_MOT at the end of each message loop, this breaks the
REPEATED START condition required for multi-message I2C transfers (such as
EDID reads), emitting STOP conditions between messages instead.

Additionally, zero-length I2C transfers are entirely bypassed by the loop:

	for (j = 0; j < msgs[i].len; j += msg.size) {

When len is 0, this loop is skipped, resulting in no hardware interaction
while still falsely reporting success. This can cause I2C scanning to see
phantom devices at every address.

Does it make sense to fix drm_dp_i2c_xfer() before enabling this flag
globally for all Nvidia GPUs to avoid regressing display detection and I2C
probing on strict monitors?

>  		drm_dp_aux_init(&nv_connector->aux);
>  		break;
>  	default:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260827015038.3483865-1-airlied@gmail.com?part=1

      reply	other threads:[~2026-08-27  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-27  1:50 [PATCH] nouveau/connector: set no zero sized all displayport on nouveau Dave Airlie
2026-08-27  1:57 ` sashiko-bot [this message]

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=20260827015758.0B4FB1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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