Linux Framebuffer Layer development
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: James Simmons <jsimmons@infradead.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH] radeonfb: more updates
Date: Tue, 10 Feb 2004 21:42:36 +1100	[thread overview]
Message-ID: <1076409755.873.13.camel@gaston> (raw)

Hi James !

Some last minute updates to radeonfb :) Remove obsolete memset
(and fix a bug where we would lose rinfo->info and thus crash
at boot, I though I sent that fix to you already but apparently
I missed it).

Remove some bitfields (useless & evil)

Also shield the accel functions vs. a sleeping ship (see my other
comment, it's rather difficult to prevent fbcon to trying to draw
anyway, so rather than adding dummy functions, I added those checks)

This drivers with the uptodate fbdev code works, sleeps & wakes up
fine on pmac laptops.

diff -urN fbdev-2.5/drivers/video/aty/radeon_accel.c linuxppc-2.5-benh/drivers/video/aty/radeon_accel.c
--- fbdev-2.5/drivers/video/aty/radeon_accel.c	2004-02-10 21:15:18.000000000 +1100
+++ linuxppc-2.5-benh/drivers/video/aty/radeon_accel.c	2004-02-10 21:04:41.000000000 +1100
@@ -28,6 +28,8 @@
 	struct fb_fillrect modded;
 	int vxres, vyres;
   
+	if (info->state != FBINFO_STATE_RUNNING)
+		return;
 	if (radeon_accel_disabled()) {
 		cfb_fillrect(info, region);
 		return;
@@ -79,6 +81,8 @@
 	modded.width  = area->width;
 	modded.height = area->height;
   
+	if (info->state != FBINFO_STATE_RUNNING)
+		return;
 	if (radeon_accel_disabled()) {
 		cfb_copyarea(info, area);
 		return;
@@ -104,6 +108,8 @@
 {
 	struct radeonfb_info *rinfo = info->par;
 
+	if (info->state != FBINFO_STATE_RUNNING)
+		return;
 	radeon_engine_idle();
 
 	cfb_imageblit(info, image);
@@ -113,6 +119,8 @@
 {
 	struct radeonfb_info *rinfo = info->par;
 
+	if (info->state != FBINFO_STATE_RUNNING)
+		return 0;
 	radeon_engine_idle();
 
 	return 0;
diff -urN fbdev-2.5/drivers/video/aty/radeon_base.c linuxppc-2.5-benh/drivers/video/aty/radeon_base.c
--- fbdev-2.5/drivers/video/aty/radeon_base.c	2004-02-10 21:15:18.000000000 +1100
+++ linuxppc-2.5-benh/drivers/video/aty/radeon_base.c	2004-02-09 18:51:22.000000000 +1100
@@ -727,7 +727,7 @@
 
 static int radeonfb_check_var (struct fb_var_screeninfo *var, struct fb_info *info)
 {
-	struct radeonfb_info *rinfo = (struct radeonfb_info *) info->par;
+	struct radeonfb_info *rinfo = info->par;
         struct fb_var_screeninfo v;
         int nom, den;
 	unsigned int pitch;
@@ -1703,9 +1703,7 @@
 
 static int __devinit radeon_set_fbinfo (struct radeonfb_info *rinfo)
 {
-	struct fb_info *info;
-
-	info = rinfo->info;
+	struct fb_info *info = rinfo->info;
 
 	info->currcon = -1;
 	info->par = rinfo;
@@ -2006,9 +2004,7 @@
 		return -ENODEV;
 	}
 	rinfo = info->par;
-	rinfo->info = info;
-	
-	memset (rinfo, 0, sizeof (struct radeonfb_info));
+	rinfo->info = info;	
 	rinfo->pdev = pdev;
 	
 	spin_lock_init(&rinfo->reg_lock);
diff -urN fbdev-2.5/drivers/video/aty/radeonfb.h linuxppc-2.5-benh/drivers/video/aty/radeonfb.h
--- fbdev-2.5/drivers/video/aty/radeonfb.h	2004-02-10 21:15:18.000000000 +1100
+++ linuxppc-2.5-benh/drivers/video/aty/radeonfb.h	2004-02-09 18:51:22.000000000 +1100
@@ -285,12 +285,12 @@
 
 	int			pitch, bpp, depth;
 
-	int			has_CRTC2 : 1;
-	int			is_mobility : 1;
-	int			is_IGP : 1;
-	int			R300_cg_workaround : 1;
-	int			reversed_DAC : 1;
-	int			reversed_TMDS : 1;
+	int			has_CRTC2;
+	int			is_mobility;
+	int			is_IGP;
+	int			R300_cg_workaround;
+	int			reversed_DAC;
+	int			reversed_TMDS;
 	struct panel_info	panel_info;
 	int			mon1_type;
 	u8			*mon1_EDID;




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

                 reply	other threads:[~2004-02-10 10:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1076409755.873.13.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox