* [PATCH] fbdev: macmodes: compare the pixel clock of each candidate mode
@ 2026-11-18 1:25 Tim Douglas
2026-11-18 1:31 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Tim Douglas @ 2026-11-18 1:25 UTC (permalink / raw)
To: deller; +Cc: linux-fbdev, dri-devel, linux-kernel
In the second pass through the mode table in mac_var_to_vmode(),
the requested pixel clock period was compared with the first mode's
period at every step. The last mode at that resolution was therefore
returned even when its period was too short. Compare against the
current candidate's period.
Tested on a Performa 6200CD using a kernel with local platform
support. With video=valkyriefb:vmode:10 (800x600 at 60 Hz), the
measured refresh rate was about 72 Hz before the fix and 60 Hz
afterward. At 640x480, 67 Hz was also selected for a 60 Hz request
before the fix.
AI assistance was used to investigate the mode-table walk and draft
the fix.
Signed-off-by: Tim Douglas <me@timdoug.com>
---
drivers/video/fbdev/macmodes.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/macmodes.c b/drivers/video/fbdev/macmodes.c
index b16a9d9be..7ea40fd34 100644
--- a/drivers/video/fbdev/macmodes.c
+++ b/drivers/video/fbdev/macmodes.c
@@ -342,7 +342,7 @@ int mac_var_to_vmode(const struct fb_var_screeninfo *var, int *vmode,
if (mode->xres != clk_mode->xres || mode->yres != clk_mode->yres)
break;
- if (var->pixclock > mode->pixclock)
+ if (var->pixclock > clk_mode->pixclock)
break;
if (mode->vmode != clk_mode->vmode)
continue;
base-commit: aebb7274476403040d582c61478df8f4a7bf9cd3
--
2.39.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbdev: macmodes: compare the pixel clock of each candidate mode
2026-11-18 1:25 [PATCH] fbdev: macmodes: compare the pixel clock of each candidate mode Tim Douglas
@ 2026-11-18 1:31 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-18 1:31 UTC (permalink / raw)
To: Tim Douglas; +Cc: dri-devel
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] fbdev: macmodes: missing Fixes trailer for mac_var_to_vmode()
bug fix
--
commit a5693e36289da1dfee41e154db2fb9b39fdc0554
Author: Tim Douglas <me@timdoug.com>
> fbdev: macmodes: compare the pixel clock of each candidate mode
>
> In the second pass through the mode table in mac_var_to_vmode(),
> the requested pixel clock period was compared with the first mode's
> period at every step. The last mode at that resolution was therefore
> returned even when its period was too short. Compare against the
> current candidate's period.
>
> Tested on a Performa 6200CD using a kernel with local platform
> support. With video=valkyriefb:vmode:10 (800x600 at 60 Hz), the
> measured refresh rate was about 72 Hz before the fix and 60 Hz
> afterward. At 640x480, 67 Hz was also selected for a 60 Hz request
> before the fix.
>
> AI assistance was used to investigate the mode-table walk and draft
> the fix.
>
> Signed-off-by: Tim Douglas <me@timdoug.com>
[Severity: Low]
Since this fixes the second-pass pixel clock check in mac_var_to_vmode(),
should this include:
Fixes: d876c11a0fd4 ("fbdev: mac_var_to_mode() fix")
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261118012557.79419-1-me@timdoug.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-18 1:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 1:25 [PATCH] fbdev: macmodes: compare the pixel clock of each candidate mode Tim Douglas
2026-11-18 1:31 ` sashiko-bot
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.