mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 20:46:48 +02:00
drm: rcar-du: Add DRM_MODE_BLEND_PREMULTI support
R-Car DU driver implicitly supports DRM_MODE_BLEND_COVERAGE only. This adds a support for DRM_MODE_BLEND_PREMULTI. As a consequence, DRM_MODE_BLEND_PREMULTI becomes the default. If DRM_MODE_BLEND_COVERAGE is desired, it should be set explicitly. This behavior comes from how DRM blend mode is supported. drm_plane_create_blend_mode_property() creates the blend mode property with the default value of DRM_MODE_BLEND_PREMULTI. This default value cannot be modified from the atomic driver. Signed-off-by: Takanari Hayama <taki@igel.co.jp> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
This commit is contained in:
parent
0efb6fd366
commit
b07f5a4d44
|
|
@ -171,6 +171,8 @@ static void rcar_du_vsp_plane_setup(struct rcar_du_vsp_plane *plane)
|
|||
format = rcar_du_format_info(state->format->fourcc);
|
||||
cfg.pixelformat = format->v4l2;
|
||||
|
||||
cfg.premult = state->state.pixel_blend_mode == DRM_MODE_BLEND_PREMULTI;
|
||||
|
||||
vsp1_du_atomic_update(plane->vsp->vsp, crtc->vsp_pipe,
|
||||
plane->index, &cfg);
|
||||
}
|
||||
|
|
@ -436,6 +438,10 @@ int rcar_du_vsp_init(struct rcar_du_vsp *vsp, struct device_node *np,
|
|||
drm_plane_create_zpos_property(&plane->plane, i, 0,
|
||||
num_planes - 1);
|
||||
|
||||
drm_plane_create_blend_mode_property(&plane->plane,
|
||||
BIT(DRM_MODE_BLEND_PREMULTI) |
|
||||
BIT(DRM_MODE_BLEND_COVERAGE));
|
||||
|
||||
vsp->num_planes++;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user