public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH/RFC] atafb line length
@ 2008-11-16 21:34 Geert Uytterhoeven
  2008-11-17 23:01 ` Michael Schmitz
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Geert Uytterhoeven @ 2008-11-16 21:34 UTC (permalink / raw)
  To: Michael Schmitz; +Cc: Linux/m68k

Make sure fix->line_length is always set, as some applications need it because
they don't have fallback code if line_length is zero.

Works on ARAnyM (Falcon emulation), but par->next_line is not set on any other
Atari variant?

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/video/atafb.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

--- a/drivers/video/atafb.c
+++ b/drivers/video/atafb.c
@@ -613,7 +613,7 @@ static int tt_encode_fix(struct fb_fix_s
 	fix->xpanstep = 0;
 	fix->ypanstep = 1;
 	fix->ywrapstep = 0;
-	fix->line_length = 0;
+	fix->line_length = par->next_line;
 	fix->accel = FB_ACCEL_ATARIBLITT;
 	return 0;
 }
@@ -917,7 +917,8 @@ static int falcon_encode_fix(struct fb_f
 		fix->visual = FB_VISUAL_TRUECOLOR;
 		fix->xpanstep = 2;
 	}
-	fix->line_length = 0;
+	fix->line_length =
+		(par->hw.falcon.line_width + par->hw.falcon.line_offset) * 2;
 	fix->accel = FB_ACCEL_ATARIBLITT;
 	return 0;
 }
@@ -1844,7 +1845,7 @@ static int stste_encode_fix(struct fb_fi
 		fix->ypanstep = 0;
 	}
 	fix->ywrapstep = 0;
-	fix->line_length = 0;
+	fix->line_length = par->next_line;
 	fix->accel = FB_ACCEL_ATARIBLITT;
 	return 0;
 }
@@ -2161,7 +2162,7 @@ static int ext_encode_fix(struct fb_fix_
 	fix->xpanstep = 0;
 	fix->ypanstep = 0;
 	fix->ywrapstep = 0;
-	fix->line_length = 0;
+	fix->line_length = par->next_line;
 	return 0;
 }
 

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-12-17 21:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-16 21:34 [PATCH/RFC] atafb line length Geert Uytterhoeven
2008-11-17 23:01 ` Michael Schmitz
2008-11-19  7:04 ` Michael Schmitz
2008-11-19  8:12   ` Geert Uytterhoeven
2008-11-22  7:11     ` Michael Schmitz
2008-12-17 21:21 ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox