set correct atomic property 91/200591/1
authorJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 27 Feb 2019 06:42:07 +0000 (15:42 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Wed, 27 Feb 2019 06:42:11 +0000 (15:42 +0900)
Change-Id: I8810b18bb94ac65a8320216284587f97c2675b49
Signed-off-by: Junkyeong Kim <jk0430.kim@samsung.com>
src/tdm_vc4_display.c

index 5418bbf..363df04 100644 (file)
@@ -25,7 +25,7 @@ check_hw_restriction(unsigned int crtc_w, unsigned int crtc_h, unsigned int buf_
                                                unsigned int *new_src_x, unsigned int *new_src_w,
                                                unsigned int *new_dst_x, unsigned int *new_dst_w)
 {
-       int start, end, diff;
+       int start, end;
        int virtual_screen;
 
        *new_src_x = src_x;
@@ -69,9 +69,6 @@ check_hw_restriction(unsigned int crtc_w, unsigned int crtc_h, unsigned int buf_
 
        *new_dst_x = start;
        *new_dst_w = end - start;
-       *new_src_w = *new_dst_w;
-       diff = start - dst_x;
-       *new_src_x += diff;
 
        RETURN_VAL_IF_FAIL(*new_src_w > 0, TDM_ERROR_BAD_REQUEST);
        RETURN_VAL_IF_FAIL(*new_dst_w > 0, TDM_ERROR_BAD_REQUEST);
@@ -1774,10 +1771,8 @@ _vc4_layer_make_atomic_request(tdm_vc4_layer_data *layer_data, drmModeAtomicReqP
        ret = _vc4_layer_add_atomic_properties(layer_data, request,
                                                layer_data->display_buffer->fb_id, output_data->crtc_id,
                                                fx, fy, fw, fh,
-                                               layer_data->info.src_config.pos.x,
-                                               layer_data->info.src_config.pos.y,
-                                               layer_data->info.src_config.pos.w,
-                                               layer_data->info.src_config.pos.h);
+                                               new_dst_x, layer_info.dst_pos.y,
+                                               new_dst_w, layer_info.dst_pos.h);
        if (ret != TDM_ERROR_NONE) {
                TDM_ERR("MakeAtomicRequest failed: drm_fd(%d) plane_id(%u) zpos(%d) crtc_id(%u) fb_id(%u) src(%u,%u %ux%u) dst(%u,%u %ux%u) failed: %m",
                                vc4_data->drm_fd, layer_data->plane_id, layer_data->zpos,