All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
@ 2018-01-24 18:56 Rodrigo Vivi
  2018-01-24 19:39 ` ✓ Fi.CI.BAT: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-24 18:56 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng, Rodrigo Vivi

If the table result is out of bounds on the array map
there is something really wrong with VBT pin so we don't
return that vbt_pin, but only return 0 instead.

This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")

Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 95f0b310d656..844c1e8f574f 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1115,16 +1115,11 @@ static const u8 cnp_ddc_pin_map[] = {
 
 static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 {
-	if (HAS_PCH_CNP(dev_priv)) {
-		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
-			return cnp_ddc_pin_map[vbt_pin];
-		if (vbt_pin > GMBUS_PIN_4_CNP) {
-			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
-			return 0;
-		}
-	}
+	if (HAS_PCH_CNP(dev_priv) &&
+	    vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
+		return cnp_ddc_pin_map[vbt_pin];
 
-	return vbt_pin;
+	return 0;
 }
 
 static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
-- 
2.13.6

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

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

* ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
@ 2018-01-24 19:39 ` Patchwork
  2018-01-24 22:12 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-24 19:39 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
URL   : https://patchwork.freedesktop.org/series/37060/
State : success

== Summary ==

Series 37060v1 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
https://patchwork.freedesktop.org/api/1.0/series/37060/revisions/1/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> DMESG-WARN (fi-elk-e7500) fdo#103989 +1
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713
Test kms_pipe_crc_basic:
        Subgroup suspend-read-crc-pipe-b:
                incomplete -> PASS       (fi-bdw-5557u) fdo#104162

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#104162 https://bugs.freedesktop.org/show_bug.cgi?id=104162

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:421s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:428s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:372s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:490s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:281s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:482s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:481s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:466s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:462s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:278s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:516s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:399s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:412s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:453s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:411s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:460s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:497s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:458s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:503s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:580s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:428s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:525s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:496s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:476s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:414s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:430s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:392s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:572s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:469s

d33d70e5449f1477b09de4963fc7397890da1263 drm-tip: 2018y-01m-24d-18h-16m-27s UTC integration manifest
3dbf54c61ae6 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7773/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.IGT: failure for drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
  2018-01-24 19:39 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-24 22:12 ` Patchwork
  2018-01-25  4:22 ` [PATCH] " Kai Heng Feng
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-24 22:12 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
URL   : https://patchwork.freedesktop.org/series/37060/
State : failure

== Summary ==

Test kms_sysfs_edid_timing:
                pass       -> WARN       (shard-apl) fdo#100047
Test kms_plane:
        Subgroup plane-position-hole-dpms-pipe-b-planes:
                pass       -> FAIL       (shard-apl)
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                pass       -> SKIP       (shard-hsw) fdo#103375
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
                fail       -> PASS       (shard-snb) fdo#101623 +2
Test kms_plane_lowres:
        Subgroup pipe-a-tiling-none:
                pass       -> SKIP       (shard-snb)
Test kms_force_connector_basic:
        Subgroup force-connector-state:
                skip       -> PASS       (shard-snb)
Test kms_draw_crc:
        Subgroup draw-method-rgb565-blt-xtiled:
                pass       -> SKIP       (shard-snb)
Test kms_cursor_legacy:
        Subgroup long-nonblocking-modeset-vs-cursor-atomic:
                pass       -> SKIP       (shard-snb)
        Subgroup flip-vs-cursor-crc-atomic:
                fail       -> PASS       (shard-apl)
Test kms_busy:
        Subgroup extended-pageflip-hang-oldfb-render-b:
                pass       -> SKIP       (shard-snb)
Test kms_flip:
        Subgroup plain-flip-fb-recreate:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test perf:
        Subgroup enable-disable:
                fail       -> PASS       (shard-apl) fdo#103715
        Subgroup blocking:
                fail       -> PASS       (shard-hsw) fdo#102252

fdo#100047 https://bugs.freedesktop.org/show_bug.cgi?id=100047
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103715 https://bugs.freedesktop.org/show_bug.cgi?id=103715
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-apl        total:2838 pass:1751 dwarn:1   dfail:0   fail:23  skip:1062 time:12533s
shard-hsw        total:2838 pass:1733 dwarn:1   dfail:0   fail:12  skip:1091 time:11851s
shard-snb        total:2838 pass:1324 dwarn:1   dfail:0   fail:10  skip:1503 time:6543s
Blacklisted hosts:
shard-kbl        total:2838 pass:1865 dwarn:8   dfail:1   fail:24  skip:940 time:9529s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7773/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
  2018-01-24 19:39 ` ✓ Fi.CI.BAT: success for " Patchwork
  2018-01-24 22:12 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-01-25  4:22 ` Kai Heng Feng
  2018-01-25 10:09 ` Jani Nikula
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Kai Heng Feng @ 2018-01-25  4:22 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: Jani Nikula, intel-gfx



> On 25 Jan 2018, at 2:56 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> 
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
> 
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
> 
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
> 
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

> ---
> drivers/gpu/drm/i915/intel_bios.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..844c1e8f574f 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1115,16 +1115,11 @@ static const u8 cnp_ddc_pin_map[] = {
> 
> static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> {
> -	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> -			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> -			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> -			return 0;
> -		}
> -	}
> +	if (HAS_PCH_CNP(dev_priv) &&
> +	    vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		return cnp_ddc_pin_map[vbt_pin];
> 
> -	return vbt_pin;
> +	return 0;
> }
> 
> static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
> -- 
> 2.13.6
> 

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (2 preceding siblings ...)
  2018-01-25  4:22 ` [PATCH] " Kai Heng Feng
