[PATCH v5 0/2] drm/blend: Add per-plane pixel blend mode property
From: Lowry Li
Date: Thu Aug 23 2018 - 04:31:02 EST
Hi,
This serie aims at adding the support for pixel blend modes represent the
alpha blending equation selection in the driver. It also introduces to use
it in the malidp driver.
Let me know what you think,
Lowry
Changes for v5:
- Adds comments in drm_blend.h.
- Removes setting default value in drm_plane_create_blend_mode_property()
as it is already in __drm_atomic_helper_plane_reset().
- Fixes to use state->pixel_blend_mode instead of using
plane->state->pixel_blend_mode in reset function.
- Rebases on drm-misc-next.
Changes for v4:
- Refines drm_plane_create_blend_mode_property(). drm_property_add_enum()
can calculate the index itself just fine, so no point in having the
caller pass it in.
- Since the current DRM assumption is that alpha is premultiplied as
default, define DRM_MODE_BLEND_PREMULTI as 0 will be better.
- Refines some comments.
- Updates on drm/malidp, hardware limitation check only when the format
has alpha pixel.
- Rebases on drm-misc-next and fixed the confilcts
Changes for v3:
- Refines the comments of drm_plane_create_blend_mode_property:
1) Puts the descriptions (after the ":") on a new line
2) Adds explaining why @supported_modes need PREMUL as default
- Refines the comments of drm/mali-dp patchset
- Rebased on drm-misc-next and fixed the confilcts with plane alpha patch
Changes for v2:
- Moves the blending equation into the DOC comment
- Refines the comments of drm_plane_create_blend_mode_property to not
enumerate the #defines, but instead the string values
- Uses fg.* instead of pixel.* and plane_alpha instead of plane.alpha
- Introduces to use it in the malidp driver, which depends on the plane
alpha patch
Changes from v1:
- v1 is just the core changes to request for commments
- Adds a pixel_blend_mode to drm_plane_state and a blend_mode_property
to drm_plane, and related support functions
- Defines three blend modes in drm_blend.h
- Rebased on current drm-next
Lowry Li (2):
drm: Add per-plane pixel blend mode property
drm/mali-dp: Implement plane alpha and pixel blend on malidp
drivers/gpu/drm/arm/malidp_planes.c | 74 +++++++++++++---------
drivers/gpu/drm/drm_atomic.c | 4 ++
drivers/gpu/drm/drm_atomic_helper.c | 1 +
drivers/gpu/drm/drm_blend.c | 123 ++++++++++++++++++++++++++++++++++++
include/drm/drm_blend.h | 6 ++
include/drm/drm_plane.h | 9 +++
6 files changed, 186 insertions(+), 31 deletions(-)
--
1.9.1