Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions drivers/gpu/drm/rockchip/rockchip_drm_vop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2755,8 +2755,8 @@ vop_crtc_mode_valid(struct drm_crtc *crtc, const struct drm_display_mode *mode)
int request_clock = mode->clock;
int clock;

if (mode->hdisplay > vop_data->max_output.width)
return MODE_BAD_HVALUE;
if (mode->hdisplay * mode->vdisplay > vop_data->max_output.width * vop_data->max_output.height)
return MODE_BAD;

if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
VOP_MAJOR(vop->version) == 3 &&
Expand Down
7 changes: 2 additions & 5 deletions drivers/gpu/drm/rockchip/rockchip_drm_vop2.c
Original file line number Diff line number Diff line change
Expand Up @@ -3133,11 +3133,8 @@ vop2_wb_connector_mode_valid(struct drm_connector *connector,
h = mode->vdisplay;


if (w > vop2->data->wb->max_output.width)
return MODE_BAD_HVALUE;

if (h > vop2->data->wb->max_output.height)
return MODE_BAD_VVALUE;
if (w * h > vop2->data->wb->max_output.width * vop2->data->wb->max_output.height)
return MODE_BAD;

return MODE_OK;
}
Expand Down