linux/drivers/gpu/drm
Matt Roper 3968be946a drm: Make integer overflow checking cover universal cursor updates (v2)
Our legacy SetPlane updates perform integer overflow checking on a
plane's destination rectangle in drm_mode_setplane(), and atomic updates
handled as part of a drm_atomic_state transaction do the same checking
in drm_atomic_plane_check().  However legacy cursor updates that get
routed through universal plane interfaces may bypass this overflow
checking if the driver's .update_plane is serviced by the transitional
plane helpers rather than the full atomic plane helpers.

Move the check for destination rectangle integer overflow from the
drm_mode_setplane() to __setplane_internal() so that it also covers
cursor operations.

This fixes an issue first noticed with i915 commit:

        commit ff42e093e9
        Author: Daniel Vetter <daniel.vetter@ffwll.ch>
        Date:   Mon Mar 2 16:35:20 2015 +0100

            Revert "drm/i915: Switch planes from transitional helpers to full
            atomic helpers"

The above revert switched us from full atomic helpers back to the
transitional helpers, and in doing so we lost the overflow checking here
for universal cursor updates.  Even though such extreme cursor positions
are unlikely to actually happen in the wild, we still don't want there
to be a change of behavior when drivers switch from transitional helpers
to full helpers.

v2: Move check from setplane ioctl to setplane_internal rather than
    adding an additional copy of the checks to the transitional plane
    helpers.  (Daniel)

Cc: Daniel Vetter <daniel@ffwll.ch>
Testcase: igt/kms_cursor_crc
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84269
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2015-04-14 09:07:46 +02:00
..
amd Merge tag 'drm-intel-next-2015-03-27-merge' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-04-01 08:21:46 +10:00
armada drm/armada: constify struct drm_encoder_helper_funcs pointer 2015-04-13 15:00:13 +02:00
ast drm/fb-helper: Propagate errors from initial config failure 2015-01-21 14:57:03 +01:00
atmel-hlcdc drm: atmel-hlcdc: use appropriate enabled flag in suspend/resume 2015-03-16 16:10:42 +01:00
bochs drm/bochs: disable video before changing video mode 2015-04-01 08:28:15 +10:00
bridge drm/bridge: dw-hdmi: Adapt to bridge API change 2015-01-28 10:01:30 +01:00
cirrus Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2015-02-16 15:48:00 -08:00
exynos drm/exynos: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:40 +02:00
gma500 drm/gma500: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
i2c drm: adv7511: Refactor power management 2015-03-19 12:28:55 +02:00
i810
i915 Linux 4.0-rc6 2015-03-30 16:37:08 +02:00
imx DRM: i.MX: parallel display: Support probe deferral for finding DRM panel 2015-02-23 17:19:25 +01:00
mga
mgag200 drm/mgag200: constify all struct drm_*_helper funcs pointers 2015-04-07 17:06:41 +02:00
msm Linux 4.0-rc3 2015-03-09 19:58:30 +10:00
nouveau drm/nouveau: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:24 +02:00
omapdrm drm/fb-helper: Propagate errors from initial config failure 2015-01-21 14:57:03 +01:00
panel drm: panel/simple: add backlight dependency 2015-01-31 10:11:45 +10:00
qxl drm/qxl: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:24 +02:00
r128
radeon drm/radeon: constify more struct drm_*_helper funcs pointers 2015-04-13 15:00:12 +02:00
rcar-du drm: rcar-du: Enable the atomic updates API 2015-03-19 12:00:22 +02:00
rockchip Merge branch 'drm_next' of https://github.com/markyzq/kernel-drm-rockchip into drm-next 2015-03-19 14:05:53 +10:00
savage
shmobile drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS 2015-02-03 11:12:37 +10:00
sis
sti drm: sti: convert driver to atomic modeset 2015-03-19 13:35:16 +01:00
tdfx
tegra Linux 4.0-rc3 2015-03-09 19:58:30 +10:00
tilcdc drm: Kconfig: Let all DRM_GEM_CMA_HELPER related macros depend on HAVE_DMA_ATTRS 2015-02-03 11:12:37 +10:00
ttm drm/ttm: device address space != CPU address space 2015-03-05 09:04:39 +10:00
udl drm/udl: properly set active_16 flag in udl_crtc_page_flip(). (v2) 2015-01-31 10:12:23 +10:00
vgem drm/vgem: implement virtual GEM 2015-04-02 09:21:48 +10:00
via
vmwgfx Merge tag 'topic/drm-misc-2015-03-31' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-04-01 08:23:25 +10:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros 2015-04-11 18:50:22 +02:00
drm_atomic.c drm/atomic: Add for_each_{connector,crtc,plane}_in_state helper macros 2015-04-11 18:50:22 +02:00
drm_auth.c
drm_bridge.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_crtc_internal.h drm/atomic: Hide drm.ko internal interfaces 2015-01-05 13:55:30 +01:00
drm_crtc.c drm: Make integer overflow checking cover universal cursor updates (v2) 2015-04-14 09:07:46 +02:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c drm/dp: Print the number of bytes processed for aux nacks 2015-03-23 16:22:29 +01:00
drm_dp_mst_topology.c Merge tag 'drm-intel-next-2015-03-13-merge' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-03-24 11:12:20 +10:00
drm_drv.c drm: %pF is only for function pointers 2015-03-13 10:17:38 +01:00
drm_edid_load.c
drm_edid.c
drm_encoder_slave.c
drm_fb_cma_helper.c drm/cma: use correct fb width/height 2015-03-11 22:08:07 +01:00
drm_fb_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_flip_work.c
drm_fops.c drm: Make drm_read() more robust against multithreaded races 2015-01-21 14:57:03 +01:00
drm_gem_cma_helper.c
drm_gem.c
drm_global.c
drm_hashtab.c
drm_info.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_internal.h
drm_ioc32.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_ioctl.c drm: line wrap DRM_IOCTL_DEF* macros 2015-03-31 09:18:40 +02:00
drm_irq.c Merge tag 'drm-intel-next-2015-02-27' of git://anongit.freedesktop.org/drm-intel into drm-next 2015-03-09 19:41:15 +10:00
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c drm/mipi-dsi: Avoid potential NULL pointer dereference 2015-01-28 08:45:37 +01:00
drm_mm.c [PATCH] drm/mm: Fix support 4 GiB and larger ranges 2015-03-16 06:28:50 +10:00
drm_modes.c drm: mode: Allow NULL modes for equality check 2015-03-23 16:22:30 +01:00
drm_modeset_lock.c
drm_of.c
drm_panel.c
drm_pci.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_plane_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_platform.c
drm_prime.c
drm_probe_helper.c drm/drm: constify all struct drm_*_helper funcs pointers 2015-04-07 18:11:25 +02:00
drm_rect.c
drm_scatter.c
drm_sysfs.c drm: Lighten sysfs connector 'status' 2015-03-10 09:59:36 +01:00
drm_trace_points.c
drm_trace.h
drm_vm.c drm: Silence sparse warnings 2015-03-13 17:37:35 +01:00
drm_vma_manager.c mm: remove rest usage of VM_NONLINEAR and pte_file() 2015-02-10 14:30:31 -08:00
Kconfig drm/vgem: implement virtual GEM 2015-04-02 09:21:48 +10:00
Makefile drm/vgem: implement virtual GEM 2015-04-02 09:21:48 +10:00