linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s3c2410fb: Misc fixes
@ 2007-01-04 23:32 Arnaud Patard
  0 siblings, 0 replies; only message in thread
From: Arnaud Patard @ 2007-01-04 23:32 UTC (permalink / raw)
  To: linux-fbdev-devel; +Cc: Ben Dooks

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

Hi,

This patch fix the following issues:

- In one place "var->width" is used, instead of "var->xres"
- add "pixclock" field to "s3c2410fb_mach_info", so
  "s3c2410fb_calc_pixclk" can be used
- check the parameters before initializing the controller

From: David Muller <d.mueller@elsoft.ch>
Signed-off-by: Arnaud Patard <arnaud.patard@rtp-net.org>
---

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: s3c2410fb_fixes.patch --]
[-- Type: text/x-patch, Size: 1974 bytes --]

---
 drivers/video/s3c2410fb.c         |    7 	4 +	3 -	0 !
 include/asm-arm/arch-s3c2410/fb.h |    1 	1 +	0 -	0 !
 2 files changed, 5 insertions(+), 3 deletions(-)

Index: linux-2.6/drivers/video/s3c2410fb.c
===================================================================
--- linux-2.6.orig/drivers/video/s3c2410fb.c	2007-01-04 22:02:58.000000000 +0100
+++ linux-2.6/drivers/video/s3c2410fb.c	2007-01-04 22:15:17.000000000 +0100
@@ -461,7 +461,7 @@ static int s3c2410fb_set_par(struct fb_i
 			 break;
 	}
 
-	fbi->fb->fix.line_length     = (var->width*var->bits_per_pixel)/8;
+	fbi->fb->fix.line_length     = (var->xres*var->bits_per_pixel)/8;
 
 	/* activate this new configuration */
 
@@ -829,6 +829,7 @@ static int __init s3c2410fb_probe(struct
 	fbinfo->var.yres	    = mach_info->yres.defval;
 	fbinfo->var.yres_virtual    = mach_info->yres.defval;
 	fbinfo->var.bits_per_pixel  = mach_info->bpp.defval;
+	fbinfo->var.pixclock        = mach_info->pixclock;
 
 	fbinfo->var.upper_margin    = S3C2410_LCDCON2_GET_VBPD(mregs->lcdcon2) + 1;
 	fbinfo->var.lower_margin    = S3C2410_LCDCON2_GET_VFPD(mregs->lcdcon2) + 1;
@@ -889,10 +890,10 @@ static int __init s3c2410fb_probe(struct
 	}
 	dprintk("got video memory\n");
 
-	ret = s3c2410fb_init_registers(info);
-
 	ret = s3c2410fb_check_var(&fbinfo->var, fbinfo);
 
+	ret = s3c2410fb_init_registers(info);
+
 	ret = register_framebuffer(fbinfo);
 	if (ret < 0) {
 		printk(KERN_ERR "Failed to register framebuffer device: %d\n", ret);
Index: linux-2.6/include/asm-arm/arch-s3c2410/fb.h
===================================================================
--- linux-2.6.orig/include/asm-arm/arch-s3c2410/fb.h	2007-01-04 22:02:59.000000000 +0100
+++ linux-2.6/include/asm-arm/arch-s3c2410/fb.h	2007-01-04 22:13:07.000000000 +0100
@@ -30,6 +30,7 @@ struct s3c2410fb_hw {
 
 struct s3c2410fb_mach_info {
 	unsigned char	fixed_syncs;	/* do not update sync/border */
+	unsigned int	pixclock;
 
 	/* LCD types */
 	int		type;

[-- Attachment #3: Type: text/plain, Size: 347 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

[-- Attachment #4: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-01-04 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-04 23:32 [PATCH] s3c2410fb: Misc fixes Arnaud Patard

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