summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-15Bump version for 7.7.1 releasexf86-video-ati-7.7.17.7Michel Dänzer1-1/+1
2016-09-15DRI2: Fix radeon_dri2_exchange_buffers width/height copy'n'paste errorQiang Yu1-1/+1
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> (Ported from amdgpu commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 12d30eeb9711bd2b1609d6bbb74c4a1760596f72)
2016-09-15DRI2: Add interpolated_vblanks in radeon_dri2_get_crtc_mscMichel Dänzer1-2/+6
We need that in radeon_dri2_drawable_crtc as well for priv->vblank_delta to work as intended. radeon_dri2_get_msc was already doing this. Fixes hangs in some cases when using VDPAU via DRI2 and moving the window between CRTCs. (Ported from amdgpu commit abd1a7901c95e4bc78415cf1b7923623b9177152) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 11cc6843aa3b745aa1361f1a65e465e16696b914)
2016-09-15Destroy all dedicated scanout buffers during CloseScreenMichel Dänzer1-0/+10
Fixes leaking active scanout buffers across a server reset, which also fixes server reset with glamor and active scanout buffers. (Ported from amdgpu commit d96dabc71b1b32dc4b422a9633cdd4e0e95da052) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 4a5fa37f74c233c6b9c6a08306688628a8e216e8)
2016-09-15glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIMEMichel Dänzer1-0/+20
Fixes corruption when using DRI2 PRIME render offloading with the master screen using this driver. (Ported from amdgpu commit 0007c2f018ba663303d91d847e7c085269a23062) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit cc2555835cd4c5fd2ae4f999a4bf7c18cdb1dda4)
2016-09-15Move DRI2's local fixup_glamor helper to radeon_glamor_set_pixmap_boMichel Dänzer3-56/+53
So it can be used outside of the DRI2 code. (Ported from amdgpu commit 5518bf5d793439b5bab369e5fc18de9a4a3b9dd6) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit b3e5259e60157fdbdf46ee59b1b78995c2b15f72)
2016-09-15Consolidate get_drawable_pixmap helperMichel Dänzer3-27/+17
There were two static helpers for the same purpose. Consolidate them into a single inline helper which can be used anywhere. (Ported from amdgpu commit 641f4647b7f51dfd2da330376cd10fa9702b6423) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 38632bbd5ff80a9cf8ce584b2bc499d17d15befe)
2016-09-15glamor: Fix radeon_glamor_share_pixmap_backing for priv->bo == NULLMichel Dänzer1-3/+8
Fixes crash when running a compositor and DRI_PRIME client via DRI2. Reported-by: Qiang Yu <qiang.yu@amd.com> (Ported from amdgpu commit b36c77695ba77b59a0ccd868454e3af4fc04d5ff) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit e91858e435672c32f9c4a854b3dec048199d6f7f)
2016-09-15Also handle disabled CRTCs in drmmode_clear_pending_flipMichel Dänzer1-3/+5
If disabling a CRTC had to be deferred due to a pending flip in drmmode_crtc_dpms, there may no longer be any outputs associated with the CRTC when we get here. So we have to check for !crtc->enabled and call drmmode_crtc_dpms in that case as well. Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 4bd2d01552f18153afa03a8947b22eebf3d67c6b)
2016-09-15Don't override crtc parameter value in drmmode_flip_handler/abortMichel Dänzer1-7/+10
When overriding the crtc parameter value of the last pending CRTC, drmmode_clear_pending_flip would work on the wrong CRTC, and the last pending CRTC's flip_pending flag might never get cleared. This would prevent that CRTC from properly turning off and back on again. Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97392 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit a36fdaff40d5b4795a1400c348a80eee94892212)
2016-09-15Also call drmmode_clear_pending_flip from radeon_scanout_flip_abortMichel Dänzer3-2/+3
Not doing so could break DPMS with TearFree. Reported-and-Tested-by: furkan on IRC Fixes: 9090309e057d ("Wait for pending flips to complete before turning off an output or CRTC") Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit e520ce0ec0adf91ddce5c932d4b3f9477fd49304)
2016-09-15Wait for pending flips to complete before turning off an output or CRTCMichel Dänzer5-12/+54
At least with older kernels, the flip may never complete otherwise, which can result in us hanging in drmmode_set_mode_major. Fixes: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-ati/+bug/1577170 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 9090309e057dc703d1a5bffd88e6cae14108cfc3)
2016-09-15Don't enable micro-tiling for scanout buffers on pre-R600Michel Dänzer1-5/+6
The display engine didn't support it. Fixes display corruption with options "TearFree" and "ShadowPrimary" (and rotation or transforms with current xserver) on pre-R600. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 6d91fb4fc701895473ff675f440a8eef655e80ca)
2016-09-15Only use RandR APIs if RandR is enabledMichel Dänzer2-10/+13
Fixes crash with Xinerama enabled, which disables RandR. Fixes: https://bugs.debian.org/827984 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 3be841d0ae7d505cef325993205b12d15e98dba9)
2016-09-15Explicitly set the fbcon pixmap pitch againMichel Dänzer2-11/+15
The kernel driver returns 0 as the pitch of the fbcon BO via the DRM_RADEON_GEM_GET_TILING ioctl, so we ended up using an incorrect pitch in some cases. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94901 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 040a7b80e1fcbaa93ac17f7113d696d9b853cf8a)
2016-09-15Fix radeon_mode_hotplug crash on multi GPU platform.Qiang Yu1-1/+2
On multi GPU platform, some screen is created by other GPU DDX. Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> (Ported from amdgpu commit 978242977e5dc905e1d5a46b1b0d34b356c7af26) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit 380daff43cfefe2a8e4d496eaf65673f2815c878)
2016-09-15Handle Zaphod mode correctly in radeon_mode_hotplugMichel Dänzer1-10/+35
We need to scan both screens of the entity for existing connectors, and enumerate DVI & HDMI connectors consistently regardless of which screen they're assigned to. Fixes crash when hot-(un)plugging connectors in Zaphod mode. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93415 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit c801f9f10a5d72d935faf21e72f7e7808fb4f05f)
2016-09-15Remove RR_Capability_SinkOutput for GPU without CRTCQiang Yu1-4/+7
Signed-off-by: Qiang Yu <Qiang.Yu@amd.com> (Ported from amdgpu commit a0bbb373f902e0ffc14570c85faec7e44134f62e) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (Cherry picked from commit ba8b6288c8e6fc4be5d7144ecbe9a1f241881674)
2016-04-07Bump version for 7.7.0 releasexf86-video-ati-7.7.0Michel Dänzer1-1/+1
2016-04-04Update manpage entry for Option "TearFree"Michel Dänzer1-3/+4
It's now effective for rotation as well. (Ported from amdgpu commit faf9d720b7d650f5f1ea657a874d08eac3972e60) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-04-01Identify DRM event queue entries by sequence number instead of by pointerMichel Dänzer6-72/+84
If the memory for an entry was allocated at the same address as that for a previously cancelled entry, the handler could theoretically be called prematurely, triggered by the DRM event which was submitted for the cancelled entry. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-31Update pixmap pitch in radeon_set_pixmap_boMichel Dänzer2-11/+10
Stop second guessing it in drmmode_crtc_scanout_create. Fixes display corruption in some cases with TearFree enabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94751 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-28DRI3: Refuse to open DRM file descriptor for ssh clients (v2)Michel Dänzer1-1/+38
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änzer3-36/+4
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-03-24Call RADEONBlockHandler_KMS before setting initial modesMichel Dänzer1-2/+2
Doing it the other way around meant that there was still a possibility for the front buffer contents to be uninitialized when they start being scanned out. (Ported from amdgpu commit 4a60b4b1851a3cbc2d8ad9048d68eeb6947cf132) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-24Require xserver 1.9 or newerMichel Dänzer5-33/+1
1.9.0 was released in August 2010. We were already unintentionally relying on things not available in 1.8 for at least a year, and nobody has complained. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-24Fix build against older versions of xserverMichel Dänzer3-11/+33
Also slightly clean up the error handling in radeon_scanout_do_update. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94614 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-24Use radeon_alloc_pixmap_bo for allocating scanout BOsMichel Dänzer1-15/+9
This enables tiling for scanout BOs used for TearFree / ShadowPrimary, and simplifies the code a little. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-24DRI3 only works with accelerationMichel Dänzer1-6/+9
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94214 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-23TearFree can only work with accelerationMichel Dänzer1-4/+6
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-23Check for xf86CursorResetCursorMichel Dänzer2-0/+8
If it's available, Xorg calls it on each mode configuration change. It does what xf86_reload_cursors does (and more), so we don't need to call the latter anymore. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-23Don't try DRI2/Present flipping while the HW cursor can't be usedMichel Dänzer5-3/+28
Flipping doesn't interact correctly with SW cursor: A flip makes the SW cursor disappear. It will only appear again when the cursor is moved, but it will be surrounded by corruption, because the SW cursor code will restore stale screen contents at the old cursor location before drawing the cursor at the new location. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-23Factor out HW cursor checking code into drmmode_can_use_hw_cursorMichel Dänzer1-10/+29
And add a check for RandR 1.4 multihead. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-23Use correct tiling in drmmode_create_bo_pixmapRyan Kennedy1-3/+6
The callers were using 0 for the tiling flags, causing surfaces to be incorrectly treated as linear. This issue was causing corruption on Cayman just after login with GNOME3. The kernel was rejecting the cs in drmmode_copy_fb due to invalid texture pitch. Signed-off-by: Ryan Kennedy <Ryan.Kennedy@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2016-03-10present: Return rotated CRTCs from radeon_present_get_crtcMichel Dänzer1-2/+1
Sync-to-vblank works fine with rotation. We're still checking for rotation in radeon_present_check_flip. Returning NULL from here resulted in the xserver present code falling back to the fake CRTC running at 1 fps. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-09present: Clear drmmode->fb_id before calling set_mode_major for unflipMichel Dänzer1-0/+6
Without this, drmmode_set_mode_major may just re-set the FB for the last flipped BO, in which case the display will probably freeze. Reproduction recipe: Enable rotation while a fullscreen client is flipping. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-09Make Option "TearFree" effective for rotated/reflected outputs as well (v2)Michel Dänzer2-41/+214
Support varies by xserver version: < 1.12: No support for the driver handling rotation/reflection 1.12-1.15: Support for driver handling rotation/reflection, but there's a bug preventing the HW cursor from being visible everywhere it should be on rotated outputs, so we can only support TearFree for reflection. >= 1.16: While the bug above is still there (fixes pending review), the driver can force SW cursor for rotated outputs, so we can support TearFree for rotation as well. v2: Don't set crtc->driverIsPerformingTransform after xf86CrtcRotate if it wasn't set before. Fixes breaking rotation with TearFree disabled. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
2016-03-09Consolidate pScreen usage in drmmode_set_mode_majorMichel Dänzer1-7/+5
We were already relying on pScrn->pScreen being non-NULL in some cases, which is supposedly always true ever since this function is no longer getting called from ScreenInit. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-08Remove check for XF86_CRTC_VERSION 3Michel Dänzer1-4/+2
We require xserver >= 1.8, which was already at version 3. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-03-01Deal with modesets and page flips crossing on a CRTCMichel Dänzer3-1/+20
If we set a mode while a flip is pending, the kernel driver may program the flip to the hardware after the modeset. If that happens, the hardware will display the BO from the flip, whereas we will assume it displays the BO from the modeset. In other words, the display will most likely freeze, at least until another modeset. Prevent this condition by waiting for a pending flip to finish before setting a mode. Fixes display freezing when setting rotation or a transform with TearFree enabled. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-27Make DRM event queue xf86CrtcPtr based instead of ScrnInfoPtr basedMichel Dänzer8-110/+83
This allows for a minor simplification of the code. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-27DRI2: Also clear dri2_flipping when client disconnects before eventMichel Dänzer1-2/+3
Fixes the following problem: With DRI3 enabled, run glxgears with LIBGL_DRI3_DISABLE=1, make it fullscreen and press Escape while it's still fullscreen. This could result in dri2_flipping not getting cleared, spuriously preventing apps using DRI3 from flipping. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-27Remove radeon_scanout_flip_handlerMichel Dänzer1-8/+1
No longer necessary now that radeon_drm_queue_handler can handle e->handler == NULL. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-25drm_queue: Don't abort events immediately from radeon_drm_abort_clientMichel Dänzer1-5/+13
Keep them around until the DRM event arrives, but then call the abort functions instead of the handler functions. This is a prerequisite for the following fix. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-17glamor: Return NullPixmap on failure to create shareable pixmapjimqu1-1/+3
If we were asked to create a shareable pixmap, it doesn't make sense to return a pixmap which isn't shareable. Doing so caused trouble down the line such as a crash with older versions of glamor when trying to use GLX pixmaps of bpp < 32 via DRI2. Signed-off-by: JimQu <jim.qu@amd.com> (ported from amdgpu commit 2fcb7dadd3c71cd405cbbaafc777697538ca9c29) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-17Move radeon_glamor_destroy_pixmap before radeon_glamor_create_pixmapjimqu1-35/+35
The next commit will call the former from the latter. No functional change. Signed-off-by: JimQu <jim.qu@amd.com> (ported from amdgpu commit 5269a2228bff6023c1a7f3e8534027e1d7addc25) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-17Remove pci_dev test from radeon_get_scrninfoMichel Dänzer1-4/+1
The pci_dev parameter can never be NULL since we only support KMS. Reported-by: Tom St Denis <tom.stdenis@amd.com> (ported from amdgpu commit 6e42c58375a4c3229da93c27bbd104af145c6163) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-17Initialize drmmode_crtc dpms_mode to DPMSModeOffMykola Lysenko1-0/+1
This disables query of disabled pipes for drmWaitVBlank on X start Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com> (ported from amdgpu commit 4eb9cedca080b30c57ded349a397620ee7d0cd46) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-17sync: Check if miSyncShmScreenInit symbol is resolved at runtimeMichel Dänzer1-0/+7
It may be disabled in the Xorg build, either explicitly or because the xshmfence library isn't available. (ported from amdgpu commit 1d0b0c1794e65e581a48aa9fb19679d928d82a5d) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2016-02-16Use render node for DRI3 if availableJammy Zhou3-4/+36
Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> (ported from amdgpu commit ea558e645786b08d75307716036045170e97b43e) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>