[PATCH xf86-video-sunffb] Remove xf86DPMSInit() duplication

Julien Cristau jcristau at debian.org
Tue Dec 7 11:59:36 PST 2010


On Tue, Dec  7, 2010 at 20:49:20 +0100, Mark Kettenis wrote:

> 
> This driver calls xf86DPMSInit() twice, which is a bad idea since this
> function wraps CloseScreen().  Remove the second call.  Fixes a crash on
> server shutdown with xserver 1.9.2 on OpenBSD/sparc64.
> 
> Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
> ---
>  src/ffb_driver.c |   13 -------------
>  1 files changed, 0 insertions(+), 13 deletions(-)
> 
> diff --git a/src/ffb_driver.c b/src/ffb_driver.c
> index 4e37c6c..3acc1a4 100644
> --- a/src/ffb_driver.c
> +++ b/src/ffb_driver.c
> @@ -59,7 +59,6 @@ static void	FFBAdjustFrame(int scrnIndex, int x, int y, int flags);
>  static void	FFBFreeScreen(int scrnIndex, int flags);
>  static ModeStatus FFBValidMode(int scrnIndex, DisplayModePtr mode,
>  			       Bool verbose, int flags);
> -static void     FFBDPMSMode(ScrnInfoPtr pScrn, int DPMSMode, int flags);
>  /* ffb_dga.c */
>  extern void FFB_InitDGA(ScreenPtr pScreen);
>  
> @@ -805,8 +804,6 @@ FFBScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
>      pScreen->CloseScreen = FFBCloseScreen;
>      pScreen->SaveScreen = FFBSaveScreen;
>  
> -    (void) xf86DPMSInit(pScreen, FFBDPMSMode, 0);
> -
>      /* Report any unused options (only for the first generation) */
>      if (serverGeneration == 1) {
>  	xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
> @@ -978,13 +975,3 @@ FFBSync(ScrnInfoPtr pScrn)
>  {
>      return;
>  }
> -
> -/*
> -  Hook for DPMS Mode.
> -*/
> -
> -static void
> -FFBDPMSMode(ScrnInfoPtr pScrn, int DPMSMode, int flags)
> -{
> -  FFBDacDPMSMode(GET_FFB_FROM_SCRN(pScrn), DPMSMode, flags);
> -}

FFBDPMSSet() calls FFBDacDPMSMode(GET_FFB_FROM_SCRN(pScrn), DPMSMode,
0), ignoring the flags.  Which one was correct?

Cheers,
Julien


More information about the xorg-devel mailing list