From 3f059756aea519d89ee1ca84c1449a8b2e5dc31a Mon Sep 17 00:00:00 2001 From: Changyeon Lee Date: Wed, 1 Aug 2018 17:12:27 +0900 Subject: [PATCH] hwc: added backend function of video Change-Id: I09b061a6df77c0e06fce33f4e3e7ea3c8a7a599d --- src/tdm_sprd.c | 3 ++- src/tdm_sprd.h | 3 ++- src/tdm_sprd_display.c | 13 ++++++++++++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/tdm_sprd.c b/src/tdm_sprd.c index 878fda8..5cc4b7a 100644 --- a/src/tdm_sprd.c +++ b/src/tdm_sprd.c @@ -180,7 +180,8 @@ tdm_sprd_init(tdm_display *dpy, tdm_error *error) memset(&sprd_func_hwc, 0, sizeof(sprd_func_hwc)); sprd_func_hwc.hwc_create_window = sprd_hwc_create_window; - sprd_func_hwc.hwc_get_supported_formats = sprd_hwc_get_supported_formats; + sprd_func_hwc.hwc_get_video_supported_formats = sprd_hwc_get_video_supported_formats; + sprd_func_hwc.hwc_get_video_capability = sprd_hwc_get_video_capability; sprd_func_hwc.hwc_get_available_properties = sprd_hwc_get_available_properties; sprd_func_hwc.hwc_get_client_target_buffer_queue = sprd_hwc_get_client_target_buffer_queue; sprd_func_hwc.hwc_set_client_target_buffer = sprd_hwc_set_client_target_buffer; diff --git a/src/tdm_sprd.h b/src/tdm_sprd.h index 539131a..1bcf528 100644 --- a/src/tdm_sprd.h +++ b/src/tdm_sprd.h @@ -52,7 +52,8 @@ tdm_error sprd_layer_unset_buffer(tdm_layer *layer); tdm_error sprd_layer_get_buffer_flags(tdm_layer *layer, unsigned int *flags); tdm_hwc_window *sprd_hwc_create_window(tdm_hwc *hwc, tdm_error *error); -tdm_error sprd_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count); +tdm_error sprd_hwc_get_video_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count); +tdm_error sprd_hwc_get_video_capability(tdm_hwc *hwc, tdm_hwc_video_capability *video_capability); tdm_error sprd_hwc_get_available_properties(tdm_hwc *hwc, const tdm_prop **props, int *count); tbm_surface_queue_h sprd_hwc_get_client_target_buffer_queue(tdm_hwc *hwc, tdm_error *error); tdm_error sprd_hwc_set_client_target_buffer(tdm_hwc *hwc, tbm_surface_h buffer, tdm_region damage); diff --git a/src/tdm_sprd_display.c b/src/tdm_sprd_display.c index e07e534..d8f7efb 100644 --- a/src/tdm_sprd_display.c +++ b/src/tdm_sprd_display.c @@ -2042,7 +2042,7 @@ sprd_hwc_set_client_target_buffer(tdm_hwc *hwc, tbm_surface_h buffer, tdm_region } tdm_error -sprd_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count) +sprd_hwc_get_video_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *count) { RETURN_VAL_IF_FAIL(hwc != NULL, TDM_ERROR_INVALID_PARAMETER); RETURN_VAL_IF_FAIL(formats != NULL, TDM_ERROR_INVALID_PARAMETER); @@ -2056,6 +2056,17 @@ sprd_hwc_get_supported_formats(tdm_hwc *hwc, const tbm_format **formats, int *co } tdm_error +sprd_hwc_get_video_capability(tdm_hwc *hwc, tdm_hwc_video_capability *video_capability) +{ + RETURN_VAL_IF_FAIL(hwc != NULL, TDM_ERROR_INVALID_PARAMETER); + RETURN_VAL_IF_FAIL(video_capability != NULL, TDM_ERROR_INVALID_PARAMETER); + + *video_capability = TDM_HWC_VIDEO_CAPABILITY_SCANOUT; + + return TDM_ERROR_NONE; +} + +tdm_error sprd_hwc_get_available_properties(tdm_hwc *hwc, const tdm_prop **props, int *count) { tdm_sprd_hwc_data *hwc_data = hwc; -- 2.7.4