]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
udlfb: set line_length in dlfb_ops_set_par
authorMikulas Patocka <mpatocka@redhat.com>
Wed, 25 Jul 2018 13:41:56 +0000 (15:41 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 9 Sep 2018 08:32:41 +0000 (10:32 +0200)
commit 0ac319b7af1bb24a33365d0ec82a2f56a59b2a78 upstream.

Set the variable "line_length" in the function dlfb_ops_set_par. Without
this, we get garbage if we select different videomode with fbset.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/fbdev/udlfb.c

index 4ab903456129b27b3cc02eb19e29600bb4b74535..862e8027acf6088423b80279895028c9f7edff10 100644 (file)
@@ -1057,6 +1057,7 @@ static int dlfb_ops_set_par(struct fb_info *info)
                return result;
 
        dlfb->current_mode = fvs;
+       info->fix.line_length = info->var.xres * (info->var.bits_per_pixel / 8);
 
        if (dlfb->fb_count == 0) {