[PATCH v2 5/5] fbdev: tdfxfb: Program the initial video mode

From: Daniel Palmer

Date: Fri Jul 31 2026 - 08:32:06 EST


If the card does not get bound to by fbcon set_par() never happens
and the initial video mode is not setup and the display detects
no signal.

Program the video mode and also clear the framebuffer memory so
random garbage isn't displayed.

Signed-off-by: Daniel Palmer <daniel@xxxxxxxx>
---
drivers/video/fbdev/tdfxfb.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/video/fbdev/tdfxfb.c b/drivers/video/fbdev/tdfxfb.c
index f2b658a47135..cb1c2e9f37db 100644
--- a/drivers/video/fbdev/tdfxfb.c
+++ b/drivers/video/fbdev/tdfxfb.c
@@ -1686,6 +1686,14 @@ static int tdfxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto out_err_iobase;
}

+ /*
+ * Program a video mode and clear the framebuffer now, this
+ * ensures the display comes up even if fbcon doesn't bind
+ * when the framebuffer is registered.
+ */
+ tdfxfb_set_par(info);
+ memset_io(info->screen_base, 0, info->fix.smem_len);
+
if (register_framebuffer(info) < 0) {
printk(KERN_ERR "tdfxfb: can't register framebuffer\n");
fb_dealloc_cmap(&info->cmap);
--
2.53.0