AgeCommit message (Collapse)AuthorFilesLines
2016-11-17Bump version for 1.2.0 releasexf86-video-amdgpu-1.2.0Michel Dänzer1-1/+1
2016-11-17manpage updates for the 1.2.0 releaseMichel Dänzer1-5/+3
Option "TearFree" is now effective for arbitrary transforms as well. Point to the amd-gfx mailing list instead of xorg-driver-ati.
2016-11-16Use pAMDGPUEnt to find both screens of a GPU in amdgpu_mode_hotplugMichel Dänzer3-15/+15
Fixes misbehaviour when hotplugging DisplayPort connectors on secondary GPUs. Fixes: 14606e127f4b ("Handle Zaphod mode correctly in amdgpu_mode_hotplug") Bugzilla: (Ported from radeon commit 9760ef33cba5795eddeda4d5c2fcbe2dcce21689) Reviewed-by: Alex Deucher <>
2016-11-10Refactor amdgpu_mode_hotplugMichel Dänzer1-24/+33
Preparation for the next change, no functional change intended. (Cherry picked from radeon commit 35bec4937d89b48a79acfcb4f814b7370cb631b2) Reviewed-by: Alex Deucher <>
2016-11-02Check Xorg version at runtime instead of build time in two placesMichel Dänzer3-10/+6
This means that all possible paths can be handled as intended, no matter which Xorg version the driver happened to be compiled against. (Ported from radeon commit 350a2645a1b127227ff294c0b62d20000d0fd48a) Reviewed-by: Alex Deucher <>
2016-11-02Require xserver 1.10 or newerMichel Dänzer6-23/+1
1.10.0 was released in February 2011. We've been accidentally requiring 1.10 or newer since c7d27c94cb65 ("Keep track of damage event related flushes per-client"). (Ported from radeon commit 5df36de39952c3a26cb2fbc125f298139a9dd5bc) Reviewed-by: Alex Deucher <>
2016-10-27present: Check tiling info for flipsMichel Dänzer1-0/+7
The kernel driver doesn't handle flipping between buffers with different tiling parameters correctly. Fixes display corruption with fullscreen apps using different tiling modes (e.g. due to R600_DEBUG=notiling or R600_DEBUG=no2d) via DRI3. Reviewed-by: Alex Deucher <>
2016-10-27Consume all available udev events at onceMichel Dänzer1-5/+8
We get multiple udev events for actions like docking a laptop into its station or plugging a monitor to the station. By consuming as many events as we can, we reduce the number of output re-evalutions. It depends on the timing how many events can be consumed at once. (Inspired by xserver commit 363f4273dd4aec3e26cc57ecb6c20f27e6c813d8) (Ported from radeon commit 22b5ce9548393ba2ff73ee234ecd82eeaf0ef6c4) Reviewed-by: Alex Deucher <>
2016-10-27PRIME: Fix swapping of provider sink / source capabilitiesHans de Goede1-2/+2
When a card has import capability it can be an offload _sink_, not a source and vice versa for export capability. This went unnoticed sofar because most gpus have both import and export capability. Signed-off-by: Hans de Goede <> (Ported from xserver commit 94a1c77259ce39ba59ad87615df39b570ffab435) (Ported from radeon commit 82d3c8f5500d2a6fb1495e217a0b79c396f1534c) Reviewed-by: Alex Deucher <>
2016-10-27Always call PixmapStopDirtyTracking in drmmode_set_scanout_pixmapMichel Dänzer1-13/+11
Otherwise, we may leak screen->pixmap_dirty_list entries if drmmode_set_scanout_pixmap is called repatedly with ppix != NULL, which can happen from RRReplaceScanoutPixmap. (Inspired by xserver commit b773a9c8126222e5fed2904d012fbf917a9f22fd) (Ported from radeon commit 6c940446ddadf418ee4959e46fa552b6c1cf6704) Reviewed-by: Alex Deucher <>
2016-10-26Don't rely on randr_crtc->scanout_pixmap in drmmode_set_scanout_pixmapMichel Dänzer1-4/+13
RRReplaceScanoutPixmap may set randr_crtc->scanout_pixmap = NULL before we get here. (Inspired by xserver commit f4c37eeee7953df1fe0e3196eda452acf0078e61) v2: Always return TRUE in the if (!ppix) block. (Cherry picked from radeon commit 61df12e2377cbb19a19ca9d5624df8959822da9f) Reviewed-by: Alex Deucher <>
2016-10-25Sayōnara, AM_MAINTAINER_MODE!Michel Dänzer2-3/+1
If --enable-maintainer-mode got lost from config.status for any reason, builds would fail in mysterious ways after changing between different Git commits. There are more reasons for dropping it in the automake manual: I'm not aware of any reason why --disable-maintainer-mode would ever be useful with this project. Reviewed-by: Alex Deucher <> (Cherry picked from radeon commit 49cf3b5032a7ce40afe514b7092440e3e19e05aa)
2016-10-19Order unique chipsets according to first appearance in ati_pciids.csvMichel Dänzer2-15/+20
Instead of lexically. This makes it more likely for similar generations to be close to each other in the list of unique chipsets. (Ported from radeon commit 1ce1b1656acc6211deb2091ff7f28d51b6daf86b, plus change $numunique++ => ++$numunique to fix OLAND getting listed twice) Reviewed-by: Alex Deucher <>
2016-10-06Enable HW cursor support with PRIME slave output & Xorg > Dänzer1-2/+3
Supported since Xorg, but buggy until Reviewed-by: Alex Deucher <>
2016-10-05Rotate and reflect cursor hotspot position for drmModeSetCursor2Michel Dänzer1-1/+31
We were always passing the hotspot position in the X screen coordinate space, but drmModeSetCursor2 needs it in the CRTC coordinate space. The wrong hotspot position would cause the kernel driver to adjust the HW cursor position incorrectly when the hotspot position changed. Reviewed-by: Alex Deucher <>
2016-09-21Add support for ScreenPtr::SyncSharedPixmapMichel Dänzer1-1/+42
This allows deferring shared pixmap updates between different drivers. (Ported from radeon commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1) Reviewed-by: Alex Deucher <>
2016-09-20Untangle HAS_XORG_CONF_DIR / --with-xorg-conf-dir lines in configure.acMichel Dänzer1-2/+3
$sysconfigdir used to be part of the default --with-xorg-conf-dir value, but it no longer is. Reviewed-by: Alex Deucher <>
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 <>
2016-09-14Use --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.
2016-09-09Make TearFree effective with PRIME slave scanoutMichel Dänzer3-13/+133
TearFree can now prevent tearing with any possible display configuration. Note that there may still be inter-GPU tearing if the primary GPU uses a different driver. (Ported from radeon commit 38797a33117222dadbc89e5f21ed8cd5deef9bea) Reviewed-by: Alex Deucher <>
2016-09-09Synchronize scanout pixmaps for TearFreeMichel Dänzer3-55/+108
Copy the damaged areas which are still valid in the other scanout pixmap from there, then only copy the remaining damaged area from the screen pixmap. This is slightly more efficient (only needs one Damage record instead of two, and only needs to copy each screen update across PCIe once with ShadowPrimary and a discrete GPU), and will be significantly more efficient for PRIME with the following change. (Ported from radeon commit eda1f3df6aaed683036369fe8820da4dac3c2ae2) Reviewed-by: Alex Deucher <>
2016-09-09Move up amdgpu_scanout_extents_intersectMichel Dänzer1-17/+17
Will be needed higher up by the following changes. No functional change. (Ported from radeon commit 2f6e5fb15f1a9ce523c85550e493f8bda9d0c00f) Reviewed-by: Alex Deucher <>
2016-09-09Factor out transform_region helperMichel Dänzer1-31/+43
(Ported from radeon commit 5a57005178fc13b6f7e513458ca6dae72a3e5783) Reviewed-by: Alex Deucher <>
2016-09-09Only copy from screen pixmap to shared pixmap on demand for slave scanoutMichel Dänzer1-13/+70
Only copy once for each time we update the corresponding scanout pixmap. This can significantly reduce the bandwidth usage when there are frequent updates to the screen pixmap. This initial implementation only works when both the master and slave screens use this driver. (Ported from radeon commit 99232f64db52812a843cd616d263d3a6b90eef3d) Reviewed-by: Alex Deucher <>
2016-09-09Track damage accurately for RandR 1.4 slave scanoutMichel Dänzer1-11/+72
This further reduces the PCIe bandwidth usage. (Ported from radeon commit b0867063abb197b9134166706d99fcbe5f204bb5, plus leak fix from 5a57005178fc13b6f7e513458ca6dae72a3e5783) Reviewed-by: Alex Deucher <>
2016-09-09Handle RandR 1.4 slave dirty updates via amdgpu_drm_queueMichel Dänzer1-3/+93
This reduces PCIe bandwidth usage and tearing. (Ported from radeon commit ad0a0656dd0e74683e6d7789decba827aa29c221) Reviewed-by: Alex Deucher <>
2016-09-09Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmapsMichel Dänzer3-62/+34
This should allow using multiple CRTCs via RandR 1.4 even with xserver < 1.17. It also simplifies the code a little, and paves the way for following changes. (Ported from radeon commits 4cfa4615f79f64062e5e771cd45dd7048f48b4f6 and a92c27484703abc7c410b6ae0e4b8d1efbbb8e6f) Reviewed-by: Alex Deucher <>
2016-09-09Wait for pending flips to complete before turning off an output or CRTCMichel Dänzer5-20/+68
At least with older kernels, the flip may never complete otherwise, which can result in us hanging in drmmode_set_mode_major. Fixes: (Ported from radeon commits 9090309e057dc703d1a5bffd88e6cae14108cfc3, e520ce0ec0adf91ddce5c932d4b3f9477fd49304, a36fdaff40d5b4795a1400c348a80eee94892212 and 4bd2d01552f18153afa03a8947b22eebf3d67c6b) Reviewed-by: Alex Deucher <>
2016-09-09Keep track of damage event related flushes per-clientMichel Dänzer2-9/+37
This further reduces the compositing slowdown due to flushing overhead, by only flushing when the X server actually sends XDamageNotify events to a client, and there hasn't been a flush yet in the meantime. (Ported from radeon commit 121a6de72da5fcf9a32408eff36b2235f3dfbcfe) Reviewed-by: Alex Deucher <>
2016-09-09Use EventCallback to avoid flushing every time in the FlushCallbackMichel Dänzer3-16/+66
We only need to flush for XDamageNotify events. Significantly reduces compositing slowdown due to flushing overhead, in particular with glamor. (Ported from radeon commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b) Reviewed-by: Alex Deucher <>
2016-09-07Add explicit AMDGPU_DRM_QUEUE_ERROR defineMichel Dänzer6-9/+12
Should make the amdgpu_drm_queue_alloc error handling clearer, and gets rid of a compile warning about it returning NULL. (Ported from radeon commit a37af701768b12d86868a831a79f1e02ee4968cf) Reviewed-by: Alex Deucher <>
2016-08-30Only list each unique chipset family once in the log fileMichel Dänzer3-1/+29
Acked-by: Christian König <> Reviewed-by: Alex Deucher <>
2016-08-30Add 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 <>
2016-08-29Add Mullins PCI IDsMichel Dänzer7-0/+97
Bugzilla: Reviewed-by: Alex Deucher <>
2016-08-23DRI2: 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 <>
2016-08-23Remove unused lut_r/g/b arrays from drmmode_crtc_private_recMichel Dänzer1-1/+0
Fixes: 1091f28e1fa2 ("Remove drmmode_load_palette") Reviewed-by: Alex Deucher <>
2016-08-22Fix cursor size for SIMarek Olšák1-2/+8
Reviewed-by: Michel Dänzer <> Acked-by: Edward O'Callaghan <>
2016-08-22Add SI PCI IDsRonie Salgado8-1/+444
Reviewed-by: Michel Dänzer <>
2016-07-22DRI2: 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 <>
2016-07-20Fix 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 <>
2016-07-19Use NotifyFd for drm fdKeith Packard2-0/+20
NotifyFd is available after API 22, and must be used after API 23. Signed-off-by: Keith Packard <>
2016-07-19Adapt Block/WakeupHandler signature for ABI 23Adam Jackson1-0/+5
Signed-off-by: Adam Jackson <>
2016-07-12Only 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 <>
2016-07-12Add .editorconfig fileMichel Dänzer1-0/+7
Basically a conversion from .dir-locals.el. EditorConfig supports many more editors and IDEs. (Ported from radeon commit aa07b365d7b0610411e118f105e49daff5f5a5cf) Reviewed-by: Alex Deucher <>
2016-06-28Clear damage in amdgpu_scanout_update if it doesn't intersect the CRTCMichel Dänzer1-1/+3
There's no need to test that same damage again. Reviewed-by: Alex Deucher <>
2016-06-28Remove w/h parameters from amdgpu_scanout_extents_intersectMichel Dänzer1-10/+5
We can use the dimensions of the CRTC's mode instead. Reviewed-by: Alex Deucher <>
2016-06-24Make the dedicated scanout mechanism work with arbitrary transforms v2Michel Dänzer2-35/+17
This makes TearFree work with arbitrary transforms, and makes transforms work better even without TearFree, with xserver >= 1.12. v2: Preserve clamping of transformed damage extents to CRTC boundaries. Reviewed-by: Alex Deucher <>
2016-06-24Destroy 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 <>
2016-06-23Remove drmmode_load_paletteMichel Dänzer1-70/+1
Not used by any supported version of xserver. Reviewed-by: Alex Deucher <>
2016-06-23present: Separate checks for flips vs unflips v2Michel Dänzer1-16/+28
All unflip checks apply to flips as well, but not vice versa. v2: Add comment above amdgpu_present_check_unflip (Alex) Reviewed-by: Alex Deucher <>