Skip to contentSkip to conversation

drm/i915: Fix MST audio enabling

PATCH In review Ander Conselvan de Oliveira 5 participants 5 messages Mar 11, 2016 – Mar 14, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Fix MST audio enabling

Commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio") erroneously added a check for MST encoder to ilk_audio_codec_enable instead of the hsw+ equivalent. That causes the HDMI path to be used, resulting in a wrong register value.

Cc Libin Yang <[email protected]>
Fixes commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio")
---
 drivers/gpu/drm/i915/intel_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +3 -3
index 30f9214..f5fccf7 100644
@@ -329,7 +329,8 @@ static void hsw_audio_codec_enable(struct drm_connector *connector,
 	tmp = I915_READ(HSW_AUD_CFG(pipe));
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
+	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -476,8 +477,7 @@ static void ilk_audio_codec_enable(struct drm_connector *connector,
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
Signature · 6 lines
2.4.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 18 lines · Ander Conselvan de Oliveira

Commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio") erroneously added a check for MST encoder to ilk_audio_codec_enable instead of the hsw+ equivalent. That causes the HDMI path to be used, resulting in a wrong register value.

Cc Libin Yang <[email protected]>
Fixes commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio")
---
 drivers/gpu/drm/i915/intel_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_audio.c +0 -0
index 30f9214..f5fccf7 100644

drivers/gpu/drm/i915/intel_audio.c static void hsw_audio_codec_enable(struct drm_connector *connector, · line 333

Quoted 6 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
@@ -329,7 +329,8 @@ static void hsw_audio_codec_enable(struct drm_connector *connector,
 	tmp = I915_READ(HSW_AUD_CFG(pipe));
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
+	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))

Humm. I thought had I asked all of these to be changed to has_dp_encoder. I wonder if I imagined it or if I was just ignored.

Quoted 20 lines
drivers/gpu/drm/i915/intel_audio.c +1 -2
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -476,8 +477,7 @@ static void ilk_audio_codec_enable(struct drm_connector *connector,
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
Signature · 6 lines
2.4.3

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Ander Conselvan de Oliveira

Commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio") erroneously added a check for MST encoder to ilk_audio_codec_enable instead of the hsw+ equivalent. That causes the HDMI path to be used, resulting in a wrong register value.

Cc Libin Yang <[email protected]>
Fixes commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio")
Signed-off-by Ander Conselvan de Oliveira <

[email protected]>

---
 drivers/gpu/drm/i915/intel_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 16 lines

drivers/gpu/drm/i915/intel_audio.c static void hsw_audio_codec_enable(struct drm_connector · line 334

Quoted 13 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
index 30f9214..f5fccf7 100644
@@ -329,7 +329,8 @@ static void hsw_audio_codec_enable(struct drm_connector
 *connector,
 	tmp = I915_READ(HSW_AUD_CFG(pipe));
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
+	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))

Humm. I thought had I asked all of these to be changed to has_dp_encoder. I wonder if I imagined it or if I was just ignored.

Ah, yes. Libin sent a patch to fix the same bug and you asked for that [1] and even R-b the follow up version even though it didn't use it everywhere. But it looks like Daniel didn't merge it since he wanted all uses converted to has_dp_encoders.

[1] https://patchwork.freedesktop.org/patch/68902/
[2] https://patchwork.freedesktop.org/patch/69525/

Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
drivers/gpu/drm/i915/intel_audio.c +1 -2
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -476,8 +477,7 @@ static void ilk_audio_codec_enable(struct drm_connector
 *connector,
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else

tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);

Signature · 1 line
2.4.3
Quoted 5 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

maintainer
#3 lore raw
Quoted 34 lines · Ander Conselvan De Oliveira

[ text/plain ]

Quoted 15 lines · Ville Syrjälä
Quoted 14 lines · Ander Conselvan de Oliveira

Commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio") erroneously added a check for MST encoder to ilk_audio_codec_enable instead of the hsw+ equivalent. That causes the HDMI path to be used, resulting in a wrong register value.

Cc Libin Yang <[email protected]>
Fixes commit 3d52ccf52f2c ("drm/i915: start adding dp mst audio")
Signed-off-by Ander Conselvan de Oliveira <

[email protected]>

---
 drivers/gpu/drm/i915/intel_audio.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 16 lines

drivers/gpu/drm/i915/intel_audio.c static void hsw_audio_codec_enable(struct drm_connector · line 334

Quoted 13 lines
drivers/gpu/drm/i915/intel_audio.c +2 -1
index 30f9214..f5fccf7 100644
@@ -329,7 +329,8 @@ static void hsw_audio_codec_enable(struct drm_connector
 *connector,
 	tmp = I915_READ(HSW_AUD_CFG(pipe));
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
+	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))

Humm. I thought had I asked all of these to be changed to has_dp_encoder. I wonder if I imagined it or if I was just ignored.

Quoted 4 lines

Ah, yes. Libin sent a patch to fix the same bug and you asked for that [1] and even R-b the follow up version even though it didn't use it everywhere. But it looks like Daniel didn't merge it since he wanted all uses converted to has_dp_encoders.

We want the minimal fix first now because by bikeshedding we let the bug slip to v4.5, and we need cc: stable on this.

BR,
Jani.

Quoted 32 lines

[1] https://patchwork.freedesktop.org/patch/68902/
[2] https://patchwork.freedesktop.org/patch/69525/

Quoted 18 lines
Quoted 18 lines
drivers/gpu/drm/i915/intel_audio.c +0 -0
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
drivers/gpu/drm/i915/intel_audio.c +1 -2
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -476,8 +477,7 @@ static void ilk_audio_codec_enable(struct drm_connector
 *connector,
 	tmp &= ~AUD_CONFIG_N_VALUE_INDEX;
 	tmp &= ~AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_PIXEL_CLOCK_HDMI_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else

tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);

Signature · 1 line
2.4.3
Quoted 5 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

✗ Fi.CI.BAT: failure for drm/i915: Fix MST audio enabling

In reply to Ander Conselvan de Oliveira
== Series Details ==

== Series Details ==

Series: drm/i915: Fix MST audio enabling
URL : https://patchwork.freedesktop.org/series/4370/
State : failure

== Summary ==

Series 4370v1 drm/i915: Fix MST audio enabling
http://patchwork.freedesktop.org/api/1.0/series/4370/revisions/1/mbox/

Test kms_addfb_basic:

        Subgroup clobberred-modifier:
                incomplete -> PASS       (bsw-nuc-2)
Test kms_flip:
        Subgroup basic-plain-flip:
                pass       -> INCOMPLETE (bsw-nuc-2)
                pass       -> DMESG-WARN (hsw-gt2)
Test kms_pipe_crc_basic:
        Subgroup nonblocking-crc-pipe-c:
                pass       -> DMESG-WARN (hsw-gt2)
Test kms_setmode:
        Subgroup basic-clone-single-crtc:
                pass       -> DMESG-WARN (snb-x220t)
Test pm_rpm:
        Subgroup basic-pci-d3-state:
                dmesg-fail -> FAIL       (snb-x220t)
                dmesg-warn -> PASS       (byt-nuc)
bdw-nuci7        total:194  pass:182  dwarn:0   dfail:0   fail:0   skip:12 
bdw-ultra        total:194  pass:173  dwarn:0   dfail:0   fail:0   skip:21 
bsw-nuc-2        total:4    pass:1    dwarn:0   dfail:0   fail:0   skip:2  
byt-nuc          total:194  pass:155  dwarn:4   dfail:0   fail:0   skip:35 
hsw-brixbox      total:194  pass:170  dwarn:2   dfail:0   fail:0   skip:22 
hsw-gt2          total:194  pass:175  dwarn:2   dfail:0   fail:0   skip:17 
ivb-t430s        total:194  pass:169  dwarn:0   dfail:0   fail:0   skip:25 
skl-i5k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-i7k-2        total:194  pass:171  dwarn:0   dfail:0   fail:0   skip:23 
skl-nuci5        total:194  pass:183  dwarn:0   dfail:0   fail:0   skip:11 
snb-dellxps      total:194  pass:159  dwarn:1   dfail:0   fail:0   skip:34 
snb-x220t        total:194  pass:159  dwarn:1   dfail:0   fail:1   skip:33 

Results at /archive/results/CI_IGT_test/Patchwork_1582/

571147d0be8b04cbbe99db761e82ef105c6f82ad drm-intel-nightly: 2016y-03m-11d-13h-31m-03s UTC integration manifest b8a315fba364c1a6c9fb2986b6fad6c6afb23686 drm/i915: Fix MST audio enabling

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx