diff options
author | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2020-09-10 21:43:36 +0000 |
---|---|---|
committer | Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com> | 2020-09-17 18:05:41 +0000 |
commit | b3d088d2f8fac0e950e348fd09626442a75625e6 (patch) | |
tree | 4daa0824a31c163f18a2434432b5f15c37593abb /drivers/media | |
parent | 58e5688a7517f13a134333c4610b98c67b20784b (diff) |
fbdev: fix fbinfo flag dropped upstream
This patch is a continuation of work performed in [d88ca7e1a27e]
upstream and propagates the fix into non-upstreamed part of NXP
source tree.
Since FBINFO_MISC_USEREVENT is completely dropped, all previous
calls to fb_set_var() which were setting and dropping this flag
are now calling fbcon_update_vcs(), but only if fb_set_var()
return 0.
Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
(cherry picked from commit bffbf24c88a75f0e0979fbd6eca034e010230e57)
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/mxc/output/mxc_vout.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/media/platform/mxc/output/mxc_vout.c b/drivers/media/platform/mxc/output/mxc_vout.c index a54df6146fda..2082c1afe724 100644 --- a/drivers/media/platform/mxc/output/mxc_vout.c +++ b/drivers/media/platform/mxc/output/mxc_vout.c @@ -17,6 +17,7 @@ #include <linux/ipu-v3.h> #include <linux/module.h> #include <linux/mxcfb.h> +#include <linux/fbcon.h> #include <linux/mxc_v4l2.h> #include <linux/platform_device.h> #include <linux/sched.h> @@ -1870,9 +1871,7 @@ static int config_disp_output(struct mxc_vout_output *vout) * This procedure applies to non-overlay fbs as well. */ console_lock(); - fbi->flags |= FBINFO_MISC_USEREVENT; fb_blank(fbi, FB_BLANK_POWERDOWN); - fbi->flags &= ~FBINFO_MISC_USEREVENT; console_unlock(); pos.x = 0; @@ -1888,9 +1887,9 @@ static int config_disp_output(struct mxc_vout_output *vout) var.yoffset = 0; var.activate |= FB_ACTIVATE_FORCE; console_lock(); - fbi->flags |= FBINFO_MISC_USEREVENT; ret = fb_set_var(fbi, &var); - fbi->flags &= ~FBINFO_MISC_USEREVENT; + if (!ret) + fbcon_update_vcs(fbi, var.activate & FB_ACTIVATE_ALL); console_unlock(); if (ret < 0) { v4l2_err(vout->vfd->v4l2_dev, @@ -1952,9 +1951,7 @@ static int config_disp_output(struct mxc_vout_output *vout) *pixel++ = color; } console_lock(); - fbi->flags |= FBINFO_MISC_USEREVENT; ret = fb_blank(fbi, FB_BLANK_UNBLANK); - fbi->flags &= ~FBINFO_MISC_USEREVENT; console_unlock(); vout->release = false; @@ -1992,9 +1989,7 @@ static void release_disp_output(struct mxc_vout_output *vout) if (vout->release) return; console_lock(); - fbi->flags |= FBINFO_MISC_USEREVENT; fb_blank(fbi, FB_BLANK_POWERDOWN); - fbi->flags &= ~FBINFO_MISC_USEREVENT; console_unlock(); /* restore pos to 0,0 avoid fb pan display hang? */ @@ -2005,9 +2000,7 @@ static void release_disp_output(struct mxc_vout_output *vout) if (get_ipu_channel(fbi) == MEM_BG_SYNC) { console_lock(); fbi->fix.smem_start = vout->disp_bufs[0]; - fbi->flags |= FBINFO_MISC_USEREVENT; fb_blank(fbi, FB_BLANK_UNBLANK); - fbi->flags &= ~FBINFO_MISC_USEREVENT; console_unlock(); } |