summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoram Park <boram1288.park@samsung.com>2016-07-05 20:27:03 +0900
committerBoram Park <boram1288.park@samsung.com>2016-08-03 01:51:30 -0700
commit028001b7ed887a2fd5ec96531595a7d9e1dfd675 (patch)
tree5a4ea60214326991e63841f271dd6f2edaccb1cc
parent79845ab9e08a5635eebb8355c38db74dc39c72f7 (diff)
downloadlibtdm-drm-028001b7ed887a2fd5ec96531595a7d9e1dfd675.tar.gz
libtdm-drm-028001b7ed887a2fd5ec96531595a7d9e1dfd675.tar.bz2
libtdm-drm-028001b7ed887a2fd5ec96531595a7d9e1dfd675.zip
fix wrong format count
Change-Id: I5f79627ea0ebdcfa92ac3f6cbaa5a4d401ec302c
-rw-r--r--src/tdm_drm_display.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tdm_drm_display.c b/src/tdm_drm_display.c
index 6db1d2f..e1237ba 100644
--- a/src/tdm_drm_display.c
+++ b/src/tdm_drm_display.c
@@ -1452,7 +1452,7 @@ drm_layer_get_capability(tdm_layer *layer, tdm_caps_layer *caps)
tdm_drm_data *drm_data;
drmModePlanePtr plane = NULL;
drmModeObjectPropertiesPtr props = NULL;
- int i;
+ int i, format_count = 0;
tdm_error ret;
RETURN_VAL_IF_FAIL(layer_data, TDM_ERROR_INVALID_PARAMETER);
@@ -1485,8 +1485,11 @@ drm_layer_get_capability(tdm_layer *layer, tdm_caps_layer *caps)
plane->formats[i] != DRM_FORMAT_ARGB8888)
continue;
caps->formats[i] = tdm_drm_format_to_tbm_format(plane->formats[i]);
+ format_count++;
}
+ caps->format_count = format_count;
+
props = drmModeObjectGetProperties(drm_data->drm_fd, layer_data->plane_id,
DRM_MODE_OBJECT_PLANE);
if (!props) {