commit 5cbe1ee8e499e1b6b2646e341946292721d07e69
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Nov 17 11:27:16 2016 +0900

    Bump version for 7.8.0 release

commit 68023e01842ed7e5c798be77c25993bbe6a5a966
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Nov 17 11:32:37 2016 +0900

    Update manpage entry for Option "TearFree"
    
    It's now effective for arbitrary transforms as well.

commit 9760ef33cba5795eddeda4d5c2fcbe2dcce21689
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Nov 8 13:02:43 2016 +0900

    Use pRADEONEnt to find both screens of a GPU in radeon_mode_hotplug
    
    Fixes misbehaviour when hotplugging DisplayPort connectors on secondary
    GPUs.
    
    Fixes: c801f9f10a5d ("Handle Zaphod mode correctly in radeon_mode_hotplug")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98626
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 35bec4937d89b48a79acfcb4f814b7370cb631b2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Nov 8 13:01:58 2016 +0900

    Refactor radeon_mode_hotplug
    
    Preparation for the next change, no functional change intended.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit be9f67339a19a6649eab52aa2e0c8971cd9b4727
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Nov 7 16:34:37 2016 +0900

    Reindent code in radeon_dri2_create_buffer2
    
    Fixes warning about misleading indentation from recent versions of gcc:
    
    ../../src/radeon_dri2.c: In function ‘radeon_dri2_create_buffer2’:
    ../../src/radeon_dri2.c:224:2: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
      if (flags & RADEON_CREATE_PIXMAP_TILING_MACRO)
      ^~
    ../../src/radeon_dri2.c:227:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
          if (aligned_width == front_width)
          ^~
    
    No functional change intended.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 350a2645a1b127227ff294c0b62d20000d0fd48a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Nov 1 16:30:42 2016 +0900

    Check Xorg version at runtime instead of build time in two places
    
    This means that all possible paths can be handled as intended, no matter
    which Xorg version the driver happened to be compiled against.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 5df36de39952c3a26cb2fbc125f298139a9dd5bc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 26 18:24:08 2016 +0900

    Require xserver 1.10 or newer
    
    1.10.0 was released in February 2011.
    
    We've been accidentally requiring 1.10 or newer since 121a6de72da5 ("Keep
    track of damage event related flushes per-client v2").
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 22b5ce9548393ba2ff73ee234ecd82eeaf0ef6c4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Oct 25 17:28:03 2016 +0900

    Consume all available udev events at once
    
    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)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 82d3c8f5500d2a6fb1495e217a0b79c396f1534c
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Oct 25 16:56:40 2016 +0900

    PRIME: Fix swapping of provider sink / source capabilities
    
    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 <hdegoede@redhat.com>
    (Ported from xserver commit 94a1c77259ce39ba59ad87615df39b570ffab435)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6c940446ddadf418ee4959e46fa552b6c1cf6704
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Oct 25 16:42:03 2016 +0900

    Always call PixmapStopDirtyTracking in drmmode_set_scanout_pixmap
    
    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)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 61df12e2377cbb19a19ca9d5624df8959822da9f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 19 18:55:33 2016 +0900

    Don't rely on randr_crtc->scanout_pixmap in drmmode_set_scanout_pixmap
    
    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.
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)

