>-----Original Message-----
>From: Intel-gfx <[email protected]> On Behalf Of Ville 
>Syrjala
>Sent: Tuesday, October 8, 2019 9:45 PM
>To: [email protected]
>Subject: [Intel-gfx] [PATCH 7/9] drm/i915: Reject ckey+fp16 on skl+
>
>From: Ville Syrjälä <[email protected]>
>
>According to the spec color keying is not supported with
>fp16 pixel formats on skl+. Reject that combo.
>
>Signed-off-by: Ville Syrjälä <[email protected]>
>---
> drivers/gpu/drm/i915/display/intel_sprite.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
>diff --git a/drivers/gpu/drm/i915/display/intel_sprite.c
>b/drivers/gpu/drm/i915/display/intel_sprite.c
>index cc9e5c9668b1..d6cd46e3f738 100644
>--- a/drivers/gpu/drm/i915/display/intel_sprite.c
>+++ b/drivers/gpu/drm/i915/display/intel_sprite.c
>@@ -1689,6 +1689,19 @@ vlv_sprite_check(struct intel_crtc_state *crtc_state,
>       return 0;
> }
>
>+static bool format_is_fp16(u32 format)
>+{
>+      switch (format) {
>+      case DRM_FORMAT_XRGB16161616F:
>+      case DRM_FORMAT_XBGR16161616F:
>+      case DRM_FORMAT_ARGB16161616F:
>+      case DRM_FORMAT_ABGR16161616F:
>+              return true;
>+      default:
>+              return false;
>+      }
>+}
>+
> static int skl_plane_check_fb(const struct intel_crtc_state *crtc_state,
>                             const struct intel_plane_state *plane_state)  { 
> @@ -
>1760,6 +1773,11 @@ static int skl_plane_check_fb(const struct intel_crtc_state
>*crtc_state,
>               return -EINVAL;
>       }
>
>+      if (plane_state->ckey.flags && format_is_fp16(fb->format->format)) {
>+              DRM_DEBUG_KMS("Color keying not supported with fp16
>formats\n");

It seems even "Indexed 8 bit formats" also don't support Color Keying. May be 
you can extend it to
even C8.

>+              return -EINVAL;
>+      }
>+
>       return 0;
> }
>
>--
>2.21.0
>
>_______________________________________________
>Intel-gfx mailing list
>[email protected]
>https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to