gfx: display: switch off GL3 power island at boot when it's not used
authorJani Nikula <jani.nikula@intel.com>
Thu, 15 Mar 2012 14:08:38 +0000 (16:08 +0200)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 3 Jul 2012 09:30:34 +0000 (12:30 +0300)
The GL3 cache power island used to be on at boot until the first display
off, even if it was never used or enabled. To save power, switch off the
GL3 island at boot if it's not used.

Issue: GRA-61
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
drivers/staging/mrst/drv/psb_powermgmt.c

index c725e3b..3cc10c1 100644 (file)
@@ -1316,7 +1316,18 @@ void ospm_power_init(struct drm_device *dev)
                0xffff;
 
        mutex_init(&g_ospm_mutex);
+
+       /* Specify the islands to keep powered up at boot */
        g_hw_power_status_mask = OSPM_ALL_ISLANDS;
+#ifndef CONFIG_MDFD_GL3
+       g_hw_power_status_mask &= ~OSPM_GL3_CACHE_ISLAND;
+#endif
+
+       /* Set power island states according to g_hw_power_status_mask */
+       ospm_set_power_state(OSPM_ISLAND_UP, g_hw_power_status_mask);
+       ospm_set_power_state(OSPM_ISLAND_DOWN,
+                       OSPM_ALL_ISLANDS ^ g_hw_power_status_mask);
+
        atomic_set(&g_display_access_count, 0);
        atomic_set(&g_graphics_access_count, 0);
        atomic_set(&g_videoenc_access_count, 0);