• Lyude Paul's avatar
    drm/nouveau: Add support for basic clockgating on Kepler1 · b138eca6
    Lyude Paul authored
    This adds support for enabling automatic clockgating on nvidia GPUs for
    Kepler1. While this is not technically a clockgating level, it does
    enable clockgating using the clockgating values initially set by the
    vbios (which should be safe to use).
    
    This introduces two therm helpers for controlling basic clockgating:
    	nvkm_therm_clkgate_enable() - enables clockgating through
    	CG_CTRL, done after initializing the GPU fully
    	nvkm_therm_clkgate_fini() - prepares clockgating for suspend or
    	driver unload
    
    A lot of this code was originally going to be based off of fermi;
    however it turns out that while Fermi's the first line of GPUs that
    introduced this kind of power saving, Fermi requires more fine tuned
    control of the CG_CTRL registers from the driver while reclocking that
    we don't entirely understand yet.
    
    For the simple parts we will be sharing with Fermi for certain however,
    we at least add those into a new subdev/therm/gf100.h header.
    Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
    Reviewed-by: default avatarMartin Peres <martin.peres@free.fr>
    Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
    b138eca6
therm.h 2.92 KB