linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Raphael Assenat <raph@8d.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: linux-fbdev-devel@lists.sourceforge.net
Subject: [PATCH 2/2] mbxfb: Fix framebuffer size smaller than requested
Date: Mon, 14 Aug 2006 14:40:12 -0400	[thread overview]
Message-ID: <44E0C38C.4030001@8d.com> (raw)

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

This patch fixes a bug where we obtain a smaller resolution than requested.
(eg: in 640x480, only 639x479 usable pixels).

This was due to 1 being substracted from the xres and yres vars
two times: first in mbxfb.c and then in the macros from reg_bits.h.

This patch removes the minus ones from the mbxfb.c file. Tested and works.


[-- Attachment #2: mbxfb-size.diff --]
[-- Type: text/plain, Size: 1174 bytes --]

This patch fixes a bug where we obtain a smaller resolution than requested. 
(eg: in 640x480, only 639x479 usable pixels). 

This was due to 1 being substracted from the xres and yres vars 
two times: first in mbxfb.c and then in the macros from reg_bits.h.

This patch removes the minus ones from the mbxfb.c file. Tested and works.

Signed-off-by: Raphael Assenat <raph@8d.com>

--- mbxfb.c-disppll-workaound	2006-08-14 14:08:56.000000000 -0400
+++ ../linux-2.6.18-rc2-8d/drivers/video/mbx/mbxfb.c	2006-08-14 14:23:40.000000000 -0400
@@ -255,8 +255,8 @@
 
 	/* setup resolution */
 	gsctrl &= ~(FMsk(GSCTRL_GSWIDTH) | FMsk(GSCTRL_GSHEIGHT));
-	gsctrl |= Gsctrl_Width(info->var.xres - 1) |
-		Gsctrl_Height(info->var.yres - 1);
+	gsctrl |= Gsctrl_Width(info->var.xres) |
+		Gsctrl_Height(info->var.yres);
 	writel(gsctrl, GSCTRL);
 	udelay(1000);
 
@@ -413,8 +413,8 @@
 {
 	unsigned long gsctrl;
 
-	gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres - 1) |
-		Gsctrl_Height(fbi->var.yres - 1);
+	gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres) |
+		Gsctrl_Height(fbi->var.yres);
 	switch (fbi->var.bits_per_pixel) {
 	case 16:
 		if (fbi->var.green.length == 5)

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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

[-- 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

                 reply	other threads:[~2006-08-14 18:39 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=44E0C38C.4030001@8d.com \
    --to=raph@8d.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=mike@compulab.co.il \
    /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).