hwc: add the dummy format and the available props 92/201692/3
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 19 Mar 2019 02:12:01 +0000 (11:12 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Tue, 19 Mar 2019 06:57:55 +0000 (15:57 +0900)
Change-Id: I17b4b0208d3a0cf611910bab98365f78eafe8923

src/tdm_vc4_hwc.c

index d20a21b..7857b24 100644 (file)
 #define ZPOS_VIDEO1  -1 //TODO:
 #define ZPOS_NONE    -999
 
+tbm_format hwc_window_video_formats[] = {
+       TBM_FORMAT_NV12,
+       TBM_FORMAT_YUV420
+};
+
 const char *
 _comp_to_str(tdm_hwc_window_composition composition_type)
 {
@@ -393,7 +398,9 @@ vc4_hwc_get_video_supported_formats(tdm_hwc *hwc, const tbm_format **formats, in
        RETURN_VAL_IF_FAIL(formats != NULL, TDM_ERROR_INVALID_PARAMETER);
        RETURN_VAL_IF_FAIL(count != NULL, TDM_ERROR_INVALID_PARAMETER);
 
-       // TODO:
+       // TODO: fix these formats.
+       *formats = hwc_window_video_formats;
+       *count = sizeof(hwc_window_video_formats) / sizeof(tbm_format);
 
        return TDM_ERROR_NONE;
 }
@@ -415,8 +422,11 @@ vc4_hwc_get_available_properties(tdm_hwc *hwc, const tdm_prop **props, int *coun
        tdm_vc4_hwc_data *hwc_data = hwc;
 
        RETURN_VAL_IF_FAIL(hwc_data != NULL, TDM_ERROR_INVALID_PARAMETER);
+       RETURN_VAL_IF_FAIL(props != NULL, TDM_ERROR_INVALID_PARAMETER);
+       RETURN_VAL_IF_FAIL(count != NULL, TDM_ERROR_INVALID_PARAMETER);
 
-       // TODO:
+       *props = NULL;
+       *count = 0;
 
        return TDM_ERROR_NONE;
 }