From c0f3fdf9a2c77e084e919d41a453accda8676c7d Mon Sep 17 00:00:00 2001 From: Mark Yao Date: Thu, 1 Dec 2016 10:25:23 +0800 Subject: [PATCH] drm/rockchip: boot_logo: support logo fullscreen or center display Change-Id: I2f688b84172de015eb59187d0d3de06e6764346e Signed-off-by: Mark Yao --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index de7f57cd66cd..c76da606a7f4 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -221,6 +221,7 @@ of_parse_display_resource(struct drm_device *drm_dev, struct device_node *route) struct drm_framebuffer *fb; struct drm_connector *connector; struct drm_crtc *crtc; + const char *string; u32 val; connect = of_parse_phandle(route, "connect", 0); @@ -256,11 +257,14 @@ of_parse_display_resource(struct drm_device *drm_dev, struct device_node *route) if (!of_property_read_u32(route, "logo,ymirror", &val)) set->ymirror = val; + set->ratio = 1; + if (!of_property_read_string(route, "logo,mode", &string) && + !strcmp(string, "fullscreen")) + set->ratio = 0; + set->fb = fb; set->crtc = crtc; set->connector = connector; - /* TODO: set display fullscreen or center */ - set->ratio = 0; return set; } -- 2.34.1