xf86-video-amdgpu: Branch 'master' - 2 commits
Michel Dänzer
daenzer at kemper.freedesktop.org
Mon Apr 23 15:14:49 UTC 2018
src/drmmode_display.c | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
New commits:
commit 72c3e9c7308fbcdf85708b72f9be14a5f2f8e7b5
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Thu Mar 8 19:07:21 2018 +0100
Simplify drmmode_crtc_scanout_update
Use our own BoxRec for the extents, and RegionEmpty for clearing the
scanout damage region.
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index d752e71..240e88b 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -727,8 +727,8 @@ drmmode_crtc_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
if (drmmode_crtc->scanout[scanout_id].pixmap &&
(!drmmode_crtc->tear_free ||
drmmode_crtc->scanout[scanout_id ^ 1].pixmap)) {
- RegionPtr region;
- BoxPtr box;
+ BoxRec extents = { .x1 = 0, .y1 = 0,
+ .x2 = scrn->virtualX, .y2 = scrn->virtualY };
if (!drmmode_crtc->scanout_damage) {
drmmode_crtc->scanout_damage =
@@ -740,21 +740,13 @@ drmmode_crtc_scanout_update(xf86CrtcPtr crtc, DisplayModePtr mode,
drmmode_crtc->scanout_damage);
}
- region = DamageRegion(drmmode_crtc->scanout_damage);
- RegionUninit(region);
- region->data = NULL;
- box = RegionExtents(region);
- box->x1 = 0;
- box->y1 = 0;
- box->x2 = max(box->x2, scrn->virtualX);
- box->y2 = max(box->y2, scrn->virtualY);
-
*fb = amdgpu_pixmap_get_fb(drmmode_crtc->scanout[scanout_id].pixmap);
*x = *y = 0;
amdgpu_scanout_do_update(crtc, scanout_id,
screen->GetWindowPixmap(screen->root),
- *box);
+ extents);
+ RegionEmpty(DamageRegion(drmmode_crtc->scanout_damage));
amdgpu_glamor_finish(scrn);
}
}
commit 4dcda0b48d62944c841cd9540f4ad4c7ac8dee47
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Apr 20 17:34:55 2018 +0200
Update RandR CRTC state if set_mode_major fails in set_desired_modes
Without this, RandR would report the CRTC and its outputs as enabled,
even though they were actually off due to the failure.
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index dcfc993..d752e71 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2729,6 +2729,8 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
} else {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Failed to set mode on CRTC %d\n", c);
+ RRCrtcSet(crtc->randr_crtc, NULL, crtc->x, crtc->y,
+ crtc->rotation, 0, NULL);
}
} else {
crtc->mode = crtc->desiredMode;
More information about the xorg-commit
mailing list