Skip to content

Commit 721d484

Browse files
jwrdegoedevsyrjala
authored andcommitted
drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating
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 Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Ville Syrjälä <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Ville Syrjälä <[email protected]>
1 parent e339d67 commit 721d484

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/gpu/drm/i915/intel_runtime_pm.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,18 @@ static bool vlv_power_well_enabled(struct drm_i915_private *dev_priv,
10991099

11001100
static void vlv_init_display_clock_gating(struct drm_i915_private *dev_priv)
11011101
{
1102-
I915_WRITE(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE);
1102+
u32 val;
1103+
1104+
/*
1105+
* On driver load, a pipe may be active and driving a DSI display.
1106+
* Preserve DPOUNIT_CLOCK_GATE_DISABLE to avoid the pipe getting stuck
1107+
* (and never recovering) in this case. intel_dsi_post_disable() will
1108+
* clear it when we turn off the display.
1109+
*/
1110+
val = I915_READ(DSPCLK_GATE_D);
1111+
val &= DPOUNIT_CLOCK_GATE_DISABLE;
1112+
val |= VRHUNIT_CLOCK_GATE_DISABLE;
1113+
I915_WRITE(DSPCLK_GATE_D, val);
11031114

11041115
/*
11051116
* Disable trickle feed and enable pnd deadline calculation

0 commit comments

Comments
 (0)