[PATCH 2/2] savage: Setup tiled surface registers in SavageEnterVT

Alex Deucher alexdeucher at gmail.com
Sun Jan 23 12:18:19 PST 2011


On Sun, Jan 23, 2011 at 2:23 PM, Tormod Volden <lists.tormod at gmail.com> wrote:
> From: Tormod Volden <debian.tormod at gmail.com>
>
> These registers are cleared after suspend/resume, so set them
> up again in EnterVT.
> ---
>
> Is there any other suitable function that is called on resume,
> where this can be placed?
>
> Similar things (registers) are set up in SavageInitialize2DEngine,
> but that function is called quite often.
>
> Finally, is there something else to blame for clearing out these
> registers? Is pm-utils doing to much?

No, this is part of why UMS sucks.  During suspend the card is powered
down, so on resume, the driver has to re-init everything.  All that
has to happen in EnterVT.  All of your savage patches look good to me:

Reviewed-by: Alex Deucher <alexdeucher at gmail.com>

BTW, I don't think anyone maintains savage anymore, so feel free to
take over if you like.

Alex

>
> Cheers,
> Tormod
>
>  src/savage_driver.c |    1 +
>  src/savage_driver.h |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/src/savage_driver.c b/src/savage_driver.c
> index 38db9f6..1a76c77 100644
> --- a/src/savage_driver.c
> +++ b/src/savage_driver.c
> @@ -2219,6 +2219,7 @@ static Bool SavageEnterVT(int scrnIndex, int flags)
>        pSAREAPriv->ctxOwner = DRIGetContext(pScreen);
>         DRIUnlock(pScreen);
>         psav->LockHeld = 0;
> +        SAVAGEDRISetupTiledSurfaceRegs ( psav );
>     }
>  #endif
>     if (!SAVPTR(pScrn)->IsSecondary)
> diff --git a/src/savage_driver.h b/src/savage_driver.h
> index 9c0ba58..64587fc 100644
> --- a/src/savage_driver.h
> +++ b/src/savage_driver.h
> @@ -559,6 +559,7 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScreen );
>  Bool SAVAGEInitMC(ScreenPtr pScreen);
>  void SAVAGEDRICloseScreen( ScreenPtr pScreen );
>  Bool SAVAGEDRIFinishScreenInit( ScreenPtr pScreen );
> +void SAVAGEDRISetupTiledSurfaceRegs ( SavagePtr psav );
>
>  Bool SAVAGELockUpdate( ScrnInfoPtr pScrn, drmLockFlags flags );
>
> --
> 1.7.0.4
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>


More information about the xorg-devel mailing list