hwc: added backend function of video 29/186429/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 1 Aug 2018 08:12:27 +0000 (17:12 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Wed, 1 Aug 2018 10:18:46 +0000 (19:18 +0900)
Change-Id: I09b061a6df77c0e06fce33f4e3e7ea3c8a7a599d

src/tdm_sprd.c
src/tdm_sprd.h
src/tdm_sprd_display.c

index 878fda8..5cc4b7a 100644 (file)
@@ -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;
index 539131a..1bcf528 100644 (file)
@@ -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);
index e07e534..d8f7efb 100644 (file)
@@ -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;