AgeCommit message (Collapse)AuthorFilesLines
2016-09-16Bump version for 1.1.2 releasexf86-video-amdgpu- Dänzer1-1/+1
2016-09-16Fix handling of configure option --with-xorg-conf-dirMichel Dänzer1-3/+4
There were two problems: I accidentally changed the variable name in the AC_ARG_WITH stanza from configdir to xorgconfigdir, so specifying --with-xorg-conf-dir wouldn't work correctly. Fix this back to configdir. If neither --with-xorg-conf-dir nor --prefix is specified on the command line, the $prefix variable doesn't contain "/usr/local" (the default prefix) yet at this point but "NONE". So make install would attempt to install 10-amdgpu.conf in ${DESTDIR}NONE/share/X11/xorg.conf.d/ . Fix this by leaving ${prefix} verbatim in the default value, to be resolved by make. Also print the configdir value along with the values of other similar configuration variables. Reported-by: Timo Aaltonen <> Reviewed-by: Julien Cristau <> (Cherry picked from commit aa8a3fa2468094cd37959179e8417ba7ba0a326c)
2016-09-15Bump version for the 1.1.1 releasexf86-video-amdgpu-1.1.1Michel Dänzer1-1/+1
2016-09-15Use --with-xorg-conf-dir=$prefix/share/X11/xorg.conf.d by defaultMichel Dänzer1-3/+3
We were using the result of `pkg-config --variable=sysconfigdir xorg-server` before, which may not be inside $prefix, so make install might fail for 10-amdgpu.conf . Fixes make distcheck in that case, and possibly also 10-amdgpu.conf seemingly missing from some distribution packages. This matches what some (though not all) input drivers are doing for their xorg.conf.d snippets. (Cherry picked from commit cd3acb75718dfd42dd25d58b4e7bd4db27b659d8)
2016-09-14Fix cursor size for SIMarek Olšák1-2/+8
Reviewed-by: Michel Dänzer <> Acked-by: Edward O'Callaghan <> (Cherry picked from commit c4364520691d18961f0a6b77071baeeffaa80a11)
2016-09-14Add SI PCI IDsRonie Salgado8-1/+444
Reviewed-by: Michel Dänzer <> (Cherry picked from commit 2eb5d77b841e55e7328df4b95c0d41fec30ce10f)
2016-09-14Add missing Kaveri PCI ID (1318)Michel Dänzer6-0/+6
Found by comparing src/pcidb/ati_pciids.csv with xf86-video-ati. Reviewed-by: Alex Deucher <> (Cherry picked from commit 7d050d15d49ef25e86e7abe88dafb52370715640)
2016-09-14Add Mullins PCI IDsMichel Dänzer7-0/+97
Bugzilla: Reviewed-by: Alex Deucher <> (Cherry picked from commit aa5492660958e359bdc2107cba9a211ff988c90e)
2016-09-14DRI2: Fix amdgpu_dri2_exchange_buffers width/height copy'n'paste errorQiang Yu1-1/+1
Signed-off-by: Qiang Yu <> Reviewed-by: Alex Deucher <> Reviewed-by: Michel Dänzer <> (Cherry picked from commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)
2016-09-14DRI2: Add interpolated_vblanks in amdgpu_dri2_get_crtc_mscMichel Dänzer1-2/+6
We need that in amdgpu_dri2_drawable_crtc as well for priv->vblank_delta to work as intended. amdgpu_dri2_get_msc was already doing this. Fixes hangs in some cases when using VDPAU via DRI2 and moving the window between CRTCs. Reviewed-by: Alex Deucher <> (Cherry picked from commit abd1a7901c95e4bc78415cf1b7923623b9177152)
2016-09-14Only use RandR APIs if RandR is enabledMichel Dänzer2-10/+13
Fixes crash with Xinerama enabled, which disables RandR. Fixes: (Ported from radeon commit 3be841d0ae7d505cef325993205b12d15e98dba9) Reviewed-by: Alex Deucher <> (Cherry picked from commit b5e2b964b7884c205a7c0fa578e05e867c176fcc)
2016-09-14Destroy 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. Reviewed-by: Alex Deucher <> (Cherry picked from commit d96dabc71b1b32dc4b422a9633cdd4e0e95da052)
2016-09-14glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIMEMichel Dänzer1-0/+21
Fixes corruption when using DRI2 PRIME render offloading with the master screen using this driver. Reported-by: Qiang Yu <> Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (Cherry picked from commit 0007c2f018ba663303d91d847e7c085269a23062)
2016-09-14Move DRI2's local fixup_glamor helper to amdgpu_glamor_set_pixmap_bo v2Michel Dänzer3-50/+53
So it can be used outside of the DRI2 code. v2: Keep pixmap refcnt increment in amdgpu_dri2_create_buffer2 (Qiang Yu) Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (v1) (Cherry picked from commit 5518bf5d793439b5bab369e5fc18de9a4a3b9dd6)
2016-09-14Consolidate get_drawable_pixmap helperMichel Dänzer3-27/+16
There were two static helpers for the same purpose. Consolidate them into a single inline helper which can be used anywhere. Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (Cherry picked from commit 641f4647b7f51dfd2da330376cd10fa9702b6423)
2016-09-14Add amdgpu_pixmap_get_tiling_infoMichel Dänzer3-1/+36
Retrieves the tiling information about a pixmap BO from the kernel driver. Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (Cherry picked from commit 8e40f190e4704c2802bf0f073f17e742786d0f18)
2016-09-14Remove amdgpu_share_pixmap_backingMichel Dänzer2-17/+0
Not used anymore. Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (Cherry picked from commit e7eeb6ad1133b6023d34b4489959ae330a8e15dd)
2016-09-14glamor: Fix amdgpu_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 <> Reviewed-by: Alex Deucher <> Tested-by: Qiang Yu <> (Cherry picked from commit b36c77695ba77b59a0ccd868454e3af4fc04d5ff)
2016-09-14add missing bonaire pci idAlex Deucher6-0/+6
Signed-off-by: Alex Deucher <> (Cherry picked from commit 60ced5026ebc34d9f32c7618430b6a7ef7c8eb4b)
2016-09-14Add more Polaris 11 PCI IDsFlora Cui6-12/+30
Signed-off-by: Flora Cui <> Reviewed-by: Christian König <> Signed-off-by: Alex Deucher <> (Cherry picked from commit 8e89448ee00da16e05e6777f34bb75d2dd6f7025)
2016-09-14Add more Polaris 10 PCI IDsFlora Cui6-0/+54
Signed-off-by: Flora Cui <> Reviewed-by: Alex Deucher <> Reviewed-by: Michel Dänzer <> Signed-off-by: Alex Deucher <> (Cherry picked from commit a59b23d64285741a7a25e314343f6261046d980f)
2016-09-14Fix amdgpu_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 <> Reviewed-by: Michel Dänzer <> (Cherry picked from commit 978242977e5dc905e1d5a46b1b0d34b356c7af26)
2016-09-14Handle Zaphod mode correctly in amdgpu_mode_hotplugMichel Dänzer1-10/+34
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: (Ported from radeon commit c801f9f10a5d72d935faf21e72f7e7808fb4f05f) Reviewed-by: Alex Deucher <> (Cherry picked from commit 14606e127f4b6eb0b00fd42cec13d524a67e4c4a)
2016-09-14add strato pci idFlora Cui6-0/+6
Signed-off-by: Flora Cui <> Reviewed-by: Jammy Zhou <> (Cherry picked from commit 4822ec7a23d2253c88bc403f17abb6d7a053528c)
2016-09-14Remove RR_Capability_SinkOutput for GPU without CRTC.Qiang Yu1-4/+7
Signed-off-by: Qiang Yu <> Reviewed-by: Alex Deucher <> Reviewed-by: Michel Dänzer <> (Cherry picked from commit a0bbb373f902e0ffc14570c85faec7e44134f62e)
2016-04-07Bump version for 1.1.0 releasexf86-video-amdgpu-1.1.0Michel Dänzer1-1/+1
2016-04-04glamor: Force GPU rendering to/from pixmaps created via DRI3Michel Dänzer2-6/+11
Fixes crash when running DRI3 clients with ShadowPrimary enabled. Bugzilla: Reviewed-by: Alex Deucher <>
2016-04-04Update manpage entry for Option "TearFree"Michel Dänzer1-3/+4
It's now effective for rotation as well. Reviewed-by: Alex Deucher <>
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. (Ported from radeon commit 4693b1bd5b5c381e8b7b68a6f7f0c6696d6a68df) Reviewed-by: Alex Deucher <>
2016-03-30DRI3: Refuse to open DRM file descriptor for ssh clientsMichel Dänzer1-1/+38
Fixes hangs when attempting to use DRI3 on display connections forwarded via SSH. Don't do this for Xorg > since the corresponding xserver change has landed in Git master. Bugzilla: (Ported from radeon commit 0b3aac1de9db42bfca545fa331e4985836682ec7) Reviewed-by: Alex Deucher <>
2016-03-25Revert "Use render node for DRI3 if available"Michel Dänzer3-36/+4
This reverts commit ea558e645786b08d75307716036045170e97b43e. 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: Reviewed-by: Alex Deucher <>
2016-03-24add polaris10 pci idFlora Cui6-0/+12
Reviewed-by: Michel Dänzer <> Signed-off-by: Flora Cui <> Reviewed-by: Jammy Zhou <>
2016-03-24add polaris11 pci idFlora Cui6-0/+36
Reviewed-by: Michel Dänzer <> Signed-off-by: Flora Cui <> Reviewed-By: Jammy Zhou <> Reviewed-by: Alex Deucher <>
2016-03-24add Polaris chip familiesAlex Deucher1-0/+2
Reviewed-by: Michel Dänzer <> Signed-off-by: Alex Deucher <>
2016-03-25Require xserver 1.9 or newerMichel Dänzer6-37/+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. (Ported from radeon commit e592f32f8b5f5873fcc18b10a69dd5e4ccf11073) Reviewed-by: Alex Deucher <>
2016-03-25Fix build against older versions of xserverMichel Dänzer3-9/+31
Also slightly clean up the error handling in amdgpu_scanout_do_update. Bugzilla: (Ported from radeon commit bde466e5d44cad64b4e4eceaa5de80fdbf86356e) Reviewed-by: Alex Deucher <>
2016-03-25DRI3 only works with accelerationMichel Dänzer1-6/+9
Bugzilla: (Ported from radeon commit d21ac4669a8b2cdd4eec5e5a94d1950b7423b8b5) Reviewed-by: Alex Deucher <>
2016-03-25Check 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. (Ported from radeon commit d670c5c9851b4eff21c845d26c7d7e4eb5ee0fa9) Reviewed-by: Alex Deucher <>
2016-03-25Don't try DRI2/Present flipping while the HW cursor can't be usedMichel Dänzer5-3/+29
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. (Ported from radeon commit 7f3d0780ca65a90117c2a61362dbc0899bd9c0b0) Reviewed-by: Alex Deucher <>
2016-03-24Factor out HW cursor checking code into drmmode_can_use_hw_cursorMichel Dänzer1-10/+29
And add a check for RandR 1.4 multihead. (Ported from radeon commit 3de480e83c0a1824838d662d6d67c9fe85277298) Reviewed-by: Alex Deucher <>
2016-03-24Call AMDGPUBlockHandler_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. Reviewed-by: Alex Deucher <>
2016-03-23present: Return rotated CRTCs from amdgpu_present_get_crtcMichel Dänzer1-2/+1
Sync-to-vblank works fine with rotation. We're still checking for rotation in amdgpu_present_check_flip. Returning NULL from here resulted in the xserver present code falling back to the fake CRTC running at 1 fps. (Ported from radeon commit a03271de5ecdaa7790d1316e993c4450b91fe936) Reviewed-by: Alex Deucher <>
2016-03-23present: Clear drmmode->fb_id before calling set_mode_major for unflipMichel Dänzer1-0/+7
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. (Ported from radeon commit 40191d82370eb7e58bd34c44966cbf44c3703229) Reviewed-by: Alex Deucher <>
2016-03-23Make Option "TearFree" effective for rotated/reflected outputs as wellMichel Dänzer2-41/+219
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. (Ported from radeon commit 798c4fd16d339b1ad5fd729cc884be084c60e38b) Reviewed-by: Alex Deucher <>
2016-03-23Consolidate 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. (Ported from radeon commit eb611a2e4ecce7a1ab85fd72b9b78e3269311dd5) Reviewed-by: Alex Deucher <>
2016-03-23Remove check for XF86_CRTC_VERSION 3Michel Dänzer1-4/+1
We require xserver >= 1.8, which was already at version 3. (Ported from radeon commit 06602171386e538081c298645fb7ca1a70fe80cc) Reviewed-by: Alex Deucher <>
2016-03-23Deal with modesets and page flips crossing on a CRTCMichel Dänzer3-0/+17
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. (Ported from radeon commit a88985f5d1e39caca49ceb65678aaa9cb622a0d2) Reviewed-by: Alex Deucher <>
2016-03-23Make DRM event queue xf86CrtcPtr based instead of ScrnInfoPtr basedMichel Dänzer8-111/+86
This allows for a minor simplification of the code. (Ported from radeon commit f5d968cbba3c9b7ec202161f2157d8d64778c817) Reviewed-by: Alex Deucher <>
2016-03-23Remove amdgpu_scanout_flip_handlerMichel Dänzer1-8/+1
No longer necessary now that amdgpu_drm_queue_handler can handle e->handler == NULL. (Ported from radeon commit d5dbb07db22d5420c81dfebc060f0dd86e7b8a20) Reviewed-by: Alex Deucher <>
2016-03-23DRI2: 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. (Ported from radeon commit e87365117acbd80b7d80fbb5eb30890ef7153291) Reviewed-by: Alex Deucher <>