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

2017-04-06 Thread Mariusz Bialonczyk
On Thu, 6 Apr 2017 15:15:00 +0900
Michel Dänzer  wrote:

> On 06/04/17 12:27 PM, Alex Deucher wrote:
> > On Wed, Apr 5, 2017 at 11:23 PM, Michel Dänzer  wrote:
> >> From: Michel Dänzer 
> >>
> >> 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 
> > 
> > Reviewed-by: Alex Deucher 
> 
> Thanks, Alex. However, after thinking about this bug and related
> https://bugs.freedesktop.org/show_bug.cgi?id=100294 some more, I suspect
> we might end up needing a different fix.

Tested-by: Mariusz Bialonczyk 

FWIW: the patch indeed fixes the xorg crash

Regarding bug #100294, I've added a photo from monitors, for you to see
what I am talking about:
https://bugs.freedesktop.org/attachment.cgi?id=130733
https://bugs.freedesktop.org/attachment.cgi?id=130734
In the same time the third monitor was constantly black, only cursor
was visible. Moving a window to this screen shows nothing (black) - maybe
the gamma was set to zero, or something like this?

Of course when I did a screenshot from xorg, all is fine:
https://bugs.freedesktop.org/attachment.cgi?id=130735

regards,
-- 
Mariusz Białończyk | xmpp/e-mail: ma...@skyboo.net
http://manio.skyboo.net | https://github.com/manio
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

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

2017-04-06 Thread Michel Dänzer
On 06/04/17 12:27 PM, Alex Deucher wrote:
> On Wed, Apr 5, 2017 at 11:23 PM, Michel Dänzer  wrote:
>> From: Michel Dänzer 
>>
>> 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 
> 
> Reviewed-by: Alex Deucher 

Thanks, Alex. However, after thinking about this bug and related
https://bugs.freedesktop.org/show_bug.cgi?id=100294 some more, I suspect
we might end up needing a different fix.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast | Mesa and X developer
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

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

2017-04-05 Thread Alex Deucher
On Wed, Apr 5, 2017 at 11:23 PM, Michel Dänzer  wrote:
> From: Michel Dänzer 
>
> 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 

Reviewed-by: Alex Deucher 

> ---
>  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@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

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

2017-04-05 Thread Michel Dänzer
From: Michel Dänzer 

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 
---
 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@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel