Mikulas Patocka
dd154e74b0
tgafb: fix mode setting with fbset
...
commit 6249665890 upstream.
Mode setting in the TGA driver is broken for these reasons:
- info->fix.line_length is set just once in tgafb_init_fix function. If
we change videomode, info->fix.line_length is not recalculated - so
the video mode is changed but the screen is corrupted because of wrong
info->fix.line_length.
- info->fix.smem_len is set in tgafb_init_fix to the size of the default
video mode (640x480). If we set a higher resolution,
info->fix.smem_len is smaller than the current screen size, preventing
the userspace program from mapping the framebuffer.
This patch fixes it:
- info->fix.line_length initialization is moved to tgafb_set_par so that
it is recalculated with each mode change.
- info->fix.smem_len is set to a fixed value representing the real
amount of video ram (the values are taken from xfree86 driver).
- add a check to tgafb_check_var to prevent us from setting a videomode
that doesn't fit into videoram.
- in tgafb_register, tgafb_init_fix is moved upwards, to be called
before fb_find_mode (because fb_find_mode already needs the videoram
size set in tgafb_init_fix).
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2014-05-30 21:52:12 -07:00
..
2014-05-13 13:59:43 +02:00
2013-12-04 10:55:47 -08:00
2013-12-04 10:55:46 -08:00
2013-04-30 09:36:50 -07:00
2013-01-21 14:52:46 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-12-08 07:29:27 -08:00
2014-05-13 13:59:42 +02:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-29 15:54:27 -07:00
2013-02-22 23:31:31 -05:00
2013-01-03 15:57:01 -08:00
2013-04-10 15:03:31 +03:00
2013-05-29 17:00:34 +08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-24 08:41:42 +03:00
2013-01-24 08:59:44 +01:00
2013-01-03 15:57:01 -08:00
2013-04-30 09:36:50 -07:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-06-01 03:18:55 +08:00
2013-11-13 12:05:33 +09:00
2013-11-13 12:05:33 +09:00
2013-04-30 09:36:50 -07:00
2013-04-04 13:08:06 +03:00
2013-04-04 13:08:06 +03:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-09 14:13:32 -04:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2014-05-13 13:59:42 +02:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-18 13:03:53 +10:00
2013-02-14 15:14:32 -08:00
2013-01-03 15:57:01 -08:00
2013-04-24 08:41:41 +03:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-24 09:03:04 +01:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-29 15:54:26 -07:00
2013-02-22 23:31:31 -05:00
2013-04-24 08:41:41 +03:00
2013-05-02 19:40:34 -07:00
2013-04-26 09:14:47 +03:00
2013-02-08 12:02:40 +10:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-10 15:03:32 +03:00
2013-04-26 08:28:56 +03:00
2013-03-20 16:26:32 +01:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-12 14:01:40 +10:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-11-20 12:27:47 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-23 20:35:02 -08:00
2013-01-22 11:41:58 -08:00
2013-05-24 16:22:52 -07:00
2013-01-03 15:57:01 -08:00
2013-05-24 16:22:51 -07:00
2013-01-03 15:57:01 -08:00
2013-02-21 17:22:19 -08:00
2013-05-09 13:06:00 -07:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-03-12 15:46:52 +02:00
2013-03-21 14:34:33 +02:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-05-02 14:59:21 +03:00
2013-01-03 15:57:01 -08:00
2013-04-09 14:16:40 -04:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-12 15:21:36 +02:00
2013-01-03 15:57:01 -08:00
2013-04-11 14:49:20 +03:00
2013-01-03 15:57:01 -08:00
2013-04-24 08:41:41 +03:00
2013-04-24 08:41:42 +03:00
2013-01-03 15:57:01 -08:00
2013-04-10 15:03:31 +03:00
2013-04-10 15:03:31 +03:00
2013-03-27 22:47:24 +09:00
2012-11-21 15:50:01 +01:00
2013-01-03 15:57:01 -08:00
2013-05-24 16:22:51 -07:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-26 08:28:56 +03:00
2013-04-12 15:21:36 +02:00
2013-01-03 15:57:01 -08:00
2013-12-04 10:55:46 -08:00
2013-12-04 10:55:46 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2014-05-30 21:52:12 -07:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-26 08:28:56 +03:00
2013-04-29 18:28:43 -07:00
2013-04-26 08:28:56 +03:00
2013-01-03 15:57:01 -08:00
2013-03-21 14:34:33 +02:00
2013-04-04 13:07:34 +03:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-10 11:15:49 +03:00
2013-01-03 15:57:01 -08:00
2013-04-04 13:07:33 +03:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00