[Intel-gfx] [patch] avoid duplicate SaveHWState

Zhenyu Wang zhenyu.z.wang at intel.com
Mon Aug 18 05:07:40 CEST 2008


On 2008.08.15 14:10:36 +0800, Shaohua Li wrote:
> i830PreInit already call SaveHWState(). When i830ScreenInit() calls into
> i830EnterVT(), we call SaveHWState() again. It appears there is no
> register change between the two SaveHWState(), so we can remove the
> second SaveHWState() call. This can save time a little bit.

Looks reasonable, but I'm not quite sure if we'll see any change between
restore state after initial output probe, with save state before mode
set. Wider test can help to be sure it doesn't break anything.

> 
> Index: intel-video/src/i830_driver.c
> ===================================================================
> --- intel-video.orig/src/i830_driver.c
> +++ intel-video/src/i830_driver.c
> @@ -1398,7 +1398,7 @@ I830PreInit(ScrnInfoPtr pScrn, int flags
>        return FALSE;
>  
>     pI830 = I830PTR(pScrn);
> -   pI830->SaveGeneration = -1;
> +   pI830->SaveGeneration = serverGeneration;
>     pI830->pEnt = pEnt;
>  
>     pScrn->displayWidth = 640; /* default it */
> 

-- 
Open Source Technology Center, Intel ltd.

$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20080818/4b96f53b/attachment.pgp>


More information about the Intel-gfx mailing list