From: Sukrut Heroorkar <hsukrut3@gmail.com>
To: Helge Deller <deller@gmx.de>,
Sukrut Heroorkar <hsukrut3@gmail.com>,
linux-fbdev@vger.kernel.org (open list:FRAMEBUFFER LAYER),
dri-devel@lists.freedesktop.org (open list:FRAMEBUFFER LAYER),
linux-kernel@vger.kernel.org (open list)
Cc: shuah@kernel.org, david.hunter.linux@gmail.com
Subject: [PATCH] fbdev: q40fb: request memory region
Date: Tue, 18 Nov 2025 15:26:55 +0530 [thread overview]
Message-ID: <20251118095700.393474-1-hsukrut3@gmail.com> (raw)
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").
No functional change beyond claming the resource. This change is compile
tested only.
Signed-off-by: Sukrut Heroorkar <hsukrut3@gmail.com>
---
drivers/video/fbdev/q40fb.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/video/fbdev/q40fb.c b/drivers/video/fbdev/q40fb.c
index 1ff8fa176124..935260326c6f 100644
--- a/drivers/video/fbdev/q40fb.c
+++ b/drivers/video/fbdev/q40fb.c
@@ -101,6 +101,12 @@ 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);
+ }
+
if (fb_alloc_cmap(&info->cmap, 256, 0) < 0) {
framebuffer_release(info);
return -ENOMEM;
@@ -144,6 +150,7 @@ static int __init q40fb_init(void)
if (ret)
platform_driver_unregister(&q40fb_driver);
}
+
return ret;
}
--
2.43.0
next reply other threads:[~2025-11-18 9:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 9:56 Sukrut Heroorkar [this message]
2025-11-19 13:57 ` [PATCH] fbdev: q40fb: request memory region David Hunter
2025-11-20 18:00 ` sukrut heroorkar
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=20251118095700.393474-1-hsukrut3@gmail.com \
--to=hsukrut3@gmail.com \
--cc=david.hunter.linux@gmail.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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