[PATCH] Skip disabled CRTCs in drmmode_set_desired_modes() even if set_hw == FALSE
Alex Deucher
alexdeucher at gmail.com
Thu Apr 30 07:28:30 PDT 2015
On Thu, Apr 30, 2015 at 4:42 AM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> Not skipping a disabled CRTC results in a crash.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90187
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> src/drmmode_display.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/src/drmmode_display.c b/src/drmmode_display.c
> index 06d1ec0..c12bf51 100644
> --- a/src/drmmode_display.c
> +++ b/src/drmmode_display.c
> @@ -2145,10 +2145,13 @@ Bool drmmode_set_desired_modes(ScrnInfoPtr pScrn, drmmode_ptr drmmode,
> int o;
>
> /* Skip disabled CRTCs */
> - if (set_hw && !crtc->enabled) {
> - drmmode_do_crtc_dpms(crtc, DPMSModeOff);
> - drmModeSetCrtc(drmmode->fd, drmmode_crtc->mode_crtc->crtc_id,
> - 0, 0, 0, NULL, 0, NULL);
> + if (!crtc->enabled) {
> + if (set_hw) {
> + drmmode_do_crtc_dpms(crtc, DPMSModeOff);
> + drmModeSetCrtc(drmmode->fd,
> + drmmode_crtc->mode_crtc->crtc_id,
> + 0, 0, 0, NULL, 0, NULL);
> + }
> continue;
> }
>
> --
> 2.1.4
>
> _______________________________________________
> xorg-driver-ati mailing list
> xorg-driver-ati at lists.x.org
> http://lists.x.org/mailman/listinfo/xorg-driver-ati
More information about the xorg-driver-ati
mailing list