]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/komeda: Creates plane alpha and blend mode properties
authorLowry Li (Arm Technology China) <Lowry.Li@arm.com>
Fri, 24 May 2019 09:20:24 +0000 (10:20 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Wed, 19 Jun 2019 10:42:16 +0000 (11:42 +0100)
Creates plane alpha and blend mode properties attached to plane.

This patch depends on:
- https://patchwork.freedesktop.org/series/59915/
- https://patchwork.freedesktop.org/series/58665/
- https://patchwork.freedesktop.org/series/59000/
- https://patchwork.freedesktop.org/series/59002/
- https://patchwork.freedesktop.org/series/59471/

Changes since v1:
- Adds patch denpendency in the comment

Changes since v2:
- Remove [RFC] from the subject

Changes since v3:
- Rebase the code

Signed-off-by: Lowry Li (Arm Technology China) <lowry.li@arm.com>
Reviewed-by: James Qian Wang (Arm Technology China) <james.qian.wang@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/display/komeda/komeda_plane.c

index 94268f49e83e9dbb72f9a6f9a3d8eb1605aa4f65..b86a517cf92f77186b877904ce06a15f083b9323 100644 (file)
@@ -301,6 +301,17 @@ static int komeda_plane_add(struct komeda_kms_dev *kms,
 
        drm_plane_helper_add(plane, &komeda_plane_helper_funcs);
 
+       err = drm_plane_create_alpha_property(plane);
+       if (err)
+               goto cleanup;
+
+       err = drm_plane_create_blend_mode_property(plane,
+                       BIT(DRM_MODE_BLEND_PIXEL_NONE) |
+                       BIT(DRM_MODE_BLEND_PREMULTI)   |
+                       BIT(DRM_MODE_BLEND_COVERAGE));
+       if (err)
+               goto cleanup;
+
        err = komeda_plane_create_layer_properties(kplane, layer);
        if (err)
                goto cleanup;