linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] radeonfb: If no video memory, exit with error [repost]
@ 2004-10-26 22:03 Bjorn Helgaas
  2004-10-26 23:50 ` Benjamin Herrenschmidt
  2004-10-27  9:42 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2004-10-26 22:03 UTC (permalink / raw)
  To: Andrew Morton, ajoshi, linux-fbdev-devel; +Cc: linux-kernel, benh

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Posted this last week (10/21) but haven't seen any response.
Would you consider this for the next -mm?  Also attached in
case kmail mangles the whitespace.


[PATCH] radeonfb: If no video memory, exit with error

Nothing good will happen if we try to ioremap and use a zero-sized
frame buffer.  I observed this problem on an ia64 sx1000 box, where
the BIOS doesn't run the option ROM.  If we try to continue, radeonfb
just gets hopelessly confused because the card isn't initialized
correctly.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

===== drivers/video/aty/radeon_base.c 1.32 vs edited =====
--- 1.32/drivers/video/aty/radeon_base.c 2004-10-19 03:40:34 -06:00
+++ edited/drivers/video/aty/radeon_base.c 2004-10-21 11:50:51 -06:00
@@ -2186,7 +2186,9 @@
           rinfo->video_ram = 8192 * 1024;
           break;
          default:
-          break;
+   printk (KERN_ERR "radeonfb: no video RAM reported\n");
+   ret = -ENXIO;
+   goto err_unmap_rom;
   }
  }
 

[-- Attachment #2: radeonfb-no-vram.patch --]
[-- Type: text/x-diff, Size: 819 bytes --]

[PATCH] radeonfb: If no video memory, exit with error

Nothing good will happen if we try to ioremap and use a zero-sized
frame buffer.  I observed this problem on an ia64 sx1000 box, where
the BIOS doesn't run the option ROM.  If we try to continue, radeonfb
just gets hopelessly confused because the card isn't initialized
correctly.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>

===== drivers/video/aty/radeon_base.c 1.32 vs edited =====
--- 1.32/drivers/video/aty/radeon_base.c	2004-10-19 03:40:34 -06:00
+++ edited/drivers/video/aty/radeon_base.c	2004-10-21 11:50:51 -06:00
@@ -2186,7 +2186,9 @@
 	       		rinfo->video_ram = 8192 * 1024;
 	       		break;
 	       	default:
-	       		break;
+			printk (KERN_ERR "radeonfb: no video RAM reported\n");
+			ret = -ENXIO;
+			goto err_unmap_rom;
 		}
 	}
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-10-27  9:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 22:03 [PATCH] radeonfb: If no video memory, exit with error [repost] Bjorn Helgaas
2004-10-26 23:50 ` Benjamin Herrenschmidt
2004-10-27  9:42 ` Benjamin Herrenschmidt

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).