aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/qxl/qxl_prime.c
AgeCommit message (Collapse)AuthorFilesLines
2020-11-09drm/gem: Use struct dma_buf_map in GEM vmap ops and convert GEM backendsThomas Zimmermann1-6/+6
This patch replaces the vmap/vunmap's use of raw pointers in GEM object functions with instances of struct dma_buf_map. GEM backends are converted as well. For most of them, this simply changes the returned type. TTM-based drivers now return information about the location of the memory, either system or I/O memory. GEM VRAM helpers and qxl now use ttm_bo_vmap() et al. Amdgpu, nouveau and radeon use drm_gem_ttm_vmap() et al instead of implementing their own vmap callbacks. v7: * init QXL cursor to mapped BO buffer (kernel test robot) v5: * update vkms after switch to shmem v4: * use ttm_bo_vmap(), drm_gem_ttm_vmap(), et al. (Daniel, Christian) * fix a trailing { in drm_gem_vmap() * remove several empty functions instead of converting them (Daniel) * comment uses of raw pointers with a TODO (Daniel) * TODO list: convert more helpers to use struct dma_buf_map Signed-off-by: Thomas Zimmermann <[email protected]> Acked-by: Christian König <[email protected]> Tested-by: Sam Ravnborg <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-05-27drm/qxl: drop WARN_ONCE()Gerd Hoffmann1-1/+0
There is no good reason to flood the kernel log with a WARN stacktrace just because someone tried to mmap a prime buffer. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-04-30Revert "drm/qxl: drop prime import/export callbacks"Gerd Hoffmann1-0/+12
This reverts commit f4c34b1e2a37d5676180901fa6ff188bcb6371f8. Simliar to commit a0cecc23cfcb Revert "drm/virtio: drop prime import/export callbacks". We have to do the same with qxl, for the same reasons (it breaks DRI3). Drop the WARN_ON_ONCE(). Fixes: f4c34b1e2a37d5676 ("drm/qxl: drop prime import/export callbacks") Signed-off-by: Gerd Hoffmann <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Acked-by: Daniel Vetter <[email protected]>
2019-02-18Merge v5.0-rc7 into drm-nextDave Airlie1-14/+0
Backmerging for nouveau and imx that needed some fixes for next pulls. Signed-off-by: Dave Airlie <[email protected]>
2019-01-28drm/qxl: implement qxl_gem_prime_(un)pinGerd Hoffmann1-3/+7
Signed-off-by: Gerd Hoffmann <[email protected]> Acked-by: Noralf Trønnes <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-28drm/qxl: implement prime kmap/kunmapGerd Hoffmann1-4/+13
Generic fbdev emulation needs this. Also: We must keep track of the number of mappings now, so we don't unmap early in case two users want a kmap of the same bo. Add a sanity check to destroy callback to make sure kmap/kunmap is balanced. Signed-off-by: Gerd Hoffmann <[email protected]> Acked-by: Noralf Trønnes <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-01-14drm/qxl: drop prime import/export callbacksGerd Hoffmann1-14/+0
Also set prime_handle_to_fd and prime_fd_to_handle to NULL, so drm will not advertive DRM_PRIME_CAP_{IMPORT,EXPORT} to userspace. Signed-off-by: Gerd Hoffmann <[email protected]> Reviewed-by: Dave Airlie <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
2018-10-30drm/qxl: Remove exceding whitelineShayenne da Luz Moura1-1/+0
Remove extra whiteline to clean the checkpatch.pl check: CHECK: Please don't use multiple blank lines Signed-off-by: Shayenne da Luz Moura <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/5b95e1d4d515d02d01b829ddc5b3ca80af29e2e2.1540579956.git.shayenneluzmoura@gmail.com Signed-off-by: Gerd Hoffmann <[email protected]>
2016-02-17drm/qxl: fix erroneous return valueAnton Protopopov1-1/+1
The qxl_gem_prime_mmap() function returns ENOSYS instead of -ENOSYS Signed-off-by: Anton Protopopov <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
2014-09-30drm: Pass dma-buf as argument to gem_prime_import_sg_tableMaarten Lankhorst1-1/+1
Allows importing dma_reservation_objects from a dma-buf. Signed-off-by: Maarten Lankhorst <[email protected]>
2014-09-03drm/qxl: enables gem prime helpers for qxl using dummy driver callbacksAndreas Pokorny1-0/+72
As there should not be any other virtual device that might share buffers, the callbacks remain empty stubs. Still prime can be used to transfer buffers between processes that use qxl. Signed-off-by: Andreas Pokorny <[email protected]> Signed-off-by: Dave Airlie <[email protected]>