@ 2018-01-25 10:09 ` Jani Nikula
  2018-01-25 15:19   ` Rodrigo Vivi
  2018-01-25 15:37 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev2) Patchwork
                   ` (4 subsequent siblings)
  8 siblings, 1 reply; 27+ messages in thread
From: Jani Nikula @ 2018-01-25 10:09 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kai Heng Feng, Rodrigo Vivi

On Wed, 24 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
>
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
>
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
>
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 13 ++++---------
>  1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..844c1e8f574f 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1115,16 +1115,11 @@ static const u8 cnp_ddc_pin_map[] = {
>  
>  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  {
> -	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> -			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> -			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> -			return 0;
> -		}
> -	}
> +	if (HAS_PCH_CNP(dev_priv) &&
> +	    vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		return cnp_ddc_pin_map[vbt_pin];
>  
> -	return vbt_pin;
> +	return 0;

Well this breaks all non-CNP...

BR,
Jani.


>  }
>  
>  static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,

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

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

* [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 10:09 ` Jani Nikula
@ 2018-01-25 15:19   ` Rodrigo Vivi
  2018-01-25 15:33     ` Jani Nikula
  0 siblings, 1 reply; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 15:19 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng, Rodrigo Vivi

If the table result is out of bounds on the array map
there is something really wrong with VBT pin so we don't
return that vbt_pin, but only return 0 instead.

This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")

v2: Do in a way that we don't break other platforms. (Jani)

Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 95f0b310d656..ad5a03028060 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1118,10 +1118,8 @@ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 	if (HAS_PCH_CNP(dev_priv)) {
 		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
 			return cnp_ddc_pin_map[vbt_pin];
-		if (vbt_pin > GMBUS_PIN_4_CNP) {
-			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
+		else
 			return 0;
-		}
 	}
 
 	return vbt_pin;
-- 
2.13.6

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 15:19   ` Rodrigo Vivi
@ 2018-01-25 15:33     ` Jani Nikula
  2018-01-25 15:40       ` Rodrigo Vivi
  0 siblings, 1 reply; 27+ messages in thread
From: Jani Nikula @ 2018-01-25 15:33 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kai Heng Feng, Rodrigo Vivi

On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
>
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
>
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
>
> v2: Do in a way that we don't break other platforms. (Jani)
>
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..ad5a03028060 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1118,10 +1118,8 @@ static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  	if (HAS_PCH_CNP(dev_priv)) {
>  		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
>  			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> -			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);

I guess I'd keep the debug message, but either way,

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


> +		else
>  			return 0;
> -		}
>  	}
>  
>  	return vbt_pin;

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

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

* ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev2)
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (3 preceding siblings ...)
  2018-01-25 10:09 ` Jani Nikula
@ 2018-01-25 15:37 ` Patchwork
  2018-01-25 16:02 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3) Patchwork
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-25 15:37 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev2)
URL   : https://patchwork.freedesktop.org/series/37060/
State : success

== Summary ==

Series 37060v2 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
https://patchwork.freedesktop.org/api/1.0/series/37060/revisions/2/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                pass       -> INCOMPLETE (fi-snb-2520m) fdo#103713

fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:419s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:492s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:482s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:483s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:466s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:457s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:510s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:391s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:407s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:411s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:452s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:410s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:459s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:492s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:450s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:577s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:427s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:528s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:486s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:488s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:419s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:431s
fi-snb-2520m     total:3    pass:2    dwarn:0   dfail:0   fail:0   skip:0  
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:403s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:566s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:469s

9d8467fe5626095314bc34449457798dae066fbb drm-tip: 2018y-01m-24d-19h-59m-41s UTC integration manifest
a913acfe20bd drm/i915/cnp: Properly handle VBT ddc pin out of bounds.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7779/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 15:33     ` Jani Nikula
@ 2018-01-25 15:40       ` Rodrigo Vivi
  2018-01-25 15:52         ` Jani Nikula
  0 siblings, 1 reply; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 15:40 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng, Rodrigo Vivi

If the table result is out of bounds on the array map
there is something really wrong with VBT pin so we don't
return that vbt_pin, but only return 0 instead.

This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")

v2: Do in a way that we don't break other platforms. (Jani)
v3: Keep debug message (Jani)

Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 95f0b310d656..06526b17a011 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
 static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 {
 	if (HAS_PCH_CNP(dev_priv)) {
-		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
+		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
 			return cnp_ddc_pin_map[vbt_pin];
-		if (vbt_pin > GMBUS_PIN_4_CNP) {
+		} else {
 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
 			return 0;
 		}
-- 
2.13.6

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 15:40       ` Rodrigo Vivi
@ 2018-01-25 15:52         ` Jani Nikula
  2018-01-25 18:07           ` Lucas De Marchi
  2018-01-25 18:14           ` Rodrigo Vivi
  0 siblings, 2 replies; 27+ messages in thread
From: Jani Nikula @ 2018-01-25 15:52 UTC (permalink / raw)
  To: intel-gfx; +Cc: Kai Heng Feng, Rodrigo Vivi

On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
>
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
>
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
>
> v2: Do in a way that we don't break other platforms. (Jani)
> v3: Keep debug message (Jani)
>
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..06526b17a011 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
>  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  {
>  	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
>  			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> +		} else {

You're going to hate me, but I just realized this will now complain
about vbt_pin == 0, which I guess is valid for N/A.

Why are simple things so hard sometimes... :(

else if (vbt_pin) ?

BR,
Jani.


>  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
>  			return 0;
>  		}

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

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

* ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3)
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (4 preceding siblings ...)
  2018-01-25 15:37 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev2) Patchwork
@ 2018-01-25 16:02 ` Patchwork
  2018-01-25 17:21 ` ✗ Fi.CI.IGT: failure " Patchwork
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-25 16:02 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3)
URL   : https://patchwork.freedesktop.org/series/37060/
State : success

== Summary ==

Series 37060v3 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
https://patchwork.freedesktop.org/api/1.0/series/37060/revisions/3/mbox/

Test debugfs_test:
        Subgroup read_all_entries:
                dmesg-warn -> DMESG-FAIL (fi-elk-e7500) fdo#103989

fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:424s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:425s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:483s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:480s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:479s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:466s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:453s
fi-elk-e7500     total:224  pass:168  dwarn:9   dfail:1   fail:0   skip:45 
fi-gdg-551       total:288  pass:179  dwarn:0   dfail:0   fail:1   skip:108 time:279s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:510s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:389s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:399s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:414s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:452s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:415s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:459s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:506s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:455s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:502s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:580s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:430s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:510s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:525s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:490s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:471s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:414s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:432s
fi-snb-2520m     total:245  pass:211  dwarn:0   dfail:0   fail:0   skip:33 
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:394s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:574s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:471s

9d8467fe5626095314bc34449457798dae066fbb drm-tip: 2018y-01m-24d-19h-59m-41s UTC integration manifest
276c6d9d9815 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7780/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✗ Fi.CI.IGT: failure for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3)
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (5 preceding siblings ...)
  2018-01-25 16:02 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3) Patchwork
@ 2018-01-25 17:21 ` Patchwork
  2018-01-25 22:46 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5) Patchwork
  2018-01-26  0:11 ` ✓ Fi.CI.IGT: " Patchwork
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-25 17:21 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3)
URL   : https://patchwork.freedesktop.org/series/37060/
State : failure

== Summary ==

Test perf:
        Subgroup oa-exponents:
                pass       -> FAIL       (shard-apl) fdo#102254
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-offscren-pri-shrfb-draw-blt:
                pass       -> FAIL       (shard-snb) fdo#101623
Test kms_plane_multiple:
        Subgroup legacy-pipe-a-tiling-yf:
                pass       -> FAIL       (shard-apl)
Test kms_cursor_crc:
        Subgroup cursor-256x256-suspend:
                pass       -> SKIP       (shard-hsw) fdo#103375
Test kms_flip:
        Subgroup plain-flip-fb-recreate-interruptible:
                fail       -> PASS       (shard-hsw) fdo#100368
        Subgroup 2x-flip-vs-modeset-interruptible:
                dmesg-warn -> PASS       (shard-hsw) fdo#102614
        Subgroup 2x-plain-flip-fb-recreate-interruptible:
                pass       -> FAIL       (shard-hsw)
Test kms_cursor_legacy:
        Subgroup flip-vs-cursor-crc-atomic:
                fail       -> PASS       (shard-apl) fdo#102670

fdo#102254 https://bugs.freedesktop.org/show_bug.cgi?id=102254
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#102614 https://bugs.freedesktop.org/show_bug.cgi?id=102614
fdo#102670 https://bugs.freedesktop.org/show_bug.cgi?id=102670

shard-apl        total:2838 pass:1751 dwarn:1   dfail:0   fail:24  skip:1062 time:12530s
shard-hsw        total:2838 pass:1733 dwarn:1   dfail:0   fail:12  skip:1091 time:11743s
shard-snb        total:2838 pass:1329 dwarn:1   dfail:0   fail:11  skip:1497 time:6634s
Blacklisted hosts:
shard-kbl        total:2838 pass:1857 dwarn:15  dfail:1   fail:24  skip:941 time:9628s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7780/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 15:52         ` Jani Nikula
@ 2018-01-25 18:07           ` Lucas De Marchi
  2018-01-25 18:25             ` Rodrigo Vivi
  2018-01-25 18:14           ` Rodrigo Vivi
  1 sibling, 1 reply; 27+ messages in thread
From: Lucas De Marchi @ 2018-01-25 18:07 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, Kai Heng Feng, Rodrigo Vivi

