drm/rockchip: driver: compare vmode picture_aspect_ratio

Change-Id: I2d1e16d48876a5095d45e1c90e1389441c130d20
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
This commit is contained in:
Sandy Huang
2019-08-29 17:22:58 +08:00
committed by Tao Huang
parent cee5e34661
commit 78c8b4e61a

View File

@@ -70,6 +70,7 @@ struct rockchip_drm_mode_set {
int vdisplay;
int vrefresh;
int flags;
int picture_aspect_ratio;
int crtc_hsync_end;
int crtc_vsync_end;
@@ -422,6 +423,9 @@ of_parse_display_resource(struct drm_device *drm_dev, struct device_node *route)
if (!of_property_read_u32(route, "video,flags", &val))
set->flags = val;
if (!of_property_read_u32(route, "video,aspect_ratio", &val))
set->picture_aspect_ratio = val;
if (!of_property_read_u32(route, "logo,ymirror", &val))
set->ymirror = val;
@@ -628,7 +632,8 @@ static int setup_initial_state(struct drm_device *drm_dev,
mode->crtc_hsync_end == set->crtc_hsync_end &&
mode->crtc_vsync_end == set->crtc_vsync_end &&
drm_mode_vrefresh(mode) == set->vrefresh &&
mode->flags == set->flags) {
mode->flags == set->flags &&
mode->picture_aspect_ratio == set->picture_aspect_ratio) {
found = 1;
match = 1;
break;