From: SooChan Lim Date: Tue, 19 Mar 2019 02:12:01 +0000 (+0900) Subject: hwc: add the dummy format and the available props X-Git-Tag: accepted/tizen/unified/20190320.082405~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F201692%2F3;p=platform%2Fadaptation%2Fbroadcom%2Flibtdm-vc4.git hwc: add the dummy format and the available props Change-Id: I17b4b0208d3a0cf611910bab98365f78eafe8923 --- 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; }