All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio
@ 2015-12-23  6:50 libin.yang
  2015-12-23  6:50 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
  2015-12-23  7:49 ` ✗ warning: Fi.CI.BAT Patchwork
  0 siblings, 2 replies; 10+ messages in thread
From: libin.yang @ 2015-12-23  6:50 UTC (permalink / raw)
  To: intel-gfx, conselvan2, tiwai, jani.nikula, ville.syrjala,
	daniel.vetter
  Cc: Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

For DP MST, use enc_to_mst(encoder)->primary to get intel_digital_port,
instead of using enc_to_dig_port(encoder).

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 31f6d21..431487a0 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -187,6 +187,16 @@ static bool intel_eld_uptodate(struct drm_connector *connector,
 	return true;
 }
 
+static struct intel_digital_port *
+intel_encoder_to_dig_port(struct intel_encoder *intel_encoder)
+{
+	struct drm_encoder *encoder = &intel_encoder->base;
+
+	if (intel_encoder->type == INTEL_OUTPUT_DP_MST)
+		return enc_to_mst(encoder)->primary;
+	return enc_to_dig_port(encoder);
+}
+
 static void g4x_audio_codec_disable(struct intel_encoder *encoder)
 {
 	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
@@ -286,7 +296,7 @@ static void hsw_audio_codec_enable(struct drm_connector *connector,
 	struct i915_audio_component *acomp = dev_priv->audio_component;
 	const uint8_t *eld = connector->eld;
 	struct intel_digital_port *intel_dig_port =
-		enc_to_dig_port(&encoder->base);
+		intel_encoder_to_dig_port(encoder);
 	enum port port = intel_dig_port->port;
 	uint32_t tmp;
 	int len, i;
@@ -500,7 +510,8 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
 	struct drm_device *dev = encoder->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_audio_component *acomp = dev_priv->audio_component;
-	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
+	struct intel_digital_port *intel_dig_port =
+		intel_encoder_to_dig_port(intel_encoder);
 	enum port port = intel_dig_port->port;
 
 	connector = drm_select_eld(encoder);
@@ -546,7 +557,8 @@ void intel_audio_codec_disable(struct intel_encoder *intel_encoder)
 	struct drm_device *dev = encoder->dev;
 	struct drm_i915_private *dev_priv = dev->dev_private;
 	struct i915_audio_component *acomp = dev_priv->audio_component;
-	struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder);
+	struct intel_digital_port *intel_dig_port =
+		intel_encoder_to_dig_port(intel_encoder);
 	enum port port = intel_dig_port->port;
 
 	if (dev_priv->display.audio_codec_disable)
@@ -724,7 +736,8 @@ static int i915_audio_component_get_eld(struct device *dev, int port,
 	/* intel_encoder might be NULL for DP MST */
 	if (intel_encoder) {
 		ret = 0;
-		intel_dig_port = enc_to_dig_port(&intel_encoder->base);
+		intel_dig_port =
+			intel_encoder_to_dig_port(intel_encoder);
 		*enabled = intel_dig_port->audio_connector != NULL;
 		if (*enabled) {
 			eld = intel_dig_port->audio_connector->eld;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2015-12-23  6:50 [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio libin.yang
@ 2015-12-23  6:50 ` libin.yang
  2016-01-04 16:03   ` Ville Syrjälä
  2015-12-23  7:49 ` ✗ warning: Fi.CI.BAT Patchwork
  1 sibling, 1 reply; 10+ messages in thread
From: libin.yang @ 2015-12-23  6:50 UTC (permalink / raw)
  To: intel-gfx, conselvan2, tiwai, jani.nikula, ville.syrjala,
	daniel.vetter
  Cc: Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

hsw platforms supports DP MST while ilk doesn't.
This patch fixes the bug.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 431487a0..f46fa7b 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -255,6 +255,11 @@ static void g4x_audio_codec_enable(struct drm_connector *connector,
 	I915_WRITE(G4X_AUD_CNTL_ST, tmp);
 }
 
