drm/i915: set CDCLK if DPLL0 enabled during resuming from S3
Subsystems (2)
PATCH 1/1 drm/i915: set CDCLK if DPLL0 enabled during resuming from S3
Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then driver needs to set CDCLK to avoid display corruption if DPLL0 enabled.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91697
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) mode change 100644 => 100755 drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_display.c +5 -8
@@ -5707,16 +5707,13 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv)/* enable PG1 and Misc I/O */ intel_display_power_get (dev_priv,POWER_DOMAIN_PLLS ); -/* DPLL0 already enabed !? */ -if (I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE ) { -DRM_DEBUG_DRIVER ("DPLL0 already running\n" ); -return ; +/* DPLL0 not enabed !? */ +if (!(I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE )) { +/* enable DPLL0 */ + required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); +skl_dpll0_enable (dev_priv, required_vco); } -/* enable DPLL0 */ - required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); -skl_dpll0_enable (dev_priv, required_vco); -/* set CDCLK to the frequency the BIOS chose */ skl_set_cdclk (dev_priv, dev_priv->skl_boot_cdclk);
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 4 lines · Gary Wang
Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then driver needs to set CDCLK to avoid display corruption if DPLL0 enabled.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91697
Quoted 10 lines
Reviewed-by Rodrigo Vivi <[email protected]>Reviewed-by Damien Lespiau <[email protected]>Reviewed-by Cooper Chiou <[email protected]>Reviewed-by Wei Shun Chang <[email protected]>Tested-by Gary Wang <[email protected]>Cc Daniel Vetter <[email protected]>Cc Gavin Hindman <[email protected]>Cc Chris Wilson <[email protected]>Cc Xiong Y Zhang <[email protected]>Signed-off-by Gary Wang <[email protected]>
Hum I had not given my r-b tag before this mail, r-b tags cannot be forged by the patch author but needs to be explicitly given by someone. In any case:
We could probably remove the '!?' as this is now the expected behaviour with recent firmware.
Signature · 1 line
Damien
Quoted 40 lines
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) mode change 100644 => 100755 drivers/gpu/drm/i915/intel_display.cdrivers/gpu/drm/i915/intel_display.c +5
-8@@ -5707,16 +5707,13 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv)/* enable PG1 and Misc I/O */ intel_display_power_get (dev_priv,POWER_DOMAIN_PLLS ); -/* DPLL0 already enabed !? */ -if (I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE ) { -DRM_DEBUG_DRIVER ("DPLL0 already running\n" ); -return ; +/* DPLL0 not enabed !? */ +if (!(I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE )) { +/* enable DPLL0 */ + required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); +skl_dpll0_enable (dev_priv, required_vco); } -/* enable DPLL0 */ - required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); -skl_dpll0_enable (dev_priv, required_vco); -/* set CDCLK to the frequency the BIOS chose */ skl_set_cdclk (dev_priv, dev_priv->skl_boot_cdclk);Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
Reviewed-byQuoted 16 lines · Damien Lespiau
Quoted 4 lines · Gary Wang
Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then driver needs to set CDCLK to avoid display corruption if DPLL0 enabled.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91697
Quoted 10 lines
Reviewed-by Rodrigo Vivi <[email protected]>Reviewed-by Damien Lespiau <[email protected]>Reviewed-by Cooper Chiou <[email protected]>Reviewed-by Wei Shun Chang <[email protected]>Tested-by Gary Wang <[email protected]>Cc Daniel Vetter <[email protected]>Cc Gavin Hindman <[email protected]>Cc Chris Wilson <[email protected]>Cc Xiong Y Zhang <[email protected]>Signed-off-by Gary Wang <[email protected]>
Quoted 9 lines
Hum I had not given my r-b tag before this mail, r-b tags cannot be forged by the patch author but needs to be explicitly given by someone. In any case:
Reviewed-by Damien Lespiau <[email protected]>We could probably remove the '!?' as this is now the expected behaviour with recent firmware.
totally agree with Damien and here it is my one:
Quoted 42 lines
--
DamienReview
Quoted 6 lines
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) mode change 100644 => 100755 drivers/gpu/drm/i915/intel_display.c(quoted diff) +0
-0
b/drivers/gpu/drm/i915/intel_display.cdrivers/gpu/drm/i915/intel_display.c void skl_init_cdclk(struct drm_i915_private
Quoted 6 lines
old mode 100644
new mode 100755
index f604ce1..617d1d8drivers/gpu/drm/i915/intel_display.c +0
-0@@ -5707,16 +5707,13 @@ void skl_init_cdclk(struct drm_i915_private
*dev_priv)Quoted 24 lines
drivers/gpu/drm/i915/intel_display.c +5
-9/* enable PG1 and Misc I/O */ intel_display_power_get (dev_priv,POWER_DOMAIN_PLLS ); -/* DPLL0 already enabed !? */ -if (I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE ) { -DRM_DEBUG_DRIVER ("DPLL0 already running\n" ); -return ; +/* DPLL0 not enabed !? */ +if (!(I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE )) { +/* enable DPLL0 */ + required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); +skl_dpll0_enable (dev_priv, required_vco); } -/* enable DPLL0 */ - required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); -skl_dpll0_enable (dev_priv, required_vco); -/* set CDCLK to the frequency the BIOS chose */ skl_set_cdclk (dev_priv, dev_priv->skl_boot_cdclk); --1.9.1
Quoted 9 lines
Quoted 4 lines
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 4 lines · Gary Wang
Since BIOS RC 1.4 it would enable CDCLK PLL during BIOS S3 resume, then driver needs to set CDCLK to avoid display corruption if DPLL0 enabled.
References: https://bugs.freedesktop.org/show_bug.cgi?id=91697
Quoted 10 lines
Reviewed-by Rodrigo Vivi <[email protected]>Reviewed-by Damien Lespiau <[email protected]>Reviewed-by Cooper Chiou <[email protected]>Reviewed-by Wei Shun Chang <[email protected]>Tested-by Gary Wang <[email protected]>Cc Daniel Vetter <[email protected]>Cc Gavin Hindman <[email protected]>Cc Chris Wilson <[email protected]>Cc Xiong Y Zhang <[email protected]>Signed-off-by Gary Wang <[email protected]>
Pushed to drm-intel-next-fixes, with the comment fixed per Damien's comment. Also fixed the accidental mode change on the file; you can avoid errors like this by running checkpatch. Thanks for the patch and review.
BR,
Jani.
Quoted 40 lines
--- drivers/gpu/drm/i915/intel_display.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) mode change 100644 => 100755 drivers/gpu/drm/i915/intel_display.cdrivers/gpu/drm/i915/intel_display.c +5
-8@@ -5707,16 +5707,13 @@ void skl_init_cdclk(struct drm_i915_private *dev_priv)/* enable PG1 and Misc I/O */ intel_display_power_get (dev_priv,POWER_DOMAIN_PLLS ); -/* DPLL0 already enabed !? */ -if (I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE ) { -DRM_DEBUG_DRIVER ("DPLL0 already running\n" ); -return ; +/* DPLL0 not enabed !? */ +if (!(I915_READ (LCPLL1_CTL ) &LCPLL_PLL_ENABLE )) { +/* enable DPLL0 */ + required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); +skl_dpll0_enable (dev_priv, required_vco); } -/* enable DPLL0 */ - required_vco =skl_cdclk_get_vco (dev_priv->skl_boot_cdclk); -skl_dpll0_enable (dev_priv, required_vco); -/* set CDCLK to the frequency the BIOS chose */ skl_set_cdclk (dev_priv, dev_priv->skl_boot_cdclk);Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx