Skip to content

Commit

Permalink
Merge branch 'for-airlied' of git://git.freedesktop.org/git/nouveau/l…
Browse files Browse the repository at this point in the history
…inux-2.6 into drm-linus

* 'for-airlied' of git://git.freedesktop.org/git/nouveau/linux-2.6:
  drm/nouveau: Force TV encoder DPMS reinit after resume.
  drm/nouveau: use mutex for vbios lock
  • Loading branch information
airlied committed Feb 18, 2010
2 parents 94429bb + bf929ef commit 6b15835
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions drivers/gpu/drm/nouveau/nouveau_bios.c
Expand Up @@ -5861,13 +5861,12 @@ nouveau_bios_run_init_table(struct drm_device *dev, uint16_t table,
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nvbios *bios = &dev_priv->VBIOS;
struct init_exec iexec = { true, false };
unsigned long flags;

spin_lock_irqsave(&bios->lock, flags);
mutex_lock(&bios->lock);
bios->display.output = dcbent;
parse_init_table(bios, table, &iexec);
bios->display.output = NULL;
spin_unlock_irqrestore(&bios->lock, flags);
mutex_unlock(&bios->lock);
}

static bool NVInitVBIOS(struct drm_device *dev)
Expand All @@ -5876,7 +5875,7 @@ static bool NVInitVBIOS(struct drm_device *dev)
struct nvbios *bios = &dev_priv->VBIOS;

memset(bios, 0, sizeof(struct nvbios));
spin_lock_init(&bios->lock);
mutex_init(&bios->lock);
bios->dev = dev;

if (!NVShadowVBIOS(dev, bios->data))
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nouveau_bios.h
Expand Up @@ -205,7 +205,7 @@ struct nvbios {
struct drm_device *dev;
struct nouveau_bios_info pub;

spinlock_t lock;
struct mutex lock;

uint8_t data[NV_PROM_SIZE];
unsigned int length;
Expand Down
2 changes: 2 additions & 0 deletions drivers/gpu/drm/nouveau/nv17_tv.c
Expand Up @@ -579,6 +579,8 @@ static void nv17_tv_restore(struct drm_encoder *encoder)
nouveau_encoder(encoder)->restore.output);

nv17_tv_state_load(dev, &to_tv_enc(encoder)->saved_state);

nouveau_encoder(encoder)->last_dpms = NV_DPMS_CLEARED;
}

static int nv17_tv_create_resources(struct drm_encoder *encoder,
Expand Down

0 comments on commit 6b15835

Please sign in to comment.