xf86-video-ati: Branch 'master' - 5 commits
Michel Dänzer
daenzer at kemper.freedesktop.org
Mon Oct 30 17:44:48 UTC 2017
src/drmmode_display.c | 9 ++++++---
src/radeon_kms.c | 5 ++++-
2 files changed, 10 insertions(+), 4 deletions(-)
New commits:
commit cafcb55768b58dc63a8c5682000eba21ad904689
Author: Keith Packard <keithp at keithp.com>
Date: Mon Sep 25 16:18:22 2017 -0700
modesetting: Skip no-longer-present connectors when resetting BAD links
Outputs may have NULL mode_output (connector) pointers if the
connector disappears while the server is running. Skip these when
resetting outputs with BAD link status.
(Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 167ecfb4..f57c4364 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2797,9 +2797,12 @@ radeon_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
for (i = 0; i < config->num_output; i++) {
xf86OutputPtr output = config->output[i];
drmmode_output_private_ptr drmmode_output = output->driver_private;
- uint32_t con_id = drmmode_output->mode_output->connector_id;
+ uint32_t con_id;
drmModeConnectorPtr koutput;
+ if (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
*/
commit 0cd14777b7e39619f231b841a2d73f3122458030
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Oct 20 17:20:30 2017 +0200
Always call drmModeFreeProperty after drmModeGetProperty
We were not doing so in all cases, leaking memory allocated by the
latter.
(Cherry picked from amdgpu commit f6b39bcd45cb06976ba8a3600df77fc471c63995)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 369c1efc..167ecfb4 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1913,8 +1913,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmModeFreeProperty(props);
break;
}
- drmModeFreeProperty(props);
}
+ drmModeFreeProperty(props);
}
kencoders = calloc(sizeof(drmModeEncoderPtr), koutput->count_encoders);
@@ -2003,8 +2003,8 @@ drmmode_output_init(ScrnInfoPtr pScrn, drmmode_ptr drmmode, drmModeResPtr mode_r
drmModeFreeProperty(props);
break;
}
- drmModeFreeProperty(props);
}
+ drmModeFreeProperty(props);
}
if (dynamic) {
commit 84c7d9c1c71d9cee9f50f96671032529b606cf04
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Oct 20 17:19:09 2017 +0200
Call TimerFree for timer created in LeaveVT
We were leaking the memory allocated by TimerSet.
(Ported from amdgpu commit 84aad09f18fed6b52b0c073f0bbd675a6de07807)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index f79af341..06c8a47f 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -2484,6 +2484,7 @@ CARD32 cleanup_black_fb(OsTimerPtr timer, CARD32 now, pointer data)
drmmode_fb_reference(pRADEONEnt->fd, &drmmode_crtc->fb, NULL);
}
+ TimerFree(timer);
return 0;
}
commit d588015f4f60ce270bcfd8433215fc981a84f143
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Oct 20 17:13:36 2017 +0200
Free memory returned by xf86GetEntityInfo
We were leaking it.
(Ported from amdgpu commit cfccf4c4e7e5c73fe4040fabeb1b43283cf29b33)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index df438768..f79af341 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -228,6 +228,7 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn)
info->accel_state = NULL;
}
+ free(info->pEnt);
free(pScrn->driverPrivate);
pScrn->driverPrivate = NULL;
}
commit ec90c94881239791d0a66a02fc6d003c73a6c1f3
Author: Michel Dänzer <michel.daenzer at amd.com>
Date: Fri Oct 20 16:51:16 2017 +0200
Free pRADEONEnt memory in RADEONFreeRec
We were leaking it.
(Inspired by amdgpu commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990)
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 9ef51693..df438768 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -218,7 +218,8 @@ static void RADEONFreeRec(ScrnInfoPtr pScrn)
pRADEONEnt->platform_dev->flags & XF86_PDEV_SERVER_FD))
#endif
drmClose(pRADEONEnt->fd);
- pRADEONEnt->fd = 0;
+ free(pPriv->ptr);
+ pPriv->ptr = NULL;
}
}
More information about the xorg-commit
mailing list