commit 49cf3b5032a7ce40afe514b7092440e3e19e05aa
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 20 15:33:09 2016 +0900

    Sayōnara, AM_MAINTAINER_MODE!
    
    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:
    
    https://www.gnu.org/software/automake/manual/html_node/maintainer_002dmode.html
    
    I'm not aware of any reason why --disable-maintainer-mode would ever be
    useful with this project.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4b17de1cad12e7be12f2c71e5149bfc04564702d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 19 18:09:14 2016 +0900

    Remove PCI IDs and bus type from ati_pciids.csv
    
    This cleans up the list of unique chipsets a little further.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1ce1b1656acc6211deb2091ff7f28d51b6daf86b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 19 18:08:36 2016 +0900

    Order unique chipsets according to first appearance in ati_pciids.csv
    
    Instead of lexically. This makes it more likely for similar generations
    to be close to each other in the list of unique chipsets.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7c66be961de3477fc685eb71b46265adbae923f0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Oct 17 18:38:55 2016 +0900

    Enable HW cursor support with PRIME slave output & Xorg > 1.18.99.901
    
    Supported since Xorg 1.18.99.2, but buggy until 1.18.99.901.
    
    (Ported from amdgpu commit 7cc04035c55788261cda89a915c433c2add6cad9)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d016f20b14ffe4f90f7457375b2d9f5cf0f5650f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 13 16:33:45 2016 +0900

    Restore location of radeon_set_pixmap_bo call in drmmode_create_bo_pixmap
    
    radeon_set_pixmap_bo sets the tiling flags, so it needs to be called
    before radeon_get_pixmap_tiling_flags. Fixes a regression with EXA and
    TearFree.
    
    Fixes: 8523a733b6a5 ("Propagate failure from radeon_set_pixmap_bo")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98097
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 937398f6cd50db105d5e53ab553eb284d44121f4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 6 18:52:37 2016 +0900

    Rotate and reflect cursor hotspot position for drmModeSetCursor2
    
    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.
    
    (Ported from amdgpu commit d42773eb45baff5933730e26878a0b45fcf07b65)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3fc839ff49f01c24eb94d5e1f0ab4065de47bc17
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 17:50:36 2016 +0900

    Only list each unique chipset family once in the log file
    
    (Ported from amdgpu commit 6a1ba044c2b71081e6060d0c096917d6238f2145)

commit 9a5eb1915a240e3021ac38a6dacafef81e7bb743
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 17:48:38 2016 +0900

    Clear damage in radeon_scanout_update if it doesn't intersect the CRTC
    
    There's no need to test that same damage again.
    
    (Ported from amdgpu commit a576430526cbc404de64b30e1377a356644e8024)

commit 792a30dbe5f7d7815ea14032dbab55b5de8eabca
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 17:43:57 2016 +0900

    Remove w/h parameters from radeon_scanout_extents_intersect
    
    We can use the dimensions of the CRTC's mode instead.
    
    (Ported from amdgpu commit ede7f2bcae63be65e05e3029bfe7c742e5978932)

commit 80d794f11a5f047663897e4349da75d89ceff7c7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 17:38:57 2016 +0900

    Make the dedicated scanout mechanism work with arbitrary transforms
    
    This makes TearFree work with arbitrary transforms, and makes transforms
    work better even without TearFree, with xserver >= 1.12.
    
    (Ported from amdgpu commit bf000ea7ef91f5ecb59fc3c1ab8ed9eddcc0841d)

commit 09ba7b3b7b1b724aa386dbf2d33f567d7f26326b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 17:00:22 2016 +0900

    Remove drmmode_load_palette
    
    Not used by any supported version of xserver.
    
    (Ported from amdgpu commits 1091f28e1fa239ee1a973d84a8376fa4a95d7247
     and 5a4d3267ac3823fe58b51b0b9075b82375d7180c)

commit 730f443955cf2bcedd760c9fef5b11c81eacdd84
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 16:48:49 2016 +0900

    present: Separate checks for flips vs unflips
    
    All unflip checks apply to flips as well, but not vice versa.
    
    (Ported from amdgpu commit 4d506c23c9a628204fa23607931557b07ada3e31)

commit 343d28672411a510de21fa57986324ef8bcdd1b6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 16:47:17 2016 +0900

    dri2: Don't allow flipping when using a dedicated scanout buffer
    
    Fixes issues when mixing rotation and page flipping with current xserver
    Git master.
    
    (Ported from amdgpu commit decabd574f90d3df397c80ec931b3fde8a4afb49)

commit 83e4781d15d66d6fa0e153eb4cd0e3d9e2ebed9f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 16:44:50 2016 +0900

    present: Don't allow flipping when using a dedicated scanout buffer
    
    Fixes issues when mixing rotation and page flipping with current xserver
    Git master.
    
    (Ported from amdgpu commit 3ed28ce7cd26f89969617ba901ff253091d0d469)

commit 8419db3de6157875f9a840773350ecd29cd42d83
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 16:40:42 2016 +0900

    Make sure drmmode_crtc->scanout[] are destroyed when not needed
    
    We failed to do this when going back to scanning out directly from the
    screen pixmap.
    
    As a bonus, since we now destroy drmmode_crtc->scanout[] after setting
    the new scanout buffer, we may avoid the CRTC turning off intermittently
    in this case.
    
    (Ported from amdgpu commit 9c3324715fd395fd486ea341654d78f4f298b97f)

commit 956e03d6a6b9478dd8e77c81f426c0d371c5d7a1
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 21 16:37:53 2016 +0900

    Simplify drmmode_set_mode_major error handling
    
    Initialize ret = FALSE and only set it to TRUE when we've succeeded.
    
    (Ported from amdgpu commit 3bce0519a4008cf87c0e31a7a579e10f5dcdd2f3)

commit ace455d1db4db3f9b8b434a3747acfa7e1273db4
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Sep 21 16:31:51 2016 +0900

    Only add main fb if necessary
    
    If we're doing reverse-prime; or doing rotation the main fb is not used,
    and there is no reason to add it in this case.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (Ported from xserver commit 4313122dea0df9affc280ee698e929489061ccc6)
    (Ported from amdgpu commit a3ca1500703837cbb8d49c554199a25dea7d5e1e)

commit eea370dc4f96e680cc29b416fe62d6e2ea09bc91
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Sep 21 16:27:11 2016 +0900

    Remove unnecessary fb addition from drmmode_xf86crtc_resize
    
    drmmode_set_mode_major() is the only user of drmmode->fb_id and will
    create it if necessary.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (Ported from xserver commit 877453212166fdc912e0d687cdecee11aba563b5)
    (Ported from amdgpu commit 9ca1c24235ff5ab2e028333fc326e2eff008c574)

commit cf52c76484a4adfa3e0b2271ea0c00f46d32ca48
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Sep 13 18:21:37 2016 +0900

    Free priv in amdgpu_set_pixmap_bo also if priv->bo == NULL
    
    Fixes memory leak when destroying pixmaps with priv->bo == NULL.
    
    Reported-by: Qiang Yu <qiang.yu@amd.com>
    (Ported from amdgpu commit 7f7f9825caf3983902491da27c16d14cd8bf9b7d)

commit 50abcc19e29bb50451d031b2c9e99d691d4faf70
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Sep 13 18:18:37 2016 +0900

    glamor: Fix leak of pixmap private when replacing BO
    
    Reported-by: Qiang Yu <qiang.yu@amd.com>
    (Ported from amdgpu commit 397aedafee437c125b8ac1feafb1c3b466842aeb)

commit 8523a733b6a5de6116a6332fefc871d4c32652d8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:54:33 2016 +0900

    Propagate failure from radeon_set_pixmap_bo
    
    (Ported from amdgpu commits c315c00e44afc91a7c8e2eab5af836d9643ebb88
     and 0d42082108c264568e2aadd15ace70e72388bc65)

