[Intel-gfx] [PATCH 6/9] drm/i915/skl: Drop alpha in non ARGB formats
Vandita Kulkarni
vandita.kulkarni at intel.com
Mon Jan 18 07:15:40 PST 2016
From: vandita kulkarni <vandita.kulkarni at intel.com>
This patch drops alpha by default if the selected
format is not ARG. This is to make sure that we drop alpha
on non-ARGB formats and not fail the ATOMIC IOCTL.
Signed-off-by: vandita kulkarni <vandita.kulkarni at intel.com>
---
drivers/gpu/drm/i915/intel_display.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 39e9db4..5fb281b 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11922,13 +11922,13 @@ static int intel_plane_state_check_blend(struct drm_plane_state *plane_state)
/* pre-multiplied alpha */
case DRM_BLEND_FUNC(ONE, ONE_MINUS_SRC_ALPHA):
if (!has_per_pixel_blending)
- return -EINVAL;
+ state->drop_alpha = true;
state->premultiplied_alpha = true;
break;
/* non pre-multiplied alpha */
case DRM_BLEND_FUNC(SRC_ALPHA, ONE_MINUS_SRC_ALPHA):
if (!has_per_pixel_blending)
- return -EINVAL;
+ state->drop_alpha = true;
break;
/* plane alpha */
case DRM_BLEND_FUNC(CONSTANT_ALPHA, ONE_MINUS_CONSTANT_ALPHA):
@@ -11940,7 +11940,7 @@ static int intel_plane_state_check_blend(struct drm_plane_state *plane_state)
case DRM_BLEND_FUNC(CONSTANT_ALPHA,
ONE_MINUS_CONSTANT_ALPHA_TIMES_SRC_ALPHA):
if (!has_per_pixel_blending)
- return -EINVAL;
+ state->drop_alpha = true;
state->premultiplied_alpha = true;
state->use_plane_alpha = true;
break;
@@ -11948,7 +11948,7 @@ static int intel_plane_state_check_blend(struct drm_plane_state *plane_state)
case DRM_BLEND_FUNC(CONSTANT_ALPHA_TIMES_SRC_ALPHA,
ONE_MINUS_CONSTANT_ALPHA_TIMES_SRC_ALPHA):
if (!has_per_pixel_blending)
- return -EINVAL;
+ state->drop_alpha = true;
state->use_plane_alpha = true;
break;
default:
--
1.9.1
More information about the Intel-gfx
mailing list