|
@@ -3254,7 +3254,7 @@ u32 skl_plane_stride(const struct drm_framebuffer *fb, int plane,
|
|
|
return stride;
|
|
|
}
|
|
|
|
|
|
-u32 skl_plane_ctl_format(uint32_t pixel_format)
|
|
|
+static u32 skl_plane_ctl_format(uint32_t pixel_format)
|
|
|
{
|
|
|
switch (pixel_format) {
|
|
|
case DRM_FORMAT_C8:
|
|
@@ -3295,7 +3295,7 @@ u32 skl_plane_ctl_format(uint32_t pixel_format)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
|
|
|
+static u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
|
|
|
{
|
|
|
switch (fb_modifier) {
|
|
|
case DRM_FORMAT_MOD_NONE:
|
|
@@ -3313,7 +3313,7 @@ u32 skl_plane_ctl_tiling(uint64_t fb_modifier)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-u32 skl_plane_ctl_rotation(unsigned int rotation)
|
|
|
+static u32 skl_plane_ctl_rotation(unsigned int rotation)
|
|
|
{
|
|
|
switch (rotation) {
|
|
|
case DRM_ROTATE_0:
|
|
@@ -3335,13 +3335,14 @@ u32 skl_plane_ctl_rotation(unsigned int rotation)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
|
|
|
- const struct intel_plane_state *plane_state)
|
|
|
+u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
|
|
|
+ const struct intel_plane_state *plane_state)
|
|
|
{
|
|
|
struct drm_i915_private *dev_priv =
|
|
|
to_i915(plane_state->base.plane->dev);
|
|
|
const struct drm_framebuffer *fb = plane_state->base.fb;
|
|
|
unsigned int rotation = plane_state->base.rotation;
|
|
|
+ const struct drm_intel_sprite_colorkey *key = &plane_state->ckey;
|
|
|
u32 plane_ctl;
|
|
|
|
|
|
plane_ctl = PLANE_CTL_ENABLE;
|
|
@@ -3357,6 +3358,11 @@ static u32 skl_plane_ctl(const struct intel_crtc_state *crtc_state,
|
|
|
plane_ctl |= skl_plane_ctl_tiling(fb->modifier);
|
|
|
plane_ctl |= skl_plane_ctl_rotation(rotation);
|
|
|
|
|
|
+ if (key->flags & I915_SET_COLORKEY_DESTINATION)
|
|
|
+ plane_ctl |= PLANE_CTL_KEY_ENABLE_DESTINATION;
|
|
|
+ else if (key->flags & I915_SET_COLORKEY_SOURCE)
|
|
|
+ plane_ctl |= PLANE_CTL_KEY_ENABLE_SOURCE;
|
|
|
+
|
|
|
return plane_ctl;
|
|
|
}
|
|
|
|