Hello community,
here is the log from the commit of package xf86-video-ati for openSUSE:Factory checked in at 2016-09-23 11:23:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/xf86-video-ati (Old)
and /work/SRC/openSUSE:Factory/.xf86-video-ati.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "xf86-video-ati"
Changes:
--------
--- /work/SRC/openSUSE:Factory/xf86-video-ati/xf86-video-ati.changes 2016-04-12 19:00:17.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.xf86-video-ati.new/xf86-video-ati.changes 2016-09-23 11:23:40.000000000 +0200
@@ -1,0 +2,8 @@
+Mon Sep 19 13:32:04 UTC 2016 - tobias.johannes.klausmann@mni.thm.de
+
+- Update to version 7.7.1:
+ This release supports xserver versions 1.9-1.18.
+ This is a stable point release containing only fixes for crash/hang/
+ corruption bugs and other minor changes.
+
+-------------------------------------------------------------------
Old:
----
xf86-video-ati-7.7.0.tar.bz2
xf86-video-ati-7.7.0.tar.bz2.sig
New:
----
xf86-video-ati-7.7.1.tar.bz2
xf86-video-ati-7.7.1.tar.bz2.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ xf86-video-ati.spec ++++++
--- /var/tmp/diff_new_pack.NH2HZu/_old 2016-09-23 11:23:41.000000000 +0200
+++ /var/tmp/diff_new_pack.NH2HZu/_new 2016-09-23 11:23:41.000000000 +0200
@@ -19,7 +19,7 @@
%define xserver_glamor 1
Name: xf86-video-ati
-Version: 7.7.0
+Version: 7.7.1
Release: 0
Summary: ATI video driver for the Xorg X server
License: MIT
++++++ xf86-video-ati-7.7.0.tar.bz2 -> xf86-video-ati-7.7.1.tar.bz2 ++++++
++++ 1818 lines of diff (skipped)
++++ retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/ChangeLog new/xf86-video-ati-7.7.1/ChangeLog
--- old/xf86-video-ati-7.7.0/ChangeLog 2016-04-07 04:50:28.000000000 +0200
+++ new/xf86-video-ati-7.7.1/ChangeLog 2016-09-15 11:09:39.000000000 +0200
@@ -1,3 +1,245 @@
+commit d6f89352f64f4eff858b671e49b732f9973f6e11
+Author: Michel Dänzer
+Date: Thu Sep 15 17:44:21 2016 +0900
+
+ Bump version for 7.7.1 release
+
+commit e890402d14ea7c4b22ef7f19d0679fb45d4eac4e
+Author: Qiang Yu
+Date: Thu Sep 15 16:51:00 2016 +0900
+
+ DRI2: Fix radeon_dri2_exchange_buffers width/height copy'n'paste error
+
+ Signed-off-by: Qiang Yu
+ (Ported from amdgpu commit 73c8dc000ad6b2b53ba3aa7155f5e8f6b55623b7)
+ Reviewed-by: Alex Deucher
+ (Cherry picked from commit 12d30eeb9711bd2b1609d6bbb74c4a1760596f72)
+
+commit b95ddb39c1154b3231cefd4e99046e7fb89f1e99
+Author: Michel Dänzer
+Date: Thu Sep 15 16:50:24 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
+ (Cherry picked from commit 11cc6843aa3b745aa1361f1a65e465e16696b914)
+
+commit 6cca7d529c3bb07bc78a49ae5085028ac743fe1d
+Author: Michel Dänzer
+Date: Thu Sep 15 16:49:48 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
+ (Cherry picked from commit 4a5fa37f74c233c6b9c6a08306688628a8e216e8)
+
+commit 05f3735131e8fa8c2d1adbca70dab7967e3be58c
+Author: Michel Dänzer
+Date: Thu Sep 15 16:49:10 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
+ (Cherry picked from commit cc2555835cd4c5fd2ae4f999a4bf7c18cdb1dda4)
+
+commit 6babf4d2205543a61fcd62c75fd88e49d0ed7cf1
+Author: Michel Dänzer
+Date: Thu Sep 15 16:48:20 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
+ (Cherry picked from commit b3e5259e60157fdbdf46ee59b1b78995c2b15f72)
+
+commit a3d8e717d5dba8495d6b9934b0804342106e90f5
+Author: Michel Dänzer
+Date: Thu Sep 15 16:47:54 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
+ (Cherry picked from commit 38632bbd5ff80a9cf8ce584b2bc499d17d15befe)
+
+commit 00a988a811741ee4e4af265deb68b97cc7e5c985
+Author: Michel Dänzer
+Date: Thu Sep 15 16:47:23 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
+ (Ported from amdgpu commit b36c77695ba77b59a0ccd868454e3af4fc04d5ff)
+ Reviewed-by: Alex Deucher
+ (Cherry picked from commit e91858e435672c32f9c4a854b3dec048199d6f7f)
+
+commit 953b4c2cdf3ea2dcf2d7cc0b1fa0fabefcc49afd
+Author: Michel Dänzer
+Date: Thu Sep 15 16:46:35 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
+ (Cherry picked from commit 4bd2d01552f18153afa03a8947b22eebf3d67c6b)
+
+commit 13f3fe45a4026801f61fb6429ca6e239a1b8c081
+Author: Michel Dänzer
+Date: Thu Sep 15 16:46:04 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
+ (Cherry picked from commit a36fdaff40d5b4795a1400c348a80eee94892212)
+
+commit 08672d31a616060d23a2e1543643eafa97bfe236
+Author: Michel Dänzer
+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
+ (Cherry picked from commit e520ce0ec0adf91ddce5c932d4b3f9477fd49304)
+
+commit a12ff1c6aec4453a6f64878cc64961488e803ed1
+Author: Michel Dänzer
+Date: Thu Sep 15 16:44:13 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/157717...
+
+ Reviewed-by: Alex Deucher
+ (Cherry picked from commit 9090309e057dc703d1a5bffd88e6cae14108cfc3)
+
+commit 4d377fd007d9a39178e318a8cf8bee5d68415c56
+Author: Michel Dänzer
+Date: Thu Sep 15 16:42:05 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
+ (Cherry picked from commit 6d91fb4fc701895473ff675f440a8eef655e80ca)
+
+commit 16135cc8b5d302cf89e174c52e455b64c2c84237
+Author: Michel Dänzer
+Date: Thu Sep 15 16:41:15 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
+ (Cherry picked from commit 3be841d0ae7d505cef325993205b12d15e98dba9)
+
+commit 948f592259f2f0c0ff331b869fb8f73ce0b29193
+Author: Michel Dänzer
+Date: Thu Sep 15 16:40:32 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
+ (Cherry picked from commit 040a7b80e1fcbaa93ac17f7113d696d9b853cf8a)
+
+commit d1e74e357278d1227425b12a4a1be2b337a6051d
+Author: Qiang Yu
+Date: Thu Sep 15 16:39:37 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
+ (Ported from amdgpu commit 978242977e5dc905e1d5a46b1b0d34b356c7af26)
+ Reviewed-by: Alex Deucher
+ (Cherry picked from commit 380daff43cfefe2a8e4d496eaf65673f2815c878)
+
+commit 3f4cba12b71206aa60271ac435c3709ee335a371
+Author: Michel Dänzer
+Date: Thu Sep 15 16:38:52 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
+ (Cherry picked from commit c801f9f10a5d72d935faf21e72f7e7808fb4f05f)
+
+commit 470538c354977e2ef5256029433d2e28e4a1f7e8
+Author: Qiang Yu
+Date: Thu Sep 15 16:37:57 2016 +0900
+
+ Remove RR_Capability_SinkOutput for GPU without CRTC
+
+ Signed-off-by: Qiang Yu
+ (Ported from amdgpu commit a0bbb373f902e0ffc14570c85faec7e44134f62e)
+ Reviewed-by: Alex Deucher
+ (Cherry picked from commit ba8b6288c8e6fc4be5d7144ecbe9a1f241881674)
+
commit df6662864b56d1aeeea4c67d9b668e64197afb20
Author: Michel Dänzer
Date: Thu Apr 7 11:44:05 2016 +0900
@@ -1567,7 +1809,7 @@
Must be enabled with
- Option "DRI3"
+ Option "DRI3"
in xorg.conf.
@@ -4001,7 +4243,7 @@
Enable at build time with --enable-glamor and runtime with
- Option "AccelMethod" "glamor"
+ Option "AccelMethod" "glamor"
The most notable lack of functionality is XVideo. Use something like VDPAU for
now.
@@ -4088,7 +4330,7 @@
...
Conflicts:
- configure.ac
+ configure.ac
commit 6a60fcdf060a0f553d8d4f7939c2a05aa04bedfa
Author: Dave Airlie
@@ -10262,7 +10504,7 @@
Conflicts:
- src/drmmode_display.c
+ src/drmmode_display.c
commit a493feb94c0d84aaf5bfd84c6940d7f03974dd86
Author: Dave Airlie
@@ -14171,7 +14413,7 @@
Conflicts:
- src/radeon_atombios.c
+ src/radeon_atombios.c
commit 1a62360e8260eaf5f98fa6be3f89f64c8cae7d32
Author: Alex Deucher
@@ -14618,7 +14860,7 @@
R5xx: always use single clipped triangle
R3xx/R4xx: use single clipped triangle up to guardband limit,
- then use quad.
+ then use quad.
commit 4d009d14c9c72f6e1bc8100ec8d9b8037ee4e514
Merge: d52882d 4e96278
@@ -16374,7 +16616,7 @@
See bug 14289
- com_bios_scratch.diff
+ com_bios_scratch.diff
commit 38ce8a984f96056b7345bcc06505ba27e0e6d5b4
Author: Dave Airlie
@@ -17037,9 +17279,9 @@
Conflicts:
- src/radeon_commonfuncs.c
- src/radeon_exa_render.c
- src/radeon_textured_videofuncs.c
+ src/radeon_commonfuncs.c
+ src/radeon_exa_render.c
+ src/radeon_textured_videofuncs.c
commit 0032c80bf30bab189204e3e6929e18a19d753138
Author: Alex Deucher
@@ -17135,8 +17377,8 @@
Conflicts:
- src/radeon.h
- src/radeon_driver.c
+ src/radeon.h
+ src/radeon_driver.c
This rework seems to have caused more trouble than it was worth.
@@ -17150,7 +17392,7 @@
Conflicts:
- src/radeon_driver.c
+ src/radeon_driver.c
commit c40a7aa3989576a8144213e2f31b892d21df8686
Author: Owen W. Taylor
@@ -18176,7 +18418,7 @@
Conflicts:
- src/radeon_commonfuncs.c
+ src/radeon_commonfuncs.c
commit 27ddb39b12a0b54e099fd5274c4c91f08e2d2822
Author: Alex Deucher
@@ -19272,8 +19514,8 @@
Conflicts:
- src/radeon_display.c
- src/radeon_driver.c
+ src/radeon_display.c
+ src/radeon_driver.c
commit eb99c3c5c9a2249cb84920f0f225e525fc3a4144
Author: Alex Deucher
@@ -19653,10 +19895,10 @@
Conflicts:
- src/radeon.h
- src/radeon_crtc.c
- src/radeon_driver.c
- src/radeon_output.c
+ src/radeon.h
+ src/radeon_crtc.c
+ src/radeon_driver.c
+ src/radeon_output.c
commit 6451ea2dcc4fac762442f699935864f4a8d445f7
Merge: 0d89556 5896ca4
@@ -19727,7 +19969,7 @@
Conflicts:
- src/radeon_output.c
+ src/radeon_output.c
commit 21ed435398e4a398dd8a0a5d7c1d4cc45e916332
Author: Alex Deucher
@@ -20234,9 +20476,9 @@
Conflicts:
- src/radeon_chipset.h
- src/radeon_driver.c
- src/radeon_probe.c
+ src/radeon_chipset.h
+ src/radeon_driver.c
+ src/radeon_probe.c
commit 0d1e0c7805b3d8e56ccb49465e6b144afb7bdc51
Author: Dave Airlie
@@ -20259,8 +20501,8 @@
Conflicts:
- src/radeon_cursor.c
- src/radeon_output.c
+ src/radeon_cursor.c
+ src/radeon_output.c
commit 744c8cb6c293fcaa687566f52901644e699baace
Merge: e258fbe e530af7
@@ -21471,7 +21713,7 @@
Conflicts:
- src/ati.c
+ src/ati.c
commit 673f799729824f4439dd5f681f75dd5aab50947f
Author: Alex Deucher
@@ -21742,14 +21984,14 @@
Conflicts:
- src/radeon.h
- src/radeon_bios.c
- src/radeon_display.c
- src/radeon_dri.c
- src/radeon_driver.c
- src/radeon_modes.c
- src/radeon_probe.h
- src/radeon_video.c
+ src/radeon.h
+ src/radeon_bios.c
+ src/radeon_display.c
+ src/radeon_dri.c
+ src/radeon_driver.c
+ src/radeon_modes.c
+ src/radeon_probe.h
+ src/radeon_video.c
commit 53a67e31904bec9a3aa1bd24de8034dcafea1d2a
Author: Alex Deucher
@@ -22615,9 +22857,9 @@
Conflicts:
- src/radeon_cursor.c
- src/radeon_display.c
- src/radeon_driver.c
+ src/radeon_cursor.c
+ src/radeon_display.c
+ src/radeon_driver.c
commit 800bf53279e2c2bf854682bbfd6fa16d03afed00
Author: Matthieu Herrb
@@ -23603,8 +23845,8 @@
Conflicts:
- src/radeon_display.c
- src/radeon_driver.c
+ src/radeon_display.c
+ src/radeon_driver.c
commit 3b43788c45f51ad2d3e8e64383c412f4ddd97207
Author: Dave Airlie
@@ -25114,7 +25356,7 @@
Conflicts:
- src/radeon_driver.c
+ src/radeon_driver.c
commit 9fa176c7989030e7340cc9b85d0b6a7b34303091
Author: Alex Deucher
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/configure.ac new/xf86-video-ati-7.7.1/configure.ac
--- old/xf86-video-ati-7.7.0/configure.ac 2016-04-07 04:43:03.000000000 +0200
+++ new/xf86-video-ati-7.7.1/configure.ac 2016-09-15 10:52:47.000000000 +0200
@@ -23,7 +23,7 @@
# Initialize Autoconf
AC_PREREQ([2.60])
AC_INIT([xf86-video-ati],
- [7.7.0],
+ [7.7.1],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-ati])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/drmmode_display.c new/xf86-video-ati-7.7.1/src/drmmode_display.c
--- old/xf86-video-ati-7.7.0/src/drmmode_display.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/drmmode_display.c 2016-09-15 10:52:47.000000000 +0200
@@ -36,6 +36,7 @@
#include "damagestr.h"
#include "micmap.h"
#include "xf86cmap.h"
+#include "xf86Priv.h"
#include "radeon.h"
#include "radeon_bo_helper.h"
#include "radeon_glamor.h"
@@ -97,6 +98,7 @@
static PixmapPtr drmmode_create_bo_pixmap(ScrnInfoPtr pScrn,
int width, int height,
int depth, int bpp,
+ int pitch,
struct radeon_bo *bo, struct radeon_surface *psurf)
{
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -110,8 +112,16 @@
if (!pixmap)
return NULL;
+ if (pitch <= 0 &&
+ (radeon_bo_get_tiling(bo, &tiling, (uint32_t*)&pitch) != 0 ||
+ pitch <= 0)) {
+ ErrorF("radeon_bo_get_tiling failed to determine pitch\n");
+ pScreen->DestroyPixmap(pixmap);
+ return NULL;
+ }
+
if (!(*pScreen->ModifyPixmapHeader)(pixmap, width, height,
- depth, bpp, -1, NULL)) {
+ depth, bpp, pitch, NULL)) {
return NULL;
}
@@ -293,9 +303,15 @@
CARD64 ust;
int ret;
+ drmmode_crtc->pending_dpms_mode = mode;
+
if (drmmode_crtc->dpms_mode == DPMSModeOn && mode != DPMSModeOn) {
drmVBlank vbl;
+ /* Wait for any pending flip to finish */
+ if (drmmode_crtc->flip_pending)
+ return;
+
/*
* On->Off transition: record the last vblank time,
* sequence number and frame period.
@@ -353,10 +369,14 @@
drmmode_ptr drmmode = drmmode_crtc->drmmode;
/* Disable unused CRTCs */
- if (!crtc->enabled || mode != DPMSModeOn)
+ if (!crtc->enabled || mode != DPMSModeOn) {
+ /* Wait for any pending flip to finish */
+ if (drmmode_crtc->flip_pending)
+ return;
+
drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
0, 0, 0, NULL, 0, NULL);
- else if (drmmode_crtc->dpms_mode != DPMSModeOn)
+ } else if (drmmode_crtc->dpms_mode != DPMSModeOn)
crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
crtc->x, crtc->y);
}
@@ -400,7 +420,8 @@
}
pixmap = drmmode_create_bo_pixmap(pScrn, fbcon->width, fbcon->height,
- fbcon->depth, fbcon->bpp, bo, NULL);
+ fbcon->depth, fbcon->bpp, fbcon->pitch,
+ bo, NULL);
info->fbcon_pixmap = pixmap;
radeon_bo_unref(bo);
out_free_fb:
@@ -528,10 +549,11 @@
int width, int height)
{
ScrnInfoPtr pScrn = crtc->scrn;
+ RADEONInfoPtr info = RADEONPTR(pScrn);
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_ptr drmmode = drmmode_crtc->drmmode;
struct radeon_surface surface;
- uint32_t tiling;
+ uint32_t tiling = RADEON_CREATE_PIXMAP_TILING_MACRO;
int ret;
int pitch;
@@ -542,11 +564,11 @@
drmmode_crtc_scanout_destroy(drmmode, scanout);
}
+ if (info->ChipFamily >= CHIP_FAMILY_R600)
+ tiling |= RADEON_CREATE_PIXMAP_TILING_MICRO;
scanout->bo = radeon_alloc_pixmap_bo(pScrn, width, height, pScrn->depth,
- RADEON_CREATE_PIXMAP_TILING_MACRO |
- RADEON_CREATE_PIXMAP_TILING_MICRO,
- pScrn->bitsPerPixel, &pitch,
- &surface, &tiling);
+ tiling, pScrn->bitsPerPixel,
+ &pitch, &surface, &tiling);
if (scanout->bo == NULL)
return NULL;
@@ -592,7 +614,7 @@
width, height,
pScrn->depth,
pScrn->bitsPerPixel,
- scanout->bo, NULL);
+ -1, scanout->bo, NULL);
if (scanout->pixmap == NULL)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Couldn't allocate scanout pixmap for CRTC\n");
@@ -1208,6 +1230,7 @@
drmmode_crtc->mode_crtc = drmModeGetCrtc(drmmode->fd, mode_res->crtcs[num]);
drmmode_crtc->drmmode = drmmode;
drmmode_crtc->dpms_mode = DPMSModeOff;
+ drmmode_crtc->pending_dpms_mode = DPMSModeOff;
crtc->driver_private = drmmode_crtc;
drmmode_crtc_hw_id(crtc);
@@ -1333,9 +1356,16 @@
if (!koutput)
return;
- if (mode != DPMSModeOn && crtc)
+ if (mode != DPMSModeOn && crtc) {
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
drmmode_do_crtc_dpms(crtc, mode);
+ /* Wait for any pending flip to finish */
+ if (drmmode_crtc->flip_pending)
+ return;
+ }
+
drmModeConnectorSetProperty(drmmode->fd, koutput->connector_id,
drmmode_output->dpms_enum_id, mode);
@@ -2165,26 +2195,50 @@
drmmode_xf86crtc_resize
};
+void
+drmmode_clear_pending_flip(xf86CrtcPtr crtc)
+{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+ drmmode_crtc->flip_pending = FALSE;
+
+ if (!crtc->enabled ||
+ (drmmode_crtc->pending_dpms_mode != DPMSModeOn &&
+ drmmode_crtc->dpms_mode != drmmode_crtc->pending_dpms_mode)) {
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn);
+ int o;
+
+ for (o = 0; o < xf86_config->num_output; o++) {
+ xf86OutputPtr output = xf86_config->output[o];
+
+ if (output->crtc != crtc)
+ continue;
+
+ drmmode_output_dpms(output, drmmode_crtc->pending_dpms_mode);
+ }
+
+ drmmode_crtc_dpms(crtc, drmmode_crtc->pending_dpms_mode);
+ }
+}
+
static void
drmmode_flip_abort(xf86CrtcPtr crtc, void *event_data)
{
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
drmmode_flipdata_ptr flipdata = event_data;
if (--flipdata->flip_count == 0) {
- if (flipdata->fe_crtc)
- crtc = flipdata->fe_crtc;
- flipdata->abort(crtc, flipdata->event_data);
+ if (!flipdata->fe_crtc)
+ flipdata->fe_crtc = crtc;
+ flipdata->abort(flipdata->fe_crtc, flipdata->event_data);
free(flipdata);
}
- drmmode_crtc->flip_pending = FALSE;
+ drmmode_clear_pending_flip(crtc);
}
static void
drmmode_flip_handler(xf86CrtcPtr crtc, uint32_t frame, uint64_t usec, void *event_data)
{
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
RADEONInfoPtr info = RADEONPTR(crtc->scrn);
drmmode_flipdata_ptr flipdata = event_data;
@@ -2196,11 +2250,14 @@
}
if (--flipdata->flip_count == 0) {
- /* Deliver cached msc, ust from reference crtc to flip event handler */
+ /* Deliver MSC & UST from reference/current CRTC to flip event
+ * handler
+ */
if (flipdata->fe_crtc)
- crtc = flipdata->fe_crtc;
- flipdata->handler(crtc, flipdata->fe_frame, flipdata->fe_usec,
- flipdata->event_data);
+ flipdata->handler(flipdata->fe_crtc, flipdata->fe_frame,
+ flipdata->fe_usec, flipdata->event_data);
+ else
+ flipdata->handler(crtc, frame, usec, flipdata->event_data);
/* Release framebuffer */
drmModeRmFB(info->drmmode.fd, flipdata->old_fb_id);
@@ -2208,7 +2265,7 @@
free(flipdata);
}
- drmmode_crtc->flip_pending = FALSE;
+ drmmode_clear_pending_flip(crtc);
}
@@ -2313,8 +2370,10 @@
void drmmode_fini(ScrnInfoPtr pScrn, drmmode_ptr drmmode)
{
+ xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn);
RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
RADEONInfoPtr info = RADEONPTR(pScrn);
+ int c;
if (info->dri2.pKernelDRMVersion->version_minor < 4 || !info->drmmode_inited)
return;
@@ -2325,6 +2384,14 @@
RemoveBlockAndWakeupHandlers((BlockHandlerProcPtr)NoopDDA,
drm_wakeup_handler, drmmode);
}
+
+ for (c = 0; c < config->num_crtc; c++) {
+ xf86CrtcPtr crtc = config->crtc[c];
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+ drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[0]);
+ drmmode_crtc_scanout_destroy(&info->drmmode, &drmmode_crtc->scanout[1]);
+ }
}
@@ -2514,10 +2581,12 @@
radeon_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
{
xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(scrn);
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(scrn);
drmModeResPtr mode_res;
- int i, j;
+ int i, j, s;
Bool found;
Bool changed = FALSE;
+ int num_dvi = 0, num_hdmi = 0;
mode_res = drmModeGetResources(drmmode->fd);
if (!mode_res)
@@ -2553,24 +2622,47 @@
for (i = 0; i < mode_res->count_connectors; i++) {
found = FALSE;
- for (j = 0; j < config->num_output; j++) {
- xf86OutputPtr output = config->output[j];
- drmmode_output_private_ptr drmmode_output;
+ for (s = 0; !found && s < xf86NumScreens; s++) {
+ ScrnInfoPtr loop_scrn = xf86Screens[s];
+ xf86CrtcConfigPtr loop_config =
+ XF86_CRTC_CONFIG_PTR(loop_scrn);
- drmmode_output = output->driver_private;
- if (mode_res->connectors[i] == drmmode_output->output_id) {
- found = TRUE;
- break;
+ if (strcmp(loop_scrn->driverName, scrn->driverName) ||
+ RADEONEntPriv(loop_scrn) != pRADEONEnt)
+ continue;
+
+ for (j = 0; !found && j < loop_config->num_output; j++) {
+ xf86OutputPtr output = loop_config->output[j];
+ drmmode_output_private_ptr drmmode_output;
+
+ drmmode_output = output->driver_private;
+ if (mode_res->connectors[i] ==
+ drmmode_output->output_id) {
+ found = TRUE;
+
+ switch(drmmode_output->mode_output->connector_type) {
+ case DRM_MODE_CONNECTOR_DVII:
+ case DRM_MODE_CONNECTOR_DVID:
+ case DRM_MODE_CONNECTOR_DVIA:
+ num_dvi++;
+ break;
+ case DRM_MODE_CONNECTOR_HDMIA:
+ case DRM_MODE_CONNECTOR_HDMIB:
+ num_hdmi++;
+ break;
+ }
+ }
}
}
if (found)
continue;
- changed = TRUE;
- drmmode_output_init(scrn, drmmode, mode_res, i, NULL, NULL, 1);
+ if (drmmode_output_init(scrn, drmmode, mode_res, i, &num_dvi,
+ &num_hdmi, 1) != 0)
+ changed = TRUE;
}
- if (changed) {
+ if (changed && dixPrivateKeyRegistered(rrPrivKey)) {
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,14,99,2,0)
RRSetChanged(xf86ScrnToScreen(scrn));
#else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/drmmode_display.h new/xf86-video-ati-7.7.1/src/drmmode_display.h
--- old/xf86-video-ati-7.7.0/src/drmmode_display.h 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/drmmode_display.h 2016-09-15 10:52:47.000000000 +0200
@@ -88,6 +88,8 @@
unsigned scanout_id;
Bool scanout_update_pending;
int dpms_mode;
+ /* For when a flip is pending when DPMS off requested */
+ int pending_dpms_mode;
CARD64 dpms_last_ust;
uint32_t dpms_last_seq;
int dpms_last_fps;
@@ -147,6 +149,7 @@
extern int drmmode_get_height_align(ScrnInfoPtr scrn, uint32_t tiling);
extern int drmmode_get_pitch_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
extern int drmmode_get_base_align(ScrnInfoPtr scrn, int bpe, uint32_t tiling);
+extern void drmmode_clear_pending_flip(xf86CrtcPtr crtc);
Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
uint32_t new_front_handle, uint64_t id, void *data,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon.h new/xf86-video-ati-7.7.1/src/radeon.h
--- old/xf86-video-ati-7.7.0/src/radeon.h 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon.h 2016-09-15 10:52:47.000000000 +0200
@@ -656,8 +656,6 @@
static inline void radeon_set_pixmap_bo(PixmapPtr pPix, struct radeon_bo *bo)
{
- ScreenPtr pScreen = pPix->drawable.pScreen;
-
#ifdef USE_GLAMOR
RADEONInfoPtr info = RADEONPTR(xf86ScreenToScrn(pPix->drawable.pScreen));
@@ -693,9 +691,7 @@
radeon_bo_ref(bo);
priv->bo = bo;
- if (radeon_bo_get_tiling(bo, &priv->tiling_flags, &pitch) == 0 &&
- pitch != pPix->devKind)
- pScreen->ModifyPixmapHeader(pPix, -1, -1, -1, -1, pitch, NULL);
+ radeon_bo_get_tiling(bo, &priv->tiling_flags, &pitch);
}
out:
radeon_set_pixmap_private(pPix, priv);
@@ -714,9 +710,7 @@
radeon_bo_ref(bo);
driver_priv->bo = bo;
- if (radeon_bo_get_tiling(bo, &driver_priv->tiling_flags, &pitch) == 0 &&
- pitch != pPix->devKind)
- pScreen->ModifyPixmapHeader(pPix, -1, -1, -1, -1, pitch, NULL);
+ radeon_bo_get_tiling(bo, &driver_priv->tiling_flags, &pitch);
}
}
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_bo_helper.h new/xf86-video-ati-7.7.1/src/radeon_bo_helper.h
--- old/xf86-video-ati-7.7.0/src/radeon_bo_helper.h 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_bo_helper.h 2016-09-15 10:51:56.000000000 +0200
@@ -41,4 +41,20 @@
radeon_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle,
struct radeon_surface *surface);
+/**
+ * get_drawable_pixmap() returns the backing pixmap for a given drawable.
+ *
+ * @param drawable the drawable being requested.
+ *
+ * This function returns the backing pixmap for a drawable, whether it is a
+ * redirected window, unredirected window, or already a pixmap.
+ */
+static inline PixmapPtr get_drawable_pixmap(DrawablePtr drawable)
+{
+ if (drawable->type == DRAWABLE_PIXMAP)
+ return (PixmapPtr)drawable;
+ else
+ return drawable->pScreen->GetWindowPixmap((WindowPtr)drawable);
+}
+
#endif /* RADEON_BO_HELPER_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_dri2.c new/xf86-video-ati-7.7.1/src/radeon_dri2.c
--- old/xf86-video-ati-7.7.0/src/radeon_dri2.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_dri2.c 2016-09-15 10:52:47.000000000 +0200
@@ -78,69 +78,6 @@
dixLookupPrivate(&(window)->devPrivates, dri2_window_private_key))
-static PixmapPtr get_drawable_pixmap(DrawablePtr drawable)
-{
- if (drawable->type == DRAWABLE_PIXMAP)
- return (PixmapPtr)drawable;
- else
- return (*drawable->pScreen->GetWindowPixmap)((WindowPtr)drawable);
-}
-
-
-static PixmapPtr fixup_glamor(DrawablePtr drawable, PixmapPtr pixmap)
-{
- PixmapPtr old = get_drawable_pixmap(drawable);
-#ifdef USE_GLAMOR
- ScreenPtr screen = drawable->pScreen;
- struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
- GCPtr gc;
-
- /* With a glamor pixmap, 2D pixmaps are created in texture
- * and without a static BO attached to it. To support DRI,
- * we need to create a new textured-drm pixmap and
- * need to copy the original content to this new textured-drm
- * pixmap, and then convert the old pixmap to a coherent
- * textured-drm pixmap which has a valid BO attached to it
- * and also has a valid texture, thus both glamor and DRI2
- * can access it.
- *
- */
-
- /* Copy the current contents of the pixmap to the bo. */
- gc = GetScratchGC(drawable->depth, screen);
- if (gc) {
- ValidateGC(&pixmap->drawable, gc);
- gc->ops->CopyArea(&old->drawable, &pixmap->drawable,
- gc,
- 0, 0,
- old->drawable.width,
- old->drawable.height,
- 0, 0);
- FreeScratchGC(gc);
- }
-
- radeon_set_pixmap_private(pixmap, NULL);
-
- /* And redirect the pixmap to the new bo (for 3D). */
- glamor_egl_exchange_buffers(old, pixmap);
- radeon_set_pixmap_private(old, priv);
- old->refcnt++;
-
- screen->ModifyPixmapHeader(old,
- old->drawable.width,
- old->drawable.height,
- 0, 0,
- pixmap->devKind,
- NULL);
- old->devPrivate.ptr = NULL;
-
- screen->DestroyPixmap(pixmap);
-
-#endif /* USE_GLAMOR*/
-
- return old;
-}
-
/* Get GEM flink name for a pixmap */
static Bool
radeon_get_flink_name(RADEONInfoPtr info, PixmapPtr pixmap, uint32_t *name)
@@ -310,10 +247,11 @@
/* this happen if pixmap is non accelerable */
goto error;
}
+ } else if (is_glamor_pixmap) {
+ pixmap = radeon_glamor_set_pixmap_bo(drawable, pixmap);
+ pixmap->refcnt++;
}
- if (is_glamor_pixmap)
- pixmap = fixup_glamor(drawable, pixmap);
if (!radeon_get_flink_name(info, pixmap, &buffers->name))
goto error;
}
@@ -578,10 +516,11 @@
*/
static Bool radeon_dri2_get_crtc_msc(xf86CrtcPtr crtc, CARD64 *ust, CARD64 *msc)
{
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
if (!radeon_crtc_is_enabled(crtc) ||
drmmode_crtc_get_ust_msc(crtc, ust, msc) != Success) {
/* CRTC is not running, extrapolate MSC and timestamp */
- drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
ScrnInfoPtr scrn = crtc->scrn;
RADEONInfoPtr info = RADEONPTR(scrn);
CARD64 now, delta_t, delta_seq;
@@ -606,6 +545,8 @@
*msc += delta_seq;
}
+ *msc += drmmode_crtc->interpolated_vblanks;
+
return TRUE;
}
@@ -834,7 +775,7 @@
region.extents.x1 = region.extents.y1 = 0;
region.extents.x2 = front_priv->pixmap->drawable.width;
- region.extents.y2 = front_priv->pixmap->drawable.width;
+ region.extents.y2 = front_priv->pixmap->drawable.height;
region.data = NULL;
DamageRegionAppend(&front_priv->pixmap->drawable, ®ion);
@@ -1053,7 +994,8 @@
if (!radeon_dri2_get_crtc_msc(crtc, ust, msc))
return FALSE;
- *msc += radeon_get_msc_delta(draw, crtc);
+ if (draw && draw->type == DRAWABLE_WINDOW)
+ *msc += get_dri2_window_priv((WindowPtr)draw)->vblank_delta;
*msc &= 0xffffffff;
return TRUE;
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_glamor.c new/xf86-video-ati-7.7.1/src/radeon_glamor.c
--- old/xf86-video-ati-7.7.0/src/radeon_glamor.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_glamor.c 2016-09-15 10:51:56.000000000 +0200
@@ -283,18 +283,91 @@
return fbCreatePixmap(screen, w, h, depth, usage);
}
+PixmapPtr
+radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap)
+{
+ PixmapPtr old = get_drawable_pixmap(drawable);
+ ScreenPtr screen = drawable->pScreen;
+ struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
+ GCPtr gc;
+
+ /* With a glamor pixmap, 2D pixmaps are created in texture
+ * and without a static BO attached to it. To support DRI,
+ * we need to create a new textured-drm pixmap and
+ * need to copy the original content to this new textured-drm
+ * pixmap, and then convert the old pixmap to a coherent
+ * textured-drm pixmap which has a valid BO attached to it
+ * and also has a valid texture, thus both glamor and DRI2
+ * can access it.
+ *
+ */
+
+ /* Copy the current contents of the pixmap to the bo. */
+ gc = GetScratchGC(drawable->depth, screen);
+ if (gc) {
+ ValidateGC(&pixmap->drawable, gc);
+ gc->ops->CopyArea(&old->drawable, &pixmap->drawable,
+ gc,
+ 0, 0,
+ old->drawable.width,
+ old->drawable.height, 0, 0);
+ FreeScratchGC(gc);
+ }
+
+ radeon_set_pixmap_private(pixmap, NULL);
+
+ /* And redirect the pixmap to the new bo (for 3D). */
+ glamor_egl_exchange_buffers(old, pixmap);
+ radeon_set_pixmap_private(old, priv);
+
+ screen->ModifyPixmapHeader(old,
+ old->drawable.width,
+ old->drawable.height,
+ 0, 0, pixmap->devKind, NULL);
+ old->devPrivate.ptr = NULL;
+
+ screen->DestroyPixmap(pixmap);
+
+ return old;
+}
+
#ifdef RADEON_PIXMAP_SHARING
static Bool
radeon_glamor_share_pixmap_backing(PixmapPtr pixmap, ScreenPtr slave,
void **handle_p)
{
- struct radeon_pixmap *priv = radeon_get_pixmap_private(pixmap);
+ ScreenPtr screen = pixmap->drawable.pScreen;
+ CARD16 stride;
+ CARD32 size;
+ int fd;
+
+ if ((radeon_get_pixmap_tiling_flags(pixmap) &
+ RADEON_TILING_MASK) != RADEON_TILING_LINEAR) {
+ PixmapPtr linear;
+
+ /* We don't want to re-allocate the screen pixmap as
+ * linear, to avoid trouble with page flipping
+ */
+ if (screen->GetScreenPixmap(screen) == pixmap)
+ return FALSE;
+
+ linear = screen->CreatePixmap(screen, pixmap->drawable.width,
+ pixmap->drawable.height,
+ pixmap->drawable.depth,
+ CREATE_PIXMAP_USAGE_SHARED);
+ if (!linear)
+ return FALSE;
+
+ radeon_glamor_set_pixmap_bo(&pixmap->drawable, linear);
+ }
- if (!priv)
+ fd = glamor_fd_from_pixmap(screen, pixmap, &stride, &size);
+ if (fd < 0)
return FALSE;
- return radeon_share_pixmap_backing(priv->bo, handle_p);
+ *handle_p = (void *)(long)fd;
+ return TRUE;
}
static Bool
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_glamor.h new/xf86-video-ati-7.7.1/src/radeon_glamor.h
--- old/xf86-video-ati-7.7.0/src/radeon_glamor.h 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_glamor.h 2016-09-15 10:51:56.000000000 +0200
@@ -71,6 +71,7 @@
Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap, struct radeon_pixmap *priv);
void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst);
+PixmapPtr radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap);
XF86VideoAdaptorPtr radeon_glamor_xv_init(ScreenPtr pScreen, int num_adapt);
@@ -85,6 +86,7 @@
static inline Bool radeon_glamor_create_textured_pixmap(PixmapPtr pixmap, struct radeon_pixmap *priv) { return TRUE; }
static inline void radeon_glamor_exchange_buffers(PixmapPtr src, PixmapPtr dst) {}
+static inline PixmapPtr radeon_glamor_set_pixmap_bo(DrawablePtr drawable, PixmapPtr pixmap) { return pixmap; }
static inline struct radeon_pixmap *radeon_get_pixmap_private(PixmapPtr pixmap) { return NULL; }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_glamor_wrappers.c new/xf86-video-ati-7.7.1/src/radeon_glamor_wrappers.c
--- old/xf86-video-ati-7.7.0/src/radeon_glamor_wrappers.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_glamor_wrappers.c 2016-09-15 10:51:56.000000000 +0200
@@ -35,27 +35,10 @@
#ifdef USE_GLAMOR
#include "radeon.h"
+#include "radeon_bo_helper.h"
#include "radeon_glamor.h"
-/**
- * get_drawable_pixmap() returns the backing pixmap for a given drawable.
- *
- * @param pDrawable the drawable being requested.
- *
- * This function returns the backing pixmap for a drawable, whether it is a
- * redirected window, unredirected window, or already a pixmap.
- */
-static PixmapPtr
-get_drawable_pixmap(DrawablePtr pDrawable)
-{
- if (pDrawable->type == DRAWABLE_WINDOW)
- return pDrawable->pScreen->
- GetWindowPixmap((WindowPtr) pDrawable);
- else
- return (PixmapPtr) pDrawable;
-}
-
/* Are there any outstanding GPU operations for this pixmap? */
static Bool
radeon_glamor_gpu_pending(uint_fast32_t gpu_synced, uint_fast32_t gpu_access)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_kms.c new/xf86-video-ati-7.7.1/src/radeon_kms.c
--- old/xf86-video-ati-7.7.0/src/radeon_kms.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_kms.c 2016-09-15 10:52:47.000000000 +0200
@@ -241,7 +241,6 @@
{
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
RADEONInfoPtr info = RADEONPTR(pScrn);
- rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen);
PixmapPtr pixmap;
struct radeon_surface *surface;
@@ -251,17 +250,21 @@
pScreen->CreateScreenResources = RADEONCreateScreenResources_KMS;
/* Set the RandR primary output if Xorg hasn't */
- if (
+ if (dixPrivateKeyRegistered(rrPrivKey)) {
+ rrScrPrivPtr rrScrPriv = rrGetScrPriv(pScreen);
+
+ if (
#ifdef RADEON_PIXMAP_SHARING
- !pScreen->isGPU &&
+ !pScreen->isGPU &&
#endif
- !rrScrPriv->primaryOutput)
- {
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
-
- rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output;
- RROutputChanged(rrScrPriv->primaryOutput, FALSE);
- rrScrPriv->layoutChanged = TRUE;
+ !rrScrPriv->primaryOutput)
+ {
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
+
+ rrScrPriv->primaryOutput = xf86_config->output[0]->randr_output;
+ RROutputChanged(rrScrPriv->primaryOutput, FALSE);
+ rrScrPriv->layoutChanged = TRUE;
+ }
}
if (!drmmode_set_desired_modes(pScrn, &info->drmmode, FALSE))
@@ -368,7 +371,7 @@
Bool force;
if (!xf86_crtc->enabled ||
- drmmode_crtc->dpms_mode != DPMSModeOn ||
+ drmmode_crtc->pending_dpms_mode != DPMSModeOn ||
!drmmode_crtc->scanout[scanout_id].pixmap)
return FALSE;
@@ -502,7 +505,7 @@
if (!xf86_crtc->enabled ||
drmmode_crtc->scanout_update_pending ||
!drmmode_crtc->scanout[0].pixmap ||
- drmmode_crtc->dpms_mode != DPMSModeOn)
+ drmmode_crtc->pending_dpms_mode != DPMSModeOn)
return;
pDamage = drmmode_crtc->scanout[0].damage;
@@ -553,7 +556,7 @@
drmmode_crtc_private_ptr drmmode_crtc = event_data;
drmmode_crtc->scanout_update_pending = FALSE;
- drmmode_crtc->flip_pending = FALSE;
+ drmmode_clear_pending_flip(crtc);
}
static void
@@ -1108,8 +1111,11 @@
if (ret == 0) {
if (value & DRM_PRIME_CAP_EXPORT)
pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload;
- if (value & DRM_PRIME_CAP_IMPORT)
- pScrn->capabilities |= RR_Capability_SinkOutput | RR_Capability_SourceOffload;
+ if (value & DRM_PRIME_CAP_IMPORT) {
+ pScrn->capabilities |= RR_Capability_SourceOffload;
+ if (info->drmmode.count_crtcs)
+ pScrn->capabilities |= RR_Capability_SinkOutput;
+ }
}
#endif
}
@@ -1228,8 +1234,6 @@
info->allowColorTiling2D = FALSE;
- RADEONSetupCapabilities(pScrn);
-
/* don't enable tiling if accel is not enabled */
if (!info->r600_shadow_fb) {
Bool colorTilingDefault =
@@ -1328,6 +1332,8 @@
goto fail;
}
+ RADEONSetupCapabilities(pScrn);
+
if (info->drmmode.count_crtcs == 1)
pRADEONEnt->HasCRTC2 = FALSE;
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_present.c new/xf86-video-ati-7.7.1/src/radeon_present.c
--- old/xf86-video-ati-7.7.0/src/radeon_present.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_present.c 2016-09-15 10:52:47.000000000 +0200
@@ -271,7 +271,7 @@
if (!drmmode_crtc || drmmode_crtc->rotate.bo != NULL)
return FALSE;
- if (drmmode_crtc->dpms_mode == DPMSModeOn)
+ if (drmmode_crtc->pending_dpms_mode == DPMSModeOn)
num_crtcs_on++;
}
@@ -398,7 +398,7 @@
if (!crtc->enabled)
continue;
- if (drmmode_crtc->dpms_mode == DPMSModeOn)
+ if (drmmode_crtc->pending_dpms_mode == DPMSModeOn)
crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation,
crtc->x, crtc->y);
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/xf86-video-ati-7.7.0/src/radeon_video.c new/xf86-video-ati-7.7.1/src/radeon_video.c
--- old/xf86-video-ati-7.7.0/src/radeon_video.c 2016-04-07 04:40:38.000000000 +0200
+++ new/xf86-video-ati-7.7.1/src/radeon_video.c 2016-09-15 10:51:56.000000000 +0200
@@ -71,7 +71,7 @@
Bool radeon_crtc_is_enabled(xf86CrtcPtr crtc)
{
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
- return drmmode_crtc->dpms_mode == DPMSModeOn;
+ return drmmode_crtc->pending_dpms_mode == DPMSModeOn;
}
xf86CrtcPtr