Subject: [PATCH] fbdev: make sure fix->line_length is always set in atafb From: Geert Uytterhoeven 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? --- 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; }