goto failed;
}
- opos_next = 1;
+ opos_next = 0;
cpos_next = ovl_cnt;
- if (plane_cnt < 2) {
- TDM_ERR("plane count(%d) should be over 2", plane_cnt);
+ if (plane_cnt < 1) {
+ TDM_ERR("plane count(%d) should be over 1", plane_cnt);
goto failed;
}
- for (i = plane_cnt - 2; i >= 0; i--) {
+ for (i = plane_cnt - 1; i >= 0; i--) {
tdm_nexell_layer_data *layer_data;
layer_data = calloc(1, sizeof(tdm_nexell_layer_data));
layer_data->capabilities = TDM_LAYER_CAPABILITY_OVERLAY |
TDM_LAYER_CAPABILITY_GRAPHIC |
TDM_LAYER_CAPABILITY_SCANOUT;
- layer_data->zpos = opos_next++;
+ if (opos_next == 1) {
+ layer_data->zpos = 2;
+ opos_next = 2;
+ } else {
+ layer_data->zpos = opos_next++;
+ }
} else if (types[i] == DRM_PLANE_TYPE_PRIMARY) {
layer_data->capabilities = TDM_LAYER_CAPABILITY_PRIMARY |
TDM_LAYER_CAPABILITY_GRAPHIC |
TDM_LAYER_CAPABILITY_SCANOUT;
- layer_data->zpos = 0;
+ layer_data->zpos = 1;
output_data->primary_layer = layer_data;
} else {
free(layer_data);
for (i = 0; i < caps->format_count; i++) {
/* TODO: kernel reports wrong formats */
if (plane->formats[i] != DRM_FORMAT_XRGB8888 &&
- plane->formats[i] != DRM_FORMAT_ARGB8888) {
+ plane->formats[i] != DRM_FORMAT_ARGB8888 &&
+ plane->formats[i] != DRM_FORMAT_YUV420) {
TDM_WRN("plane(%d) zpos(%d) %c%c%c%c skipped",
layer_data->plane_id, layer_data->zpos, FOURCC_STR(plane->formats[i]));
continue;