From: Huang Jiachai Date: Thu, 1 Dec 2016 06:35:43 +0000 (+0800) Subject: video: rockchip: fb: update mirror for vr X-Git-Tag: firefly_0821_release~1179 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3758e9ae0777ebd898e3ce97127a6e18ffe7db63;p=firefly-linux-kernel-4.4.55.git video: rockchip: fb: update mirror for vr Change-Id: Ibdd0e60991490115428ed04027cbaef717951d3b Signed-off-by: Huang Jiachai --- diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index e61fb7fedb1b..25563a453128 100644 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -3719,8 +3719,10 @@ int rk_fb_switch_screen(struct rk_screen *screen, int enable, int lcdc_id) memcpy(dev_drv->cur_screen, screen, sizeof(struct rk_screen)); dev_drv->cur_screen->xsize = dev_drv->cur_screen->mode.xres; dev_drv->cur_screen->ysize = dev_drv->cur_screen->mode.yres; - dev_drv->cur_screen->x_mirror = dev_drv->rotate_mode & X_MIRROR; - dev_drv->cur_screen->y_mirror = dev_drv->rotate_mode & Y_MIRROR; + dev_drv->cur_screen->x_mirror = + !!(dev_drv->rotate_mode & X_MIRROR); + dev_drv->cur_screen->y_mirror = + !!(dev_drv->rotate_mode & Y_MIRROR); } if (!dev_drv->uboot_logo || load_screen || diff --git a/drivers/video/rockchip/rkfb_sysfs.c b/drivers/video/rockchip/rkfb_sysfs.c index b5ad8520512e..de8acc5d2df3 100644 --- a/drivers/video/rockchip/rkfb_sysfs.c +++ b/drivers/video/rockchip/rkfb_sysfs.c @@ -126,6 +126,7 @@ static ssize_t set_screen_info(struct device *dev, ymirror = !!(rotate & Y_MIRROR); dev_drv->cur_screen->x_mirror = xmirror; dev_drv->cur_screen->y_mirror = ymirror; + dev_drv->rotate_mode = rotate; mutex_lock(&dev_drv->output_lock); mutex_lock(&dev_drv->win_config); if (dev_drv->ops->extern_func)