diff options
author | Changyeon Lee <cyeon.lee@samsung.com> | 2022-02-11 15:18:23 +0900 |
---|---|---|
committer | Changyeon Lee <cyeon.lee@samsung.com> | 2022-02-11 15:19:25 +0900 |
commit | 924be9d229862fb537521f2ac21de85c0e8ce7b3 (patch) | |
tree | 8fe01148ef08b7b2ccf7fc2434c208dce1509a27 | |
parent | 4ce970849619efe9f7568f2e467fb841c470e46c (diff) | |
download | libtdm-vc4-924be9d229862fb537521f2ac21de85c0e8ce7b3.tar.gz libtdm-vc4-924be9d229862fb537521f2ac21de85c0e8ce7b3.tar.bz2 libtdm-vc4-924be9d229862fb537521f2ac21de85c0e8ce7b3.zip |
assign overlay, cursor, primary layer to each output
this patch makes to assign overlay and cursor layer to external output
and other layers are not used because current hwc policy use 3 layers.
Change-Id: I25b6239ff78ac7dfae9bf57c5c4f503cb9a4a0a5
-rw-r--r-- | src/libhal-backend-tdm-vc4/tdm_backend_vc4_types.h | 2 | ||||
-rw-r--r-- | src/libhal-backend-tdm-vc4/tdm_vc4_display.c | 13 |
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; |