All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"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>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	linux-sound@vger.kernel.org,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	amd-gfx@lists.freedesktop.org, "Lyude Paul" <lyude@redhat.com>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Tomáš Hnyk" <tomashnyk@gmail.com>,
	"Wim Taymans" <wtaymans@redhat.com>,
	nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Kai Vehmanen" <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints
Date: Fri, 06 Nov 2026 15:30:06 +0200	[thread overview]
Message-ID: <e3f0bf049faf6222781eb61e23cdaacc62eccfd7@intel.com> (raw)
In-Reply-To: <20261105160240.2850042-1-kai.vehmanen@linux.intel.com>

On Thu, 05 Nov 2026, Kai Vehmanen <kai.vehmanen@linux.intel.com> wrote:
> The ELD Port_ID field (bytes 8..15 of the baseline block) is typically
> zero on Linux today: drm_edid_to_eld() leaves it empty and no in-tree driver
> fills it in. amdgpu, radeon and nouveau pass the raw connector->eld to
> the audio component. On the amdgpu DC Azalia register path the value
> is a hardcoded constant, the same for every port.
> Only closed display drivers fill the value.
>
> Pipewire added support for "Port_ID" in merge request:
> https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/3025
>
> As a result, when two identical monitors are connected their ELDs are
> byte-identical, and userspace (e.g. PipeWire/WirePlumber) cannot
> passively tell which HDMI/DP PCM belongs to which DRM connector.
>
> This series adds a DRM helper that fills Port_ID with a common layout,
> and uses it in i915:
>
>   bits 63:48 - PCI domain of the DRM device
>   bits 47:32 - PCI bus/device/function of the DRM device
>   bits 31:0  - DRM connector object ID
>
> The upper half follows the layout documented for the AMD Azalia sink
> info registers (dce_audio.c: "PORT_ID1 = 16bit BDF"). The aim is for
> this to become a convention other drivers can opt into. For drivers
> that copy connector->eld to the audio component (amdgpu DM, radeon,
> nouveau), adopting it would be a one-line change. Comments from the
> AMD and nouveau folks on whether the layout works for them are very
> welcome.
>
> An alternative would be to fill Port_ID directly in drm_edid_to_eld(),
> so every driver gets it without changes. I went with an opt-in helper
> to avoid changing the ELD contents seen by all drivers and existing
> userspace at once.
>
> The value is exposed to userspace via the ALSA ELD control and
> /proc/asound/cardX/eld#Y.

We might want drm_edid_to_eld() to do this automatically for everyone in
the future, but I think this is a good, cautious first step.

Acked-by: Jani Nikula <jani.nikula@intel.com>

>
> Kai Vehmanen (2):
>   drm/eld: Add drm_eld_set_port_id() helper
>   drm/i915/audio: Populate ELD Port_ID
>
>  drivers/gpu/drm/drm_eld.c                  | 42 ++++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_audio.c |  2 ++
>  include/drm/drm_eld.h                      |  3 ++
>  3 files changed, 47 insertions(+)

-- 
Jani Nikula, Intel

WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Kai Vehmanen <kai.vehmanen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Cc: "Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Rodrigo Vivi" <rodrigo.vivi@intel.com>,
	"Joonas Lahtinen" <joonas.lahtinen@linux.intel.com>,
	"Tvrtko Ursulin" <tursulin@ursulin.net>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Takashi Iwai" <tiwai@suse.com>,
	"Jaroslav Kysela" <perex@perex.cz>,
	linux-sound@vger.kernel.org,
	"Harry Wentland" <harry.wentland@amd.com>,
	"Leo Li" <sunpeng.li@amd.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	amd-gfx@lists.freedesktop.org,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Tomáš Hnyk" <tomashnyk@gmail.com>,
	"Wim Taymans" <wtaymans@redhat.com>,
	nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	"Kai Vehmanen" <kai.vehmanen@linux.intel.com>
