All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Marek Vasut <marex@denx.de>, Fabio Estevam <festevam@gmail.com>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>,
	dl-linux-imx <linux-imx@nxp.com>,
	b.zolnierkie@samsung.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Alistair Francis <alistair@alistair23.me>
Subject: Re: Revert "video: fbdev: mxsfb: Remove driver"
Date: Thu, 19 Aug 2021 18:16:00 +1000	[thread overview]
Message-ID: <CAKmqyKNzojeRtYUZyfVDBhAz5gNfRendSWduYJV_+gYiz8QAMg@mail.gmail.com> (raw)
In-Reply-To: <YR1R7/nIUIN3LA7t@ravnborg.org>

On Thu, Aug 19, 2021 at 4:31 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Alistair,
>
> > prctl(PR_CAPBSET_READ, 0x30 /* CAP_??? */) = -1 EINVAL (Invalid argument)
> > prctl(PR_CAPBSET_READ, 0x2c /* CAP_??? */) = -1 EINVAL (Invalid argument)
> > prctl(PR_CAPBSET_READ, 0x2a /* CAP_??? */) = -1 EINVAL (Invalid argument)
> > prctl(PR_CAPBSET_READ, 0x29 /* CAP_??? */) = -1 EINVAL (Invalid argument)
> > ioctl(5, FBIOPUT_VSCREENINFO, 0x4ce8e0) = -1 EINVAL (Invalid argument)
> >
> > I'm guessing it's related to FBIOPUT_VSCREENINFO then, is that
> > something that could be added to the DRM emulation?
>
> Just to try to verify this could you try to return early
> in the switch where we have FBIOPUT_VSCREENINFO?
>
> In fbmem.c in do_fb_ioctl() just add a printk("something\n") and
> return 0 in the FBIOPUT_VSCREENINFO case.

Yep, this diff changes the working screen with the fbdev driver to not working:

diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
index 1c855145711b..0f781914eca0 100644
--- a/drivers/video/fbdev/core/fbmem.c
+++ b/drivers/video/fbdev/core/fbmem.c
@@ -1099,18 +1099,8 @@ static long do_fb_ioctl(struct fb_info *info,
unsigned int cmd,
                ret = copy_to_user(argp, &var, sizeof(var)) ? -EFAULT : 0;
                break;
        case FBIOPUT_VSCREENINFO:
-               if (copy_from_user(&var, argp, sizeof(var)))
-                       return -EFAULT;
-               console_lock();
-               lock_fb_info(info);
-               ret = fb_set_var(info, &var);
-               if (!ret)
-                       fbcon_update_vcs(info, var.activate & FB_ACTIVATE_ALL);
-               unlock_fb_info(info);
-               console_unlock();
-               if (!ret && copy_to_user(argp, &var, sizeof(var)))
-                       ret = -EFAULT;
-               break;
+               printk("FBIOPUT_VSCREENINFO Returning early");
+               return -EINVAL;
        case FBIOGET_FSCREENINFO:
                lock_fb_info(info);
                memcpy(&fix, &info->fix, sizeof(fix));

So FBIOPUT_VSCREENINFO is the issue (or at least one of them).

Alistair

>
> The printk is just so something pops up in the logging.
>
> If this makes you going then we need to look at how to add this to the
> emulation or some other way to deal with this.
>
>         Sam

  parent reply	other threads:[~2021-08-19  8:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 12:16 Revert "video: fbdev: mxsfb: Remove driver" Alistair Francis
2021-08-15 12:31 ` Marek Vasut
2021-08-16  7:34   ` Alistair Francis
2021-08-16  7:55     ` Marek Vasut
2021-08-17  9:08       ` Alistair Francis
2021-08-17 10:03         ` Marek Vasut
2021-08-17 12:16           ` Alistair Francis
     [not found]             ` <YR1R7/nIUIN3LA7t@ravnborg.org>
2021-08-19  8:16               ` Alistair Francis [this message]
     [not found]             ` <YR1Th65KKRS4D/6+@ravnborg.org>
2021-08-19  9:10               ` Alistair Francis
     [not found]                 ` <YR58MvAYYEjBQ7l5@ravnborg.org>
2021-08-19 22:36                   ` Alistair Francis
2021-10-14  9:56                     ` Alistair Francis
2021-10-21 10:42                       ` Alistair Francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKmqyKNzojeRtYUZyfVDBhAz5gNfRendSWduYJV_+gYiz8QAMg@mail.gmail.com \
    --to=alistair23@gmail.com \
    --cc=alistair@alistair23.me \
    --cc=b.zolnierkie@samsung.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marex@denx.de \
    --cc=sam@ravnborg.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.