Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Helge Deller <deller@gmx.de>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Sukrut Heroorkar <hsukrut3@gmail.com>
Cc: "open list:FRAMEBUFFER LAYER" <linux-fbdev@vger.kernel.org>,
	"open list:FRAMEBUFFER LAYER" <dri-devel@lists.freedesktop.org>,
	shuah@kernel.org, david.hunter.linux@gamil.com,
	linux-m68k <linux-m68k@lists.linux-m68k.org>
Subject: Re: [RFC/RFT PATCH] fbdev: q40fb: request memory region
Date: Fri, 21 Nov 2025 11:17:11 +0100	[thread overview]
Message-ID: <cd870d98-2e40-46d0-ae5a-2299f243cc79@gmx.de> (raw)
In-Reply-To: <CAMuHMdV3UvDHT0uu8oeiCGc9pURaLPDPmG-Fu9kC9H8DQyqRDw@mail.gmail.com>

Hi Geert & Sukrut,

On 11/21/25 11:03, Geert Uytterhoeven wrote:
> On Thu, 20 Nov 2025 at 19:03, Sukrut Heroorkar <hsukrut3@gmail.com> wrote:
>> The q40fb driver uses a fixed physical address but never reserves
>> the corresponding I/O region. Reserve the range  as suggested in
>> Documentation/gpu/todo.rst ("Request memory regions in all fbdev drivers").
>>
>> If the memory cannot be reserved, fail probe with -EBUSY to avoid
>> conflicting with another user of the same address.
>>
>> Signed-off-by: Sukrut Heroorkar <hsukrut3@gmail.com>
> 
> Thanks for your patch!
> 
>> ---
>> Testing: This patch is sent as RFT since Q40 hardware is unavilable and
>> QEMU does not emulated a Q40 platform. The change is therefore compile-tested
>> only.
> 
> I would suggest not to apply this, unless it is tested on real
> hardware.  It wouldn't be the first time an innocent-looking change like
> this breaks a system. See e.g.
> https://lore.kernel.org/all/Y5I2oQexHNdlIbsQ@shell.armlinux.org.uk

Geert, that's actually my thought as well, so I'm happy you wrote down
your opinion here!

By any chance, do you (or someone on this list) know of someone who has
that card and might be able to test it?

Helge


>> --- a/drivers/video/fbdev/q40fb.c
>> +++ b/drivers/video/fbdev/q40fb.c
>> @@ -101,6 +101,13 @@ static int q40fb_probe(struct platform_device *dev)
>>          info->par = NULL;
>>          info->screen_base = (char *) q40fb_fix.smem_start;
>>
>> +       if (!request_mem_region(q40fb_fix.smem_start, q40fb_fix.smem_len,
>> +                               "q40fb")) {
>> +               dev_err(&dev->dev, "cannot reserve video memory at 0x%lx\n",
>> +                       q40fb_fix.smem_start);
>> +               return -EBUSY;
>> +       }
>> +
>>          if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
>>                  framebuffer_release(info);
>>                  return -ENOMEM;

      reply	other threads:[~2025-11-21 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 18:02 [RFC/RFT PATCH] fbdev: q40fb: request memory region Sukrut Heroorkar
2025-11-21 10:03 ` Geert Uytterhoeven
2025-11-21 10:17   ` Helge Deller [this message]

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=cd870d98-2e40-46d0-ae5a-2299f243cc79@gmx.de \
    --to=deller@gmx.de \
    --cc=david.hunter.linux@gamil.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=geert@linux-m68k.org \
    --cc=hsukrut3@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=shuah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox