linux/drivers/gpu/drm
Mikulas Patocka 28668f43b8 drm/nouveau/fbcon: fix font width not divisible by 8
The patch f045f459d9 ("drm/nouveau/fbcon: fix out-of-bounds memory accesses")
tries to fix some out of memory accesses. Unfortunatelly, the patch breaks the
display when using fonts with width that is not divisiable by 8.

The monochrome bitmap for each character is stored in memory by lines from top
to bottom. Each line is padded to a full byte.

For example, for 22x11 font, each line is padded to 16 bits, so each
character is consuming 44 bytes total, that is 11 32-bit words. The patch
f045f459d9 changed the logic to "dsize = ALIGN(image->width *
image->height, 32) >> 5", that is just 8 words - this is incorrect and it
causes display corruption.

This patch adds the necesary padding of lines to 8 bytes.

This patch should be backported to stable kernels where f045f459d9 was
backported.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Fixes: f045f459d9 ("drm/nouveau/fbcon: fix out-of-bounds memory accesses")
Cc: stable@vger.kernel.org
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
2016-07-30 18:17:22 +10:00
..
amd Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
arc
arm
armada drm/armada: use drm_crtc_handle_vblank() 2016-07-12 15:41:14 +02:00
ast drm/ttm: remove dummy bo_move implementations 2016-07-07 14:54:34 -04:00
atmel-hlcdc Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
bochs drm/ttm: remove dummy bo_move implementations 2016-07-07 14:54:34 -04:00
bridge Merge branch 'drm_bridge_for_4.8' of https://github.com/boddob/linux into drm-next 2016-07-19 17:51:19 +10:00
cirrus drm/ttm: remove dummy bo_move implementations 2016-07-07 14:54:34 -04:00
etnaviv Merge branch 'drm-etnaviv-next' of git://git.pengutronix.de/git/lst/linux into drm-next 2016-07-08 13:30:22 +10:00
exynos Merge branch 'upstream/analogix-dp-20160705' of git://github.com/yakir-Yang/linux into drm-next 2016-07-16 11:21:50 +10:00
fsl-dcu drm/fsl-dcu: add support for drm bridge 2016-07-15 18:06:28 -07:00
gma500
hisilicon drm/hisilicon: Fix ADE vblank on/off handling 2016-07-12 14:17:03 +02:00
i2c drm/i2c: adv7511: Move to bridge folder 2016-07-13 14:24:35 +05:30
i810
i915 drm/i915: Update DRIVER_DATE to 20160711 2016-07-11 09:18:31 +02:00
imx drm/imx: parallel-display: add bridge support 2016-07-14 11:18:46 +02:00
mediatek Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
mga
mgag200 drm/ttm: remove dummy bo_move implementations 2016-07-07 14:54:34 -04:00
msm drm/msm: Delete an unnecessary check before drm_gem_object_unreference() 2016-07-16 10:29:35 -04:00
nouveau drm/nouveau/fbcon: fix font width not divisible by 8 2016-07-30 18:17:22 +10:00
omapdrm Linux 4.7-rc5 2016-07-02 15:56:01 +10:00
panel drm/panel: simple: Add support for Starry KR122EA0SRA panel 2016-07-11 14:30:43 +02:00
qxl Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
r128
radeon Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
rcar-du Merge branch 'drm_bridge_for_4.8' of https://github.com/boddob/linux into drm-next 2016-07-19 17:51:19 +10:00
rockchip drm/rockchip: allocate correct crtc state structure on reset 2016-07-19 14:01:53 +08:00
savage
shmobile
sis
sti Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
sun4i Linux 4.7-rc5 2016-07-02 15:56:01 +10:00
tdfx
tegra drm/tegra: Changes for v4.8-rc1 2016-07-16 11:23:50 +10:00
tilcdc drm/tilcdc: use drm_crtc_handle_vblank() 2016-07-12 15:41:53 +02:00
ttm drm/ttm: fix stupid parameter inversion in the pipeline code 2016-07-07 15:06:01 -04:00
udl drm/udl: Unplugging a device now unregisters it 2016-07-12 13:01:55 +02:00
vc4 This pull request brings in vc4 shader validation for branching, 2016-07-16 11:25:11 +10:00
vgem drm/vgem: Use PAGE_KERNEL in place of x86-specific PAGE_KERNEL_IO 2016-07-12 16:53:49 +02:00
via
virtio drm/ttm: add wait for idle in all drivers bo_move functions 2016-07-07 14:54:35 -04:00
vmwgfx Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c
drm_atomic.c Merge tag 'topic/drm-misc-2016-07-14' of git://anongit.freedesktop.org/drm-intel into drm-next 2016-07-15 11:01:37 +10:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c drm: Restore double clflush on the last partial cacheline 2016-07-12 15:57:13 +02:00
drm_context.c
drm_crtc_helper.c Linux 4.7-rc5 2016-07-02 15:56:01 +10:00
drm_crtc_internal.h drm: Resurrect atomic rmfb code 2016-07-13 12:56:20 +02:00
drm_crtc.c drm: Resurrect atomic rmfb code 2016-07-13 12:56:20 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c drm_aux-dev: fix error handling in drm_dp_aux_dev_init() 2016-07-12 14:10:57 +02:00
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c
drm_drv.c drm: Do a full device unregister when unplugging 2016-07-12 13:01:49 +02:00
drm_edid_load.c
drm_edid.c
drm_encoder_slave.c
drm_fb_cma_helper.c Merge branch 'for-next' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next 2016-07-02 16:21:35 +10:00
drm_fb_helper.c
drm_flip_work.c
drm_fops.c
drm_fourcc.c
drm_gem_cma_helper.c
drm_gem.c
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c drm: Don't overwrite user ioctl arg unless requested 2016-07-14 10:12:50 +02:00
drm_irq.c drm: make drm_vblank_count_and_time() static 2016-07-12 15:40:45 +02:00
drm_kms_helper_common.c
drm_legacy.h
drm_lock.c
drm_memory.c drm: Fix broken use of _PAGE_NO_CACHE on powerpc 2016-07-12 13:20:39 +02:00
drm_mipi_dsi.c drm/dsi: Make set_tear_scanline command consistent 2016-07-12 13:19:26 +02:00
drm_mm.c
drm_modes.c
drm_modeset_lock.c
drm_of.c
drm_panel.c
drm_pci.c
drm_plane_helper.c
drm_platform.c
drm_prime.c
drm_probe_helper.c
drm_rect.c
drm_scatter.c drm: Fix broken use of _PAGE_NO_CACHE on powerpc 2016-07-12 13:20:39 +02:00
drm_simple_kms_helper.c
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vm.c drm: Fix broken use of _PAGE_NO_CACHE on powerpc 2016-07-12 13:20:39 +02:00
drm_vma_manager.c
Kconfig
Makefile