[PATCH driver/vesa] Make shadowFB really the default

Chris Wilson chris at chris-wilson.co.uk
Wed Jul 31 02:48:10 PDT 2013


On Wed, Jul 31, 2013 at 11:36:37AM +0200, Egbert Eich wrote:
> Make the implementation follow what the comment already
> suggests.

The current code, this patch just makes it clearer.
 
> Signed-off-by: Egbert Eich <eich at freedesktop.org>
> ---
>  src/vesa.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/src/vesa.c b/src/vesa.c
> index b73d104..0412050 100644
> --- a/src/vesa.c
> +++ b/src/vesa.c
> @@ -838,8 +838,9 @@ VESAPreInit(ScrnInfoPtr pScrn, int flags)
>      xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pVesa->Options);
>  
>      /* Use shadow by default */
> -    if (xf86ReturnOptValBool(pVesa->Options, OPTION_SHADOW_FB, TRUE)) 
> -	pVesa->shadowFB = TRUE;
> +    pVesa->shadowFB = TRUE;
> +    xf86GetOptValBool(pVesa->Options, OPTION_SHADOW_FB,
> +		      &pVesa->shadowFB);

Could be more simply expressed as:

pVesa->shadowFB =
    xf86ReturnOptValBool(pVesa->Options,OPTION_SHADOW_FB, TRUE);

and similarly for defaultRefresh below.
  
>      if (xf86ReturnOptValBool(pVesa->Options, OPTION_DFLT_REFRESH, FALSE))
>  	pVesa->defaultRefresh = TRUE;

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list