* [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
@ 2018-01-23 17:40 Rodrigo Vivi
2018-01-23 18:15 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Rodrigo Vivi @ 2018-01-23 17:40 UTC (permalink / raw)
To: intel-gfx; +Cc: Kai Heng Feng, Rodrigo Vivi
Let's ignore VBT request if the pin is clearly wrong.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
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 | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index b0668202dc7e..95f0b310d656 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1115,9 +1115,14 @@ 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) &&
- vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
- return cnp_ddc_pin_map[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;
+ }
+ }
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] 10+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-23 17:40 [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin Rodrigo Vivi
@ 2018-01-23 18:15 ` Patchwork
2018-01-23 23:19 ` [PATCH] " Rodrigo Vivi
2018-01-24 3:16 ` ✓ Fi.CI.IGT: success for " Patchwork
2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-01-23 18:15 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
URL : https://patchwork.freedesktop.org/series/36988/
State : success
== Summary ==
Series 36988v1 drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
https://patchwork.freedesktop.org/api/1.0/series/36988/revisions/1/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> DMESG-WARN (fi-elk-e7500) fdo#103989 +2
Test gem_ringfill:
Subgroup basic-default-hang:
dmesg-warn -> PASS (fi-pnv-d510) fdo#101600
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
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:419s
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:492s
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:489s
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:466s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:462s
fi-elk-e7500 total:229 pass:172 dwarn:10 dfail:0 fail:0 skip:46
fi-gdg-551 total:288 pass:179 dwarn:0 dfail:0 fail:1 skip:108 time:280s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:511s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:390s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:401s
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:449s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:416s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:456s
fi-kbl-7560u total:288 pass:269 dwarn:0 dfail:0 fail:0 skip:19 time:496s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:11 time:451s
fi-kbl-r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:500s
fi-pnv-d510 total:288 pass:223 dwarn:0 dfail:0 fail:0 skip:65 time:563s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:429s
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:527s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:492s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:485s
fi-skl-guc total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:416s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:530s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:397s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:568s
fi-glk-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:472s
5e022f5f329c7909cb9aa938364072329f694fb2 drm-tip: 2018y-01m-23d-17h-29m-20s UTC integration manifest
e8a94473f3e0 drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7754/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-23 17:40 [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin Rodrigo Vivi
2018-01-23 18:15 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2018-01-23 23:19 ` Rodrigo Vivi
2018-01-24 9:25 ` Jani Nikula
2018-01-24 3:16 ` ✓ Fi.CI.IGT: success for " Patchwork
2 siblings, 1 reply; 10+ messages in thread
From: Rodrigo Vivi @ 2018-01-23 23:19 UTC (permalink / raw)
To: intel-gfx; +Cc: Kai Heng Feng
On Tue, Jan 23, 2018 at 05:40:50PM +0000, Rodrigo Vivi wrote:
> Let's ignore VBT request if the pin is clearly wrong.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
(f2f)
thanks
merged to dinq.
> ---
> drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> index b0668202dc7e..95f0b310d656 100644
> --- a/drivers/gpu/drm/i915/intel_bios.c
> +++ b/drivers/gpu/drm/i915/intel_bios.c
> @@ -1115,9 +1115,14 @@ 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) &&
> - vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> - return cnp_ddc_pin_map[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;
> + }
> + }
>
> 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 [flat|nested] 10+ messages in thread
* ✓ Fi.CI.IGT: success for drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-23 17:40 [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin Rodrigo Vivi
2018-01-23 18:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-23 23:19 ` [PATCH] " Rodrigo Vivi
@ 2018-01-24 3:16 ` Patchwork
2 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2018-01-24 3:16 UTC (permalink / raw)
To: Rodrigo Vivi; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
URL : https://patchwork.freedesktop.org/series/36988/
State : success
== Summary ==
Test kms_flip:
Subgroup 2x-plain-flip-fb-recreate:
fail -> PASS (shard-hsw)
Subgroup flip-vs-expired-vblank-interruptible:
fail -> PASS (shard-hsw) fdo#102887
Test drv_suspend:
Subgroup fence-restore-untiled:
skip -> PASS (shard-snb) fdo#102365
Test gem_softpin:
Subgroup noreloc-s4:
fail -> SKIP (shard-snb) fdo#103375
fdo#102887 https://bugs.freedesktop.org/show_bug.cgi?id=102887
fdo#102365 https://bugs.freedesktop.org/show_bug.cgi?id=102365
fdo#103375 https://bugs.freedesktop.org/show_bug.cgi?id=103375
shard-apl total:2753 pass:1716 dwarn:1 dfail:0 fail:22 skip:1013 time:13982s
shard-hsw total:2753 pass:1726 dwarn:1 dfail:0 fail:10 skip:1015 time:15436s
shard-snb total:2753 pass:1319 dwarn:1 dfail:0 fail:9 skip:1424 time:7928s
Blacklisted hosts:
shard-kbl total:2753 pass:1836 dwarn:3 dfail:0 fail:24 skip:890 time:11032s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7754/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-24 9:25 ` Jani Nikula
@ 2018-01-24 9:24 ` Kai Heng Feng
2018-01-24 10:03 ` Jani Nikula
2018-01-24 18:34 ` Rodrigo Vivi
1 sibling, 1 reply; 10+ messages in thread
From: Kai Heng Feng @ 2018-01-24 9:24 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Rodrigo Vivi
Hi,
> On 24 Jan 2018, at 5:25 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> A bit too fast IMO. The bug report doesn't include the vbt dump which
> you should *always* look at before making workarounds for vbt.
I didn’t have access to the machine in question until now, I can provide
VBT dump as well as i915_opregion requested by Ville.
But how do I make a VBT dump?
Kai-Heng
>
> --
> 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] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-23 23:19 ` [PATCH] " Rodrigo Vivi
@ 2018-01-24 9:25 ` Jani Nikula
2018-01-24 9:24 ` Kai Heng Feng
2018-01-24 18:34 ` Rodrigo Vivi
0 siblings, 2 replies; 10+ messages in thread
From: Jani Nikula @ 2018-01-24 9:25 UTC (permalink / raw)
To: Rodrigo Vivi, intel-gfx; +Cc: Kai Heng Feng
On Tue, 23 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> On Tue, Jan 23, 2018 at 05:40:50PM +0000, Rodrigo Vivi wrote:
>> Let's ignore VBT request if the pin is clearly wrong.
>>
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
>> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> (f2f)
> thanks
>
> merged to dinq.
A bit too fast IMO. The bug report doesn't include the vbt dump which
you should *always* look at before making workarounds for vbt.
Also, see below.
>> ---
>> drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++---
>> 1 file changed, 8 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
>> index b0668202dc7e..95f0b310d656 100644
>> --- a/drivers/gpu/drm/i915/intel_bios.c
>> +++ b/drivers/gpu/drm/i915/intel_bios.c
>> @@ -1115,9 +1115,14 @@ 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) &&
>> - vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
>> - return cnp_ddc_pin_map[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;
>> + }
The original code was wrong in the sense that it would only do the
mapping if the provided vbt_pin was within bounds for CNP, and would
return the unmapped vbt_pin otherwise. Instead, I think you should
directly return 0 for out of bounds vbt_pin.
This change here is effectively the same, but more confusing. As if
there's a case where the vbt_pin can be both out of bounds, within CNP
pin limits, and should be returned unmapped. That can't happen, so
please make the code reflect that.
BR,
Jani.
>> + }
>>
>> return vbt_pin;
>> }
>> --
>> 2.13.6
>>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
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] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-24 9:24 ` Kai Heng Feng
@ 2018-01-24 10:03 ` Jani Nikula
2018-01-24 10:04 ` Kai Heng Feng
2018-01-24 13:30 ` Ville Syrjälä
0 siblings, 2 replies; 10+ messages in thread
From: Jani Nikula @ 2018-01-24 10:03 UTC (permalink / raw)
To: Kai Heng Feng; +Cc: intel-gfx, Rodrigo Vivi
On Wed, 24 Jan 2018, Kai Heng Feng <kai.heng.feng@canonical.com> wrote:
> Hi,
>
>> On 24 Jan 2018, at 5:25 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>> A bit too fast IMO. The bug report doesn't include the vbt dump which
>> you should *always* look at before making workarounds for vbt.
>
> I didn’t have access to the machine in question until now, I can provide
> VBT dump as well as i915_opregion requested by Ville.
>
> But how do I make a VBT dump?
Copy /sys/kernel/debug/dri/0/i915_vbt
I don't think the opregion will be necessary, I think Ville asks for it
for the vbt, which on most platforms is contained in the opregion.
BR,
Jani.
>
> Kai-Heng
>
>>
>> --
>> Jani Nikula, Intel Open Source Technology Center
>
--
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] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-24 10:03 ` Jani Nikula
@ 2018-01-24 10:04 ` Kai Heng Feng
2018-01-24 13:30 ` Ville Syrjälä
1 sibling, 0 replies; 10+ messages in thread
From: Kai Heng Feng @ 2018-01-24 10:04 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Rodrigo Vivi
> On 24 Jan 2018, at 6:03 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>
> On Wed, 24 Jan 2018, Kai Heng Feng <kai.heng.feng@canonical.com> wrote:
>> Hi,
>>
>>> On 24 Jan 2018, at 5:25 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
>>> A bit too fast IMO. The bug report doesn't include the vbt dump which
>>> you should *always* look at before making workarounds for vbt.
>>
>> I didn’t have access to the machine in question until now, I can provide
>> VBT dump as well as i915_opregion requested by Ville.
>>
>> But how do I make a VBT dump?
>
> Copy /sys/kernel/debug/dri/0/i915_vbt
>
> I don't think the opregion will be necessary, I think Ville asks for it
> for the vbt, which on most platforms is contained in the opregion.
>
Thanks for the tip.
Attached i915_vbt:
https://bugs.freedesktop.org/attachment.cgi?id=136935
Kai-Heng
> BR,
> Jani.
>
>
>>
>> Kai-Heng
>>
>>>
>>> --
>>> Jani Nikula, Intel Open Source Technology Center
>>
>
> --
> 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] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-24 10:03 ` Jani Nikula
2018-01-24 10:04 ` Kai Heng Feng
@ 2018-01-24 13:30 ` Ville Syrjälä
1 sibling, 0 replies; 10+ messages in thread
From: Ville Syrjälä @ 2018-01-24 13:30 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Kai Heng Feng, Rodrigo Vivi
On Wed, Jan 24, 2018 at 12:03:12PM +0200, Jani Nikula wrote:
> On Wed, 24 Jan 2018, Kai Heng Feng <kai.heng.feng@canonical.com> wrote:
> > Hi,
> >
> >> On 24 Jan 2018, at 5:25 PM, Jani Nikula <jani.nikula@linux.intel.com> wrote:
> >> A bit too fast IMO. The bug report doesn't include the vbt dump which
> >> you should *always* look at before making workarounds for vbt.
> >
> > I didn’t have access to the machine in question until now, I can provide
> > VBT dump as well as i915_opregion requested by Ville.
> >
> > But how do I make a VBT dump?
>
> Copy /sys/kernel/debug/dri/0/i915_vbt
>
> I don't think the opregion will be necessary, I think Ville asks for it
> for the vbt, which on most platforms is contained in the opregion.
Old habits...
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin.
2018-01-24 9:25 ` Jani Nikula
2018-01-24 9:24 ` Kai Heng Feng
@ 2018-01-24 18:34 ` Rodrigo Vivi
1 sibling, 0 replies; 10+ messages in thread
From: Rodrigo Vivi @ 2018-01-24 18:34 UTC (permalink / raw)
To: Jani Nikula; +Cc: intel-gfx, Kai Heng Feng
On Wed, Jan 24, 2018 at 09:25:06AM +0000, Jani Nikula wrote:
> On Tue, 23 Jan 2018, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
> > On Tue, Jan 23, 2018 at 05:40:50PM +0000, Rodrigo Vivi wrote:
> >> Let's ignore VBT request if the pin is clearly wrong.
> >>
> >> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104139
> >> Cc: Kai Heng Feng <kai.heng.feng@canonical.com>
> >> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
> >
> > Reviewed-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
> > (f2f)
> > thanks
> >
> > merged to dinq.
>
> A bit too fast IMO. The bug report doesn't include the vbt dump which
> you should *always* look at before making workarounds for vbt.
my apologies. My biggest mistake was taking so long to reply to the
bug and taking so long to post the patch here. :(
I looked to the VBT now and it is really just this ddc pin for this
particular port wrong. Or should I look to something else?
What other kind of useful information would that bring to us
normally?
>
> Also, see below.
>
> >> ---
> >> drivers/gpu/drm/i915/intel_bios.c | 11 ++++++++---
> >> 1 file changed, 8 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
> >> index b0668202dc7e..95f0b310d656 100644
> >> --- a/drivers/gpu/drm/i915/intel_bios.c
> >> +++ b/drivers/gpu/drm/i915/intel_bios.c
> >> @@ -1115,9 +1115,14 @@ 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) &&
> >> - vbt_pin > 0 && vbt_pin < ARRAY_SIZE(cnp_ddc_pin_map))
> >> - return cnp_ddc_pin_map[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;
> >> + }
>
> The original code was wrong in the sense that it would only do the
> mapping if the provided vbt_pin was within bounds for CNP, and would
> return the unmapped vbt_pin otherwise. Instead, I think you should
> directly return 0 for out of bounds vbt_pin.
>
> This change here is effectively the same, but more confusing. As if
> there's a case where the vbt_pin can be both out of bounds, within CNP
> pin limits, and should be returned unmapped. That can't happen, so
> please make the code reflect that.
Yes. That's a great idea. Thanks for the suggestion.
Honestly, at first I assumed our behavior was something
like this so I couldn't believe we had the issue even with
the original mapping there. But when I did the last fix
I avoided changing the original behavior and messed things up. Sorry.
Thanks,
Rodrigo.
>
> BR,
> Jani.
>
>
> >> + }
> >>
> >> return vbt_pin;
> >> }
> >> --
> >> 2.13.6
> >>
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
> --
> 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] 10+ messages in thread
end of thread, other threads:[~2018-01-24 18:34 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-23 17:40 [PATCH] drm/i915/cnp: Ignore VBT request for know invalid DDC pin Rodrigo Vivi
2018-01-23 18:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2018-01-23 23:19 ` [PATCH] " Rodrigo Vivi
2018-01-24 9:25 ` Jani Nikula
2018-01-24 9:24 ` Kai Heng Feng
2018-01-24 10:03 ` Jani Nikula
2018-01-24 10:04 ` Kai Heng Feng
2018-01-24 13:30 ` Ville Syrjälä
2018-01-24 18:34 ` Rodrigo Vivi
2018-01-24 3:16 ` ✓ Fi.CI.IGT: success for " Patchwork
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.