drm/i915/vlv: Add cdclk workaround for DSI
Subsystems (2)
PATCH v2 1/1 drm/i915/vlv: Add cdclk workaround for DSI
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
--- drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/gpu/drm/i915/intel_cdclk.c +8 -0
@@ -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);
Signature · 6 lines
2.14.3 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/vlv: Add cdclk workaround for DSI (rev2)
== Series Details ==
== 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#103182fdo#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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.IGT: warning for drm/i915/vlv: Add cdclk workaround for DSI (rev2)
In reply to Hans de Goede== Series Details ==
== 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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · Hans de Goede
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:
(quoted diff) +0
-4-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
Quoted 3 lines
Also interesting wrt this is the comment in
vlv_calc_cdclkabout 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.
Quoted 19 lines
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 referenceSigned-off-by Hans de Goede <[email protected]>--- drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/i915/intel_cdclk.c +0
-0
drivers/gpu/drm/i915/intel_cdclk.c int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state) · line 1927
Quoted 5 lines
drivers/gpu/drm/i915/intel_cdclk.c +2
-0@@ -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.
Quoted 11 lines
drivers/gpu/drm/i915/intel_cdclk.c +6
-0+* 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);Signature · 1 line
2.14.3
Signature · 6 lines
Ville Syrjälä Intel OTC _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 53 lines · Ville Syrjälä
Quoted 19 lines · Hans de Goede
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:
(quoted diff) +0
-4-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 patchQuoted 3 lines
Also interesting wrt this is the comment in
vlv_calc_cdclkabout 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.
Quoted 19 lines
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 referenceSigned-off-by Hans de Goede <[email protected]>--- drivers/gpu/drm/i915/intel_cdclk.c | 8 ++++++++ 1 file changed, 8 insertions(+)drivers/gpu/drm/i915/intel_cdclk.c +0
-0drivers/gpu/drm/i915/intel_cdclk.c int intel_crtc_compute_min_cdclk(const struct intel_crtc_state *crtc_state) · line 1927
Quoted 5 lines
drivers/gpu/drm/i915/intel_cdclk.c +2
-0@@ -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/
Quoted 5 lines
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ä <[email protected]>
Thank you, I've just pushed this to dinq with your acked-by and the spelling error corrected.
Regards,
Hans
Quoted 12 lines
Quoted 11 lines
drivers/gpu/drm/i915/intel_cdclk.c +6
-0+* 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);Signature · 1 line
2.14.3
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel