drm/i915: Pass the new crtc_state to ->disable_plane()

We're going to need access to the new crtc state in ->disable_plane()
for SKL+ wm/ddb programming and pre-skl pipe gamma/csc control. Pass
the crtc state down.

We'll also try to make intel_crtc_disable_planes() do the right
thing as much as it's possible. The fact that we don't have a
separate crtc state for the disabled state when we're going to
re-enable the crtc later means we might end up poking at a few
extra planes in there. But that's harmless. I suppose one might
argue that we wouldn't have to care about proper ddb/wm/csc/gamma
if the pipe is going to permanently disable anyway, but the state
checker probably cares so we should try our best to make sure
everything is programmed correctly even in that case.

v2: Fix the commit message a bit (Matt)

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-5-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
This commit is contained in:
Ville Syrjälä
2018-11-14 23:07:20 +02:00
parent afbd8a722b
commit 0dd14be30d
5 changed files with 42 additions and 21 deletions

View File

@@ -594,7 +594,8 @@ icl_update_slave(struct intel_plane *plane,
}
static void
skl_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc)
skl_disable_plane(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum plane_id plane_id = plane->id;
@@ -857,7 +858,8 @@ vlv_update_plane(struct intel_plane *plane,
}
static void
vlv_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc)
vlv_disable_plane(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum pipe pipe = plane->pipe;
@@ -1024,7 +1026,8 @@ ivb_update_plane(struct intel_plane *plane,
}
static void
ivb_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc)
ivb_disable_plane(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum pipe pipe = plane->pipe;
@@ -1190,7 +1193,8 @@ g4x_update_plane(struct intel_plane *plane,
}
static void
g4x_disable_plane(struct intel_plane *plane, struct intel_crtc *crtc)
g4x_disable_plane(struct intel_plane *plane,
const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(plane->base.dev);
enum pipe pipe = plane->pipe;