drm/i915: Do not add all planes when checking scalers on glk+
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Fri, 20 Sep 2019 11:42:21 +0000 (13:42 +0200)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 25 Sep 2019 11:34:06 +0000 (13:34 +0200)
We cannot switch between HQ and normal mode on GLK+, so only
add planes on platforms where it makes sense.

We could probably restrict it even more to only add when scaler
users toggles between 1 and 2, but lets just leave it for now.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190920114235.22411-9-maarten.lankhorst@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/display/intel_atomic.c

index 99f4f83..c5a552a 100644 (file)
@@ -373,6 +373,15 @@ int intel_atomic_setup_scalers(struct drm_i915_private *dev_priv,
                         */
                        if (!plane) {
                                struct drm_plane_state *state;
+
+                               /*
+                                * GLK+ scalers don't have a HQ mode so it
+                                * isn't necessary to change between HQ and dyn mode
+                                * on those platforms.
+                                */
+                               if (INTEL_GEN(dev_priv) >= 10 || IS_GEMINILAKE(dev_priv))
+                                       continue;
+
                                plane = drm_plane_from_index(&dev_priv->drm, i);
                                state = drm_atomic_get_plane_state(drm_state, plane);
                                if (IS_ERR(state)) {