Subject: Re: [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints
Date: Fri, 06 Nov 2026 15:30:06 +0200	[thread overview]
Message-ID: <e3f0bf049faf6222781eb61e23cdaacc62eccfd7@intel.com> (raw)
In-Reply-To: <20261105160240.2850042-1-kai.vehmanen@linux.intel.com>

On Thu, 05 Nov 2026, Kai Vehmanen <kai.vehmanen@linux.intel.com> wrote:
> The ELD Port_ID field (bytes 8..15 of the baseline block) is typically
> zero on Linux today: drm_edid_to_eld() leaves it empty and no in-tree driver
> fills it in. amdgpu, radeon and nouveau pass the raw connector->eld to
> the audio component. On the amdgpu DC Azalia register path the value
> is a hardcoded constant, the same for every port.
> Only closed display drivers fill the value.
>
> Pipewire added support for "Port_ID" in merge request:
> https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/3025
>
> As a result, when two identical monitors are connected their ELDs are
> byte-identical, and userspace (e.g. PipeWire/WirePlumber) cannot
> passively tell which HDMI/DP PCM belongs to which DRM connector.
>
> This series adds a DRM helper that fills Port_ID with a common layout,
> and uses it in i915:
>
>   bits 63:48 - PCI domain of the DRM device
>   bits 47:32 - PCI bus/device/function of the DRM device
>   bits 31:0  - DRM connector object ID
>
> The upper half follows the layout documented for the AMD Azalia sink
> info registers (dce_audio.c: "PORT_ID1 = 16bit BDF"). The aim is for
> this to become a convention other drivers can opt into. For drivers
> that copy connector->eld to the audio component (amdgpu DM, radeon,
> nouveau), adopting it would be a one-line change. Comments from the
> AMD and nouveau folks on whether the layout works for them are very
> welcome.
>
> An alternative would be to fill Port_ID directly in drm_edid_to_eld(),
> so every driver gets it without changes. I went with an opt-in helper
> to avoid changing the ELD contents seen by all drivers and existing
> userspace at once.
>
> The value is exposed to userspace via the ALSA ELD control and
> /proc/asound/cardX/eld#Y.

We might want drm_edid_to_eld() to do this automatically for everyone in
the future, but I think this is a good, cautious first step.

Acked-by: Jani Nikula <jani.nikula@intel.com>

>
> Kai Vehmanen (2):
>   drm/eld: Add drm_eld_set_port_id() helper
>   drm/i915/audio: Populate ELD Port_ID
>
>  drivers/gpu/drm/drm_eld.c                  | 42 ++++++++++++++++++++++
>  drivers/gpu/drm/i915/display/intel_audio.c |  2 ++
>  include/drm/drm_eld.h                      |  3 ++
>  3 files changed, 47 insertions(+)

-- 
Jani Nikula, Intel

  parent reply	other threads:[~2026-11-06 13:30 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 16:02 [PATCH 0/2] drm: Populate ELD Port_ID to identify audio endpoints Kai Vehmanen
2026-11-05 16:02 ` Kai Vehmanen
2026-11-05 16:02 ` [PATCH 1/2] drm/eld: Add drm_eld_set_port_id() helper Kai Vehmanen
2026-11-05 16:02   ` Kai Vehmanen
2026-11-05 17:08   ` Ville Syrjälä
2026-11-05 17:08     ` Ville Syrjälä
2026-11-05 16:02 ` [PATCH 2/2] drm/i915/audio: Populate ELD Port_ID Kai Vehmanen
2026-11-05 16:02   ` Kai Vehmanen
2026-11-05 17:09   ` Ville Syrjälä
2026-11-05 17:09     ` Ville Syrjälä
2026-11-05 16:58 ` ✓ CI.KUnit: success for drm: Populate ELD Port_ID to identify audio endpoints Patchwork
2026-11-05 17:35 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-05 21:08 ` ✓ i915.CI.BAT: " Patchwork
2026-11-06  4:43 ` ✗ i915.CI.Full: failure " Patchwork
2026-11-06  7:16 ` [PATCH 0/2] " Takashi Iwai
2026-11-06  7:16   ` Takashi Iwai
2026-11-06 13:30 ` Jani Nikula [this message]
2026-11-06 13:30   ` Jani Nikula
2026-11-06 17:24 ` ✗ Xe.CI.FULL: failure for " Patchwork

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=e3f0bf049faf6222781eb61e23cdaacc62eccfd7@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=airlied@gmail.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=harry.wentland@amd.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=kai.vehmanen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=nouveau@lists.freedesktop.org \
    --cc=perex@perex.cz \
    --cc=rodrigo.vivi@intel.com \
    --cc=simona@ffwll.ch \
    --cc=sunpeng.li@amd.com \
    --cc=tiwai@suse.com \
    --cc=tomashnyk@gmail.com \
    --cc=tursulin@ursulin.net \
    --cc=tzimmermann@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=wtaymans@redhat.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.