summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h2
-rw-r--r--src/libhal-backend-tdm-vc4/tdm_vc4_display.c13
2 files changed, 15 insertions, 0 deletions
diff --git a/src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h b/src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h
index ed45909..46e6b08 100644
--- a/src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h
+++ b/src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h
@@ -186,6 +186,8 @@ struct _tdm_vc4_output {
unsigned int connector_type_id;
struct list_head layer_list;
tdm_vc4_layer *primary_layer;
+ tdm_vc4_layer *overlay_layer;
+ tdm_vc4_layer *cursor_layer;
/* not fixed data below */
hal_tdm_output_vblank_handler vblank_func;
diff --git a/src/libhal-backend-tdm-vc4/tdm_vc4_display.c b/src/libhal-backend-tdm-vc4/tdm_vc4_display.c
index d5e2470..5b6ff68 100644
--- a/src/libhal-backend-tdm-vc4/tdm_vc4_display.c
+++ b/src/libhal-backend-tdm-vc4/tdm_vc4_display.c
@@ -609,6 +609,17 @@ _tdm_vc4_display_create_layer_list_type(tdm_vc4_display *display_data)
LIST_FOR_EACH_ENTRY(output_data, &display_data->output_list, link) {
if (plane->possible_crtcs & (1 << output_data->pipe)) {
+ if (type == DRM_PLANE_TYPE_CURSOR) {
+ if (output_data->cursor_layer)
+ continue;
+ } else if (type == DRM_PLANE_TYPE_OVERLAY) {
+ if (output_data->overlay_layer)
+ continue;
+ } else if (type == DRM_PLANE_TYPE_PRIMARY) {
+ if (output_data->primary_layer)
+ continue;
+ }
+
output_find = 1;
break;
}
@@ -630,10 +641,12 @@ _tdm_vc4_display_create_layer_list_type(tdm_vc4_display *display_data)
layer_data->capabilities = TDM_VC4_LAYER_CAPABILITY_CURSOR |
TDM_VC4_LAYER_CAPABILITY_GRAPHIC;
layer_data->zpos = 2;
+ output_data->cursor_layer = layer_data;
} else if (type == DRM_PLANE_TYPE_OVERLAY) {
layer_data->capabilities = TDM_VC4_LAYER_CAPABILITY_OVERLAY |
TDM_VC4_LAYER_CAPABILITY_GRAPHIC;
layer_data->zpos = 1;
+ output_data->overlay_layer = layer_data;
} else if (type == DRM_PLANE_TYPE_PRIMARY) {
layer_data->capabilities = TDM_VC4_LAYER_CAPABILITY_PRIMARY |
TDM_VC4_LAYER_CAPABILITY_GRAPHIC;