Re: [PATCH 3/3] Kludge -- Call RandR screen before cleaning up xf86 crtcs

2012-08-14 Thread Dave Airlie
On Wed, Aug 8, 2012 at 10:49 AM, Keith Packard kei...@keithp.com wrote:
 The core RandR screen cleanup now involves cleaning up any GPU screen
 associations, and those call down into DDX to clean up the driver. If
 the pointers from the xf86 structures back to the core randr
 structures are set to NULL at that point, bad things happen.

 This patch knows that the core RandR close screen is underneath the
 xf86 randr close screen function, and so makes sure it gets called
 first.

Yeah its pretty kludgey but probably the best solution for now.

Reviewed-by: Dave Airlie airl...@redhat.com


 Signed-off-by: Keith Packard kei...@keithp.com
 ---
  hw/xfree86/modes/xf86Crtc.c |   11 +++
  1 file changed, 7 insertions(+), 4 deletions(-)

 diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
 index 154f684..1947c5be 100644
 --- a/hw/xfree86/modes/xf86Crtc.c
 +++ b/hw/xfree86/modes/xf86Crtc.c
 @@ -726,6 +726,12 @@ xf86CrtcCloseScreen(ScreenPtr screen)

  xf86RotateCloseScreen(screen);

 +xf86RandR12CloseScreen(screen);
 +
 +free(config-name);
 +
 +screen-CloseScreen(screen);
 +
  for (o = 0; o  config-num_output; o++) {
  xf86OutputPtr output = config-output[o];

 @@ -749,10 +755,7 @@ xf86CrtcCloseScreen(ScreenPtr screen)
  else if (screen-current_master)
  DetachUnboundGPU(screen);
  }
 -xf86RandR12CloseScreen(screen);
 -
 -free(config-name);
 -return screen-CloseScreen(screen);
 +return TRUE;
  }

  /*
 --
 1.7.10.4

 ___
 xorg-devel@lists.x.org: X.Org development
 Archives: http://lists.x.org/archives/xorg-devel
 Info: http://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel


Re: [PATCH 3/3] Kludge -- Call RandR screen before cleaning up xf86 crtcs

2012-08-14 Thread Keith Packard
Dave Airlie airl...@gmail.com writes:


 Yeah its pretty kludgey but probably the best solution for now.

 Reviewed-by: Dave Airlie airl...@redhat.com

All three of these are merged.
   863d528..c0540b4  master - master

-- 
keith.pack...@intel.com



pgp8tjCWWcySx.pgp
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

[PATCH 3/3] Kludge -- Call RandR screen before cleaning up xf86 crtcs

2012-08-07 Thread Keith Packard
The core RandR screen cleanup now involves cleaning up any GPU screen
associations, and those call down into DDX to clean up the driver. If
the pointers from the xf86 structures back to the core randr
structures are set to NULL at that point, bad things happen.

This patch knows that the core RandR close screen is underneath the
xf86 randr close screen function, and so makes sure it gets called
first.

Signed-off-by: Keith Packard kei...@keithp.com
---
 hw/xfree86/modes/xf86Crtc.c |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c
index 154f684..1947c5be 100644
--- a/hw/xfree86/modes/xf86Crtc.c
+++ b/hw/xfree86/modes/xf86Crtc.c
@@ -726,6 +726,12 @@ xf86CrtcCloseScreen(ScreenPtr screen)
 
 xf86RotateCloseScreen(screen);
 
+xf86RandR12CloseScreen(screen);
+
+free(config-name);
+
+screen-CloseScreen(screen);
+
 for (o = 0; o  config-num_output; o++) {
 xf86OutputPtr output = config-output[o];
 
@@ -749,10 +755,7 @@ xf86CrtcCloseScreen(ScreenPtr screen)
 else if (screen-current_master)
 DetachUnboundGPU(screen);
 }
-xf86RandR12CloseScreen(screen);
-
-free(config-name);
-return screen-CloseScreen(screen);
+return TRUE;
 }
 
 /*
-- 
1.7.10.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel