drm/i915: Don't reject primary plane windowing with color keying enabled on SKL+
authorVille Syrjälä <[email protected]>
Fri, 15 Jan 2016 18:46:53 +0000 (20:46 +0200)
committerVille Syrjälä <[email protected]>
Mon, 18 Jan 2016 14:07:43 +0000 (16:07 +0200)
On SKL+ plane scaling is mutually exclusive with color keying. The code
check for this, but during some refactoring the code got changed to
also reject primary plane windowing when color keying is used. There is
no such restriction in the hardware, so restore the original logic.

Cc: Maarten Lankhorst <[email protected]>
Fixes: 061e4b8d650a ("drm/i915: clean up atomic plane check functions, v2.")
Signed-off-by: Ville Syrjälä <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Cc: [email protected]
Reviewed-by: Matt Roper <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
drivers/gpu/drm/i915/intel_display.c

index ccb3e3f474502af95da8c519b5127e4642b44794..9b6e726666c3c7a5c6ef48eb8b8657115731d51d 100644 (file)
@@ -14019,11 +14019,12 @@ intel_check_primary_plane(struct drm_plane *plane,
        int max_scale = DRM_PLANE_HELPER_NO_SCALING;
        bool can_position = false;
 
-       /* use scaler when colorkey is not required */
-       if (INTEL_INFO(plane->dev)->gen >= 9 &&
-           state->ckey.flags == I915_SET_COLORKEY_NONE) {
-               min_scale = 1;
-               max_scale = skl_max_scale(to_intel_crtc(crtc), crtc_state);
+       if (INTEL_INFO(plane->dev)->gen >= 9) {
+               /* use scaler when colorkey is not required */
+               if (state->ckey.flags == I915_SET_COLORKEY_NONE) {
+                       min_scale = 1;
+                       max_scale = skl_max_scale(to_intel_crtc(crtc), crtc_state);
+               }
                can_position = true;
        }