All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Pieter PoroCYon Sluys <pcy@national.shitposting.agency>
Cc: Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] vfb: fix video mode and line_length being set when loaded
Date: Wed, 20 Dec 2017 09:26:46 +0100	[thread overview]
Message-ID: <CAMuHMdXjkY=6=CDMPNFtxtjw8g52ivV-HdnKX3-mao0TPTabMw@mail.gmail.com> (raw)
In-Reply-To: <39a57338-18ac-c64f-1cf1-70a5f905990a@national.shitposting.agency>

Hi Pieter,

On Wed, Dec 20, 2017 at 1:24 AM, Pieter "PoroCYon" Sluys
<pcy@national.shitposting.agency> wrote:
> Currently, when loading the vfb module, the newly created fbdev
> has a line_length of 0, and its video mode would be PSEUDOCOLOR
> regardless of color depth. (The former could be worked around by
> calling the FBIOPUT_VSCREENINFO ioctl with having the FBACTIVIATE_FORCE
> flag set.) This patch automatically sets the line_length correctly,
> and the video mode is derived from the bit depth now as well.

Thanks for your patch!
This bug was introduced in 2002, when converting the driver to the new
internal API.

Please add your "Signed-off-by", cfr.
Documentation/process/submitting-patches.rst.

> --- a/drivers/video/fbdev/vfb.c
> +++ b/drivers/video/fbdev/vfb.c
> @@ -239,8 +239,25 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
>   */
>  static int vfb_set_par(struct fb_info *info)
>  {
> +       switch (info->var.bits_per_pixel) {
> +               case 1:
> +                       info->fix.visual = FB_VISUAL_MONO01;
> +                       break;
> +               case 2:
> +               case 4:

You can drop the tests for 2 and 4, as these are no longer used by the driver.

With the above fixed:
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

WARNING: multiple messages have this Message-ID (diff)
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Pieter PoroCYon Sluys <pcy@national.shitposting.agency>
Cc: Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] vfb: fix video mode and line_length being set when loaded
Date: Wed, 20 Dec 2017 08:26:46 +0000	[thread overview]
Message-ID: <CAMuHMdXjkY=6=CDMPNFtxtjw8g52ivV-HdnKX3-mao0TPTabMw@mail.gmail.com> (raw)
In-Reply-To: <39a57338-18ac-c64f-1cf1-70a5f905990a@national.shitposting.agency>

Hi Pieter,

On Wed, Dec 20, 2017 at 1:24 AM, Pieter "PoroCYon" Sluys
<pcy@national.shitposting.agency> wrote:
> Currently, when loading the vfb module, the newly created fbdev
> has a line_length of 0, and its video mode would be PSEUDOCOLOR
> regardless of color depth. (The former could be worked around by
> calling the FBIOPUT_VSCREENINFO ioctl with having the FBACTIVIATE_FORCE
> flag set.) This patch automatically sets the line_length correctly,
> and the video mode is derived from the bit depth now as well.

Thanks for your patch!
This bug was introduced in 2002, when converting the driver to the new
internal API.

Please add your "Signed-off-by", cfr.
Documentation/process/submitting-patches.rst.

> --- a/drivers/video/fbdev/vfb.c
> +++ b/drivers/video/fbdev/vfb.c
> @@ -239,8 +239,25 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
>   */
>  static int vfb_set_par(struct fb_info *info)
>  {
> +       switch (info->var.bits_per_pixel) {
> +               case 1:
> +                       info->fix.visual = FB_VISUAL_MONO01;
> +                       break;
> +               case 2:
> +               case 4:

You can drop the tests for 2 and 4, as these are no longer used by the driver.

With the above fixed:
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2017-12-20  8:26 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20  0:24 [PATCH] vfb: fix video mode and line_length being set when loaded Pieter "PoroCYon" Sluys
2017-12-20  8:26 ` Geert Uytterhoeven [this message]
2017-12-20  8:26   ` Geert Uytterhoeven
2017-12-20 14:53   ` Pieter "PoroCYon" Sluys
2018-01-04 15:05     ` Bartlomiej Zolnierkiewicz
2018-01-04 15:05       ` Bartlomiej Zolnierkiewicz

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='CAMuHMdXjkY=6=CDMPNFtxtjw8g52ivV-HdnKX3-mao0TPTabMw@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=b.zolnierkie@samsung.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pcy@national.shitposting.agency \
    /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.