xserver: Branch 'master' - 6 commits
Adam Jackson
ajax at kemper.freedesktop.org
Wed Nov 29 19:56:05 UTC 2017
hw/xfree86/drivers/modesetting/driver.h | 1 -
hw/xfree86/drivers/modesetting/drmmode_display.c | 15 +++++++--------
hw/xfree86/os-support/linux/lnx_platform.c | 9 +++------
os/xdmcp.c | 2 +-
4 files changed, 11 insertions(+), 16 deletions(-)
New commits:
commit 78b2ce1410dda758537d52398223ca9b757883bc
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:43 2017 +0100
modesetting: Remove #if 0 CMAP_LOAD_EVEN_IF_OFFSCREEN
CMAP_LOAD_EVEN_IF_OFFSCREEN has been encapsulated since the import of
xf86-video-modesetting into the tree.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 3b8107359..a51722b58 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2206,12 +2206,9 @@ drmmode_setup_colormap(ScreenPtr pScreen, ScrnInfoPtr pScrn)
if (!miCreateDefColormap(pScreen))
return FALSE;
/* all radeons support 10 bit CLUTs */
- if (!xf86HandleColormaps(pScreen, 256, 10,
- drmmode_load_palette, NULL, CMAP_PALETTED_TRUECOLOR
-#if 0 /* This option messes up text mode! (eich at suse.de) */
- | CMAP_LOAD_EVEN_IF_OFFSCREEN
-#endif
- | CMAP_RELOAD_ON_MODE_SWITCH))
+ if (!xf86HandleColormaps(pScreen, 256, 10, drmmode_load_palette, NULL,
+ CMAP_PALETTED_TRUECOLOR |
+ CMAP_RELOAD_ON_MODE_SWITCH))
return FALSE;
return TRUE;
}
commit d563443381142fbc0b102422d7e7389bf3621331
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:42 2017 +0100
modesetting: Remove unused define DRV_ERROR
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/hw/xfree86/drivers/modesetting/driver.h b/hw/xfree86/drivers/modesetting/driver.h
index 7ea500f5c..08dc3b58a 100644
--- a/hw/xfree86/drivers/modesetting/driver.h
+++ b/hw/xfree86/drivers/modesetting/driver.h
@@ -40,7 +40,6 @@
#endif
#include "drmmode_display.h"
-#define DRV_ERROR(msg) xf86DrvMsg(pScrn->scrnIndex, X_ERROR, msg);
#define MS_LOGLEVEL_DEBUG 4
typedef enum {
commit 6804875662363764683a86c1614e4cf3cc70a20a
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:41 2017 +0100
modesetting: Reset output_id if drmModeGetConnector failed
If drmModeGetConnector() fails in drmmode_output_detect(), we have to
reset the output_id to -1 too.
Yet another spot leading to a potential NULL dereference when handling
the mode_output member as output_id was != -1. Though, this case should
be very hard to hit.
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 404bb1dc2..3b8107359 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1151,8 +1151,10 @@ drmmode_output_detect(xf86OutputPtr output)
drmmode_output->mode_output =
drmModeGetConnector(drmmode->fd, drmmode_output->output_id);
- if (!drmmode_output->mode_output)
+ if (!drmmode_output->mode_output) {
+ drmmode_output->output_id = -1;
return XF86OutputStatusDisconnected;
+ }
switch (drmmode_output->mode_output->connection) {
case DRM_MODE_CONNECTED:
commit e20b1016de22e893d5468960988ddd5677c11d98
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:40 2017 +0100
modesetting: Fix log msg if pixmap creation failed
Add a missing new-line character and make the message more verbose than
"Failed".
Reviewed-by: Adam Jackson <ajax at redhat.com>
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index f7298b1d8..404bb1dc2 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1879,7 +1879,7 @@ drmmode_set_pixmap_bo(drmmode_ptr drmmode, PixmapPtr pixmap, drmmode_bo *bo)
return TRUE;
if (!glamor_egl_create_textured_pixmap_from_gbm_bo(pixmap, bo->gbm)) {
- xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed");
+ xf86DrvMsg(scrn->scrnIndex, X_ERROR, "Failed to create pixmap\n");
return FALSE;
}
#endif
commit 02981fe1a844e101c81037df79fc147f217f3bf9
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:39 2017 +0100
xfree86: Fix set but not used warnings in lnx_platform
Those warnings are generated, when building without systemd support:
../hw/xfree86/os-support/linux/lnx_platform.c: In function ‘get_drm_info’:
../hw/xfree86/os-support/linux/lnx_platform.c:29:16: warning: variable ‘minor’ set but not used [-Wunused-but-set-variable]
int major, minor, fd;
^~~~~
../hw/xfree86/os-support/linux/lnx_platform.c:29:9: warning: variable ‘major’ set but not used [-Wunused-but-set-variable]
int major, minor, fd;
^~~~~
In this case the functions are macros, which don't use theese arguments.
v2: Add comments, why the warnings appear. Suggested by Emil Velikov
Reviewed-by: Emil Velikov <emil.velikov at collabora.com>
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
diff --git a/hw/xfree86/os-support/linux/lnx_platform.c b/hw/xfree86/os-support/linux/lnx_platform.c
index 1d145b362..11af52c46 100644
--- a/hw/xfree86/os-support/linux/lnx_platform.c
+++ b/hw/xfree86/os-support/linux/lnx_platform.c
@@ -26,19 +26,16 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index)
drmSetVersion sv;
drmVersionPtr v;
char *buf;
- int major, minor, fd;
+ int fd;
int err = 0;
Bool paused, server_fd = FALSE;
- major = attribs->major;
- minor = attribs->minor;
-
- fd = systemd_logind_take_fd(major, minor, path, &paused);
+ fd = systemd_logind_take_fd(attribs->major, attribs->minor, path, &paused);
if (fd != -1) {
if (paused) {
LogMessage(X_ERROR,
"Error systemd-logind returned paused fd for drm node\n");
- systemd_logind_release_fd(major, minor, -1);
+ systemd_logind_release_fd(attribs->major, attribs->minor, -1);
return FALSE;
}
attribs->fd = fd;
commit 918afeecbc63d70413e222efdb2ac4cfb16eae9e
Author: Daniel Martin <consume.noise at gmail.com>
Date: Mon Nov 20 10:47:38 2017 +0100
os/xdmcp: Honour -once when session is dead
Terminate a dead session when -once was passed. Don't restart it.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-by: Walter Harms <wharms at bfs.de>
diff --git a/os/xdmcp.c b/os/xdmcp.c
index 906c95944..7aeb393e6 100644
--- a/os/xdmcp.c
+++ b/os/xdmcp.c
@@ -797,7 +797,7 @@ XdmcpDeadSession(const char *reason)
ErrorF("XDM: %s, declaring session dead\n", reason);
state = XDM_INIT_STATE;
isItTimeToYield = TRUE;
- dispatchException |= DE_RESET;
+ dispatchException |= (OneSession ? DE_TERMINATE : DE_RESET);
TimerCancel(xdmcp_timer);
timeOutRtx = 0;
send_packet();
More information about the xorg-commit
mailing list