xf86-video-intel: src/sna/sna_display.c src/sna/sna_dri2.c
Chris Wilson
ickle at kemper.freedesktop.org
Sat Mar 25 01:11:37 UTC 2017
src/sna/sna_display.c | 4 +++-
src/sna/sna_dri2.c | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
New commits:
commit c0d41c371f52c87280630ac8182da44124dfd49f
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Sat Mar 25 01:07:07 2017 +0000
sna: Protect against RROutputPrimary being on a slave
RandR allows the Primary output to belong to a slave GPU, i.e. with the
condition that screen->primaryOutput->screen != screen. When we fallback
to using the PrimaryOutput, we therefore have to check that the output
belong to us before treating it as a sna_output.
Reported-by: Peter Wu <peter at lekensteyn.nl>
Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100382
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index e85e444c..1eca8cc0 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -7905,7 +7905,9 @@ xf86CrtcPtr sna_primary_crtc(struct sna *sna)
rrScrPrivPtr rr = rrGetScrPriv(xf86ScrnToScreen(sna->scrn));
if (rr && rr->primaryOutput) {
xf86OutputPtr output = rr->primaryOutput->devPrivate;
- if (output->crtc && to_sna_crtc(output->crtc))
+ if (output->crtc &&
+ output->scrn == sna->scrn &&
+ to_sna_crtc(output->crtc))
return output->crtc;
}
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index 697a7290..d89525cc 100644
--- a/src/sna/sna_dri2.c
+++ b/src/sna/sna_dri2.c
@@ -1464,6 +1464,7 @@ inline static uint32_t pipe_select(int pipe)
* we can safely ignore the capability check - if we have more
* than two pipes, we can assume that they are fully supported.
*/
+ assert(pipe < _DRM_VBLANK_HIGH_CRTC_MASK);
if (pipe > 1)
return pipe << DRM_VBLANK_HIGH_CRTC_SHIFT;
else if (pipe > 0)
More information about the xorg-commit
mailing list