drm/i915/glk: CDCLK calculation changes for glk
Subsystems (2)
PATCH 1/1 drm/i915/glk: CDCLK calculation changes for glk
As per BSPEC, valid cdclk values for glk are 79.2, 158.4, 316.8 Mhz. Practically we can achive only 99% of these cdclk values(HW team checking on this). So cdclk should be calculated for the given pixclk as per that otherwise it may lead to screen corruption for some scenarios.
v2: Rebased to new CDLCK code framework
v3: Addressed review comments from Ander/Jani
- Add comment in code about 99% usage of CDCLK
- Calculate max dot clock as well with 99% limit
--- drivers/gpu/drm/i915/intel_cdclk.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/intel_cdclk.c +7 -4
@@ -1071,9 +1071,13 @@ static int bxt_calc_cdclk(int max_pixclk)static int glk_calc_cdclk (int max_pixclk) { -if (max_pixclk >2 *158400 ) +/* +* For GLK platform 316.8, 158.4, 79.2 MHz are the CDCLK values +* as per BSPEC. But practically we can only achieve 99% of these. +*/ +if (max_pixclk >DIV_ROUND_UP (2 *158400 *99 ,100 ))return 316800 ; -else if (max_pixclk >2 *79200 ) +else if (max_pixclk >DIV_ROUND_UP (2 *79200 *99 ,100 ))return 158400 ;else return 79200 ;
@@ -1613,7 +1617,6 @@ static int bxt_modeset_calc_cdclk(struct drm_atomic_state *state) cdclk =bxt_calc_cdclk (max_pixclk); vco =bxt_de_pll_vco (dev_priv, cdclk); } -if (cdclk > dev_priv->max_cdclk_freq) {DRM_DEBUG_KMS ("requested cdclk (%d kHz) exceeds max (%d kHz)\n" , cdclk, dev_priv->max_cdclk_freq);
@@ -1647,7 +1650,7 @@ static int intel_compute_max_dotclk(struct drm_i915_private *dev_priv)int max_cdclk_freq = dev_priv->max_cdclk_freq;if (IS_GEMINILAKE (dev_priv)) -return 2 * max_cdclk_freq; +return 2 * max_cdclk_freq *99 /100 ;else if (INTEL_INFO (dev_priv)->gen >=9 ||IS_HASWELL (dev_priv) ||IS_BROADWELL (dev_priv))return max_cdclk_freq;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for drm/i915/glk: CDCLK calculation changes for glk (rev3)
== Series Details ==
== Series Details ==
Series: drm/i915/glk: CDCLK calculation changes for glk (rev3)
URL : https://patchwork.freedesktop.org/series/19226/
State : failure
== Summary ==
Series 19226v3 drm/i915/glk: CDCLK calculation changes for glk
https://patchwork.freedesktop.org/api/1.0/series/19226/revisions/3/mbox/
Test gem_exec_flush:
Subgroup basic-batch-kernel-default-uc:
fail -> PASS (fi-snb-2600) fdo#100007
Test gem_exec_suspend:
Subgroup basic-s4:
notrun -> INCOMPLETE (fi-snb-2600)
Test gem_mmap_gtt:
Subgroup basic-copy:
pass -> INCOMPLETE (fi-hsw-4770r)
Test kms_flip:
Subgroup basic-flip-vs-modeset:
pass -> INCOMPLETE (fi-byt-n2820)
Subgroup basic-flip-vs-wf_vblank:
pass -> INCOMPLETE (fi-byt-j1900)
Test kms_pipe_crc_basic:
Subgroup hang-read-crc-pipe-c:
pass -> INCOMPLETE (fi-ivb-3520m)
Test kms_setmode:
Subgroup basic:
notrun -> INCOMPLETE (fi-snb-2520m)
Test pm_rpm:
Subgroup basic-pci-d3-state:
pass -> INCOMPLETE (fi-bsw-n3050)fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007
fi-bdw-5557u total:300 pass:284 dwarn:0 dfail:0 fail:0 skip:16 time: 626s fi-bsw-n3050 total:300 pass:221 dwarn:0 dfail:0 fail:1 skip:46 time: 0s fi-byt-j1900 total:240 pass:212 dwarn:0 dfail:0 fail:0 skip:27 time: 0s fi-byt-n2820 total:239 pass:207 dwarn:0 dfail:0 fail:0 skip:31 time: 0s fi-hsw-4770 total:300 pass:279 dwarn:0 dfail:0 fail:1 skip:20 time: 666s fi-hsw-4770r total:300 pass:138 dwarn:0 dfail:0 fail:0 skip:13 time: 0s fi-ilk-650 total:300 pass:240 dwarn:0 dfail:0 fail:2 skip:58 time: 540s fi-ivb-3520m total:263 pass:238 dwarn:0 dfail:0 fail:5 skip:19 time: 0s fi-kbl-7500u total:300 pass:276 dwarn:1 dfail:0 fail:3 skip:20 time: 638s fi-skl-6260u total:300 pass:283 dwarn:1 dfail:0 fail:4 skip:12 time: 662s fi-skl-6700k total:300 pass:271 dwarn:5 dfail:0 fail:4 skip:20 time: 667s fi-skl-6770hq total:300 pass:283 dwarn:1 dfail:0 fail:4 skip:12 time: 695s fi-snb-2520m total:300 pass:226 dwarn:0 dfail:0 fail:5 skip:33 time: 0s fi-snb-2600 total:113 pass:88 dwarn:0 dfail:0 fail:5 skip:19 time: 0s
fi-bxt-j4205 failed to connect after reboot
fi-bxt-t5700 failed to connect after reboot
fi-ivb-3770 failed to collect. IGT log at Patchwork_4233/fi-ivb-3770/igt.log fi-skl-6700hq failed to connect after reboot
a4d4230315e8bd8ce20fc86d860ec342c630da65 drm-tip: 2017y-03m-20d-14h-40m-55s UTC integration manifest aff56a8 drm/i915/glk: CDCLK calculation changes for glk
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4233/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx