From ccf6a497a830738e4784c8b52a4f94f406480c19 Mon Sep 17 00:00:00 2001 From: SooChan Lim Date: Tue, 19 Mar 2019 11:12:01 +0900 Subject: [PATCH] hwc: add the dummy format and the available props Change-Id: I17b4b0208d3a0cf611910bab98365f78eafe8923 --- src/tdm_vc4_hwc.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/tdm_vc4_hwc.c b/src/tdm_vc4_hwc.c index d20a21b..7857b24 100644 --- a/src/tdm_vc4_hwc.c +++ b/src/tdm_vc4_hwc.c @@ -17,6 +17,11 @@ #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; } -- 2.7.4