Thread (6 messages) flat view 6 messages, 2 authors, 11d ago

Re: [PATCH v3 2/5] fbdev: Give atafb proper parent

From: Michael Schmitz <schmitzmic@gmail.com>
Date: 2026-08-21 06:44:14
Also in: linux-m68k

Thanks Helge,

On 21/08/2026 9:51 AM, Helge Deller wrote:
On 8/20/26 00:28, Michael Schmitz wrote:
quoted
From: Miro Kropacek <redacted>

The atafb fb device registers no parent, causing a missing symlink
(/sys/class/graphics/fb0/device). Xorg fbdevhw driver looks for that
symlink when scanning for devices, so add a parent node for atafb.

The proper way to do that is use of framebuffer_alloc(), which
requries refactoring atafb to move from static fb_info to allocation
of fb_info by framebuffer_alloc().
About the only location where a fb_info pointer cannot be passed
is monspec setup in atafb_setup(). Store static monspecs there
and copy into place after framebuffer_alloc().

Pass fb_info everywhere it's needed (detect, decode_var and
do_fb_set_var functions), and remove the static fb_info struct.

Signed-off-by: Miro Kropacek <redacted>
Reviewed-by: Michael Schmitz <schmitzmic@gmail.com>
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
Cc: <redacted>
Link: https://lists.debian.org/debian-68k/2026/08/msg00000.html

---

Changes in v3:

- fbdev: refactor atafb fb_info use to allow use of framebuffer_alloc()
   (Thomas Zimmermann)
---
  drivers/video/fbdev/atafb.c | 174 +++++++++++++++++++-----------------
  1 file changed, 92 insertions(+), 82 deletions(-)
diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c
index b8ed1c537293..a9be06ded5c9 100644
--- a/drivers/video/fbdev/atafb.c
+++ b/drivers/video/fbdev/atafb.c
@@ -158,14 +158,6 @@ static int DontCalcRes = 0;
  #define VMO_PREMASK        0x0c
  #endif
  -static struct fb_info fb_info = {
-    .fix = {
-        .id    = "Atari ",
-        .visual    = FB_VISUAL_PSEUDOCOLOR,
-        .accel    = FB_ACCEL_NONE,
-    }
-};
-
  static void *screen_base;    /* base address of screen */
  static unsigned long phys_screen_base;    /* (only for Overscan) */
  @@ -175,6 +167,12 @@ static int current_par_valid;
    static int mono_moni;
  +/* monspecs passed by user */
+
+static __u32 mcap_hmin;        /* hfreq lower limit (Hz) */
+static __u32 mcap_hmax;        /* hfreq upper limit (Hz) */
+static __u16 mcap_vmin;        /* vfreq lower limit (Hz) */
+static __u16 mcap_vmax;        /* vfreq upper limit (Hz) */
    #ifdef ATAFB_EXT
  @@ -299,7 +297,7 @@ static int *MV300_reg = MV300_reg_8bit;
  /* ++roman: This structure abstracts from the underlying hardware 
(ST(e),
   * TT, or Falcon.
   *
- * int (*detect)(void)
+ * int (*detect)(*fb_info)
I fixed this comment up to become:
+ * int (*detect)(struct fb_info *info)

Other than that I've replaced the latest patch series by this series in
the fbdev for-next git tree.
Appreciate the fast work - I'm working on another patch for atafb to 
update error handling in atafb_probe() (just calling panic() when 
something goes wrong is a little rough these days). Will take a little 
longer to test though.

Cheers,

     Michael
Thanks!
Helge
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help