mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
drm/rockchip: vop: add check if global/pixel alpha both enable
VOP in RK3308 supports global alpha and pixel alpha. Only one alpha mode can be enabled at the same time. Signed-off-by: Damon Ding <damon.ding@rock-chips.com> Change-Id: Ia749deeb82a31b7e5298ca14586bbfb75606469f
This commit is contained in:
@@ -1795,6 +1795,12 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
|
||||
vop = to_vop(crtc);
|
||||
vop_data = vop->data;
|
||||
|
||||
if (VOP_MAJOR(vop->version) == 2 && is_alpha_support(fb->format->format) &&
|
||||
vop_plane_state->global_alpha != 0xff) {
|
||||
DRM_ERROR("Pixel alpha and global alpha can't be enabled at the same time\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (drm_rect_width(src) >> 16 < 4 || drm_rect_height(src) >> 16 < 4 ||
|
||||
drm_rect_width(dest) < 4 || drm_rect_width(dest) < 4) {
|
||||
DRM_ERROR("Invalid size: %dx%d->%dx%d, min size is 4x4\n",
|
||||
|
||||
Reference in New Issue
Block a user