* [PATCH xf86-video-ati] modesetting: Check crtc before searching link-status property
@ 2017-11-01 17:43 Michel Dänzer
[not found] ` <20171101174324.2886-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Michel Dänzer @ 2017-11-01 17:43 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
From: Daniel Martin <consume.noise@gmail.com>
No need to lookup the link-status property if we don't have a crtc.
Signed-off-by: Daniel Martin <consume.noise@gmail.com>
(Ported from xserver commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad)
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
---
src/drmmode_display.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index f57c43647..7ad3235a5 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -2796,12 +2796,14 @@ radeon_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
*/
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 || !drmmode_output->mode_output)
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
@@ -2813,10 +2815,6 @@ radeon_mode_hotplug(ScrnInfoPtr scrn, drmmode_ptr drmmode)
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);
--
2.15.0.rc2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH xf86-video-ati] modesetting: Check crtc before searching link-status property
[not found] ` <20171101174324.2886-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2017-11-01 18:44 ` Deucher, Alexander
0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2017-11-01 18:44 UTC (permalink / raw)
To: 'Michel Dänzer', amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Michel Dänzer
> Sent: Wednesday, November 01, 2017 1:43 PM
> To: amd-gfx@lists.freedesktop.org
> Subject: [PATCH xf86-video-ati] modesetting: Check crtc before searching
> link-status property
>
> From: Daniel Martin <consume.noise@gmail.com>
>
> No need to lookup the link-status property if we don't have a crtc.
>
> Signed-off-by: Daniel Martin <consume.noise@gmail.com>
> (Ported from xserver commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad)
> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Both this and the amdgpu patch are:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> ---
> src/drmmode_display.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index f57c43647..7ad3235a5 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -2796,12 +2796,14 @@ radeon_mode_hotplug(ScrnInfoPtr scrn,
> drmmode_ptr drmmode)
> */
> 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 || !drmmode_output->mode_output)
> 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
> @@ -2813,10 +2815,6 @@ radeon_mode_hotplug(ScrnInfoPtr scrn,
> drmmode_ptr drmmode)
> 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);
> --
> 2.15.0.rc2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-01 18:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-01 17:43 [PATCH xf86-video-ati] modesetting: Check crtc before searching link-status property Michel Dänzer
[not found] ` <20171101174324.2886-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-11-01 18:44 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.