All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <superm1@kernel.org>
To: "Eren Özen" <erenozen@protonmail.com>
Cc: simonit.orig@gmail.com, Richard Hughes <richard@hughsie.com>,
	Harry Wentland <harry.wentland@amd.com>,
	Leo Li <sunpeng.li@amd.com>,
	Alex Deucher <alexander.deucher@amd.com>,
	dri-devel@lists.freedesktop.org, Wayne Lin <Wayne.Lin@amd.com>,
	amd-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/amd/display: Route connector DDC over AUX for native DP sinks
Date: Wed, 18 Nov 2026 08:26:48 -0600	[thread overview]
Message-ID: <5386db0f-e9b3-4c62-bb2b-392cca4d761a@kernel.org> (raw)
In-Reply-To: <QU464501lRPW3X8es-jXBFOvvwqS3eKR3HRS33U6x6o5eYC6h5AKV7f3ZXRCaU7-sEcupJMHereqyDUsUSG_fsOMNwvGO_CcZRKsz1AgObk=@protonmail.com>

On 11/18/26 06:46, Eren Özen wrote:
> Hi Wayne, Mario,
> 
> 48b8c06b05ad ("drm/amd/display: Route connector DDC over AUX for native
> DP sinks") in amd-staging-drm-next is v2 of this patch, not v3 [1].
> 
> v3 added a NULL check on ddc_service->link. Without it, the existing
> KUnit test dm_test_i2c_xfer_no_ddc_pin(), whose ddc_service has no link,
> dereferences a NULL link and panics the UML kernel. sashiko-bot pointed
> this out on v2 [2]. It reproduces on amd-staging-drm-next 8dd68a79583a:
> 
>    RIP: 0033:amdgpu_dm_i2c_xfer+0x52/0x210
>    Kernel panic - not syncing: Segfault with no mm
>    ...
>    dm_test_i2c_xfer_no_ddc_pin+0xaf/0x1e0
> 
> Only 670 of the 1931 amdgpu_dm tests get to run.
> 
> I don't think picking up v3 instead is the answer, though. From reading
> the code, sashiko-bot's DP++ concern on v3 [3] looks right:
> link->aux_mode is only written in detect_link_and_local_sink() after
> detect_dp(), and nothing clears it on unplug. After a native DP monitor
> is swapped for a passive DP++ HDMI adapter, the adapter ID read in
> dp_passive_dongle_detection() would go over AUX. v2 doesn't have that
> problem, because link_disconnect_sink() clears local_sink before
> detect_dp().
> 
> In the driver, a non-OEM adapter always has ddc_service->link set
> (amdgpu_dm_create_i2c() already dereferences it), so I think only the
> test needs fixing. I can send a test-only patch that gives the test a
> zeroed dc_link. With it, all three i2c_xfer tests pass and the suite
> runs to the end again. Mario, if you'd rather fold it into a driver
> follow-up, I'm happy to test that instead.
> 
> [1] https://lore.kernel.org/all/20261110-superm1-amdgpu-ddc-v3-1-9436b04d1e31@kernel.org/
> [2] https://lore.kernel.org/all/sashiko-outbox-195461@kernel.org/
> [3] https://lore.kernel.org/all/sashiko-outbox-207767@kernel.org/
> 
> Thanks,
> Eren

Eren,

Really appreciate the feedback.  If you want to share your test patch 
I'll fold it into what's currently v3 and give you a C-d-b tag for v4.

Simon,

But I still need testing this actually works for the issue originally 
raised on real hardware.

These unit test issues are just noise "for that purpose".

  reply	other threads:[~2026-11-18 14:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03 14:18 [PATCH v2] drm/amd/display: Route connector DDC over AUX for native DP sinks Mario Limonciello
2026-11-03 14:36 ` sashiko-bot
2026-11-15  8:20 ` Wayne Lin
2026-11-15 14:06   ` Mario Limonciello
2026-11-18 12:46     ` Eren Özen
2026-11-18 14:26       ` Mario Limonciello [this message]
2026-11-18 16:07         ` Eren Özen
2026-11-18 16:29           ` SimonIT
2026-11-18 16:42             ` Eren Özen

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=5386db0f-e9b3-4c62-bb2b-392cca4d761a@kernel.org \
    --to=superm1@kernel.org \
    --cc=Wayne.Lin@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=erenozen@protonmail.com \
    --cc=harry.wentland@amd.com \
    --cc=richard@hughsie.com \
    --cc=simonit.orig@gmail.com \
    --cc=sunpeng.li@amd.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.