i915 never fills in the ELD Port_ID field, so it is always zero, and the ELDs of identical monitors connected to different outputs are byte-identical. Userspace then cannot tell which HDMI/DP PCM belongs to which DRM connector without toggling the connector audio property.
Use drm_eld_set_port_id() when computing the audio config, so the value reaches the audio driver through every path: the audio component get_eld() callback, the hardware ELD buffer, SDVO and LPE audio. The value is fixed for the lifetime of the connector, so it does not cause extra audio re-enables when the ELD is compared across commits, and state readout stays consistent because it is copied from the programmed ELD. Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16693 Signed-off-by: Kai Vehmanen <[email protected]> --- drivers/gpu/drm/i915/display/intel_audio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_audio.c b/drivers/gpu/drm/i915/display/intel_audio.c index 32f8c5e55319..3277e67748ee 100644 --- a/drivers/gpu/drm/i915/display/intel_audio.c +++ b/drivers/gpu/drm/i915/display/intel_audio.c @@ -881,6 +881,8 @@ bool intel_audio_compute_config(struct intel_encoder *encoder, crtc_state->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2; mutex_unlock(&connector->eld_mutex); + drm_eld_set_port_id(crtc_state->eld, connector); + return true; } -- 2.43.0