On Thu, Jan 25, 2018 at 05:52:26PM +0200, Jani Nikula wrote:
> On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > If the table result is out of bounds on the array map
> > there is something really wrong with VBT pin so we don't
> > return that vbt_pin, but only return 0 instead.
> >
> > This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> > Ignore VBT request for know invalid DDC pin.")'
> >
> > Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> > Map VBT DDC Pin to BSpec DDC Pin.")
> >
> > v2: Do in a way that we don't break other platforms. (Jani)
> > v3: Keep debug message (Jani)
> >
> > Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> > Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 95f0b310d656..06526b17a011 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
> >  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> >  {
> >  	if (HAS_PCH_CNP(dev_priv)) {
> > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> > +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> >  			return cnp_ddc_pin_map[vbt_pin];
> > -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> > +		} else {
> 
> You're going to hate me, but I just realized this will now complain
> about vbt_pin == 0, which I guess is valid for N/A.
> 
> Why are simple things so hard sometimes... :(
> 
> else if (vbt_pin) ?

vpt_pin is unsigned so we are just special-casing the vpt_pin == 0
already. What about stopping doing that by adding it to the array, like
below (to be squashed)

-------
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 06526b17a011..cf3f8f1ba6f7 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
 }
 
 static const u8 cnp_ddc_pin_map[] = {
+	[0] = 0, /* N/A */
 	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
 	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
 	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
@@ -1116,7 +1117,7 @@ static const u8 cnp_ddc_pin_map[] = {
 static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 {
 	if (HAS_PCH_CNP(dev_priv)) {
-		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
+		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
 			return cnp_ddc_pin_map[vbt_pin];
 		} else {
 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
-------


Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 15:52         ` Jani Nikula
  2018-01-25 18:07           ` Lucas De Marchi
@ 2018-01-25 18:14           ` Rodrigo Vivi
  1 sibling, 0 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 18:14 UTC (permalink / raw)
  To: Jani Nikula; +Cc: intel-gfx, Kai Heng Feng

On Thu, Jan 25, 2018 at 03:52:26PM +0000, Jani Nikula wrote:
> On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > If the table result is out of bounds on the array map
> > there is something really wrong with VBT pin so we don't
> > return that vbt_pin, but only return 0 instead.
> >
> > This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> > Ignore VBT request for know invalid DDC pin.")'
> >
> > Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> > Map VBT DDC Pin to BSpec DDC Pin.")
> >
> > v2: Do in a way that we don't break other platforms. (Jani)
> > v3: Keep debug message (Jani)
> >
> > Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> > Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 95f0b310d656..06526b17a011 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
> >  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> >  {
> >  	if (HAS_PCH_CNP(dev_priv)) {
> > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> > +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> >  			return cnp_ddc_pin_map[vbt_pin];
> > -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> > +		} else {
> 
> You're going to hate me,

hehe... why would I hate you if you are helping me to get
the proper and better code there ;)

> but I just realized this will now complain
> about vbt_pin == 0, which I guess is valid for N/A.

ouch... indeed...
and a common one I'd say. at least during platform enabling times.
imagine the number of bugs we would receive?!

> 
> Why are simple things so hard sometimes... :(
> 
> else if (vbt_pin) ?

So, on the icp the things gets a bit more complicated, because
the proper check for valid pin is not just on the array side.
on cnp is only a cross-over on the array position to pin.

On icp array goes from 0 to 9, but valid pin numbers are
0, 1, 2, 3, 9, A, B, C, D, E.

So, what about leaving the current solution in place and
finding a proper way to check the valid pins per platform
with the PIN numbers and not array position one?

Or any good idea for both already?

> 
> BR,
> Jani.
> 
> 
> >  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> >  			return 0;
> >  		}
> 
> -- 
> Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 18:07           ` Lucas De Marchi
@ 2018-01-25 18:25             ` Rodrigo Vivi
  2018-01-25 22:24               ` Rodrigo Vivi
  2018-01-25 22:25               ` Rodrigo Vivi
  0 siblings, 2 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 18:25 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: Jani Nikula, intel-gfx, Kai Heng Feng

On Thu, Jan 25, 2018 at 06:07:19PM +0000, Lucas De Marchi wrote:
> On Thu, Jan 25, 2018 at 05:52:26PM +0200, Jani Nikula wrote:
> > On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > > If the table result is out of bounds on the array map
> > > there is something really wrong with VBT pin so we don't
> > > return that vbt_pin, but only return 0 instead.
> > >
> > > This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> > > Ignore VBT request for know invalid DDC pin.")'
> > >
> > > Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> > > Map VBT DDC Pin to BSpec DDC Pin.")
> > >
> > > v2: Do in a way that we don't break other platforms. (Jani)
> > > v3: Keep debug message (Jani)
> > >
> > > Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> > > Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> > > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > > Cc: Jani Nikula <jani.nikula@intel.com>
> > > Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > > index 95f0b310d656..06526b17a011 100644
> > > --- a/drivers/gpu/drm/i915/intel_bios.c
> > > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > > @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
> > >  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> > >  {
> > >  	if (HAS_PCH_CNP(dev_priv)) {
> > > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> > > +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> > >  			return cnp_ddc_pin_map[vbt_pin];
> > > -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> > > +		} else {
> > 
> > You're going to hate me, but I just realized this will now complain
> > about vbt_pin == 0, which I guess is valid for N/A.
> > 
> > Why are simple things so hard sometimes... :(
> > 
> > else if (vbt_pin) ?
> 
> vpt_pin is unsigned so we are just special-casing the vpt_pin == 0
> already. What about stopping doing that by adding it to the array, like
> below (to be squashed)

That's a very good suggestion for the cnp part.
cleaner...

and we don't want to make cnp more difficult because of icp...
but if you also have a good idea for that icp case please raise that!

> 
> -------
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 06526b17a011..cf3f8f1ba6f7 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>  }
>  
>  static const u8 cnp_ddc_pin_map[] = {
> +	[0] = 0, /* N/A */

N/A for Not Alternate? hehe

maybe:
+	[0] = 0, /* Per platform default */

>  	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
>  	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
>  	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
> @@ -1116,7 +1117,7 @@ static const u8 cnp_ddc_pin_map[] = {
>  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  {
>  	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> +		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
>  			return cnp_ddc_pin_map[vbt_pin];
>  		} else {
>  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> -------
> 
> 
> Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 18:25             ` Rodrigo Vivi
@ 2018-01-25 22:24               ` Rodrigo Vivi
  2018-01-25 22:25               ` Rodrigo Vivi
  1 sibling, 0 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 22:24 UTC (permalink / raw)
  To: Lucas De Marchi; +Cc: Jani Nikula, intel-gfx, Kai Heng Feng

On Thu, Jan 25, 2018 at 06:25:06PM +0000, Rodrigo Vivi wrote:
> On Thu, Jan 25, 2018 at 06:07:19PM +0000, Lucas De Marchi wrote:
> > On Thu, Jan 25, 2018 at 05:52:26PM +0200, Jani Nikula wrote:
> > > On Thu, 25 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > > > If the table result is out of bounds on the array map
> > > > there is something really wrong with VBT pin so we don't
> > > > return that vbt_pin, but only return 0 instead.
> > > >
> > > > This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> > > > Ignore VBT request for know invalid DDC pin.")'
> > > >
> > > > Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> > > > Map VBT DDC Pin to BSpec DDC Pin.")
> > > >
> > > > v2: Do in a way that we don't break other platforms. (Jani)
> > > > v3: Keep debug message (Jani)
> > > >
> > > > Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> > > > Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> > > > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > > > Cc: Jani Nikula <jani.nikula@intel.com>
> > > > Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> > > > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
> > > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > > > index 95f0b310d656..06526b17a011 100644
> > > > --- a/drivers/gpu/drm/i915/intel_bios.c
> > > > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > > > @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
> > > >  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> > > >  {
> > > >  	if (HAS_PCH_CNP(dev_priv)) {
> > > > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> > > > +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> > > >  			return cnp_ddc_pin_map[vbt_pin];
> > > > -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> > > > +		} else {
> > > 
> > > You're going to hate me, but I just realized this will now complain
> > > about vbt_pin == 0, which I guess is valid for N/A.
> > > 
> > > Why are simple things so hard sometimes... :(
> > > 
> > > else if (vbt_pin) ?
> > 
> > vpt_pin is unsigned so we are just special-casing the vpt_pin == 0
> > already. What about stopping doing that by adding it to the array, like
> > below (to be squashed)
> 
> That's a very good suggestion for the cnp part.
> cleaner...
> 
> and we don't want to make cnp more difficult because of icp...
> but if you also have a good idea for that icp case please raise that!

Sorry for the noise. As you showed and convinced me here this simple
solution already solves the icl case without needing to check for both sides
of the map.

> 
> > 
> > -------
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 06526b17a011..cf3f8f1ba6f7 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> >  }
> >  
> >  static const u8 cnp_ddc_pin_map[] = {
> > +	[0] = 0, /* N/A */
> 
> N/A for Not Alternate? hehe
> 
> maybe:
> +	[0] = 0, /* Per platform default */
> 
> >  	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
> >  	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
> >  	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
> > @@ -1116,7 +1117,7 @@ static const u8 cnp_ddc_pin_map[] = {
> >  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> >  {
> >  	if (HAS_PCH_CNP(dev_priv)) {
> > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> > +		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> >  			return cnp_ddc_pin_map[vbt_pin];
> >  		} else {
> >  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> > -------
> > 
> > 
> > Lucas De Marchi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 18:25             ` Rodrigo Vivi
  2018-01-25 22:24               ` Rodrigo Vivi
@ 2018-01-25 22:25               ` Rodrigo Vivi
  2018-01-25 22:52                 ` Lucas De Marchi
  2018-01-29  5:42                 ` Kai Heng Feng
  1 sibling, 2 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 22:25 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng, Lucas De Marchi, Rodrigo Vivi

If the table result is out of bounds on the array map
there is something really wrong with VBT pin so we don't
return that vbt_pin, but only return 0 instead.

This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")

v2: Do in a way that we don't break other platforms. (Jani)

v3: Keep debug message (Jani)

v4: Don't mess with 0 mapping was noticed by Jani and
    addressed with a simple solution suggested by Lucas
    that makes this even simpler.

Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 95f0b310d656..cf3f8f1ba6f7 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
 }
 
 static const u8 cnp_ddc_pin_map[] = {
+	[0] = 0, /* N/A */
 	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
 	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
 	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
@@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {
 static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 {
 	if (HAS_PCH_CNP(dev_priv)) {
-		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
+		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
 			return cnp_ddc_pin_map[vbt_pin];
-		if (vbt_pin > GMBUS_PIN_4_CNP) {
+		} else {
 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
 			return 0;
 		}
-- 
2.13.6

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

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

* ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5)
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (6 preceding siblings ...)
  2018-01-25 17:21 ` ✗ Fi.CI.IGT: failure " Patchwork
@ 2018-01-25 22:46 ` Patchwork
  2018-01-26  0:11 ` ✓ Fi.CI.IGT: " Patchwork
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-25 22:46 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5)
URL   : https://patchwork.freedesktop.org/series/37060/
State : success

== Summary ==

Series 37060v5 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
https://patchwork.freedesktop.org/api/1.0/series/37060/revisions/5/mbox/

Test gem_ringfill:
        Subgroup basic-default-hang:
                pass       -> DMESG-WARN (fi-pnv-d510) fdo#101600

fdo#101600 https://bugs.freedesktop.org/show_bug.cgi?id=101600

fi-bdw-5557u     total:288  pass:267  dwarn:0   dfail:0   fail:0   skip:21  time:418s
fi-bdw-gvtdvm    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:426s
fi-blb-e6850     total:288  pass:223  dwarn:1   dfail:0   fail:0   skip:64  time:373s
fi-bsw-n3050     total:288  pass:242  dwarn:0   dfail:0   fail:0   skip:46  time:484s
fi-bwr-2160      total:288  pass:183  dwarn:0   dfail:0   fail:0   skip:105 time:280s
fi-bxt-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:482s
fi-bxt-j4205     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:486s
fi-byt-j1900     total:288  pass:253  dwarn:0   dfail:0   fail:0   skip:35  time:465s
fi-byt-n2820     total:288  pass:249  dwarn:0   dfail:0   fail:0   skip:39  time:460s
fi-cnl-y2        total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:526s
fi-elk-e7500     total:224  pass:168  dwarn:10  dfail:0   fail:0   skip:45 
fi-gdg-551       total:288  pass:180  dwarn:0   dfail:0   fail:0   skip:108 time:281s
fi-glk-1         total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:512s
fi-hsw-4770      total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:392s
fi-hsw-4770r     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:398s
fi-ilk-650       total:288  pass:228  dwarn:0   dfail:0   fail:0   skip:60  time:413s
fi-ivb-3520m     total:288  pass:259  dwarn:0   dfail:0   fail:0   skip:29  time:451s
fi-ivb-3770      total:288  pass:255  dwarn:0   dfail:0   fail:0   skip:33  time:412s
fi-kbl-7500u     total:288  pass:263  dwarn:1   dfail:0   fail:0   skip:24  time:457s
fi-kbl-7560u     total:288  pass:269  dwarn:0   dfail:0   fail:0   skip:19  time:498s
fi-kbl-7567u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:456s
fi-kbl-r         total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:501s
fi-pnv-d510      total:288  pass:222  dwarn:1   dfail:0   fail:0   skip:65  time:584s
fi-skl-6260u     total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:428s
fi-skl-6600u     total:288  pass:261  dwarn:0   dfail:0   fail:0   skip:27  time:507s
fi-skl-6700hq    total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:529s
fi-skl-6700k2    total:288  pass:264  dwarn:0   dfail:0   fail:0   skip:24  time:491s
fi-skl-6770hq    total:288  pass:268  dwarn:0   dfail:0   fail:0   skip:20  time:487s
fi-skl-guc       total:288  pass:260  dwarn:0   dfail:0   fail:0   skip:28  time:416s
fi-skl-gvtdvm    total:288  pass:265  dwarn:0   dfail:0   fail:0   skip:23  time:432s
fi-snb-2520m     total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:514s
fi-snb-2600      total:288  pass:248  dwarn:0   dfail:0   fail:0   skip:40  time:396s
Blacklisted hosts:
fi-cfl-s2        total:288  pass:262  dwarn:0   dfail:0   fail:0   skip:26  time:572s
fi-glk-dsi       total:288  pass:258  dwarn:0   dfail:0   fail:0   skip:30  time:471s

804d087465e907accca7a2631d8a9485729b9a48 drm-tip: 2018y-01m-25d-18h-22m-16s UTC integration manifest
61943b38df25 drm/i915/cnp: Properly handle VBT ddc pin out of bounds.

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7784/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 22:25               ` Rodrigo Vivi
@ 2018-01-25 22:52                 ` Lucas De Marchi
  2018-01-29  5:42                 ` Kai Heng Feng
  1 sibling, 0 replies; 27+ messages in thread
From: Lucas De Marchi @ 2018-01-25 22:52 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: Jani Nikula, intel-gfx, Kai Heng Feng

On Thu, Jan 25, 2018 at 02:25:24PM -0800, Rodrigo Vivi wrote:
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
> 
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'

In this version it's not really a revert anymore as the debug message is
still there. I'd say it fixes, but doesn't revert.

> 
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
> 
> v2: Do in a way that we don't break other platforms. (Jani)
> 
> v3: Keep debug message (Jani)
> 
> v4: Don't mess with 0 mapping was noticed by Jani and
>     addressed with a simple solution suggested by Lucas
>     that makes this even simpler.
> 
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Not sure about the suggested-by vs reviewed-by, but:
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>


Lucas De Marchi

> ---
>  drivers/gpu/drm/i915/intel_bios.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..cf3f8f1ba6f7 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
>  }
>  
>  static const u8 cnp_ddc_pin_map[] = {
> +	[0] = 0, /* N/A */
>  	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
>  	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
>  	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
> @@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {
>  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  {
>  	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
>  			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> +		} else {
>  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
>  			return 0;
>  		}
> -- 
> 2.13.6
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* ✓ Fi.CI.IGT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5)
  2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
                   ` (7 preceding siblings ...)
  2018-01-25 22:46 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5) Patchwork
@ 2018-01-26  0:11 ` Patchwork
  8 siblings, 0 replies; 27+ messages in thread
From: Patchwork @ 2018-01-26  0:11 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5)
URL   : https://patchwork.freedesktop.org/series/37060/
State : success

== Summary ==

Test kms_flip:
        Subgroup plain-flip-fb-recreate-interruptible:
                pass       -> FAIL       (shard-hsw) fdo#100368
Test kms_frontbuffer_tracking:
        Subgroup fbc-1p-primscrn-pri-shrfb-draw-render:
                pass       -> FAIL       (shard-snb) fdo#103167
        Subgroup fbc-1p-primscrn-pri-indfb-draw-blt:
                pass       -> FAIL       (shard-snb) fdo#101623 +1
Test gem_eio:
        Subgroup in-flight-contexts:
                fail       -> PASS       (shard-hsw) fdo#104676
Test perf:
        Subgroup blocking:
                pass       -> FAIL       (shard-hsw) fdo#102252

fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#104676 https://bugs.freedesktop.org/show_bug.cgi?id=104676
fdo#102252 https://bugs.freedesktop.org/show_bug.cgi?id=102252

shard-apl        total:2838 pass:1752 dwarn:1   dfail:0   fail:21  skip:1064 time:12676s
shard-hsw        total:2838 pass:1734 dwarn:1   dfail:0   fail:12  skip:1090 time:12098s
shard-snb        total:2838 pass:1327 dwarn:1   dfail:0   fail:13  skip:1497 time:6589s
Blacklisted hosts:
shard-kbl        total:2838 pass:1853 dwarn:23  dfail:2   fail:18  skip:942 time:9632s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7784/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 22:25               ` Rodrigo Vivi
  2018-01-25 22:52                 ` Lucas De Marchi
@ 2018-01-29  5:42                 ` Kai Heng Feng
  2018-01-29 22:12                   ` Rodrigo Vivi
  1 sibling, 1 reply; 27+ messages in thread
From: Kai Heng Feng @ 2018-01-29  5:42 UTC (permalink / raw)
  To: Rodrigo Vivi; +Cc: Jani Nikula, intel-gfx, Lucas De Marchi


> On 26 Jan 2018, at 6:25 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> 
> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
> 
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
> 
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
> 
> v2: Do in a way that we don't break other platforms. (Jani)
> 
> v3: Keep debug message (Jani)
> 
> v4: Don't mess with 0 mapping was noticed by Jani and
>    addressed with a simple solution suggested by Lucas
>    that makes this even simpler.
> 
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

> ---
> drivers/gpu/drm/i915/intel_bios.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..cf3f8f1ba6f7 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> }
> 
> static const u8 cnp_ddc_pin_map[] = {
> +	[0] = 0, /* N/A */
> 	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
> 	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
> 	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
> @@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {
> static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> {
> 	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> 			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> +		} else {
> 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> 			return 0;
> 		}
> -- 
> 2.13.6
> 

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-29  5:42                 ` Kai Heng Feng
@ 2018-01-29 22:12                   ` Rodrigo Vivi
  2018-03-23 13:07                     ` Timo Aaltonen
  0 siblings, 1 reply; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-29 22:12 UTC (permalink / raw)
  To: Kai Heng Feng; +Cc: Jani Nikula, intel-gfx, Lucas De Marchi

On Mon, Jan 29, 2018 at 05:42:53AM +0000, Kai Heng Feng wrote:
> 
> > On 26 Jan 2018, at 6:25 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > 
> > If the table result is out of bounds on the array map
> > there is something really wrong with VBT pin so we don't
> > return that vbt_pin, but only return 0 instead.
> > 
> > This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> > Ignore VBT request for know invalid DDC pin.")'
> > 
> > Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> > Map VBT DDC Pin to BSpec DDC Pin.")
> > 
> > v2: Do in a way that we don't break other platforms. (Jani)
> > 
> > v3: Keep debug message (Jani)
> > 
> > v4: Don't mess with 0 mapping was noticed by Jani and
> >    addressed with a simple solution suggested by Lucas
> >    that makes this even simpler.
> > 
> > Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> > Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> > Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> > Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> > Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
> > Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> 
> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>

merged. thanks for suggestions, reviews, tests and patience ;)

> 
> > ---
> > drivers/gpu/drm/i915/intel_bios.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> > index 95f0b310d656..cf3f8f1ba6f7 100644
> > --- a/drivers/gpu/drm/i915/intel_bios.c
> > +++ b/drivers/gpu/drm/i915/intel_bios.c
> > @@ -1107,6 +1107,7 @@ static void sanitize_aux_ch(struct drm_i915_private *dev_priv,
> > }
> > 
> > static const u8 cnp_ddc_pin_map[] = {
> > +	[0] = 0, /* N/A */
> > 	[DDC_BUS_DDI_B] = GMBUS_PIN_1_BXT,
> > 	[DDC_BUS_DDI_C] = GMBUS_PIN_2_BXT,
> > 	[DDC_BUS_DDI_D] = GMBUS_PIN_4_CNP, /* sic */
> > @@ -1116,9 +1117,9 @@ static const u8 cnp_ddc_pin_map[] = {
> > static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
> > {
> > 	if (HAS_PCH_CNP(dev_priv)) {
> > -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> > +		if (vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
> > 			return cnp_ddc_pin_map[vbt_pin];
> > -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> > +		} else {
> > 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
> > 			return 0;
> > 		}
> > -- 
> > 2.13.6
> > 
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-29 22:12                   ` Rodrigo Vivi
@ 2018-03-23 13:07                     ` Timo Aaltonen
  2018-04-09  9:48                       ` Jani Nikula
  0 siblings, 1 reply; 27+ messages in thread
From: Timo Aaltonen @ 2018-03-23 13:07 UTC (permalink / raw)
  To: Rodrigo Vivi, Kai Heng Feng; +Cc: Jani Nikula, intel-gfx, Lucas De Marchi

On 30.01.2018 00:12, Rodrigo Vivi wrote:
> On Mon, Jan 29, 2018 at 05:42:53AM +0000, Kai Heng Feng wrote:
>>
>>> On 26 Jan 2018, at 6:25 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>>>
>>> If the table result is out of bounds on the array map
>>> there is something really wrong with VBT pin so we don't
>>> return that vbt_pin, but only return 0 instead.
>>>
>>> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
>>> Ignore VBT request for know invalid DDC pin.")'
>>>
>>> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
>>> Map VBT DDC Pin to BSpec DDC Pin.")
>>>
>>> v2: Do in a way that we don't break other platforms. (Jani)
>>>
>>> v3: Keep debug message (Jani)
>>>
>>> v4: Don't mess with 0 mapping was noticed by Jani and
>>>    addressed with a simple solution suggested by Lucas
>>>    that makes this even simpler.
>>>
>>> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
>>> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
>>> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>>> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>
>> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> 
> merged. thanks for suggestions, reviews, tests and patience ;)

Shouldn't this and

drm/i915/cnp: Ignore VBT request for know invalid DDC pin.

be cc:stable? Though they aren't even in 4.16 yet.



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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-03-23 13:07                     ` Timo Aaltonen
@ 2018-04-09  9:48                       ` Jani Nikula
  2018-04-09 19:12                         ` Rodrigo Vivi
  0 siblings, 1 reply; 27+ messages in thread
From: Jani Nikula @ 2018-04-09  9:48 UTC (permalink / raw)
  To: Timo Aaltonen, Rodrigo Vivi, Kai Heng Feng; +Cc: intel-gfx, Lucas De Marchi

On Fri, 23 Mar 2018, Timo Aaltonen <tjaalton@ubuntu.com> wrote:
> On 30.01.2018 00:12, Rodrigo Vivi wrote:
>> On Mon, Jan 29, 2018 at 05:42:53AM +0000, Kai Heng Feng wrote:
>>>
>>>> On 26 Jan 2018, at 6:25 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>>>>
>>>> If the table result is out of bounds on the array map
>>>> there is something really wrong with VBT pin so we don't
>>>> return that vbt_pin, but only return 0 instead.
>>>>
>>>> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
>>>> Ignore VBT request for know invalid DDC pin.")'
>>>>
>>>> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
>>>> Map VBT DDC Pin to BSpec DDC Pin.")
>>>>
>>>> v2: Do in a way that we don't break other platforms. (Jani)
>>>>
>>>> v3: Keep debug message (Jani)
>>>>
>>>> v4: Don't mess with 0 mapping was noticed by Jani and
>>>>    addressed with a simple solution suggested by Lucas
>>>>    that makes this even simpler.
>>>>
>>>> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
>>>> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
>>>> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
>>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>>> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
>>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>>>> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
>>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>>>
>>> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
>> 
>> merged. thanks for suggestions, reviews, tests and patience ;)
>
> Shouldn't this and
>
> drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
>
> be cc:stable? Though they aren't even in 4.16 yet.

Apologies for nobody replying. The commits are in v4.16, and I've made a
stable backport request for v4.15.

BR,
Jani.

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-04-09  9:48                       ` Jani Nikula
@ 2018-04-09 19:12                         ` Rodrigo Vivi
  0 siblings, 0 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-04-09 19:12 UTC (permalink / raw)
  To: Jani Nikula; +Cc: Kai Heng Feng, Lucas De Marchi, intel-gfx

On Mon, Apr 09, 2018 at 12:48:15PM +0300, Jani Nikula wrote:
> On Fri, 23 Mar 2018, Timo Aaltonen <tjaalton@ubuntu.com> wrote:
> > On 30.01.2018 00:12, Rodrigo Vivi wrote:
> >> On Mon, Jan 29, 2018 at 05:42:53AM +0000, Kai Heng Feng wrote:
> >>>
> >>>> On 26 Jan 2018, at 6:25 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> >>>>
> >>>> If the table result is out of bounds on the array map
> >>>> there is something really wrong with VBT pin so we don't
> >>>> return that vbt_pin, but only return 0 instead.
> >>>>
> >>>> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> >>>> Ignore VBT request for know invalid DDC pin.")'
> >>>>
> >>>> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> >>>> Map VBT DDC Pin to BSpec DDC Pin.")
> >>>>
> >>>> v2: Do in a way that we don't break other platforms. (Jani)
> >>>>
> >>>> v3: Keep debug message (Jani)
> >>>>
> >>>> v4: Don't mess with 0 mapping was noticed by Jani and
> >>>>    addressed with a simple solution suggested by Lucas
> >>>>    that makes this even simpler.
> >>>>
> >>>> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> >>>> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> >>>> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> >>>> Cc: Jani Nikula <jani.nikula@intel.com>
> >>>> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> >>>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
> >>>> Suggested-by: Lucas De Marchi <lucas.demarchi@intel.com>
> >>>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >>>
> >>> Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> >> 
> >> merged. thanks for suggestions, reviews, tests and patience ;)
> >
> > Shouldn't this and
> >
> > drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
> >
> > be cc:stable? Though they aren't even in 4.16 yet.
> 
> Apologies for nobody replying. The commits are in v4.16, and I've made a
> stable backport request for v4.15.

Ops, my bad. I'm sorry...
I had missed those.

Thank you very much Jani.

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

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

* Re: [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 21:37 ` [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
@ 2018-01-25 22:01   ` Rodrigo Vivi
  0 siblings, 0 replies; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 22:01 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng

On Thu, Jan 25, 2018 at 09:37:56PM +0000, Rodrigo Vivi wrote:

please ignore this one...

now I guess I will have to resend the entire series to avoid
CI confusion... :/

> If the table result is out of bounds on the array map
> there is something really wrong with VBT pin so we don't
> return that vbt_pin, but only return 0 instead.
> 
> This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
> Ignore VBT request for know invalid DDC pin.")'
> 
> Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
> Map VBT DDC Pin to BSpec DDC Pin.")
> 
> v2: Do in a way that we don't break other platforms. (Jani)
> v3: Keep debug message (Jani)
> 
> Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
> Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
> Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> ---
>  drivers/gpu/drm/i915/intel_bios.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index 95f0b310d656..06526b17a011 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
>  static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
>  {
>  	if (HAS_PCH_CNP(dev_priv)) {
> -		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> +		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
>  			return cnp_ddc_pin_map[vbt_pin];
> -		if (vbt_pin > GMBUS_PIN_4_CNP) {
> +		} else {
>  			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
>  			return 0;
>  		}
> -- 
> 2.13.6
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds.
  2018-01-25 19:27 [PATCH 07/10] drm/i915: For HPD connected port use hpd_pin instead of port Rodrigo Vivi
@ 2018-01-25 21:37 ` Rodrigo Vivi
  2018-01-25 22:01   ` Rodrigo Vivi
  0 siblings, 1 reply; 27+ messages in thread
From: Rodrigo Vivi @ 2018-01-25 21:37 UTC (permalink / raw)
  To: intel-gfx; +Cc: Jani Nikula, Kai Heng Feng, Rodrigo Vivi

If the table result is out of bounds on the array map
there is something really wrong with VBT pin so we don't
return that vbt_pin, but only return 0 instead.

This basically reverts commit 'a8e6f3888b05 ("drm/i915/cnp:
Ignore VBT request for know invalid DDC pin.")'

Also this properly fixes commit 9c3b2689d01f ("drm/i915/cnl:
Map VBT DDC Pin to BSpec DDC Pin.")

v2: Do in a way that we don't break other platforms. (Jani)
v3: Keep debug message (Jani)

Fixes: a8e6f3888b05 ("drm/i915/cnp: Ignore VBT request for know invalid DDC pin.")
Fixes: 9c3b2689d01f ("drm/i915/cnl: Map VBT DDC Pin to BSpec DDC Pin.")
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_bios.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 95f0b310d656..06526b17a011 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1116,9 +1116,9 @@ static const u8 cnp_ddc_pin_map[] = {
 static u8 map_ddc_pin(struct drm_i915_private *dev_priv, u8 vbt_pin)
 {
 	if (HAS_PCH_CNP(dev_priv)) {
-		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
+		if (vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map)) {
 			return cnp_ddc_pin_map[vbt_pin];
-		if (vbt_pin > GMBUS_PIN_4_CNP) {
+		} else {
 			DRM_DEBUG_KMS("Ignoring alternate pin: VBT claims DDC pin %d, which is not valid for this platform\n", vbt_pin);
 			return 0;
 		}
-- 
2.13.6

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

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

end of thread, other threads:[~2018-04-09 19:12 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-24 18:56 [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
2018-01-24 19:39 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-24 22:12 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-25  4:22 ` [PATCH] " Kai Heng Feng
2018-01-25 10:09 ` Jani Nikula
2018-01-25 15:19   ` Rodrigo Vivi
2018-01-25 15:33     ` Jani Nikula
2018-01-25 15:40       ` Rodrigo Vivi
2018-01-25 15:52         ` Jani Nikula
2018-01-25 18:07           ` Lucas De Marchi
2018-01-25 18:25             ` Rodrigo Vivi
2018-01-25 22:24               ` Rodrigo Vivi
2018-01-25 22:25               ` Rodrigo Vivi
2018-01-25 22:52                 ` Lucas De Marchi
2018-01-29  5:42                 ` Kai Heng Feng
2018-01-29 22:12                   ` Rodrigo Vivi
2018-03-23 13:07                     ` Timo Aaltonen
2018-04-09  9:48                       ` Jani Nikula
2018-04-09 19:12                         ` Rodrigo Vivi
2018-01-25 18:14           ` Rodrigo Vivi
2018-01-25 15:37 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev2) Patchwork
2018-01-25 16:02 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev3) Patchwork
2018-01-25 17:21 ` ✗ Fi.CI.IGT: failure " Patchwork
2018-01-25 22:46 ` ✓ Fi.CI.BAT: success for drm/i915/cnp: Properly handle VBT ddc pin out of bounds. (rev5) Patchwork
2018-01-26  0:11 ` ✓ Fi.CI.IGT: " Patchwork
2018-01-25 19:27 [PATCH 07/10] drm/i915: For HPD connected port use hpd_pin instead of port Rodrigo Vivi
2018-01-25 21:37 ` [PATCH] drm/i915/cnp: Properly handle VBT ddc pin out of bounds Rodrigo Vivi
2018-01-25 22:01   ` Rodrigo Vivi

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.