Patch "drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating" has been added to the 4.9-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-i915-dsi-do-not-clear-dpounit_clock_gate_disable-from-vlv_init_display_clock_gating.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
bb98e72adaf9d19719aba35f802d4836f5d5176cMon Sep 17 00:00:00 2001
From: Hans de Goede <[email protected]>
Date: Fri, 2 Dec 2016 15:29:04 +0100
Subject: drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Hans de Goede <[email protected]>
commit bb98e72adaf9d19719aba35f802d4836f5d5176c upstream.
On my Cherrytrail CUBE iwork8 Air tablet PIPE-A would get stuck on loading i915 at boot 1 out of every 3 boots, resulting in a non functional LCD. Once the i915 driver has successfully loaded, the panel can be disabled / enabled without hitting this issue.
The getting stuck is caused by vlv_init_display_clock_gating() clearing the DPOUNIT_CLOCK_GATE_DISABLE bit in DSPCLK_GATE_D when called from chv_pipe_power_well_ops.enable() on driver load, while a pipe is enabled driving the DSI LCD by the BIOS.
Clearing this bit while DSI is in use is a known issue and intel_dsi_pre_enable() / intel_dsi_post_disable() already set / clear it as appropriate.
This commit modifies vlv_init_display_clock_gating() to leave the DPOUNIT_CLOCK_GATE_DISABLE bit alone fixing the pipe getting stuck.
Changes in v2:
-Replace PIPE-A with "a pipe" or "the pipe" in the commit msg and comment
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97330
--- drivers/gpu/drm/i915/intel_runtime_pm.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_runtime_pm.c +12 -1
@@ -1065,7 +1065,18 @@ static bool vlv_power_well_enabled(strucstatic void vlv_init_display_clock_gating (struct drm_i915_private *dev_priv) { -I915_WRITE (DSPCLK_GATE_D ,VRHUNIT_CLOCK_GATE_DISABLE ); +u32 val; + +/* +* On driver load, a pipe may be active and driving a DSI display. +* Preserve DPOUNIT_CLOCK_GATE_DISABLE to avoid the pipe getting stuck +* (and never recovering) in this case. intel_dsi_post_disable() will +* clear it when we turn off the display. +*/ + val =I915_READ (DSPCLK_GATE_D ); + val &=DPOUNIT_CLOCK_GATE_DISABLE ; + val |=VRHUNIT_CLOCK_GATE_DISABLE ; +I915_WRITE (DSPCLK_GATE_D , val);/* * Disable trickle feed and enable pnd deadline calculation
Patches currently in stable-queue which might be from [email protected] are
queue-4.9/acpi-video-add-force_native-quirk-for-hp-pavilion-dv6.patch queue-4.9/acpi-video-add-force_native-quirk-for-dell-xps-17-l702x.patch queue-4.9/drm-i915-dsi-fix-chv_exec_gpio-disabling-the-gpios-it-is-setting.patch queue-4.9/drm-i915-dsi-do-not-clear-dpounit_clock_gate_disable-from-vlv_init_display_clock_gating.patch