drm/i915: Do not temporarily disable the DPLL on i830
Subsystems (2)
PATCH v2 1/2 drm/i915: Do not temporarily disable the DPLL on i830
From: Ville Syrjälä <[email protected]>
The current code clears the DPLL register entirely when re-enabling VGA mode temporarily during the DPLL enable sequence. On i830 we want to keep the DPLLs on all the time, so let's not do this temporary disabling.
The current code does work, so this doesn't seem super important. But I prefer that we make the behaviour 100% consistent.
v2: Split this change the DVO 2x clocking patch
--- drivers/gpu/drm/i915/intel_display.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_display.c +1 -2
@@ -1486,8 +1486,7 @@ static void i9xx_enable_pll(struct intel_crtc *crtc,* the P1/P2 dividers. Otherwise the DPLL will keep using the old * dividers, even though the register value does change. */ -I915_WRITE (reg,0 ); - +I915_WRITE (reg, dpll & ~DPLL_VGA_MODE_DIS );I915_WRITE (reg, dpll);/* Wait for the clocks to stabilize. */
Signature · 6 lines
2.19.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH v2 2/2 drm/i915: Simplify i830 DVO 2x clock handling
From: Ville Syrjälä <[email protected]>
Let's just always enable the DVO 2x clock on i830. This way we don't have to track if DVO is being used or not. The spec does suggest we should disable the clock when it isn't needed, but this does appear to work just fine.
This removes another crtc->config usage.
v2: Split the DPLL enable sequence change to a separate patch
--- drivers/gpu/drm/i915/intel_display.c | 60 +++++++--------------------- 1 file changed, 14 insertions(+), 46 deletions(-)
drivers/gpu/drm/i915/intel_display.c +14 -46
@@ -1441,19 +1441,6 @@ static void chv_enable_pll(struct intel_crtc *crtc, } } -static int intel_num_dvo_pipes (struct drm_i915_private *dev_priv) -{ -struct intel_crtc *crtc; -int count =0 ; - -for_each_intel_crtc (&dev_priv->drm, crtc) { - count += crtc->base.state->active && -intel_crtc_has_type (crtc->config,INTEL_OUTPUT_DVO ); - } - -return count; -} -static void i9xx_enable_pll (struct intel_crtc *crtc,const struct intel_crtc_state *crtc_state) {
@@ -1468,19 +1455,6 @@ static void i9xx_enable_pll(struct intel_crtc *crtc,if (IS_MOBILE (dev_priv) && !IS_I830 (dev_priv))assert_panel_unlocked (dev_priv, crtc->pipe); -/* Enable DVO 2x clock on both PLLs if necessary */ -if (IS_I830 (dev_priv) &&intel_num_dvo_pipes (dev_priv) >0 ) { -/* -* It appears to be important that we don't enable this -* for the current pipe before otherwise configuring the -* PLL. No idea how this should be handled if multiple -* DVO outputs are enabled simultaneosly. -*/ - dpll |=DPLL_DVO_2X_MODE ; -I915_WRITE (DPLL (!crtc->pipe), -I915_READ (DPLL (!crtc->pipe)) |DPLL_DVO_2X_MODE ); - } -/* * Apparently we need to have VGA mode enabled prior to changing * the P1/P2 dividers. Otherwise the DPLL will keep using the old
@@ -1519,16 +1493,6 @@ static void i9xx_disable_pll(const struct intel_crtc_state *crtc_state)struct drm_i915_private *dev_priv =to_i915 (crtc->base.dev);enum pipe pipe = crtc->pipe; -/* Disable DVO 2x clock on both PLLs if necessary */ -if (IS_I830 (dev_priv) && -intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DVO ) && - !intel_num_dvo_pipes (dev_priv)) { -I915_WRITE (DPLL (PIPE_B ), -I915_READ (DPLL (PIPE_B )) & ~DPLL_DVO_2X_MODE ); -I915_WRITE (DPLL (PIPE_A ), -I915_READ (DPLL (PIPE_A )) & ~DPLL_DVO_2X_MODE ); - } -/* Don't disable pipe or pipe PLLs if needed */ if (IS_I830 (dev_priv))return ;
@@ -7493,7 +7457,19 @@ static void i8xx_compute_dpll(struct intel_crtc *crtc, dpll |=PLL_P2_DIVIDE_BY_4 ; } -if (!IS_I830 (dev_priv) && +/* +* Bspec: +* "[Almador Errata}: For the correct operation of the muxed DVO pins +* (GDEVSELB/I2Cdata, GIRDBY/I2CClk) and (GFRAMEB/DVI_Data, +* GTRDYB/DVI_Clk): Bit 31 (DPLL VCO Enable) and Bit 30 (2X Clock +* Enable) must be set to “1” in both the DPLL A Control Register +* (06014h-06017h) and DPLL B Control Register (06018h-0601Bh)." +* +* For simplicity We simply keep both bits always enabled in +* both DPLLS. The spec says we should disable the DVO 2X clock +* when not needed, but this seems to work fine in practice. +*/ +if (IS_I830 (dev_priv) ||intel_crtc_has_type (crtc_state,INTEL_OUTPUT_DVO )) dpll |=DPLL_DVO_2X_MODE ;
@@ -8217,14 +8193,6 @@ static bool i9xx_get_pipe_config(struct intel_crtc *crtc, } pipe_config->dpll_hw_state.dpll =I915_READ (DPLL (crtc->pipe));if (!IS_VALLEYVIEW (dev_priv) && !IS_CHERRYVIEW (dev_priv)) { -/* -* DPLL_DVO_2X_MODE must be enabled for both DPLLs -* on 830. Filter it out here so that we don't -* report errors due to that. -*/ -if (IS_I830 (dev_priv)) - pipe_config->dpll_hw_state.dpll &= ~DPLL_DVO_2X_MODE ; - pipe_config->dpll_hw_state.fp0 =I915_READ (FP0 (crtc->pipe)); pipe_config->dpll_hw_state.fp1 =I915_READ (FP1 (crtc->pipe)); }else {
@@ -15616,7 +15584,7 @@ void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe) pipe_name(pipe), clock.vco, clock.dot); fp =i9xx_dpll_compute_fp (&clock); - dpll = (I915_READ (DPLL (pipe)) &DPLL_DVO_2X_MODE ) | + dpll =DPLL_DVO_2X_MODE |DPLL_VGA_MODE_DIS | ((clock.p1 -2 ) <<DPLL_FPA01_P1_POST_DIV_SHIFT ) | PLL_P2_DIVIDE_BY_4 |
Signature · 6 lines
2.19.2 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Do not temporarily disable the DPLL on i830
In reply to Ville Syrjala== Series Details ==
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: Do not temporarily disable the DPLL on i830
URL : https://patchwork.freedesktop.org/series/57598/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_5708 -> Patchwork_12377
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_12377 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_12377, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/57598/revisions/1/mbox/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_12377:
### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@reload-with-fault-injection:
- fi-kbl-7560u: PASS -> INCOMPLETE
Known issues
------------
Here are the changes found in Patchwork_12377 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: PASS -> INCOMPLETE [fdo#107718]
* igt@i915_selftest@live_execlists:
- fi-apl-guc: PASS -> INCOMPLETE [fdo#103927] / [fdo#109720]
* igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a:
- fi-byt-clapper: PASS -> FAIL [fdo#103191] / [fdo#107362]
* igt@runner@aborted:
- fi-apl-guc: NOTRUN -> FAIL [fdo#108622] / [fdo#109720]
#### Possible fixes ####
* igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a-frame-sequence:
- fi-byt-clapper: FAIL [fdo#103191] / [fdo#107362] -> PASS +1
[fdo#103191]: https://bugs.freedesktop.org/show_bug.cgi?id=103191
[fdo#103927]: https://bugs.freedesktop.org/show_bug.cgi?id=103927
[fdo#107362]: https://bugs.freedesktop.org/show_bug.cgi?id=107362
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108622]: https://bugs.freedesktop.org/show_bug.cgi?id=108622
[fdo#109720]: https://bugs.freedesktop.org/show_bug.cgi?id=109720
Participating hosts (47 -> 40)
------------------------------
Missing (7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-y fi-ivb-3520m fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_5708 -> Patchwork_12377
CI_DRM_5708: afd34c5dec857362de91fb3044f09d90e83ad6a5 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4871: 8feb147562ba1b364615ddacd44c3846f0250d37 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_12377: 048987dd7fdb1f37537299e3d587a81bdd432279 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
048987dd7fdb drm/i915: Simplify i830 DVO 2x clock handling 9c6f3a854085 drm/i915: Do not temporarily disable the DPLL on i830
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_12377/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: ✗ Fi.CI.BAT: failure for series starting with [v2,1/2] drm/i915: Do not temporarily disable the DPLL on i830
Quoted 28 lines · Patchwork
== Series Details ==
Series: series starting with [v2,1/2] drm/i915: Do not temporarily disable the DPLL on i830
URL : https://patchwork.freedesktop.org/series/57598/
State : failure== Summary ==
CI Bug Log - changes from
CI_DRM_5708->Patchwork_12377
====================================================Summary
-------**FAILURE**
Serious unknown changes coming with
Patchwork_12377absolutely need to be verified manually.If you think the reported changes have nothing to do with the changes introduced in
Patchwork_12377, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.External URL: https://patchwork.freedesktop.org/api/1.0/series/57598/revisions/1/mbox/
Possible new issues
-------------------
Quoted 8 lines
Here are the unknown changes that may have been introduced in
Patchwork_12377:### IGT changes ###
#### Possible regressions ####
* igt@i915_module_load@reload-with-fault-injection:
- fi-kbl-7560u: PASS -> INCOMPLETE
Unrelated, and v1 (which was 100% identical) passed everything -> series pushed to dinq
Signature · 6 lines
Ville Syrjälä Intel _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx