Skip to content

Commit 888ace3

Browse files
ck_zhangCK Zhang
authored andcommitted
Revert "drm: change primary plane from 4K to 1080p"
Now we wanna let drm plane can support 4K content, so revert this patch. This reverts commit 36e2e62. Change-Id: I333876a61ef8f0398db9e2dae701ea147f38cebd
1 parent f2487e0 commit 888ace3

3 files changed

Lines changed: 7 additions & 36 deletions

File tree

drivers/gpu/drm/drm_atomic_helper.c

100755100644
Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,13 +1754,6 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set)
17541754
}
17551755
EXPORT_SYMBOL(drm_atomic_helper_set_config);
17561756

1757-
1758-
1759-
#define WIDTH_4K 3840
1760-
#define HEIGHT_4K 2160
1761-
#define WIDTH_FAKE 1920
1762-
#define HEIGHT_FAKE 1080
1763-
17641757
/* just used from fb-helper and atomic-helper: */
17651758
int __drm_atomic_helper_set_config(struct drm_mode_set *set,
17661759
struct drm_atomic_state *state)
@@ -1828,13 +1821,6 @@ int __drm_atomic_helper_set_config(struct drm_mode_set *set,
18281821
primary_state->src_w = hdisplay << 16;
18291822
}
18301823

1831-
1832-
if (hdisplay==WIDTH_4K && vdisplay==HEIGHT_4K) {
1833-
DRM_INFO("set primary src: (%ux%u)->(%ux%u)\n", primary_state->src_w>>16,
1834-
primary_state->src_h>>16, WIDTH_FAKE, HEIGHT_FAKE);
1835-
primary_state->src_w = WIDTH_FAKE<<16;
1836-
primary_state->src_h = HEIGHT_FAKE<<16;
1837-
}
18381824
commit:
18391825
ret = update_output_state(state, set);
18401826
if (ret)

drivers/gpu/drm/drm_crtc.c

100755100644
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2709,14 +2709,8 @@ int drm_crtc_check_viewport(const struct drm_crtc *crtc,
27092709

27102710
{
27112711
int hdisplay, vdisplay;
2712-
drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
27132712

2714-
if (hdisplay == 3840 && vdisplay == 2160) {
2715-
pr_info("%s: skip check\n", __func__);
2716-
pr_info("drm_crtc_check_viewport x= %d, y=%d, fb x=%d, y=%d, \n",x, y ,fb->width, fb->height);
2717-
pr_info("drm_crtc_check_viewport hdisplay %d, vdisplay= %d \n",hdisplay, vdisplay);
2718-
return 0;
2719-
}
2713+
drm_crtc_get_hv_timing(mode, &hdisplay, &vdisplay);
27202714

27212715
if (crtc->state &&
27222716
crtc->primary->state->rotation & (BIT(DRM_ROTATE_90) |

drivers/gpu/drm/drm_modes.c

100755100644
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -973,27 +973,18 @@ drm_mode_validate_basic(const struct drm_display_mode *mode)
973973
if (mode->clock == 0)
974974
return MODE_CLOCK_LOW;
975975

976-
977976
if (mode->hdisplay == 0 ||
978977
mode->hsync_start < mode->hdisplay ||
979978
mode->hsync_end < mode->hsync_start ||
980-
mode->htotal < mode->hsync_end) {
981-
printk("drm_mode_validate_basic hdisplay = %d\n",mode->hdisplay);
982-
printk("drm_mode_validate_basic hsync_start = %d\n",mode->hsync_start);
983-
printk("drm_mode_validate_basic hsync_end = %d\n",mode->hsync_end);
984-
printk("drm_mode_validate_basic htotal = %d\n",mode->htotal);
985-
}
986-
979+
mode->htotal < mode->hsync_end)
980+
return MODE_H_ILLEGAL;
987981

988982
if (mode->vdisplay == 0 ||
989983
mode->vsync_start < mode->vdisplay ||
990984
mode->vsync_end < mode->vsync_start ||
991-
mode->vtotal < mode->vsync_end) {
992-
printk("drm_mode_validate_basic vdisplay = %d\n",mode->vdisplay);
993-
printk("drm_mode_validate_basic vsync_start = %d\n",mode->vsync_start);
994-
printk("drm_mode_validate_basic vsync_end = %d\n",mode->vsync_end);
995-
printk("drm_mode_validate_basic vtotal = %d\n",mode->vtotal);
996-
}
985+
mode->vtotal < mode->vsync_end)
986+
return MODE_V_ILLEGAL;
987+
997988
return MODE_OK;
998989
}
999990
EXPORT_SYMBOL(drm_mode_validate_basic);
@@ -1502,4 +1493,4 @@ int drm_mode_convert_umode(struct drm_display_mode *out,
15021493

15031494
out:
15041495
return ret;
1505-
}
1496+
}

0 commit comments

Comments
 (0)