linux/drivers/gpu/drm
Mikulas Patocka 702117fe1e drm/nouveau/fbcon: fix font width not divisible by 8
commit 28668f43b8 upstream.

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")
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-08-20 18:09:23 +02:00
..
amd drm/amdgpu/gmc7: add missing mullins case 2016-08-20 18:09:22 +02:00
armada
ast drm/ast: Fix incorrect register check for DRAM width 2016-03-09 15:34:51 -08:00
atmel-hlcdc drm: atmel-hlcdc: actually disable scaling when no scaling is required 2016-07-27 09:47:35 -07:00
bochs
bridge drm/panel: Changes for v4.4-rc1 2015-11-05 11:07:13 +10:00
cirrus
exynos drm/exynos: atomic check only enabled crtc states 2015-12-20 01:39:10 +09:00
fsl-dcu
gma500 drm/gma500: Fix possible out of bounds read 2016-06-07 18:14:36 -07:00
i2c
i810
i915 drm/i915: Don't complain about lack of ACPI video bios 2016-08-20 18:09:21 +02:00
imx drm/imx: Match imx-ipuv3-crtc components using device node in platform data 2016-06-07 18:14:37 -07:00
mga
mgag200 drm/mgag200: Black screen fix for G200e rev 4 2016-07-27 09:47:32 -07:00
msm
nouveau drm/nouveau/fbcon: fix font width not divisible by 8 2016-08-20 18:09:23 +02:00
omapdrm drm/omap: fix fbdev pix format to support all platforms 2015-12-14 10:00:22 +02:00
panel
qxl drm/qxl: fix cursor position with non-zero hotspot 2016-05-04 14:48:43 -07:00
r128
radeon drm/radeon: support backlight control for UNIPHY3 2016-08-20 18:09:23 +02:00
rcar-du
rockchip drm/rockchip: Use CRTC vblank event interface 2015-12-02 10:22:21 +08:00
savage
shmobile
sis
sti drm/sti: load HQVDP firmware the first time HQVDP's plane is used 2015-11-03 13:04:56 +01:00
tdfx
tegra Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
tilcdc
ttm drm/ttm: Make ttm_bo_mem_compat available 2016-07-27 09:47:35 -07:00
udl drm/udl: Use unlocked gem unreferencing 2016-04-20 15:41:55 +09:00
vc4 drm/vc4: Make sure that planes aren't scaled. 2015-11-17 12:27:03 -08:00
vgem
via
virtio virtio-gpu: use no-merge for fill-modes 2015-12-01 10:33:35 +10:00
vmwgfx drm/vmwgfx: Fix error paths when mapping framebuffer 2016-07-27 09:47:35 -07:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm/atomic-helper: Check encoder/crtc constraints 2015-11-19 17:11:13 +02:00
drm_atomic.c drm: make drm_atomic_set_mode_prop_for_crtc() more reliable 2016-07-27 09:47:35 -07:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c
drm_crtc_internal.h
drm_crtc.c drm: add missing drm_mode_set_crtcinfo call 2016-07-27 09:47:35 -07:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/dp: move hw_mutex up the call stack 2016-04-20 15:41:55 +09:00
drm_dp_mst_topology.c drm/dp/mst: Always clear proposed vcpi table for port. 2016-07-27 09:47:34 -07:00
drm_drv.c drm: Fix an unwanted master inheritance v2 2015-12-04 12:28:14 +10:00
drm_edid_load.c
drm_edid.c
drm_encoder_slave.c
drm_fb_cma_helper.c
drm_fb_helper.c drm/fb_helper: Fix references to dev->mode_config.num_connector 2016-06-07 18:14:36 -07:00
drm_flip_work.c
drm_fops.c drm: Fix an unwanted master inheritance v2 2015-12-04 12:28:14 +10:00
drm_gem_cma_helper.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
drm_gem.c Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-11-10 09:33:06 -08:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c drm: Fix treatment of drm_vblank_offdelay in drm_vblank_on() (v2) 2016-03-03 15:07:23 -08:00
drm_legacy.h
drm_lock.c signals: kill block_all_signals() and unblock_all_signals() 2015-11-06 17:50:42 -08:00
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_modes.c drm: add missing drm_mode_set_crtcinfo call 2016-07-27 09:47:35 -07:00
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: Don't overwrite UNVERFIED mode status to OK 2015-12-15 11:00:10 +10:00
drm_rect.c
drm_scatter.c
drm_sysfs.c
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig
Makefile