Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

fbdev: sh_mobile_lcdcfb: fix bug in reconfig()

The function sh_mobile_fb_reconfig() contained a bug,
which caused the line_length to be set wrongly, if a mode
with a different X-resolution than the default one was chosen.
This caused 1080p24 mode to not work on AP4EVB.
Additionally the notifier chain was also called with the wrong
mode.

This patch fixes this, by using the X-resolution of the new
mode instead of the old one to calculate line length and
hands over the correct mode to the notifier chain.

Signed-off-by: Arnd Hannemann <arnd@arndnet.de>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>

authored by

Arnd Hannemann and committed by
Paul Mundt
cc267ec5 6800e4c0

+2 -2
+2 -2
drivers/video/sh_mobile_lcdcfb.c
··· 860 860 /* Couldn't reconfigure, hopefully, can continue as before */ 861 861 return; 862 862 863 - info->fix.line_length = mode2.xres * (ch->cfg.bpp / 8); 863 + info->fix.line_length = mode1.xres * (ch->cfg.bpp / 8); 864 864 865 865 /* 866 866 * fb_set_var() calls the notifier change internally, only if ··· 868 868 * user event, we have to call the chain ourselves. 869 869 */ 870 870 event.info = info; 871 - event.data = &mode2; 871 + event.data = &mode1; 872 872 fb_notifier_call_chain(evnt, &event); 873 873 } 874 874