commit 53be26b00e83f871f0afd39caa5a7a1d6ec4aea1
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 31 16:46:56 2016 +0900

    Add support for ScreenPtr::SyncSharedPixmap
    
    This allows deferring shared pixmap updates between different drivers.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 156b5bc00da2eecb71cad517136f8cd74cf5d2c9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Sep 20 17:50:20 2016 +0900

    Only define transform_region function for XF86_CRTC_VERSION >= 4
    
    We're not using it with older xserver.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 80cc892ee1ce54fad3cb7dd11bd9df18c359136f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Sep 20 17:45:16 2016 +0900

    Use local implementation of RegionDuplicate for older xserver
    
    It was only added in xserver 1.15. Fixes build against older xserver.
    
    Reported-by: Pali Rohár <pali.rohar@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 12d30eeb9711bd2b1609d6bbb74c4a1760596f72
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Wed Sep 14 17:03:03 2016 +0900

    DRI2: Fix radeon_dri2_exchange_buffers width/height copy'n'paste error
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    (Ported from amdgpu commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 11cc6843aa3b745aa1361f1a65e465e16696b914
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 14 17:01:13 2016 +0900

    DRI2: Add interpolated_vblanks in radeon_dri2_get_crtc_msc
    
    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>

commit 380daff43cfefe2a8e4d496eaf65673f2815c878
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Wed Sep 14 16:59:38 2016 +0900

    Fix radeon_mode_hotplug crash on multi GPU platform.
    
    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>

commit 4a5fa37f74c233c6b9c6a08306688628a8e216e8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 14 16:56:22 2016 +0900

    Destroy all dedicated scanout buffers during CloseScreen
    
    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>

commit cc2555835cd4c5fd2ae4f999a4bf7c18cdb1dda4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:26:57 2016 +0900

    glamor: Reallocate linear pixmap BO if necessary for DRI2 PRIME
    
    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>

commit b3e5259e60157fdbdf46ee59b1b78995c2b15f72
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:12:06 2016 +0900

    Move DRI2's local fixup_glamor helper to radeon_glamor_set_pixmap_bo
    
    So it can be used outside of the DRI2 code.
    
    (Ported from amdgpu commit 5518bf5d793439b5bab369e5fc18de9a4a3b9dd6)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 38632bbd5ff80a9cf8ce584b2bc499d17d15befe
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:05:51 2016 +0900

    Consolidate get_drawable_pixmap helper
    
    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>

commit e91858e435672c32f9c4a854b3dec048199d6f7f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Sep 12 18:02:07 2016 +0900

    glamor: Fix radeon_glamor_share_pixmap_backing for priv->bo == NULL
    
    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>

commit 38797a33117222dadbc89e5f21ed8cd5deef9bea
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 2 11:08:28 2016 +0900

    Make TearFree effective with PRIME slave scanout
    
    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.
    
    v2:
    * Also test dirty->slave_dst in radeon_prime_scanout_do_update
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> [v1]

commit eda1f3df6aaed683036369fe8820da4dac3c2ae2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Sep 1 12:54:13 2016 +0900

    Synchronize scanout pixmaps for TearFree
    
    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.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2f6e5fb15f1a9ce523c85550e493f8bda9d0c00f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 2 17:23:16 2016 +0900

    Move up radeon_scanout_extents_intersect
    
    Will be needed higher up by the following changes. No functional change.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 5a57005178fc13b6f7e513458ca6dae72a3e5783
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Sep 1 17:19:27 2016 +0900

    Factor out transform_region helper
    
    While we're at it, fix leaking the memory allocated for xRectangles.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 99232f64db52812a843cd616d263d3a6b90eef3d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Dec 1 17:58:13 2015 +0900

    Only copy from screen pixmap to shared pixmap on demand for slave scanout
    
    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.
    
    v2:
    * Reduce churn in radeon_prime_scanout_update_handler
    * Clear the correct damage in radeon_dirty_update
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit a92c27484703abc7c410b6ae0e4b8d1efbbb8e6f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 26 18:09:03 2016 +0900

    Fix build against xserver < 1.13
    
    pScreen->isGPU was only introduced in 1.13.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97490
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4bd2d01552f18153afa03a8947b22eebf3d67c6b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 26 12:02:38 2016 +0900

    Also handle disabled CRTCs in drmmode_clear_pending_flip
    
    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>

commit a36fdaff40d5b4795a1400c348a80eee94892212
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 24 22:52:11 2016 +0900

    Don't override crtc parameter value in drmmode_flip_handler/abort
    
    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>

commit e520ce0ec0adf91ddce5c932d4b3f9477fd49304
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 25 18:22:34 2016 +0900

    Also call drmmode_clear_pending_flip from radeon_scanout_flip_abort
    
    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>

commit b0867063abb197b9134166706d99fcbe5f204bb5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Nov 30 18:54:12 2015 +0900

    Track damage accurately for RandR 1.4 slave scanout
    
    This further reduces the PCIe bandwidth usage.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ad0a0656dd0e74683e6d7789decba827aa29c221
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Nov 27 16:31:21 2015 +0900

    Handle RandR 1.4 slave dirty updates via radeon_drm_queue
    
    This reduces PCIe bandwidth usage and tearing.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4cfa4615f79f64062e5e771cd45dd7048f48b4f6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Nov 27 16:53:30 2015 +0900

    Use drmmode_crtc_scanout_* helpers for RandR 1.4 scanout pixmaps
    
    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.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 121a6de72da5fcf9a32408eff36b2235f3dfbcfe
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 11 12:51:46 2016 +0900

    Keep track of damage event related flushes per-client v2
    
    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.
    
    v2: Use ScreenPrivateKey, fixes invalid memory access with GPU screens
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 9090309e057dc703d1a5bffd88e6cae14108cfc3
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 10 18:45:30 2016 +0900

    Wait for pending flips to complete before turning off an output or CRTC
    
    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>

commit 9a1afbf61fbb2827c86bd86d295fa0848980d60b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 11 12:22:09 2016 +0900

    Use EventCallback to avoid flushing every time in the FlushCallback
    
    We only need to flush for XDamageNotify events.
    
    Significantly reduces compositing slowdown due to flushing overhead, in
    particular with glamor.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 94fe42f29e0b00a26e810581d6c438ac6d8ecd8a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 12 17:36:27 2016 +0900

    Don't enable DRI3 by default with EXA
    
    It doesn't work correctly in all cases, see e.g.
    https://bugs.freedesktop.org/show_bug.cgi?id=95475 . I'm not sure this
    is fixable, given EXA's architecture.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6d91fb4fc701895473ff675f440a8eef655e80ca
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 12 15:57:28 2016 +0900

    Don't enable micro-tiling for scanout buffers on pre-R600
    
    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>

commit a37af701768b12d86868a831a79f1e02ee4968cf
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 6 12:46:01 2016 +0900

    Add explicit RADEON_DRM_QUEUE_ERROR define
    
    Should make the radeon_drm_queue_alloc error handling clearer, and gets
    rid of a compile warning about it returning NULL.
    
    Reviewed-by: Alexandre Demers <alexandre.f.demers@gmail.com>

commit 024afff27eb9f4c60043214099ddb42bbfb3d289
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Jul 18 21:24:23 2016 -0700

    Adapt to video API 22
    
    Deal with drm fd wakeup
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>

commit eac4db4f0cb22a23d6e69161dcaacc7d53978aae
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jul 19 10:03:56 2016 -0400

    Adapt Block/WakeupHandler signature for ABI 23
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 3be841d0ae7d505cef325993205b12d15e98dba9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jun 24 11:12:49 2016 +0900

    Only use RandR APIs if RandR is enabled
    
    Fixes crash with Xinerama enabled, which disables RandR.
    
    Fixes: https://bugs.debian.org/827984
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7835558acdce318130ba4a09ef936fd675e3197d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Mar 28 18:49:15 2016 +0900

    Adapt to XF86_CRTC_VERSION 7
    
    Now the HW cursor can be used with TearFree rotation.
    
    This also allows always using the separate scanout pixmap mechanism for
    rotation, so that should be much smoother even without TearFree enabled.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0945db4d902056bda3d9ad4a4de2dfa685d10a70
Author: Tan Hu <tan.hu@zte.com.cn>
Date:   Fri May 27 17:05:15 2016 +0800

    EXA/6xx/7xx: accelerate PictOpOver with component alpha
    
    Subpixel text rendering is typically done with a solid src and
    a pixmap mask. Traditionally, this cannot be accelerated in a single
    pass and requires two passes [1]. However, we can cheat a little
    with a constant blend color.
    
    We can use:
    const.A = src.A / src.A
    const.R = src.R / src.A
    const.G = src.G / src.A
    const.B = src.B / src.A
    
    dst.A = const.A * (src.A * mask.A) + (1 - (src.A * mask.A)) * dst.A
    dst.R = const.R * (src.A * mask.R) + (1 - (src.A * mask.R)) * dst.R
    dst.G = const.G * (src.A * mask.G) + (1 - (src.A * mask.G)) * dst.G
    dst.B = const.B * (src.A * mask.B) + (1 - (src.A * mask.B)) * dst.B
    
    This only needs a single source value. src.A is cancelled down in
    the right places.
    
    [1] http://anholt.livejournal.com/32058.html
    
    r6xx still be used on some machine,
    Ported from commit 4375a6e75e5d41139be7031a0dee58c057ecbd07.
    
    Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
    Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>

commit 9b9ad669c748f53247e53fa3f3b03a77da5e5cb3
Author: Tan Hu <tan.hu@zte.com.cn>
Date:   Fri May 27 17:05:14 2016 +0800

    EXA/6xx/7xx: fast solid pixmap support
    
    Solid pixmaps are currently implemented with scratch pixmaps, which
    is slow. This replaces the hack with a proper implementation. The
    Composite shader can now either sample a src/mask or use a constant
    value.
    
    r6xx still be used on some machine,
    Ported from commit 94d0d14914a025525a0766669b556eaa6681def7.
    
    Signed-off-by: Tan Hu <tan.hu@zte.com.cn>
    Reviewed-by: Grigori Goronzy <greg@chown.ath.cx>

commit aa07b365d7b0610411e118f105e49daff5f5a5cf
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 31 18:16:26 2016 +0900

    Add .editorconfig file
    
    Basically a conversion from .dir-locals.el, but also correctly handles
    files which predominantly use tabs for indentation.
    
    Also, EditorConfig supports many more editors and IDEs.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 040a7b80e1fcbaa93ac17f7113d696d9b853cf8a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Apr 12 18:18:43 2016 +0900

    Explicitly set the fbcon pixmap pitch again
    
    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>

commit 1181b9c582f10b6c523e4b2988e2ce87ecf3d367
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 10 19:02:20 2016 +0900

    Enable DRI3 by default when building for Xorg >= 1.18.3
    
    Seems to work well enough in general now.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit c801f9f10a5d72d935faf21e72f7e7808fb4f05f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Apr 13 11:12:38 2016 +0900

    Handle Zaphod mode correctly in radeon_mode_hotplug
    
    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>

commit 1ca677309720e2f6c953c9e76f5b34c22a4416c6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 15 16:47:35 2016 +0900

    present: Support async flips
    
    The xserver Present code only calls radeon_present_flip with
    sync_flip=FALSE if radeon_present_screen_init sets
    PresentCapabilityAsync, and the latter only sets it if the kernel driver
    advertises support for async flips.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 90a915c62d012e99193833aecc93974e68880c60
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 15 16:42:16 2016 +0900

    Add support for async flips to radeon_do_pageflip
    
    Will be used by the next change. No functional change here.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ba8b6288c8e6fc4be5d7144ecbe9a1f241881674
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Mon Apr 11 16:35:37 2016 +0900

    Remove RR_Capability_SinkOutput for GPU without CRTC
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    (Ported from amdgpu commit a0bbb373f902e0ffc14570c85faec7e44134f62e)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit bd4c72c8625996d842824ce4963f2d759fe2954a
Author: Tom St Denis <tom.stdenis@amd.com>
Date:   Fri Apr 8 10:22:11 2016 -0400

    dri3: Return NULL from radeon_dri3_pixmap_from_fd if calloc fails.
    
    Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit 3300ea01fbdf770dc084eebbf2854fba35144220
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Apr 11 16:11:57 2016 +0900

    Post 7.7.0 release version bump

commit df6662864b56d1aeeea4c67d9b668e64197afb20
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Apr 7 11:44:05 2016 +0900

    Bump version for 7.7.0 release

commit c12614cfdc5729041c204e3ead1dbfde38011f0c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Apr 4 14:59:41 2016 +0900

    Update manpage entry for Option "TearFree"
    
    It's now effective for rotation as well.
    
    (Ported from amdgpu commit faf9d720b7d650f5f1ea657a874d08eac3972e60)
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4693b1bd5b5c381e8b7b68a6f7f0c6696d6a68df
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 31 17:02:55 2016 +0900

    Identify DRM event queue entries by sequence number instead of by pointer
    
    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>

commit 83734317e6bdaeebb4462a63f541e73a1d7c2f77
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 30 11:44:09 2016 +0900

    Update pixmap pitch in radeon_set_pixmap_bo
    
    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>

commit 0b3aac1de9db42bfca545fa331e4985836682ec7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Mar 28 18:43:36 2016 +0900

    DRI3: Refuse to open DRM file descriptor for ssh clients (v2)
    
    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)

commit 8a6cd4bda05b9569b3dd0a5a75b2cc385b9ecba9
Author: Michel Dänzer <michel.daenzer@amd.com>
