[PATCH xserver] xf86_crtc_supports_gamma: Return FALSE if RandR is disabled

Alex Deucher alexdeucher at gmail.com
Thu Apr 6 03:27:40 UTC 2017


On Wed, Apr 5, 2017 at 11:23 PM, Michel Dänzer <michel at daenzer.net> wrote:
> From: Michel Dänzer <michel.daenzer at amd.com>
>
> E.g. becuase Xinerama is enabled.
>
> Fixes crash on server startup when RandR is disabled and all other
> conditions in xf86_crtc_supports_gamma are satisfied.
>
> Bugzilla: https://bugs.freedesktop.org/100293
> Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  hw/xfree86/modes/xf86Crtc.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
> index 3f9857b4a..9ce303de7 100644
> --- a/hw/xfree86/modes/xf86Crtc.c
> +++ b/hw/xfree86/modes/xf86Crtc.c
> @@ -3405,7 +3405,8 @@ xf86_crtc_notify(ScreenPtr screen)
>  Bool
>  xf86_crtc_supports_gamma(ScrnInfoPtr pScrn)
>  {
> -    if (xf86CrtcConfigPrivateIndex != -1) {
> +    if (dixPrivateKeyRegistered(rrPrivKey) &&
> +        xf86CrtcConfigPrivateIndex != -1) {
>          xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
>          xf86CrtcPtr crtc;
>
> --
> 2.11.0
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel


More information about the xorg-devel mailing list