* [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI
@ 2017-12-20 10:50 Hans de Goede
2017-12-20 11:09 ` ✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2) Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Hans de Goede @ 2017-12-20 10:50 UTC (permalink / raw)
To: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Ville Syrjälä
Cc: Hans de Goede, intel-gfx, dri-devel
At least on the Chuwi Vi8 (non pro/plus) the LCD panel will show an image
shifted aprox. 20% to the left (with wraparound) and sometimes also wrong
colors, showing that the panel controller is starting with sampling the
datastream somewhere mid-line. This happens after the first blanking and
re-init of the panel.
After looking at drm.debug output I noticed that initially we inherit the
cdclk of 333333 KHz set by the GOP, but after the re-init we picked 266667
KHz, which turns out to be the cause of this problem, a quick hack to hard
code the cdclk to 333333 KHz makes the problem go away.
I've tested this on various Bay Trail devices, to make sure this not
causes regressions on other devices and the higher cdclk does not cause
any problems on the following devices:
-GP-electronic T701 1024x600 333333 KHz cdclk after this patch
-PEAQ C1010 1920x1200 333333 KHz cdclk after this patch
-PoV mobii-wintab-800w 800x1280 333333 KHz cdclk after this patch
-Asus Transformer-T100TA 1368x768 320000 KHz cdclk after this patch
Also interesting wrt this is the comment in vlv_calc_cdclk about the
existing workaround to avoid 200 Mhz as clock because that causes issues
in some cases.
This commit extends the "do not use 200 Mhz" workaround with an extra
check to require atleast 320000 KHz (avoiding 266667 KHz) when a DSI
panel is active.
Changes in v2:
-Change the commit message and the code comment to not treat the GOP as
a reference, the GOP should not be treated as a reference
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
index 9c5ceb98d48f..a15976f55f47 100644
--- a/drivers/gpu/drm/i915/intel_cdclk.c
+++ b/drivers/gpu/drm/i915/intel_cdclk.c
@@ -1923,6 +1923,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
min_cdclk = max(2 * 96000, min_cdclk);
+ /*
+ * On Valleyview some DSI panels loose (v|h)sync when the clock is lower
+ * then 320000KHz.
+ */
+ if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI) &&
+ IS_VALLEYVIEW(dev_priv))
+ min_cdclk = max(320000, min_cdclk);
+
if (min_cdclk > dev_priv->max_cdclk_freq) {
DRM_DEBUG_KMS("required cdclk (%d kHz) exceeds max (%d kHz)\n",
min_cdclk, dev_priv->max_cdclk_freq);
--
2.14.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2)
2017-12-20 10:50 [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Hans de Goede
@ 2017-12-20 11:09 ` Patchwork
2017-12-20 12:28 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-20 14:04 ` [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Ville Syrjälä
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-20 11:09 UTC (permalink / raw)
To: Hans de Goede; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/vlv: Add cdclk workaround for DSI (rev2)
URL : https://patchwork.freedesktop.org/series/35598/
State : success
== Summary ==
Series 35598v2 drm/i915/vlv: Add cdclk workaround for DSI
https://patchwork.freedesktop.org/api/1.0/series/35598/revisions/2/mbox/
Test debugfs_test:
Subgroup read_all_entries:
dmesg-fail -> FAIL (fi-elk-e7500) fdo#103989 +1
Test gem_mmap_gtt:
Subgroup basic-small-bo-tiledx:
pass -> FAIL (fi-gdg-551) fdo#102575
Test kms_busy:
Subgroup basic-flip-b:
pass -> FAIL (fi-bwr-2160) fdo#103182
fdo#103989 https://bugs.freedesktop.org/show_bug.cgi?id=103989
fdo#102575 https://bugs.freedesktop.org/show_bug.cgi?id=102575
fdo#103182 https://bugs.freedesktop.org/show_bug.cgi?id=103182
fi-bdw-5557u total:288 pass:267 dwarn:0 dfail:0 fail:0 skip:21 time:436s
fi-bdw-gvtdvm total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:453s
fi-blb-e6850 total:288 pass:223 dwarn:1 dfail:0 fail:0 skip:64 time:390s
fi-bsw-n3050 total:288 pass:242 dwarn:0 dfail:0 fail:0 skip:46 time:499s
fi-bwr-2160 total:288 pass:182 dwarn:0 dfail:0 fail:1 skip:105 time:278s
fi-bxt-dsi total:288 pass:258 dwarn:0 dfail:0 fail:0 skip:30 time:494s
fi-bxt-j4205 total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:501s
fi-byt-j1900 total:288 pass:253 dwarn:0 dfail:0 fail:0 skip:35 time:479s
fi-byt-n2820 total:288 pass:249 dwarn:0 dfail:0 fail:0 skip:39 time:470s
fi-elk-e7500 total:224 pass:162 dwarn:15 dfail:0 fail:1 skip:45
fi-gdg-551 total:288 pass:178 dwarn:1 dfail:0 fail:1 skip:108 time:267s
fi-glk-1 total:288 pass:260 dwarn:0 dfail:0 fail:0 skip:28 time:532s
fi-hsw-4770 total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:410s
fi-hsw-4770r total:288 pass:261 dwarn:0 dfail:0 fail:0 skip:27 time:413s
fi-ilk-650 total:288 pass:228 dwarn:0 dfail:0 fail:0 skip:60 time:388s
fi-ivb-3520m total:288 pass:259 dwarn:0 dfail:0 fail:0 skip:29 time:475s
fi-ivb-3770 total:288 pass:255 dwarn:0 dfail:0 fail:0 skip:33 time:429s
fi-kbl-7500u total:288 pass:263 dwarn:1 dfail:0 fail:0 skip:24 time:479s
fi-kbl-7560u total:288 pass:268 dwarn:1 dfail:0 fail:0 skip:19 time:519s
fi-kbl-7567u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:467s
fi-kbl-r total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:523s
fi-skl-6260u total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:452s
fi-skl-6600u total:288 pass:260 dwarn:1 dfail:0 fail:0 skip:27 time:532s
fi-skl-6700hq total:288 pass:261 dwarn:1 dfail:0 fail:0 skip:26 time:558s
fi-skl-6700k2 total:288 pass:264 dwarn:0 dfail:0 fail:0 skip:24 time:509s
fi-skl-6770hq total:288 pass:268 dwarn:0 dfail:0 fail:0 skip:20 time:490s
fi-skl-gvtdvm total:288 pass:265 dwarn:0 dfail:0 fail:0 skip:23 time:450s
fi-snb-2520m total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:549s
fi-snb-2600 total:288 pass:248 dwarn:0 dfail:0 fail:0 skip:40 time:414s
Blacklisted hosts:
fi-cfl-s2 total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:585s
fi-cnl-y total:288 pass:262 dwarn:0 dfail:0 fail:0 skip:26 time:624s
fi-pnv-d510 failed to collect. IGT log at Patchwork_7548/fi-pnv-d510/igt.log
94dca9e73099883228b4b7ad6a7077a7992f4061 drm-tip: 2017y-12m-20d-09h-26m-52s UTC integration manifest
32511c71c824 drm/i915/vlv: Add cdclk workaround for DSI
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7548/issues.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for drm/i915/vlv: Add cdclk workaround for DSI (rev2)
2017-12-20 10:50 [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Hans de Goede
2017-12-20 11:09 ` ✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2) Patchwork
@ 2017-12-20 12:28 ` Patchwork
2017-12-20 14:04 ` [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Ville Syrjälä
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-12-20 12:28 UTC (permalink / raw)
To: Hans de Goede; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/vlv: Add cdclk workaround for DSI (rev2)
URL : https://patchwork.freedesktop.org/series/35598/
State : warning
== Summary ==
Test kms_flip:
Subgroup plain-flip-ts-check-interruptible:
pass -> FAIL (shard-hsw) fdo#100368
Subgroup flip-vs-fences:
incomplete -> PASS (shard-hsw)
Test kms_universal_plane:
Subgroup disable-primary-vs-flip-pipe-b:
pass -> SKIP (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-1p-primscrn-spr-indfb-draw-mmap-wc:
pass -> SKIP (shard-hsw) fdo#101623
Subgroup fbc-1p-pri-indfb-multidraw:
fail -> PASS (shard-snb) fdo#103167
Test kms_draw_crc:
Subgroup draw-method-xrgb2101010-mmap-gtt-xtiled:
skip -> PASS (shard-hsw)
fdo#100368 https://bugs.freedesktop.org/show_bug.cgi?id=100368
fdo#101623 https://bugs.freedesktop.org/show_bug.cgi?id=101623
fdo#103167 https://bugs.freedesktop.org/show_bug.cgi?id=103167
shard-hsw total:2712 pass:1534 dwarn:1 dfail:0 fail:11 skip:1166 time:9464s
shard-snb total:2712 pass:1308 dwarn:1 dfail:0 fail:12 skip:1391 time:8095s
Blacklisted hosts:
shard-apl total:2712 pass:1687 dwarn:1 dfail:0 fail:23 skip:1001 time:14033s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_7548/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI
2017-12-20 10:50 [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Hans de Goede
2017-12-20 11:09 ` ✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2) Patchwork
2017-12-20 12:28 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-12-20 14:04 ` Ville Syrjälä
2017-12-23 19:03 ` Hans de Goede
2 siblings, 1 reply; 5+ messages in thread
From: Ville Syrjälä @ 2017-12-20 14:04 UTC (permalink / raw)
To: Hans de Goede
Cc: intel-gfx, Joonas Lahtinen, dri-devel, Hans de Goede,
Rodrigo Vivi
On Wed, Dec 20, 2017 at 11:50:17AM +0100, Hans de Goede wrote:
> At least on the Chuwi Vi8 (non pro/plus) the LCD panel will show an image
> shifted aprox. 20% to the left (with wraparound) and sometimes also wrong
> colors, showing that the panel controller is starting with sampling the
> datastream somewhere mid-line. This happens after the first blanking and
> re-init of the panel.
>
> After looking at drm.debug output I noticed that initially we inherit the
> cdclk of 333333 KHz set by the GOP, but after the re-init we picked 266667
> KHz, which turns out to be the cause of this problem, a quick hack to hard
> code the cdclk to 333333 KHz makes the problem go away.
>
> I've tested this on various Bay Trail devices, to make sure this not
> causes regressions on other devices and the higher cdclk does not cause
> any problems on the following devices:
> -GP-electronic T701 1024x600 333333 KHz cdclk after this patch
> -PEAQ C1010 1920x1200 333333 KHz cdclk after this patch
> -PoV mobii-wintab-800w 800x1280 333333 KHz cdclk after this patch
> -Asus Transformer-T100TA 1368x768 320000 KHz cdclk after this patch
>
> Also interesting wrt this is the comment in vlv_calc_cdclk about the
> existing workaround to avoid 200 Mhz as clock because that causes issues
> in some cases.
IIRC the 200 MHz clock never worked on any machine/display.
>
> This commit extends the "do not use 200 Mhz" workaround with an extra
> check to require atleast 320000 KHz (avoiding 266667 KHz) when a DSI
> panel is active.
>
> Changes in v2:
> -Change the commit message and the code comment to not treat the GOP as
> a reference, the GOP should not be treated as a reference
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
> index 9c5ceb98d48f..a15976f55f47 100644
> --- a/drivers/gpu/drm/i915/intel_cdclk.c
> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
> @@ -1923,6 +1923,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
> if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
> min_cdclk = max(2 * 96000, min_cdclk);
>
> + /*
> + * On Valleyview some DSI panels loose (v|h)sync when the clock is lower
s/loose/lose/
My VLV+DSI tablet is happy with the 266 MHz cdclk, so it's a little
disappointing to apply this to all such machines. But unless someone
can come up with a better workaround I think this will have to do.
Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> + * then 320000KHz.
> + */
> + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI) &&
> + IS_VALLEYVIEW(dev_priv))
> + min_cdclk = max(320000, min_cdclk);
> +
> if (min_cdclk > dev_priv->max_cdclk_freq) {
> DRM_DEBUG_KMS("required cdclk (%d kHz) exceeds max (%d kHz)\n",
> min_cdclk, dev_priv->max_cdclk_freq);
> --
> 2.14.3
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI
2017-12-20 14:04 ` [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Ville Syrjälä
@ 2017-12-23 19:03 ` Hans de Goede
0 siblings, 0 replies; 5+ messages in thread
From: Hans de Goede @ 2017-12-23 19:03 UTC (permalink / raw)
To: Ville Syrjälä, Hans de Goede
Cc: intel-gfx, Joonas Lahtinen, dri-devel, Rodrigo Vivi
Hi,
On 20-12-17 15:04, Ville Syrjälä wrote:
> On Wed, Dec 20, 2017 at 11:50:17AM +0100, Hans de Goede wrote:
>> At least on the Chuwi Vi8 (non pro/plus) the LCD panel will show an image
>> shifted aprox. 20% to the left (with wraparound) and sometimes also wrong
>> colors, showing that the panel controller is starting with sampling the
>> datastream somewhere mid-line. This happens after the first blanking and
>> re-init of the panel.
>>
>> After looking at drm.debug output I noticed that initially we inherit the
>> cdclk of 333333 KHz set by the GOP, but after the re-init we picked 266667
>> KHz, which turns out to be the cause of this problem, a quick hack to hard
>> code the cdclk to 333333 KHz makes the problem go away.
>>
>> I've tested this on various Bay Trail devices, to make sure this not
>> causes regressions on other devices and the higher cdclk does not cause
>> any problems on the following devices:
>> -GP-electronic T701 1024x600 333333 KHz cdclk after this patch
>> -PEAQ C1010 1920x1200 333333 KHz cdclk after this patch
>> -PoV mobii-wintab-800w 800x1280 333333 KHz cdclk after this patch
>> -Asus Transformer-T100TA 1368x768 320000 KHz cdclk after this patch
>>
>> Also interesting wrt this is the comment in vlv_calc_cdclk about the
>> existing workaround to avoid 200 Mhz as clock because that causes issues
>> in some cases.
>
> IIRC the 200 MHz clock never worked on any machine/display.
>
>>
>> This commit extends the "do not use 200 Mhz" workaround with an extra
>> check to require atleast 320000 KHz (avoiding 266667 KHz) when a DSI
>> panel is active.
>>
>> Changes in v2:
>> -Change the commit message and the code comment to not treat the GOP as
>> a reference, the GOP should not be treated as a reference
>>
>> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
>> ---
>> drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_cdclk.c b/drivers/gpu/drm/i915/intel_cdclk.c
>> index 9c5ceb98d48f..a15976f55f47 100644
>> --- a/drivers/gpu/drm/i915/intel_cdclk.c
>> +++ b/drivers/gpu/drm/i915/intel_cdclk.c
>> @@ -1923,6 +1923,14 @@ int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state)
>> if (crtc_state->has_audio && INTEL_GEN(dev_priv) >= 9)
>> min_cdclk = max(2 * 96000, min_cdclk);
>>
>> + /*
>> + * On Valleyview some DSI panels loose (v|h)sync when the clock is lower
>
> s/loose/lose/
>
> My VLV+DSI tablet is happy with the 266 MHz cdclk, so it's a little
> disappointing to apply this to all such machines. But unless someone
> can come up with a better workaround I think this will have to do.
>
> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Thank you, I've just pushed this to dinq with your acked-by and
the spelling error corrected.
Regards,
Hans
>> + * then 320000KHz.
>> + */
>> + if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DSI) &&
>> + IS_VALLEYVIEW(dev_priv))
>> + min_cdclk = max(320000, min_cdclk);
>> +
>> if (min_cdclk > dev_priv->max_cdclk_freq) {
>> DRM_DEBUG_KMS("required cdclk (%d kHz) exceeds max (%d kHz)\n",
>> min_cdclk, dev_priv->max_cdclk_freq);
>> --
>> 2.14.3
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-12-23 19:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-20 10:50 [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Hans de Goede
2017-12-20 11:09 ` ✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2) Patchwork
2017-12-20 12:28 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-12-20 14:04 ` [PATCH v2] drm/i915/vlv: Add cdclk workaround for DSI Ville Syrjälä
2017-12-23 19:03 ` Hans de Goede
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).