+/* pipe type is DP SST or DP MST */
+#define intel_pipe_is_dp(intel_crtc) \
+	(intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) || \
+	 intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+
 static void hsw_audio_codec_disable(struct intel_encoder *encoder)
 {
 	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
@@ -272,8 +277,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
 	tmp |= AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
 	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_is_dp(intel_crtc))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
 
@@ -339,7 +343,7 @@ 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_is_dp(intel_crtc))
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -486,8 +490,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);
@@ -526,8 +529,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
 
 	/* ELD Conn_Type */
 	connector->eld[5] &= ~(3 << 2);
-	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_pipe_is_dp(crtc))
 		connector->eld[5] |= (1 << 2);
 
 	connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* ✗ warning: Fi.CI.BAT
  2015-12-23  6:50 [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio libin.yang
  2015-12-23  6:50 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
@ 2015-12-23  7:49 ` Patchwork
  2015-12-29  2:23   ` Libin Yang
  1 sibling, 1 reply; 10+ messages in thread
From: Patchwork @ 2015-12-23  7:49 UTC (permalink / raw)
  To: libin.yang; +Cc: intel-gfx

== Summary ==

Built on 7e671e69deffb88d60687dacffe6e34a5d046500 drm-intel-nightly: 2015y-12m-22d-13h-28m-34s UTC integration manifest

Test gem_storedw_loop:
        Subgroup basic-render:
                pass       -> DMESG-WARN (skl-i5k-2)
Test kms_flip:
        Subgroup basic-flip-vs-dpms:
                dmesg-warn -> PASS       (ilk-hp8440p)
        Subgroup basic-flip-vs-modeset:
                dmesg-warn -> PASS       (bsw-nuc-2)
                pass       -> DMESG-WARN (skl-i5k-2)
                dmesg-warn -> PASS       (byt-nuc)
                pass       -> DMESG-WARN (hsw-brixbox)
                pass       -> DMESG-WARN (bdw-nuci7)
                dmesg-warn -> PASS       (ilk-hp8440p)
        Subgroup basic-plain-flip:
                pass       -> DMESG-WARN (bdw-ultra)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-a-frame-sequence:
                dmesg-warn -> PASS       (byt-nuc)
        Subgroup read-crc-pipe-b:
                dmesg-warn -> PASS       (skl-i5k-2)
        Subgroup read-crc-pipe-b-frame-sequence:
                pass       -> DMESG-WARN (byt-nuc)
Test kms_psr_sink_crc:
        Subgroup psr_basic:
                dmesg-warn -> PASS       (bdw-ultra)

bdw-nuci7        total:132  pass:121  dwarn:2   dfail:0   fail:0   skip:9  
bdw-ultra        total:132  pass:124  dwarn:2   dfail:0   fail:0   skip:6  
bsw-nuc-2        total:135  pass:114  dwarn:1   dfail:0   fail:0   skip:20 
byt-nuc          total:135  pass:119  dwarn:3   dfail:0   fail:0   skip:13 
hsw-brixbox      total:135  pass:126  dwarn:2   dfail:0   fail:0   skip:7  
hsw-gt2          total:135  pass:130  dwarn:1   dfail:0   fail:0   skip:4  
hsw-xps12        total:132  pass:125  dwarn:3   dfail:0   fail:0   skip:4  
ilk-hp8440p      total:135  pass:100  dwarn:0   dfail:0   fail:0   skip:35 
ivb-t430s        total:135  pass:127  dwarn:2   dfail:0   fail:0   skip:6  
skl-i5k-2        total:135  pass:123  dwarn:4   dfail:0   fail:0   skip:8  
skl-i7k-2        total:135  pass:124  dwarn:3   dfail:0   fail:0   skip:8  
snb-dellxps      total:135  pass:121  dwarn:2   dfail:0   fail:0   skip:12 
snb-x220t        total:135  pass:122  dwarn:1   dfail:0   fail:1   skip:11 

Results at /archive/results/CI_IGT_test/Patchwork_799/

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ✗ warning: Fi.CI.BAT
  2015-12-23  7:49 ` ✗ warning: Fi.CI.BAT Patchwork
@ 2015-12-29  2:23   ` Libin Yang
  2015-12-30 12:47     ` Jani Nikula
  0 siblings, 1 reply; 10+ messages in thread
From: Libin Yang @ 2015-12-29  2:23 UTC (permalink / raw)
  To: intel-gfx

Sorry to interrupt.

I got this email sent to me. It seems one of my patch causes this 
issue? Does anyone know how to find which patch causes this issue from 
the below message? Thanks.

Best Regards,
Libin

On 12/23/2015 03:49 PM, Patchwork wrote:
> == Summary ==
>
> Built on 7e671e69deffb88d60687dacffe6e34a5d046500 drm-intel-nightly: 2015y-12m-22d-13h-28m-34s UTC integration manifest
>
> Test gem_storedw_loop:
>          Subgroup basic-render:
>                  pass       -> DMESG-WARN (skl-i5k-2)
> Test kms_flip:
>          Subgroup basic-flip-vs-dpms:
>                  dmesg-warn -> PASS       (ilk-hp8440p)
>          Subgroup basic-flip-vs-modeset:
>                  dmesg-warn -> PASS       (bsw-nuc-2)
>                  pass       -> DMESG-WARN (skl-i5k-2)
>                  dmesg-warn -> PASS       (byt-nuc)
>                  pass       -> DMESG-WARN (hsw-brixbox)
>                  pass       -> DMESG-WARN (bdw-nuci7)
>                  dmesg-warn -> PASS       (ilk-hp8440p)
>          Subgroup basic-plain-flip:
>                  pass       -> DMESG-WARN (bdw-ultra)
> Test kms_pipe_crc_basic:
>          Subgroup read-crc-pipe-a-frame-sequence:
>                  dmesg-warn -> PASS       (byt-nuc)
>          Subgroup read-crc-pipe-b:
>                  dmesg-warn -> PASS       (skl-i5k-2)
>          Subgroup read-crc-pipe-b-frame-sequence:
>                  pass       -> DMESG-WARN (byt-nuc)
> Test kms_psr_sink_crc:
>          Subgroup psr_basic:
>                  dmesg-warn -> PASS       (bdw-ultra)
>
> bdw-nuci7        total:132  pass:121  dwarn:2   dfail:0   fail:0   skip:9
> bdw-ultra        total:132  pass:124  dwarn:2   dfail:0   fail:0   skip:6
> bsw-nuc-2        total:135  pass:114  dwarn:1   dfail:0   fail:0   skip:20
> byt-nuc          total:135  pass:119  dwarn:3   dfail:0   fail:0   skip:13
> hsw-brixbox      total:135  pass:126  dwarn:2   dfail:0   fail:0   skip:7
> hsw-gt2          total:135  pass:130  dwarn:1   dfail:0   fail:0   skip:4
> hsw-xps12        total:132  pass:125  dwarn:3   dfail:0   fail:0   skip:4
> ilk-hp8440p      total:135  pass:100  dwarn:0   dfail:0   fail:0   skip:35
> ivb-t430s        total:135  pass:127  dwarn:2   dfail:0   fail:0   skip:6
> skl-i5k-2        total:135  pass:123  dwarn:4   dfail:0   fail:0   skip:8
> skl-i7k-2        total:135  pass:124  dwarn:3   dfail:0   fail:0   skip:8
> snb-dellxps      total:135  pass:121  dwarn:2   dfail:0   fail:0   skip:12
> snb-x220t        total:135  pass:122  dwarn:1   dfail:0   fail:1   skip:11
>
> Results at /archive/results/CI_IGT_test/Patchwork_799/
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: ✗ warning: Fi.CI.BAT
  2015-12-29  2:23   ` Libin Yang
@ 2015-12-30 12:47     ` Jani Nikula
  0 siblings, 0 replies; 10+ messages in thread
From: Jani Nikula @ 2015-12-30 12:47 UTC (permalink / raw)
  To: Libin Yang, intel-gfx

On Tue, 29 Dec 2015, Libin Yang <libin.yang@linux.intel.com> wrote:
> Sorry to interrupt.
>
> I got this email sent to me. It seems one of my patch causes this 
> issue? Does anyone know how to find which patch causes this issue from 
> the below message? Thanks.

Some of the tests don't give stable results yet. We're working on it. It
doesn't look like your patch would change the results of any of those
tests for real.

BR,
Jani.


>
> Best Regards,
> Libin
>
> On 12/23/2015 03:49 PM, Patchwork wrote:
>> == Summary ==
>>
>> Built on 7e671e69deffb88d60687dacffe6e34a5d046500 drm-intel-nightly: 2015y-12m-22d-13h-28m-34s UTC integration manifest
>>
>> Test gem_storedw_loop:
>>          Subgroup basic-render:
>>                  pass       -> DMESG-WARN (skl-i5k-2)
>> Test kms_flip:
>>          Subgroup basic-flip-vs-dpms:
>>                  dmesg-warn -> PASS       (ilk-hp8440p)
>>          Subgroup basic-flip-vs-modeset:
>>                  dmesg-warn -> PASS       (bsw-nuc-2)
>>                  pass       -> DMESG-WARN (skl-i5k-2)
>>                  dmesg-warn -> PASS       (byt-nuc)
>>                  pass       -> DMESG-WARN (hsw-brixbox)
>>                  pass       -> DMESG-WARN (bdw-nuci7)
>>                  dmesg-warn -> PASS       (ilk-hp8440p)
>>          Subgroup basic-plain-flip:
>>                  pass       -> DMESG-WARN (bdw-ultra)
>> Test kms_pipe_crc_basic:
>>          Subgroup read-crc-pipe-a-frame-sequence:
>>                  dmesg-warn -> PASS       (byt-nuc)
>>          Subgroup read-crc-pipe-b:
>>                  dmesg-warn -> PASS       (skl-i5k-2)
>>          Subgroup read-crc-pipe-b-frame-sequence:
>>                  pass       -> DMESG-WARN (byt-nuc)
>> Test kms_psr_sink_crc:
>>          Subgroup psr_basic:
>>                  dmesg-warn -> PASS       (bdw-ultra)
>>
>> bdw-nuci7        total:132  pass:121  dwarn:2   dfail:0   fail:0   skip:9
>> bdw-ultra        total:132  pass:124  dwarn:2   dfail:0   fail:0   skip:6
>> bsw-nuc-2        total:135  pass:114  dwarn:1   dfail:0   fail:0   skip:20
>> byt-nuc          total:135  pass:119  dwarn:3   dfail:0   fail:0   skip:13
>> hsw-brixbox      total:135  pass:126  dwarn:2   dfail:0   fail:0   skip:7
>> hsw-gt2          total:135  pass:130  dwarn:1   dfail:0   fail:0   skip:4
>> hsw-xps12        total:132  pass:125  dwarn:3   dfail:0   fail:0   skip:4
>> ilk-hp8440p      total:135  pass:100  dwarn:0   dfail:0   fail:0   skip:35
>> ivb-t430s        total:135  pass:127  dwarn:2   dfail:0   fail:0   skip:6
>> skl-i5k-2        total:135  pass:123  dwarn:4   dfail:0   fail:0   skip:8
>> skl-i7k-2        total:135  pass:124  dwarn:3   dfail:0   fail:0   skip:8
>> snb-dellxps      total:135  pass:121  dwarn:2   dfail:0   fail:0   skip:12
>> snb-x220t        total:135  pass:122  dwarn:1   dfail:0   fail:1   skip:11
>>
>> Results at /archive/results/CI_IGT_test/Patchwork_799/
>>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2015-12-23  6:50 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
@ 2016-01-04 16:03   ` Ville Syrjälä
  2016-01-06  2:26     ` Yang, Libin
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2016-01-04 16:03 UTC (permalink / raw)
  To: libin.yang; +Cc: intel-gfx, tiwai, daniel.vetter

On Wed, Dec 23, 2015 at 02:50:47PM +0800, libin.yang@linux.intel.com wrote:
> From: Libin Yang <libin.yang@linux.intel.com>
> 
> hsw platforms supports DP MST while ilk doesn't.
> This patch fixes the bug.
> 
> Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 431487a0..f46fa7b 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -255,6 +255,11 @@ static void g4x_audio_codec_enable(struct drm_connector *connector,
>  	I915_WRITE(G4X_AUD_CNTL_ST, tmp);
>  }
>  
> +/* pipe type is DP SST or DP MST */
> +#define intel_pipe_is_dp(intel_crtc) \
> +	(intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) || \
> +	 intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> +

crtc->config->has_dp_encoder should be good enough for all platforms.

Though I have some plans to eliminate it, but that doesn't mean we can't
use it in the meantime.

>  static void hsw_audio_codec_disable(struct intel_encoder *encoder)
>  {
>  	struct drm_i915_private *dev_priv = encoder->base.dev->dev_private;
> @@ -272,8 +277,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
>  	tmp |= AUD_CONFIG_N_PROG_ENABLE;
>  	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
>  	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
> -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> -	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> +	if (intel_pipe_is_dp(intel_crtc))
>  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
>  
> @@ -339,7 +343,7 @@ 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_is_dp(intel_crtc))
>  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>  	else
>  		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
> @@ -486,8 +490,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);
> @@ -526,8 +529,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
>  
>  	/* ELD Conn_Type */
>  	connector->eld[5] &= ~(3 << 2);
> -	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> -	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
> +	if (intel_pipe_is_dp(crtc))
>  		connector->eld[5] |= (1 << 2);
>  
>  	connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2016-01-04 16:03   ` Ville Syrjälä
@ 2016-01-06  2:26     ` Yang, Libin
  0 siblings, 0 replies; 10+ messages in thread
From: Yang, Libin @ 2016-01-06  2:26 UTC (permalink / raw)
  To: ville.syrjala@linux.intel.com, libin.yang@linux.intel.com
  Cc: tiwai@suse.de, intel-gfx@lists.freedesktop.org, Vetter, Daniel

Hi Ville,

> -----Original Message-----
> From: Ville Syrjälä [mailto:ville.syrjala@linux.intel.com]
> Sent: Tuesday, January 05, 2016 12:03 AM
> To: libin.yang@linux.intel.com
> Cc: intel-gfx@lists.freedesktop.org; conselvan2@gmail.com;
> tiwai@suse.de; jani.nikula@linux.intel.com; Vetter, Daniel; Yang, Libin
> Subject: Re: [PATCH 2/2] drm/i915: add dp mst judgement in
> hsw_audio_codec_enable
> 
> On Wed, Dec 23, 2015 at 02:50:47PM +0800, libin.yang@linux.intel.com
> wrote:
> > From: Libin Yang <libin.yang@linux.intel.com>
> >
> > hsw platforms supports DP MST while ilk doesn't.
> > This patch fixes the bug.
> >
> > Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 16 +++++++++-------
> >  1 file changed, 9 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c
> b/drivers/gpu/drm/i915/intel_audio.c
> > index 431487a0..f46fa7b 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -255,6 +255,11 @@ static void g4x_audio_codec_enable(struct
> drm_connector *connector,
> >  	I915_WRITE(G4X_AUD_CNTL_ST, tmp);
> >  }
> >
> > +/* pipe type is DP SST or DP MST */
> > +#define intel_pipe_is_dp(intel_crtc) \
> > +	(intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT)
> || \
> > +	 intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> > +
> 
> crtc->config->has_dp_encoder should be good enough for all platforms.
> 
> Though I have some plans to eliminate it, but that doesn't mean we can't
> use it in the meantime.

Thanks. I have verified your method and it works. I will send the refined
patches.

Regards,
Libin

> 
> >  static void hsw_audio_codec_disable(struct intel_encoder *encoder)
> >  {
> >  	struct drm_i915_private *dev_priv = encoder->base.dev-
> >dev_private;
> > @@ -272,8 +277,7 @@ static void hsw_audio_codec_disable(struct
> intel_encoder *encoder)
> >  	tmp |= AUD_CONFIG_N_PROG_ENABLE;
> >  	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
> >  	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
> > -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT)
> ||
> > -	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> > +	if (intel_pipe_is_dp(intel_crtc))
> >  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
> >  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
> >
> > @@ -339,7 +343,7 @@ 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_is_dp(intel_crtc))
> >  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
> >  	else
> >  		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
> > @@ -486,8 +490,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);
> > @@ -526,8 +529,7 @@ void intel_audio_codec_enable(struct
> intel_encoder *intel_encoder)
> >
> >  	/* ELD Conn_Type */
> >  	connector->eld[5] &= ~(3 << 2);
> > -	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> > -	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
> > +	if (intel_pipe_is_dp(crtc))
> >  		connector->eld[5] |= (1 << 2);
> >
> >  	connector->eld[6] = drm_av_sync_delay(connector,
> adjusted_mode) / 2;
> > --
> > 1.9.1
> 
> --
> Ville Syrjälä
> Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2016-01-06  2:26 [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio libin.yang
@ 2016-01-06  2:26 ` libin.yang
  2016-01-07 16:51   ` Ville Syrjälä
  0 siblings, 1 reply; 10+ messages in thread
From: libin.yang @ 2016-01-06  2:26 UTC (permalink / raw)
  To: intel-gfx, conselvan2, jani.nikula, ville.syrjala, daniel.vetter,
	tiwai
  Cc: Libin Yang

From: Libin Yang <libin.yang@linux.intel.com>

hsw platforms supports DP MST while ilk doesn't.
This patch fixes the bug.

Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_audio.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
index 431487a0..d8d42d3 100644
--- a/drivers/gpu/drm/i915/intel_audio.c
+++ b/drivers/gpu/drm/i915/intel_audio.c
@@ -272,8 +272,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
 	tmp |= AUD_CONFIG_N_PROG_ENABLE;
 	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
 	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
-	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
+	if (intel_crtc->config->has_dp_encoder)
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
 
@@ -339,7 +338,7 @@ 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_crtc->config->has_dp_encoder)
 		tmp |= AUD_CONFIG_N_VALUE_INDEX;
 	else
 		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
@@ -486,8 +485,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);
@@ -526,8 +524,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
 
 	/* ELD Conn_Type */
 	connector->eld[5] &= ~(3 << 2);
-	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
-	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
+	if (crtc->config->has_dp_encoder)
 		connector->eld[5] |= (1 << 2);
 
 	connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2016-01-06  2:26 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
@ 2016-01-07 16:51   ` Ville Syrjälä
  2016-01-07 16:59     ` Daniel Vetter
  0 siblings, 1 reply; 10+ messages in thread
From: Ville Syrjälä @ 2016-01-07 16:51 UTC (permalink / raw)
  To: libin.yang; +Cc: intel-gfx, tiwai, daniel.vetter

On Wed, Jan 06, 2016 at 10:26:42AM +0800, libin.yang@linux.intel.com wrote:
> From: Libin Yang <libin.yang@linux.intel.com>
> 
> hsw platforms supports DP MST while ilk doesn't.
> This patch fixes the bug.
> 
> Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_audio.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> index 431487a0..d8d42d3 100644
> --- a/drivers/gpu/drm/i915/intel_audio.c
> +++ b/drivers/gpu/drm/i915/intel_audio.c
> @@ -272,8 +272,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
>  	tmp |= AUD_CONFIG_N_PROG_ENABLE;
>  	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
>  	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
> -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> -	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> +	if (intel_crtc->config->has_dp_encoder)
>  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
>  
> @@ -339,7 +338,7 @@ 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_crtc->config->has_dp_encoder)
>  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>  	else
>  		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
> @@ -486,8 +485,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))

Could have used has_dp_encoder everywhere, but whatever

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
>  	else
>  		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
> @@ -526,8 +524,7 @@ void intel_audio_codec_enable(struct intel_encoder *intel_encoder)
>  
>  	/* ELD Conn_Type */
>  	connector->eld[5] &= ~(3 << 2);
> -	if (intel_pipe_has_type(crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> -	    intel_pipe_has_type(crtc, INTEL_OUTPUT_DP_MST))
> +	if (crtc->config->has_dp_encoder)
>  		connector->eld[5] |= (1 << 2);
>  
>  	connector->eld[6] = drm_av_sync_delay(connector, adjusted_mode) / 2;
> -- 
> 1.9.1

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable
  2016-01-07 16:51   ` Ville Syrjälä
@ 2016-01-07 16:59     ` Daniel Vetter
  0 siblings, 0 replies; 10+ messages in thread
From: Daniel Vetter @ 2016-01-07 16:59 UTC (permalink / raw)
  To: Ville Syrjälä; +Cc: tiwai, daniel.vetter, libin.yang, intel-gfx

On Thu, Jan 07, 2016 at 06:51:08PM +0200, Ville Syrjälä wrote:
> On Wed, Jan 06, 2016 at 10:26:42AM +0800, libin.yang@linux.intel.com wrote:
> > From: Libin Yang <libin.yang@linux.intel.com>
> > 
> > hsw platforms supports DP MST while ilk doesn't.
> > This patch fixes the bug.
> > 
> > Signed-off-by: Libin Yang <libin.yang@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_audio.c | 11 ++++-------
> >  1 file changed, 4 insertions(+), 7 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
> > index 431487a0..d8d42d3 100644
> > --- a/drivers/gpu/drm/i915/intel_audio.c
> > +++ b/drivers/gpu/drm/i915/intel_audio.c
> > @@ -272,8 +272,7 @@ static void hsw_audio_codec_disable(struct intel_encoder *encoder)
> >  	tmp |= AUD_CONFIG_N_PROG_ENABLE;
> >  	tmp &= ~AUD_CONFIG_UPPER_N_MASK;
> >  	tmp &= ~AUD_CONFIG_LOWER_N_MASK;
> > -	if (intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DISPLAYPORT) ||
> > -	    intel_pipe_has_type(intel_crtc, INTEL_OUTPUT_DP_MST))
> > +	if (intel_crtc->config->has_dp_encoder)
> >  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
> >  	I915_WRITE(HSW_AUD_CFG(pipe), tmp);
> >  
> > @@ -339,7 +338,7 @@ 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_crtc->config->has_dp_encoder)
> >  		tmp |= AUD_CONFIG_N_VALUE_INDEX;
> >  	else
> >  		tmp |= audio_config_hdmi_pixel_clock(adjusted_mode);
> > @@ -486,8 +485,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))
> 
> Could have used has_dp_encoder everywhere, but whatever

I think this would be good chance to do for consistency, before merging.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2016-01-07 16:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-23  6:50 [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio libin.yang
2015-12-23  6:50 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
2016-01-04 16:03   ` Ville Syrjälä
2016-01-06  2:26     ` Yang, Libin
2015-12-23  7:49 ` ✗ warning: Fi.CI.BAT Patchwork
2015-12-29  2:23   ` Libin Yang
2015-12-30 12:47     ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2016-01-06  2:26 [PATCH 1/2] drm/i915: fix get digital port issue in intel_audio libin.yang
2016-01-06  2:26 ` [PATCH 2/2] drm/i915: add dp mst judgement in hsw_audio_codec_enable libin.yang
2016-01-07 16:51   ` Ville Syrjälä
2016-01-07 16:59     ` Daniel Vetter

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.