diff options
author | Hans de Goede <hdegoede@redhat.com> | 2016-12-02 09:29:04 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-09 02:32:26 -0500 |
commit | d816da6f57661157b3e056da426141f98d3bddde (patch) | |
tree | bf93140af3c2ce2c73cf5f4fe4c4c88462e4d1fe /drivers/gpu/drm/i915 | |
parent | 6cb4179f97cf666639f2f11b40d45766bc1b4d85 (diff) |
drm/i915/dsi: Do not clear DPOUNIT_CLOCK_GATE_DISABLE from vlv_init_display_clock_gating
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
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161202142904.25613-1-hdegoede@redhat.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
(cherry picked from commit 721d484563e1a51ada760089c490cbc47e909756)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_runtime_pm.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c index a38c2fefe85a..23ed3f5972fa 100644 --- a/drivers/gpu/drm/i915/intel_runtime_pm.c +++ b/drivers/gpu/drm/i915/intel_runtime_pm.c | |||
@@ -1065,7 +1065,18 @@ static bool vlv_power_well_enabled(struct drm_i915_private *dev_priv, | |||
1065 | 1065 | ||
1066 | static void vlv_init_display_clock_gating(struct drm_i915_private *dev_priv) | 1066 | static void vlv_init_display_clock_gating(struct drm_i915_private *dev_priv) |
1067 | { | 1067 | { |
1068 | I915_WRITE(DSPCLK_GATE_D, VRHUNIT_CLOCK_GATE_DISABLE); | 1068 | u32 val; |
1069 | |||
1070 | /* | ||
1071 | * On driver load, a pipe may be active and driving a DSI display. | ||
1072 | * Preserve DPOUNIT_CLOCK_GATE_DISABLE to avoid the pipe getting stuck | ||
1073 | * (and never recovering) in this case. intel_dsi_post_disable() will | ||
1074 | * clear it when we turn off the display. | ||
1075 | */ | ||
1076 | val = I915_READ(DSPCLK_GATE_D); | ||
1077 | val &= DPOUNIT_CLOCK_GATE_DISABLE; | ||
1078 | val |= VRHUNIT_CLOCK_GATE_DISABLE; | ||
1079 | I915_WRITE(DSPCLK_GATE_D, val); | ||
1069 | 1080 | ||
1070 | /* | 1081 | /* |
1071 | * Disable trickle feed and enable pnd deadline calculation | 1082 | * Disable trickle feed and enable pnd deadline calculation |