summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv40_pm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-08-12 10:05:43 +1000
committerBen Skeggs <bskeggs@redhat.com>2011-09-20 16:11:51 +1000
commit59ef9742f6b24d1f3062b975ec959512519f8987 (patch)
treed4030d54e3ba6b857aee3b988812f755fe6dafa0 /drivers/gpu/drm/nouveau/nv40_pm.c
parent6d6538a0c33e29781151d03c150b7e31ab4f6411 (diff)
drm/nv40/pm: execute memory reset script from vbios
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv40_pm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv40_pm.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nv40_pm.c b/drivers/gpu/drm/nouveau/nv40_pm.c
index 491688676df..bbc0b9c7e1f 100644
--- a/drivers/gpu/drm/nouveau/nv40_pm.c
+++ b/drivers/gpu/drm/nouveau/nv40_pm.c
@@ -221,6 +221,7 @@ nv40_pm_clocks_set(struct drm_device *dev, void *pre_state)
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nv40_pm_state *info = pre_state;
unsigned long flags;
+ struct bit_entry M;
u32 crtc_mask = 0;
u8 sr1[2];
int i;
@@ -310,6 +311,10 @@ nv40_pm_clocks_set(struct drm_device *dev, void *pre_state)
nv_mask(dev, 0x100210, 0x80000000, 0x80000000);
udelay(100);
+ /* execute memory reset script from vbios */
+ if (!bit_table(dev, 'M', &M))
+ nouveau_bios_init_exec(dev, ROM16(M.data[0]));
+
/* make sure we're in vblank (hopefully the same one as before), and
* then re-enable crtc memory access
*/