xf86-video-ati: Branch 'master' - 3 commits
Michel Dänzer
daenzer at kemper.freedesktop.org
Fri Jul 22 10:12:11 UTC 2016
man/radeon.man | 5 +++--
src/drmmode_display.c | 13 +++++++------
src/radeon_dri2.c | 4 ++--
src/radeon_drm_queue.c | 7 ++++---
src/radeon_drm_queue.h | 2 ++
src/radeon_kms.c | 6 +++---
src/radeon_present.c | 2 +-
7 files changed, 22 insertions(+), 17 deletions(-)
New commits:
commit 94fe42f29e0b00a26e810581d6c438ac6d8ecd8a
Author: Michel Dänzer <michel.daenzer at 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 at amd.com>
diff --git a/man/radeon.man b/man/radeon.man
index cacafb5..44603a5 100644
--- a/man/radeon.man
+++ b/man/radeon.man
@@ -271,8 +271,9 @@ Sea Islands.
Define the maximum level of DRI to enable. Valid values are 2 for DRI2 or 3 for DRI3.
The default is
.B 3 for DRI3
-if the driver was compiled for Xorg >= 1.18.3, otherwise
-.B 2 for DRI2.
+if the driver was compiled for Xorg >= 1.18.3 and glamor is enabled, otherwise
+.B 2 for DRI2. Note:
+DRI3 may not work correctly in all cases with EXA, enable at your own risk.
.TP
.BI "Option \*qEnablePageFlip\*q \*q" boolean \*q
Enable DRI2 page flipping. The default is
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 6388669..122b932 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -1726,7 +1726,7 @@ Bool RADEONScreenInit_KMS(SCREEN_INIT_ARGS_DECL)
#endif
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,18,3,0,0)
- value = TRUE;
+ value = info->use_glamor;
#else
value = FALSE;
#endif
commit 6d91fb4fc701895473ff675f440a8eef655e80ca
Author: Michel Dänzer <michel.daenzer at 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 at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 7d2ce1f..b39651c 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -543,10 +543,11 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
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;
@@ -557,11 +558,11 @@ drmmode_crtc_scanout_allocate(xf86CrtcPtr crtc,
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;
commit a37af701768b12d86868a831a79f1e02ee4968cf
Author: Michel Dänzer <michel.daenzer at 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 at gmail.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index b1de952..7d2ce1f 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2792,7 +2792,7 @@ Bool radeon_do_pageflip(ScrnInfoPtr scrn, ClientPtr client,
flipdata,
drmmode_flip_handler,
drmmode_flip_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM queue event entry failed.\n");
goto error;
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index 62325bd..c55e6ee 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -1201,7 +1201,7 @@ static int radeon_dri2_schedule_wait_msc(ClientPtr client, DrawablePtr draw,
drm_queue_seq = radeon_drm_queue_alloc(crtc, client, RADEON_DRM_QUEUE_ID_DEFAULT,
wait_info, radeon_dri2_frame_event_handler,
radeon_dri2_frame_event_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM queue event entry failed.\n");
goto out_complete;
@@ -1348,7 +1348,7 @@ static int radeon_dri2_schedule_swap(ClientPtr client, DrawablePtr draw,
drm_queue_seq = radeon_drm_queue_alloc(crtc, client, RADEON_DRM_QUEUE_ID_DEFAULT,
swap_info, radeon_dri2_frame_event_handler,
radeon_dri2_frame_event_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM queue entry failed.\n");
goto blit_fallback;
diff --git a/src/radeon_drm_queue.c b/src/radeon_drm_queue.c
index 0d999dd..31f2435 100644
--- a/src/radeon_drm_queue.c
+++ b/src/radeon_drm_queue.c
@@ -92,10 +92,11 @@ radeon_drm_queue_alloc(xf86CrtcPtr crtc, ClientPtr client,
e = calloc(1, sizeof(struct radeon_drm_queue_entry));
if (!e)
- return NULL;
+ return RADEON_DRM_QUEUE_ERROR;
+
+ if (_X_UNLIKELY(radeon_drm_queue_seq == RADEON_DRM_QUEUE_ERROR))
+ radeon_drm_queue_seq++;
- if (!radeon_drm_queue_seq)
- radeon_drm_queue_seq = 1;
e->seq = radeon_drm_queue_seq++;
e->client = client;
e->crtc = crtc;
diff --git a/src/radeon_drm_queue.h b/src/radeon_drm_queue.h
index 0d9d278..c3e2076 100644
--- a/src/radeon_drm_queue.h
+++ b/src/radeon_drm_queue.h
@@ -29,6 +29,8 @@
#ifndef _RADEON_DRM_QUEUE_H_
#define _RADEON_DRM_QUEUE_H_
+#define RADEON_DRM_QUEUE_ERROR 0
+
#define RADEON_DRM_QUEUE_CLIENT_DEFAULT serverClient
#define RADEON_DRM_QUEUE_ID_DEFAULT ~0ULL
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 41ee597..6388669 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -529,7 +529,7 @@ radeon_scanout_update(xf86CrtcPtr xf86_crtc)
drmmode_crtc,
radeon_scanout_update_handler,
radeon_scanout_update_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"radeon_drm_queue_alloc failed for scanout update\n");
return;
@@ -581,7 +581,7 @@ radeon_scanout_flip(ScreenPtr pScreen, RADEONInfoPtr info,
RADEON_DRM_QUEUE_ID_DEFAULT,
drmmode_crtc, NULL,
radeon_scanout_flip_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
xf86DrvMsg(scrn->scrnIndex, X_WARNING,
"Allocating DRM event queue entry failed.\n");
return;
diff --git a/src/radeon_present.c b/src/radeon_present.c
index 1eced4a..52943fb 100644
--- a/src/radeon_present.c
+++ b/src/radeon_present.c
@@ -169,7 +169,7 @@ radeon_present_queue_vblank(RRCrtcPtr crtc, uint64_t event_id, uint64_t msc)
event_id, event,
radeon_present_vblank_handler,
radeon_present_vblank_abort);
- if (!drm_queue_seq) {
+ if (drm_queue_seq == RADEON_DRM_QUEUE_ERROR) {
free(event);
return BadAlloc;
}
More information about the xorg-commit
mailing list