linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Vrabel <dvrabel@arcom.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [patch] (Preliminary) Geode framebuffer driver.
Date: Tue, 15 Feb 2005 14:15:03 +0000	[thread overview]
Message-ID: <421203E7.4030903@arcom.com> (raw)
In-Reply-To: <200502152138.24361.adaplas@hotpop.com>

Note that this driver requires the FB_CFB_xxx and FB_SOFT_CURSOR kbuild
option patches I posted earlier today.

It's also:

Signed-off-by: David Vrabel <dvrabel@arcom.com>

Thanks for looking this over.

> A few minor comments:
> 
> +        /* Clear the frame buffer of garbage. */
> +        memset(info->screen_base, 0, info->fix.smem_len);
> 
> Is the above really necessary?

Yes. Otherwise the screen will show garbage until whatever application
you're using gets around to clearing the screen. (An embedded system
won't necessarily have fbcon.)

> And if it is, memset_io is preferred.

Done.

> +	info->screen_base = (unsigned char *)ioremap(info->fix.smem_start, info->fix.smem_len);
> 
> You also do not need the (unsigned char *) part. (sparse will complain.)

Done.

I think I got that from skeletonfb.c (which is looking a bit out of date).

> No need to resend the patch, just let me know what changes you want, if any.

I've also fixed a warning and corrected some whitespace.

Here's a diff of these changes.

Index: linux-2.6-i386/drivers/video/geode/geodefb.h
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/geodefb.h	2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/geodefb.h	2005-02-15
13:49:54.782318435 +0000
@@ -22,7 +22,7 @@
 struct geode_vid_ops {
 	void (*set_dclk)(struct fb_info *);
 	void (*configure_display)(struct fb_info *);
-	int  (*blank_display)(const struct fb_info *, int blank_mode);
+	int  (*blank_display)(struct fb_info *, int blank_mode);
 };

 struct geodefb_par {
Index: linux-2.6-i386/drivers/video/geode/gx1fb_core.c
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/gx1fb_core.c	2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/gx1fb_core.c	2005-02-15
13:53:56.244807541 +0000
@@ -139,7 +139,7 @@
 	return 0;
 }

-static int gx1fb_blank(int blank_mode, const struct fb_info *info)
+static int gx1fb_blank(int blank_mode, struct fb_info *info)
 {
 	struct geodefb_par *par = info->par;

@@ -174,7 +174,7 @@
 	if ((fb_len = gx1_frame_buffer_size()) < 0)
 		return -ENOMEM;
 	info->fix.smem_len = fb_len;
-	info->screen_base = (unsigned char *)ioremap(info->fix.smem_start,
info->fix.smem_len);
+	info->screen_base = ioremap(info->fix.smem_start, info->fix.smem_len);
 	if (!info->screen_base)
 		return -ENOMEM;

@@ -269,7 +269,7 @@
 int __init gx1fb_init(void)
 {
 	struct fb_info *info;
-        struct geodefb_par *par;
+	struct geodefb_par *par;
 	int ret;

 #ifndef MODULE
@@ -300,8 +300,8 @@
 		goto err;
 	}

-        /* Clear the frame buffer of garbage. */
-        memset(info->screen_base, 0, info->fix.smem_len);
+	/* Clear the frame buffer of garbage. */
+	memset_io(info->screen_base, 0, info->fix.smem_len);

 	gx1fb_check_var(&info->var, info);
 	gx1fb_set_par(info);
@@ -315,7 +315,7 @@

   err:
 	if (info->screen_base)
-		iounmap((void __iomem *)info->screen_base);
+		iounmap(info->screen_base);
 	if (par->vid_regs)
 		iounmap(par->vid_regs);
 	if (par->dc_regs)
@@ -330,7 +330,7 @@
 static void __exit gx1fb_cleanup(void)
 {
 	struct fb_info *info = gx1fb_info;
-        struct geodefb_par *par = gx1fb_info->par;
+	struct geodefb_par *par = gx1fb_info->par;

 	unregister_framebuffer(info);

Index: linux-2.6-i386/drivers/video/geode/video_cs5530.c
===================================================================
--- linux-2.6-i386.orig/drivers/video/geode/video_cs5530.c	2005-02-15
10:33:59.000000000 +0000
+++ linux-2.6-i386/drivers/video/geode/video_cs5530.c	2005-02-15
13:50:10.660522983 +0000
@@ -135,7 +135,7 @@
 	writel(dcfg, par->vid_regs + CS5530_DISPLAY_CONFIG);
 }

-static int cs5530_blank_display(const struct fb_info *info, int blank_mode)
+static int cs5530_blank_display(struct fb_info *info, int blank_mode)
 {
 	struct geodefb_par *par = info->par;
 	u32 dcfg;


-- 
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click

  reply	other threads:[~2005-02-15 14:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 11:11 [patch] (Preliminary) Geode framebuffer driver David Vrabel
2005-02-11 20:39 ` Antonino A. Daplas
2005-02-15 11:13   ` David Vrabel
2005-02-15 13:38     ` Antonino A. Daplas
2005-02-15 14:15       ` David Vrabel [this message]
2005-02-15 14:34         ` Antonino A. Daplas

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=421203E7.4030903@arcom.com \
    --to=dvrabel@arcom.com \
    --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;
as well as URLs for NNTP newsgroup(s).