xserver: Branch 'master' - 2 commits
Adam Jackson
ajax at kemper.freedesktop.org
Thu Apr 5 15:00:13 UTC 2018
dri3/dri3_screen.c | 2 ++
hw/xfree86/drivers/modesetting/drmmode_display.c | 5 +++--
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 8ff1cdb2bff72a37e75004f562737dd0af6daf14
Author: Daniel Stone <daniels at collabora.com>
Date: Thu Apr 5 15:00:38 2018 +0100
dri3: Set stride and size for old clients
For old clients using the fd_from_pixmap entrypoint, make sure we set
stride and size correctly.
Noticed by inspection.
Signed-off-by: Daniel Stone <daniels at collabora.com>
diff --git a/dri3/dri3_screen.c b/dri3/dri3_screen.c
index 41595f412..8ccbeb40c 100644
--- a/dri3/dri3_screen.c
+++ b/dri3/dri3_screen.c
@@ -161,6 +161,8 @@ dri3_fd_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
return -1;
}
+ *stride = strides[0];
+ *size = size[0];
return fds[0];
}
commit 78574a66b5b286e26839877640592980de089d64
Author: Daniel Stone <daniels at collabora.com>
Date: Thu Apr 5 14:58:40 2018 +0100
modesetting: Don't reuse iterator in nested loop
drmmode_crtc_set_mode has a loop nested inside another loop, where both
of them were using 'i' as the loop iterator. Rename it to avoid an
infinite loop.
Signed-off-by: Daniel Stone <daniels at collabora.com>
Reported-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 2b04c3555..cdcd4f3f3 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -777,12 +777,13 @@ drmmode_crtc_set_mode(xf86CrtcPtr crtc, Bool test_only)
drmmode_crtc_private_ptr other_drmmode_crtc = other_crtc->driver_private;
int lost_outputs = 0;
int remaining_outputs = 0;
+ int j;
if (other_crtc == crtc)
continue;
- for (i = 0; i < xf86_config->num_output; i++) {
- xf86OutputPtr output = xf86_config->output[i];
+ for (j = 0; j < xf86_config->num_output; j++) {
+ xf86OutputPtr output = xf86_config->output[j];
drmmode_output_private_ptr drmmode_output = output->driver_private;
if (drmmode_output->current_crtc == other_crtc) {
More information about the xorg-commit
mailing list