Commit 939c2fe8 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Set primary_disabled in intel_{enable, disable}_plane

If the primary gets marked as disabled while the pipe is off for
instance, we should still re-enable it when the pipe is turned on,
unless the sprite covers it fully also in that configuration.
Unfortunately we do the plane visibility checks only in the sprite code,
which is executed after the primary enabling when turning the pipe off.

Ideally we should compute the plane visibility before touching the
hardware at all, but for now just set the primary_disabld flag
in intel_{enable,disable}_plane.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 3def84b3
...@@ -1832,12 +1832,16 @@ void intel_flush_display_plane(struct drm_i915_private *dev_priv, ...@@ -1832,12 +1832,16 @@ void intel_flush_display_plane(struct drm_i915_private *dev_priv,
static void intel_enable_plane(struct drm_i915_private *dev_priv, static void intel_enable_plane(struct drm_i915_private *dev_priv,
enum plane plane, enum pipe pipe) enum plane plane, enum pipe pipe)
{ {
struct intel_crtc *intel_crtc =
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
int reg; int reg;
u32 val; u32 val;
/* If the pipe isn't enabled, we can't pump pixels and may hang */ /* If the pipe isn't enabled, we can't pump pixels and may hang */
assert_pipe_enabled(dev_priv, pipe); assert_pipe_enabled(dev_priv, pipe);
intel_crtc->primary_disabled = false;
reg = DSPCNTR(plane); reg = DSPCNTR(plane);
val = I915_READ(reg); val = I915_READ(reg);
if (val & DISPLAY_PLANE_ENABLE) if (val & DISPLAY_PLANE_ENABLE)
...@@ -1859,9 +1863,13 @@ static void intel_enable_plane(struct drm_i915_private *dev_priv, ...@@ -1859,9 +1863,13 @@ static void intel_enable_plane(struct drm_i915_private *dev_priv,
static void intel_disable_plane(struct drm_i915_private *dev_priv, static void intel_disable_plane(struct drm_i915_private *dev_priv,
enum plane plane, enum pipe pipe) enum plane plane, enum pipe pipe)
{ {
struct intel_crtc *intel_crtc =
to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]);
int reg; int reg;
u32 val; u32 val;
intel_crtc->primary_disabled = true;
reg = DSPCNTR(plane); reg = DSPCNTR(plane);
val = I915_READ(reg); val = I915_READ(reg);
if ((val & DISPLAY_PLANE_ENABLE) == 0) if ((val & DISPLAY_PLANE_ENABLE) == 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment