* [PATCH] fbdev: atyfb: Check if pll_ops->init_pll failed
@ 2025-10-24 9:37 Daniel Palmer
2025-10-28 21:29 ` Helge Deller
0 siblings, 1 reply; 2+ messages in thread
From: Daniel Palmer @ 2025-10-24 9:37 UTC (permalink / raw)
To: deller, linux-fbdev; +Cc: dri-devel, linux-kernel, Daniel Palmer
Actually check the return value from pll_ops->init_pll()
as it can return an error.
If the card's BIOS didn't run because it's not the primary VGA card
the fact that the xclk source is unsupported is printed as shown
below but the driver continues on regardless and on my machine causes
a hard lock up.
[ 61.470088] atyfb 0000:03:05.0: enabling device (0080 -> 0083)
[ 61.476191] atyfb: using auxiliary register aperture
[ 61.481239] atyfb: 3D RAGE XL (Mach64 GR, PCI-33) [0x4752 rev 0x27]
[ 61.487569] atyfb: 512K SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 83 Mhz MCLK, 63 MHz XCLK
[ 61.496112] atyfb: Unsupported xclk source: 5.
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
drivers/video/fbdev/aty/atyfb_base.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index 210fd3ac18a4..56ef1d88e003 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -2614,8 +2614,12 @@ static int aty_init(struct fb_info *info)
pr_cont("\n");
}
#endif
- if (par->pll_ops->init_pll)
- par->pll_ops->init_pll(info, &par->pll);
+ if (par->pll_ops->init_pll) {
+ ret = par->pll_ops->init_pll(info, &par->pll);
+ if (ret)
+ return ret;
+ }
+
if (par->pll_ops->resume_pll)
par->pll_ops->resume_pll(info, &par->pll);
--
2.51.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fbdev: atyfb: Check if pll_ops->init_pll failed
2025-10-24 9:37 [PATCH] fbdev: atyfb: Check if pll_ops->init_pll failed Daniel Palmer
@ 2025-10-28 21:29 ` Helge Deller
0 siblings, 0 replies; 2+ messages in thread
From: Helge Deller @ 2025-10-28 21:29 UTC (permalink / raw)
To: Daniel Palmer, linux-fbdev; +Cc: dri-devel, linux-kernel
On 10/24/25 11:37, Daniel Palmer wrote:
> Actually check the return value from pll_ops->init_pll()
> as it can return an error.
>
> If the card's BIOS didn't run because it's not the primary VGA card
> the fact that the xclk source is unsupported is printed as shown
> below but the driver continues on regardless and on my machine causes
> a hard lock up.
>
> [ 61.470088] atyfb 0000:03:05.0: enabling device (0080 -> 0083)
> [ 61.476191] atyfb: using auxiliary register aperture
> [ 61.481239] atyfb: 3D RAGE XL (Mach64 GR, PCI-33) [0x4752 rev 0x27]
> [ 61.487569] atyfb: 512K SGRAM (1:1), 14.31818 MHz XTAL, 230 MHz PLL, 83 Mhz MCLK, 63 MHz XCLK
> [ 61.496112] atyfb: Unsupported xclk source: 5.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> ---
> drivers/video/fbdev/aty/atyfb_base.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
applied.
Thanks!
Helge
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-28 21:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-24 9:37 [PATCH] fbdev: atyfb: Check if pll_ops->init_pll failed Daniel Palmer
2025-10-28 21:29 ` Helge Deller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).