summaryrefslogtreecommitdiff
path: root/src/radeon_dri3.c
AgeCommit message (Collapse)Author
2019-05-09dri3: Always flush glamor before sharing pixmap storage with clientsMichel Dänzer
Even if glamor_gbm_bo_from_pixmap / glamor_fd_from_pixmap themselves don't trigger any drawing, there could already be unflushed drawing to the pixmap whose storage we share with a client. (Ported from amdgpu commit 4b17533fcb30842caf0035ba593b7d986520cc85) Acked-by: Alex Deucher <alexander.deucher@amd.com>
2019-01-28dri3: Flush if necessary in dri3_fd_from_pixmapMichel Dänzer
To make sure the client can't use the shared pixmap storage for direct rendering first, which could produce garbage. Bugzilla: https://bugs.freedesktop.org/109235 (Ported from amdgpu commit d168532ee739f7e33a2798051e64ba445dd3859f)
2018-10-15dri3: Handle radeon_get_pixmap_bo returning NULLMichel Dänzer
We were trying to already, but testing the wrong pointer. Fixes: b85b7b11f5b5 "Add struct radeon_buffer" Bug: https://bugs.debian.org/910846 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-08-02glamor: Set RADEON_CREATE_PIXMAP_DRI2 for DRI3 pixmapsMichel Dänzer
Not doing this resulted in falling back to software for DRI3 client presentation operations with ShadowPrimary. (Ported from amdgpu commit 2989d40ef74d9966e8e8df2ef7727b2cc48d4960) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-07-09glamor: Use GBM for BO allocation when possibleMichel Dänzer
Inspired by amdgpu. This avoids various issues due to a GEM handle lifetime conflict between us and Mesa with current glamor. Bugzilla: https://bugs.freedesktop.org/105381 Tested-by: Konstantin Kharlamov <hi-angel@yandex.ru> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2018-07-09Add struct radeon_bufferMichel Dänzer
Inspired by amdgpu, preparation for the following change. For now, this is mostly a wrapper around struct radeon_bo, no functional change intended. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2017-06-30Use pRADEONEnt->fd exclusively for the DRM file descriptorMichel Dänzer
This brings us closer to amdgpu. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-12-19Use render node for DRI3 if availableJammy Zhou
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> (ported from amdgpu commit ea558e645786b08d75307716036045170e97b43e) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [ Second attempt, let's see if there's any fallout this time... ]
2016-04-11dri3: Return NULL from radeon_dri3_pixmap_from_fd if calloc fails.Tom St Denis
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-03-28DRI3: Refuse to open DRM file descriptor for ssh clients (v2)Michel Dänzer
Fixes hangs when attempting to use DRI3 on display connections forwarded via SSH. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261 v2: Don't do this for Xorg > 1.18.99.1 since the corresponding xserver change has landed in Git master. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
2016-03-25Revert "Use render node for DRI3 if available"Michel Dänzer
This reverts commit cd94248ffa7d8fe0b57476f79e7e860dee66d1b0. It broke VDPAU<->GL interop with DRI3 enabled, because the Gallium VDPAU code doesn't support DRI3 yet. We can consider re-enabling this once there is a Mesa release where the Gallium VDPAU code supports DRI3. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94675 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-16Use render node for DRI3 if availableJammy Zhou
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> (ported from amdgpu commit ea558e645786b08d75307716036045170e97b43e) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-03glamor: Add Option "ShadowPrimary" v2Michel Dänzer
When this option is enabled, most pixmaps (including the screen pixmap) are allocated in system RAM and mostly accessed by the CPU. Changed areas of the screen pixmap are copied to dedicated per-CRTC scanout pixmaps regularly, triggered by the vblank interrupt. v2: * Set region data pointer to NULL for keeping only the extents * Move pRegion and pBox local variable declarations closer to their uses in drmmode_set_mode_major()
2015-03-25glamor: Avoid generating GEM flink names for BOs shared via DRI3 v2Michel Dänzer
We can't create our own struct radeon_bo representation in this case because destroying that would make the GEM handle inaccessible to glamor as well. So just get the handle directly via dma-buf. v2: Close dma-buf file descriptor, pointed out by Axel Davy. Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-18dri3: Use screen->CreatePixmap instead of fbCreatePixmap directlyMichel Dänzer
Fixes crash with EXA reported by "marvin24" on IRC.
2015-03-18DRI3: Use open hook instead of open_clientMichel Dänzer
We don't need the client pointer, and this allows it to work with older versions of xserver as well.
2015-03-17Simplify includes in radeon_{dri3,present}.cMichel Dänzer
Just include radeon.h first. Fixes build failures against older versions of xserver because compat-api.h wasn't getting picked up. Reported by "Pali" on IRC.
2015-03-17Add DRI3 support v2Michel Dänzer
Must be enabled with Option "DRI3" in xorg.conf. v2: Adapt to v2 of patches 11/12. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>