mirror of
https://github.com/hardkernel/linux.git
synced 2026-04-15 01:50:40 +09:00
drm/rockchip: vop: get rid of max_output_fb
max_output_fb is similar to max_display_output Change-Id: I2045dd1ca5f7c99d723122d1b6c9dbf600db9c61 Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
This commit is contained in:
@@ -954,13 +954,13 @@ static int vop_plane_atomic_check(struct drm_plane *plane,
|
||||
vop = to_vop(crtc);
|
||||
vop_data = vop->data;
|
||||
|
||||
if (drm_rect_width(src) >> 16 > vop_data->max_input_fb.width ||
|
||||
drm_rect_height(src) >> 16 > vop_data->max_input_fb.height) {
|
||||
if (drm_rect_width(src) >> 16 > vop_data->max_input.width ||
|
||||
drm_rect_height(src) >> 16 > vop_data->max_input.height) {
|
||||
DRM_ERROR("Invalid source: %dx%d. max input: %dx%d\n",
|
||||
drm_rect_width(src) >> 16,
|
||||
drm_rect_height(src) >> 16,
|
||||
vop_data->max_input_fb.width,
|
||||
vop_data->max_input_fb.height);
|
||||
vop_data->max_input.width,
|
||||
vop_data->max_input.height);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@@ -1410,9 +1410,9 @@ 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_disably_output.width)
|
||||
if (mode->hdisplay > vop_data->max_output.width)
|
||||
return MODE_BAD_HVALUE;
|
||||
if (mode->vdisplay > vop_data->max_disably_output.height)
|
||||
if (mode->vdisplay > vop_data->max_output.height)
|
||||
return MODE_BAD_VVALUE;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
@@ -1448,8 +1448,8 @@ static bool vop_crtc_mode_fixup(struct drm_crtc *crtc,
|
||||
const struct vop_data *vop_data = vop->data;
|
||||
int request_clock = mode->clock;
|
||||
|
||||
if (mode->hdisplay > vop_data->max_disably_output.width ||
|
||||
mode->vdisplay > vop_data->max_disably_output.height)
|
||||
if (mode->hdisplay > vop_data->max_output.width ||
|
||||
mode->vdisplay > vop_data->max_output.height)
|
||||
return false;
|
||||
|
||||
if (mode->flags & DRM_MODE_FLAG_DBLCLK)
|
||||
|
||||
@@ -262,9 +262,8 @@ struct vop_data {
|
||||
const struct vop_csc_table *csc_table;
|
||||
unsigned int win_size;
|
||||
uint32_t version;
|
||||
struct vop_rect max_input_fb;
|
||||
struct vop_rect max_output_fb;
|
||||
struct vop_rect max_disably_output;
|
||||
struct vop_rect max_input;
|
||||
struct vop_rect max_output;
|
||||
u64 feature;
|
||||
};
|
||||
|
||||
|
||||
@@ -266,14 +266,13 @@ static const struct vop_intr rk3288_vop_intr = {
|
||||
static const struct vop_data rk3288_vop = {
|
||||
.version = VOP_VERSION(3, 1),
|
||||
.feature = VOP_FEATURE_OUTPUT_10BIT,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 3840, 2160},
|
||||
.max_input = {4096, 8192},
|
||||
/*
|
||||
* TODO: rk3288 have two vop, big one support 3840x2160,
|
||||
* little one only support 2560x1600.
|
||||
* Now force use 3840x2160.
|
||||
*/
|
||||
.max_disably_output = { 3840, 2160},
|
||||
.max_output = {3840, 2160},
|
||||
.intr = &rk3288_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3288_vop_win_data,
|
||||
@@ -377,9 +376,8 @@ static const struct vop_win_data rk3368_vop_win_data[] = {
|
||||
static const struct vop_data rk3368_vop = {
|
||||
.version = VOP_VERSION(3, 2),
|
||||
.feature = VOP_FEATURE_OUTPUT_10BIT,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 4096, 2160},
|
||||
.max_disably_output = { 4096, 2160},
|
||||
.max_input = {4096, 8192},
|
||||
.max_output = {4096, 2160},
|
||||
.intr = &rk3368_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3368_vop_win_data,
|
||||
@@ -399,9 +397,8 @@ static const struct vop_intr rk3366_vop_intr = {
|
||||
static const struct vop_data rk3366_vop = {
|
||||
.version = VOP_VERSION(3, 4),
|
||||
.feature = VOP_FEATURE_OUTPUT_10BIT,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 4096, 2160},
|
||||
.max_disably_output = { 4096, 2160},
|
||||
.max_input = {4096, 8192},
|
||||
.max_output = {4096, 2160},
|
||||
.intr = &rk3366_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3368_vop_win_data,
|
||||
@@ -511,9 +508,8 @@ static const struct vop_data rk3399_vop_big = {
|
||||
.version = VOP_VERSION(3, 5),
|
||||
.csc_table = &rk3399_csc_table,
|
||||
.feature = VOP_FEATURE_OUTPUT_10BIT | VOP_FEATURE_AFBDC,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 4096, 2160},
|
||||
.max_disably_output = { 4096, 2160},
|
||||
.max_input = {4096, 8192},
|
||||
.max_output = {4096, 2160},
|
||||
.intr = &rk3366_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3399_vop_win_data,
|
||||
@@ -535,9 +531,8 @@ static const struct vop_win_data rk3399_vop_lit_win_data[] = {
|
||||
static const struct vop_data rk3399_vop_lit = {
|
||||
.version = VOP_VERSION(3, 6),
|
||||
.csc_table = &rk3399_csc_table,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 2560, 1600},
|
||||
.max_disably_output = { 2560, 1600},
|
||||
.max_input = {4096, 8192},
|
||||
.max_output = {2560, 1600},
|
||||
.intr = &rk3366_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3399_vop_lit_win_data,
|
||||
@@ -547,9 +542,8 @@ static const struct vop_data rk3399_vop_lit = {
|
||||
static const struct vop_data rk322x_vop = {
|
||||
.version = VOP_VERSION(3, 7),
|
||||
.feature = VOP_FEATURE_OUTPUT_10BIT,
|
||||
.max_input_fb = { 4096, 8192},
|
||||
.max_output_fb = { 4096, 2160},
|
||||
.max_disably_output = { 4096, 2160},
|
||||
.max_input = {4096, 8192},
|
||||
.max_output = {4096, 2160},
|
||||
.intr = &rk3366_vop_intr,
|
||||
.ctrl = &rk3288_ctrl_data,
|
||||
.win = rk3368_vop_win_data,
|
||||
@@ -634,9 +628,8 @@ static const struct vop_ctrl rk3036_ctrl_data = {
|
||||
|
||||
static const struct vop_data rk3036_vop = {
|
||||
.version = VOP_VERSION(2, 2),
|
||||
.max_input_fb = { 1920, 1080},
|
||||
.max_output_fb = { 1920, 1080},
|
||||
.max_disably_output = { 1920, 1080},
|
||||
.max_input = {1920, 1080},
|
||||
.max_output = {1920, 1080},
|
||||
.ctrl = &rk3036_ctrl_data,
|
||||
.intr = &rk3036_intr,
|
||||
.win = rk3036_vop_win_data,
|
||||
|
||||
Reference in New Issue
Block a user