xserver: Branch 'master' - 3 commits
Adam Jackson
ajax at kemper.freedesktop.org
Fri Oct 20 19:27:37 UTC 2017
hw/xfree86/drivers/modesetting/driver.c | 12 +-----------
hw/xfree86/drivers/modesetting/drmmode_display.c | 8 +++-----
2 files changed, 4 insertions(+), 16 deletions(-)
New commits:
commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad
Author: Daniel Martin <consume.noise at gmail.com>
Date: Fri Oct 20 10:05:35 2017 +0200
modesetting: Check crtc before searching link-status property
No need to lookup the link-status property if we don't have a crtc.
Signed-off-by: Daniel Martin <consume.noise at gmail.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 e211e57eb..4906b0539 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -2270,12 +2270,14 @@ drmmode_handle_uevents(int fd, void *closure)
*/
for (i = 0; i < config->num_output; i++) {
xf86OutputPtr output = config->output[i];
+ xf86CrtcPtr crtc = output->crtc;
drmmode_output_private_ptr drmmode_output = output->driver_private;
uint32_t con_id;
drmModeConnectorPtr koutput;
- if (drmmode_output->mode_output == NULL)
+ if (crtc == NULL || drmmode_output->mode_output == NULL)
continue;
+
con_id = drmmode_output->mode_output->connector_id;
/* Get an updated view of the properties for the current connector and
* look for the link-status property
@@ -2287,10 +2289,6 @@ drmmode_handle_uevents(int fd, void *closure)
if (props && props->flags & DRM_MODE_PROP_ENUM &&
!strcmp(props->name, "link-status") &&
koutput->prop_values[j] == DRM_MODE_LINK_STATUS_BAD) {
- xf86CrtcPtr crtc = output->crtc;
- if (!crtc)
- continue;
-
/* the connector got a link failure, re-set the current mode */
drmmode_set_mode_major(crtc, &crtc->mode, crtc->rotation,
crtc->x, crtc->y);
commit 8c455db0ebb6e5313ca81428bb6dd75ef12aaa15
Author: Daniel Martin <consume.noise at gmail.com>
Date: Fri Oct 20 10:05:34 2017 +0200
modesetting: Remove #ifdefs XF86_PDEV_SERVER_FD
XF86_PDEV_SERVER_FD is defined since:
commit 5fb641a29bfb4a33da964e1e9af523f3472015c6
Author: Hans de Goede <hdegoede at redhat.com>
Date: Mon Jan 13 12:03:46 2014 +0100
hotplug: Extend OdevAttributes for server-managed fd support
ifdef'ing for it is a leftover from the external xf86-video-modesetting.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 91d850427..380dbbe17 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -244,14 +244,12 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev)
{
int fd;
-#ifdef XF86_PDEV_SERVER_FD
if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) {
fd = xf86_platform_device_odev_attributes(platform_dev)->fd;
if (fd == -1)
return FALSE;
return check_outputs(fd, NULL);
}
-#endif
fd = open_hw(dev);
if (fd != -1) {
@@ -712,10 +710,8 @@ FreeRec(ScrnInfoPtr pScrn)
if (ms->pEnt->location.type == BUS_PCI)
ret = drmClose(ms->fd);
else
-#ifdef XF86_PDEV_SERVER_FD
if (!(ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)))
-#endif
ret = close(ms->fd);
(void) ret;
ms_ent->fd = 0;
@@ -828,13 +824,11 @@ ms_get_drm_master_fd(ScrnInfoPtr pScrn)
#ifdef XSERVER_PLATFORM_BUS
if (pEnt->location.type == BUS_PLATFORM) {
-#ifdef XF86_PDEV_SERVER_FD
if (pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD)
ms->fd =
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
fd;
else
-#endif
{
char *path =
xf86_platform_device_odev_attributes(pEnt->location.id.plat)->
@@ -1496,11 +1490,9 @@ SetMaster(ScrnInfoPtr pScrn)
modesettingPtr ms = modesettingPTR(pScrn);
int ret;
-#ifdef XF86_PDEV_SERVER_FD
if (ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
return TRUE;
-#endif
ret = drmSetMaster(ms->fd);
if (ret)
@@ -1749,11 +1741,9 @@ LeaveVT(ScrnInfoPtr pScrn)
pScrn->vtSema = FALSE;
-#ifdef XF86_PDEV_SERVER_FD
if (ms->pEnt->location.type == BUS_PLATFORM &&
(ms->pEnt->location.id.plat->flags & XF86_PDEV_SERVER_FD))
return;
-#endif
drmDropMaster(ms->fd);
}
commit 66d8cbf8ce9285a8771118e46daa44faa73ad847
Author: Daniel Martin <consume.noise at gmail.com>
Date: Fri Oct 20 10:05:33 2017 +0200
modesetting: Fix warning of unused variable if not GLAMOR_HAS_GBM
../hw/xfree86/drivers/modesetting/driver.c: In function ‘redisplay_dirty’:
../hw/xfree86/drivers/modesetting/driver.c:586:20: warning: unused variable ‘ms’ [-Wunused-variable]
modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
Move the variable ms into #ifdef GLAMOR_HAS_GBM, where it is used.
Signed-off-by: Daniel Martin <consume.noise at gmail.com>
Reviewed-by: Adam Jackson <ajax at redhat.com>
diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c
index 9afb344c8..91d850427 100644
--- a/hw/xfree86/drivers/modesetting/driver.c
+++ b/hw/xfree86/drivers/modesetting/driver.c
@@ -585,7 +585,6 @@ dispatch_slave_dirty(ScreenPtr pScreen)
static void
redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
{
- modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
RegionRec pixregion;
PixmapRegionInit(&pixregion, dirty->slave_dst);
@@ -594,6 +593,7 @@ redisplay_dirty(ScreenPtr screen, PixmapDirtyUpdatePtr dirty, int *timeout)
if (!screen->isGPU) {
#ifdef GLAMOR_HAS_GBM
+ modesettingPtr ms = modesettingPTR(xf86ScreenToScrn(screen));
/*
* When copying from the master framebuffer to the shared pixmap,
* we must ensure the copy is complete before the slave starts a
More information about the xorg-commit
mailing list