Re: [PATCH 27/33] fbdev: remove FBINFO_MISC_USEREVENT around fb_blank

From: Sam Ravnborg
Date: Mon May 20 2019 - 13:55:35 EST


Hi Daniel.

On Mon, May 20, 2019 at 07:29:52PM +0200, Daniel Vetter wrote:
> On Mon, May 20, 2019 at 7:20 PM Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
> >
> > Hi Daniel.
> >
> > > With the recursion broken in the previous patch we can drop the
> > > FBINFO_MISC_USEREVENT flag around calls to fb_blank - recursion
> > > prevention was it's only job.
> > >
> > When grepping for FBINFO_MISC_USEREVENT I get a few hits not addressed
> > in the patch below:
> >
> > drivers/video/fbdev/core/fbcon.c: if (!(info->flags & FBINFO_MISC_USEREVENT))
> > drivers/video/fbdev/core/fbmem.c: if (!ret && (flags & FBINFO_MISC_USEREVENT)) {
> > drivers/video/fbdev/core/fbmem.c: info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbmem.c: info->flags |= FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbmem.c: info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbmem.c: info->flags |= FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbmem.c: info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbsysfs.c: fb_info->flags |= FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbsysfs.c: fb_info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbsysfs.c: fb_info->flags |= FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/core/fbsysfs.c: fb_info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/ps3fb.c: info->flags |= FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/ps3fb.c: info->flags &= ~FBINFO_MISC_USEREVENT;
> > drivers/video/fbdev/sh_mobile_lcdcfb.c: * FBINFO_MISC_USEREVENT flag is set. Since we do not want to fake a
> > include/linux/fb.h:#define FBINFO_MISC_USEREVENT 0x10000 /* event request
> >
> > The use in ps3fb looks like a candidate for removal and this file is not
> > touch in this patch series, so I guess I did not miss it.
> >
> > As I did not apply the full series maybe some of the other users was
> > already taken care of.
>
> It's also used to break recursion around fb_set_par and fb_set_pan.
> Untangling that one would be possible, but also requires untangling
> some locking, so a lot more work. If you chase all the call paths then
> you'll noticed that the users still left have no overlap with the ones
> I'm removing here.
Now you spell it out it is obvious. I guess I never read more than fb_
and missed that we are dealing with different calls.
Thanks for the quick feedback, and sorry for the noise.

Sam