summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/kmb/kmb_plane.h
diff options
context:
space:
mode:
authorEdmund Dea <edmund.j.dea@intel.com>2020-12-04 14:34:29 -0800
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2021-10-06 11:05:44 +0200
commitc026565fe9be813fe826f7e5533ed763283af5f0 (patch)
tree3852e4dc8555319a7cffefe45219307bdc173305 /drivers/gpu/drm/kmb/kmb_plane.h
parent9e1ff307c779ce1f0f810c7ecce3d95bbae40896 (diff)
downloadlinux-c026565fe9be813fe826f7e5533ed763283af5f0.tar.bz2
drm/kmb: Enable alpha blended second plane
Enable one additional plane that is alpha blended on top of the primary plane. This also fixes the below warnings when building with -Warray-bounds: drivers/gpu/drm/kmb/kmb_plane.c:135:20: warning: array subscript 3 is above array bounds of 'struct layer_status[1]' [-Warray-bounds] drivers/gpu/drm/kmb/kmb_plane.c:132:20: warning: array subscript 2 is above array bounds of 'struct layer_status[1]' [-Warray-bounds] drivers/gpu/drm/kmb/kmb_plane.c:129:20: warning: array subscript 1 is above array bounds of 'struct layer_status[1]' [-Warray-bounds] v2: corrected previous patch dependecies so it builds Signed-off-by: Edmund Dea <edmund.j.dea@intel.com> Signed-off-by: Anitha Chrisanthus <anitha.chrisanthus@intel.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.kernel.org/project/dri-devel/patch/20210728003126.1425028-13-anitha.chrisanthus@intel.com/ Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm/kmb/kmb_plane.h')
-rw-r--r--drivers/gpu/drm/kmb/kmb_plane.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/kmb/kmb_plane.h b/drivers/gpu/drm/kmb/kmb_plane.h
index 486490f7a3ec..6e8d22cf8819 100644
--- a/drivers/gpu/drm/kmb/kmb_plane.h
+++ b/drivers/gpu/drm/kmb/kmb_plane.h
@@ -35,6 +35,9 @@
#define POSSIBLE_CRTCS 1
#define to_kmb_plane(x) container_of(x, struct kmb_plane, base_plane)
+#define POSSIBLE_CRTCS 1
+#define KMB_MAX_PLANES 2
+
enum layer_id {
LAYER_0,
LAYER_1,
@@ -43,8 +46,6 @@ enum layer_id {
/* KMB_MAX_PLANES */
};
-#define KMB_MAX_PLANES 1
-
enum sub_plane_id {
Y_PLANE,
U_PLANE,