All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Michal Piotrowski <michal.k.k.piotrowski@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Antonino A. Daplas" <adaplas@pol.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Subject: [PATCH] nvidiafb: Fix bug in nvidiafb_pan_display
Date: Sat, 12 Nov 2005 07:28:31 +0800	[thread overview]
Message-ID: <4375291F.3040508@gmail.com> (raw)
In-Reply-To: <20051111150108.265b2d3f.akpm@osdl.org>

nvidiafb_pan_display() is incorrectly using the fields in
info->var instead of var passed to the function.

Signed-off-by: Antonino Daplas <adaplas@pol.net>
---

Andrew Morton wrote:
> Michal Piotrowski <michal.k.k.piotrowski@gmail.com> wrote:
>> Hi,
>>
>> On 11/11/05, Andrew Morton <akpm@osdl.org> wrote:
>>> ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.14/2.6.14-mm2/
>>>
>> Something is broken with nvidia framebuffer. When I try to login on
>> tty1 "Password: " doesn't appear. It appear when I switch Alt+F2 to
>> tty2 and then back to tty1.
>>
> 
> Yup, thanks.  Yesterday Ben reported:
> 
>> not 100% sure what's up, but current -git has funny breakage with
>> nvidiafb on an iMac G5 I have here. The mode seems correct but the
>> console uses one line too much of text.
>>
>> That is, the total height of the screen isn't a multiple of the height
>> of a line of text. It seems that fbcon is rounding up instead of down,
>> thus the "last" line is basically going offscreen (about 2 or 3 pixels
>> visible, the rest is offscreen).
>>
> 

Looks like a bug in nvidiafb_pan_display() which was revealed when I
changed the semantics of update_var/update_start.

Try this patch.

Tony

 nvidia.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff --git a/drivers/video/nvidia/nvidia.c b/drivers/video/nvidia/nvidia.c
index 0b40a2a..bee09c6 100644
--- a/drivers/video/nvidia/nvidia.c
+++ b/drivers/video/nvidia/nvidia.c
@@ -1301,7 +1301,7 @@ static int nvidiafb_pan_display(struct f
 	struct nvidia_par *par = info->par;
 	u32 total;
 
-	total = info->var.yoffset * info->fix.line_length + info->var.xoffset;
+	total = var->yoffset * info->fix.line_length + var->xoffset;
 
 	NVSetStartAddress(par, total);
 


  reply	other threads:[~2005-11-11 23:32 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-11  4:35 2.6.14-mm2 Andrew Morton
2005-11-11  5:23 ` 2.6.14-mm2: loop detected in depmod Brice Goglin
2005-11-11  7:52   ` Antonino A. Daplas
2005-11-12  3:41     ` Brice Goglin
2005-11-11  5:49 ` 2.6.14-mm2 Reuben Farrelly
2005-11-11  6:07   ` 2.6.14-mm2 Andrew Morton
2005-11-11  8:28     ` 2.6.14-mm2 Reuben Farrelly
2005-11-11  8:55       ` 2.6.14-mm2 Andrew Morton
2005-11-11 13:28         ` 2.6.14-mm2 Reuben Farrelly
2005-11-11  8:54 ` 2.6.14-mm2 J.A. Magallon
2005-11-11 12:33 ` 2.6.14-mm2 Felipe Alfaro Solana
2005-11-11 16:40 ` [-mm patch] fs/ocfs2/file.c: make ocfs2_extend_allocation() static Adrian Bunk
2005-11-11 17:09 ` [-mm PATCH] slob: add kmem_set_shrinker Yoichi Yuasa
2005-11-11 19:14 ` 2.6.14-mm2 Badari Pulavarty
2005-11-11 19:21   ` 2.6.14-mm2 Andrew Morton
2005-11-11 19:32     ` 2.6.14-mm2 Badari Pulavarty
2005-11-11 22:32 ` 2.6.14-mm2 Michal Piotrowski
2005-11-11 22:37   ` 2.6.14-mm2 Michal Piotrowski
2005-11-11 23:01   ` 2.6.14-mm2 Andrew Morton
2005-11-11 23:28     ` Antonino A. Daplas [this message]
2005-11-11 23:38       ` [PATCH] nvidiafb: Fix bug in nvidiafb_pan_display Benjamin Herrenschmidt
2005-11-11 23:55         ` Antonino A. Daplas
2005-11-11 23:54       ` Michal Piotrowski
2005-11-11 23:30     ` 2.6.14-mm2 Michal Piotrowski
2005-11-12  0:45       ` 2.6.14-mm2 Antonino A. Daplas
2005-11-16  9:04 ` 2.6.14-mm2 KAMEZAWA Hiroyuki
2005-11-16 12:56 ` 2.6.14-mm2 KAMEZAWA Hiroyuki
2005-11-16 13:17   ` [Lhms-devel] 2.6.14-mm2 Dave Hansen
2005-11-16 16:02     ` Kamezawa Hiroyuki
2005-11-16 16:31       ` Dave Hansen
2005-11-16 16:39         ` Kamezawa Hiroyuki
2005-11-17  0:10         ` KAMEZAWA Hiroyuki
2005-11-17  9:16         ` KAMEZAWA Hiroyuki

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=4375291F.3040508@gmail.com \
    --to=adaplas@gmail.com \
    --cc=adaplas@pol.net \
    --cc=akpm@osdl.org \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.k.k.piotrowski@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.