remove cursor min size 07/251807/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Tue, 19 Jan 2021 05:30:52 +0000 (14:30 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Tue, 19 Jan 2021 05:31:08 +0000 (14:31 +0900)
vc4 support all size

Change-Id: I951d914e58e6555d6480a277d5c2636593491cbd

src/tdm_vc4_hwc.c
src/tdm_vc4_types.h

index 9ec176a..584f356 100644 (file)
@@ -78,7 +78,7 @@ _vc4_hwc_cursor_buffer_set(tdm_vc4_hwc_data *hwc_data, tdm_vc4_hwc_window_data *
        tbm_surface_info_s tsurface_info;
        tbm_surface_error_e ret = TBM_SURFACE_ERROR_NONE;
        int img_w, img_h, new_w, new_h;
-       tbm_format new_format;
+       tbm_format format;
        unsigned int flags = TBM_BO_SCANOUT;
        void *src_ptr = NULL, *dst_ptr = NULL;
        int src_stride;
@@ -91,18 +91,14 @@ _vc4_hwc_cursor_buffer_set(tdm_vc4_hwc_data *hwc_data, tdm_vc4_hwc_window_data *
 
        img_w = hwc_window_data->cursor_img.width;
        img_h = hwc_window_data->cursor_img.height;
-       new_format = hwc_window_data->info.src_config.format;
-
-       /* cursor restriction to set the cursor layer */
-       new_w = (CURSOR_MIN_W > img_w) ? CURSOR_MIN_W : img_w;
-       new_h = (CURSOR_MIN_H > img_h) ? CURSOR_MIN_H : img_h;
+       format = hwc_window_data->info.src_config.format;
 
        if (hwc_data->cursor_tsurface) {
                tbm_surface_internal_unref(hwc_data->cursor_tsurface);
                hwc_data->cursor_tsurface = NULL;
        }
 
-       cursor_tsurface = tbm_surface_internal_create_with_flags(new_w, new_h, new_format, flags);
+       cursor_tsurface = tbm_surface_internal_create_with_flags(img_w, img_h, format, flags);
        RETURN_VAL_IF_FAIL(cursor_tsurface, 0);
 
        hwc_data->cursor_tsurface = cursor_tsurface;
@@ -132,10 +128,10 @@ _vc4_hwc_cursor_buffer_set(tdm_vc4_hwc_data *hwc_data, tdm_vc4_hwc_window_data *
        hwc_window_data->cursor_img_surface = 1;
 
        /* fix the dst_pos info of the cursor window */
-       hwc_window_data->info.src_config.pos.w = new_w;
-       hwc_window_data->info.src_config.pos.h = new_h;
-       hwc_window_data->info.dst_pos.w = new_w;
-       hwc_window_data->info.dst_pos.h = new_h;
+       hwc_window_data->info.src_config.pos.w = img_w;
+       hwc_window_data->info.src_config.pos.h = img_h;
+       hwc_window_data->info.dst_pos.w = img_w;
+       hwc_window_data->info.dst_pos.h = img_h;
 
        hwc_window_data->cursor_img_refresh = 0;
 
index 7013bad..b029aca 100644 (file)
 
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 
-#define CURSOR_MIN_W 192
-#define CURSOR_MIN_H 192
-#define CURSOR_MAX_W 192
-#define CURSOR_MAX_H 192
-
 #define RETURN_VAL_IF_FAIL(cond, val) {\
        if (!(cond)) {\
                TDM_ERR("'%s' failed", #cond);\