}
static tdm_error
-check_hw_restriction(unsigned int crtc_w, unsigned int buf_w,
- unsigned int src_x, unsigned int src_w, unsigned int dst_x, unsigned int dst_w,
+check_hw_restriction(unsigned int crtc_w, unsigned int crtc_h, unsigned int buf_w,
+ unsigned int src_x, unsigned int src_w,
+ unsigned int dst_x, unsigned int dst_y, unsigned int dst_w,
unsigned int *new_src_x, unsigned int *new_src_w,
unsigned int *new_dst_x, unsigned int *new_dst_w)
{
return TDM_ERROR_BAD_REQUEST;
}
+ if (dst_x > crtc_w || dst_y > crtc_h) {
+ TDM_ERR("dst_pos(%u,%u) is out of crtc(%ux%u)", dst_x, dst_y, crtc_w, crtc_h);
+ return TDM_ERROR_BAD_REQUEST;
+ }
+
if (src_x > dst_x || ((dst_x - src_x) + buf_w) > crtc_w)
virtual_screen = 1;
else
_tdm_exynos_output_transform_layer_info(crtc_w, crtc_h, &layer_info);
/* check hw restriction*/
- if (check_hw_restriction(crtc_w, layer_data->display_buffer->width,
+ if (check_hw_restriction(crtc_w, crtc_h, layer_data->display_buffer->width,
layer_info.src_config.pos.x,
layer_info.src_config.pos.w,
layer_info.dst_pos.x,
+ layer_info.dst_pos.y,
layer_info.dst_pos.w,
&new_src_x, &new_src_w, &new_dst_x, &new_dst_w) != TDM_ERROR_NONE) {
TDM_WRN("not going to set plane(%u)", layer_data->plane_id);
new_dst_x, layer_info.dst_pos.y,
new_dst_w, layer_info.dst_pos.h,
fx, fy, fw, fh) < 0) {
- TDM_ERR("set plane(%d) failed: %m", layer_data->plane_id);
+ TDM_ERR("SetPlane: drm_fd(%d) plane_id(%u) crtc_id(%u) fb_id(%u) src(%u,%u %ux%u) dst(%u,%u %ux%u) failed: %m",
+ exynos_data->drm_fd, layer_data->plane_id,
+ output_data->crtc_id, layer_data->display_buffer->fb_id,
+ new_src_x, layer_info.src_config.pos.y,
+ new_src_w, layer_info.src_config.pos.h,
+ layer_info.dst_pos.x, layer_info.dst_pos.y,
+ layer_info.dst_pos.w, layer_info.dst_pos.h);
return TDM_ERROR_OPERATION_FAILED;
}