linux_dsm_epyc7002/drivers/gpu/drm
Michał Winiarski 934acce3c0 drm/i915: Avoid writing relocs with addresses in non-canonical form
According to PRM, some parts of HW require the addresses to be in
a canonical form, where bits [63:48] == [47]. Let's convert addresses to
canonical form prior to relocating and return converted offsets to
userspace. We also need to make sure that userspace is using addresses
in canonical form in case of softpin.

v2: Whitespace fixup, gen8_canonical_addr description (Chris, Ville)
v3: Rebase on top of softpin, fix a hole in relocate_entry,
    s/expect/require (Chris)
v4: Handle softpin in validate_exec_list (Chris)
v5: Convert back to canonical form at copy_to_user time (Chris)
v6: Don't use struct exec_object2 in place of exec_object
v7: Use sign_extend64 for converting to canonical form (Joonas),
    reject non-canonical and non-page-aligned offset for softpin (Chris)
v8: Convert back to non-canonical form in a function,
    split the test for EXEC_OBJECT_PINNED (Chris)
v9: s/canonial/canonical, drop accidental double newline (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1451409892-13708-1-git-send-email-michal.winiarski@intel.com
Testcase: igt/gem_bad_reloc/negative-reloc-blt
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92699
Cc: drm-intel-fixes@lists.freedesktop.org
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
2016-01-05 11:00:42 +01:00
..
amd Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
armada drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
ast drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
atmel-hlcdc drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
bochs drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
bridge drm/panel: Changes for v4.4-rc1 2015-11-05 11:07:13 +10:00
cirrus drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
exynos drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
fsl-dcu
gma500 drm/gma500: Add driver private mutex for the fault handler 2015-12-01 10:05:11 +01:00
i2c
i810
i915 drm/i915: Avoid writing relocs with addresses in non-canonical form 2016-01-05 11:00:42 +01:00
imx Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
mga
mgag200 drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
msm drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
nouveau Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
omapdrm drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
panel spi: Drop owner assignment from spi_drivers 2015-10-28 10:30:17 +09:00
qxl drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
r128
radeon Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
rcar-du drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
rockchip Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
savage
shmobile drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
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 drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
tilcdc drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
ttm
udl drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
vc4 drm/vc4: Make sure that planes aren't scaled. 2015-11-17 12:27:03 -08:00
vgem
via
virtio Linux 4.4-rc4 2015-12-08 11:04:26 +10:00
vmwgfx drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm/atomic-helper: Reject attempts at re-stealing encoders 2015-12-03 10:50:27 +01:00
drm_atomic.c drm: Implement drm_modeset_lock_all_ctx() 2015-12-02 23:10:59 +01:00
drm_auth.c
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc_helper.c drm/atomic-helper: Implement subsystem-level suspend/resume 2015-12-02 23:11:17 +01:00
drm_crtc_internal.h
drm_crtc.c drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
drm_debugfs.c
drm_dma.c
drm_dp_helper.c
drm_dp_mst_topology.c dp/mst: add SDP stream support 2015-12-10 10:00:42 +01: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/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference 2015-12-01 07:57:14 +01:00
drm_encoder_slave.c
drm_fb_cma_helper.c drm: Pass the user drm_mode_fb_cmd2 as const to .fb_create() 2015-11-24 11:47:38 +01:00
drm_fb_helper.c drm/core: Fix old_fb handling in pan_display_atomic. 2015-11-17 13:02:14 +02:00
drm_flip_work.c
drm_fops.c Linux 4.4-rc4 2015-12-08 11:04:26 +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 drm/gem: Update/Polish docs 2015-11-24 11:41:49 +01:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c drm/nouveau: Fix pre-nv50 pageflip events (v4) 2015-12-04 13:49:38 +10: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/edid: Make the detailed timing CEA/HDMI mode fixup accept up to 5kHz clock difference 2015-12-01 07:57:14 +01:00
drm_modeset_lock.c drm: Implement drm_modeset_lock_all_ctx() 2015-12-02 23:10:59 +01:00
drm_of.c drm: Introduce generic probe function for component based masters. 2015-10-20 12:01:29 +02:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm: Print the src/dst/clip rectangles in error in drm_plane_helper 2015-11-24 11:47:47 +01:00
drm_platform.c
drm_prime.c
drm_probe_helper.c drm: keep connector status change logging human readable 2015-12-04 08:59:41 +01:00
drm_rect.c drm: Add "prefix" parameter to drm_rect_debug_print() 2015-11-24 11:47:46 +01:00
drm_scatter.c
drm_sysfs.c drm/sysfs: Send out uevent when connector->force changes 2015-11-24 11:49:34 +01:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig drm/vc4: Add KMS support for Raspberry Pi. 2015-10-21 10:33:12 +01:00
Makefile Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into drm-next 2015-10-22 10:31:17 +10:00