aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_bios.c
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-07-24 11:41:48 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-07-25 21:43:43 -0400
commit946fd35f88ae7ef910229e7995ab0c32d52517b4 (patch)
tree81458483bf8d1be8a579844a1a735ac37426b425 /drivers/gpu/drm/nouveau/nouveau_bios.c
parentc88c2e0631b03ffb1485f8790a5b659beb1ac0be (diff)
drm/nouveau: Get rid of the remaining VGA CRTC locking.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_bios.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bios.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bios.c b/drivers/gpu/drm/nouveau/nouveau_bios.c
index aae29cc0cd80..40231cea465e 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bios.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bios.c
@@ -6550,11 +6550,8 @@ nouveau_run_vbios_init(struct drm_device *dev)
6550 struct nvbios *bios = &dev_priv->vbios; 6550 struct nvbios *bios = &dev_priv->vbios;
6551 int i, ret = 0; 6551 int i, ret = 0;
6552 6552
6553 NVLockVgaCrtcs(dev, false); 6553 /* Reset the BIOS head to 0. */
6554 if (nv_two_heads(dev)) { 6554 bios->state.crtchead = 0;
6555 bios->state.crtchead = 0;
6556 NVSetOwner(dev, 0);
6557 }
6558 6555
6559 if (bios->major_version < 5) /* BMP only */ 6556 if (bios->major_version < 5) /* BMP only */
6560 load_nv17_hw_sequencer_ucode(dev, bios); 6557 load_nv17_hw_sequencer_ucode(dev, bios);
@@ -6587,8 +6584,6 @@ nouveau_run_vbios_init(struct drm_device *dev)
6587 } 6584 }
6588 } 6585 }
6589 6586
6590 NVLockVgaCrtcs(dev, true);
6591
6592 return ret; 6587 return ret;
6593} 6588}
6594 6589
@@ -6618,13 +6613,11 @@ nouveau_bios_posted(struct drm_device *dev)
6618 return true; 6613 return true;
6619 } 6614 }
6620 6615
6621 NVLockVgaCrtcs(dev, false);
6622 htotal = NVReadVgaCrtc(dev, 0, 0x06); 6616 htotal = NVReadVgaCrtc(dev, 0, 0x06);
6623 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x01) << 8; 6617 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x01) << 8;
6624 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x20) << 4; 6618 htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x20) << 4;
6625 htotal |= (NVReadVgaCrtc(dev, 0, 0x25) & 0x01) << 10; 6619 htotal |= (NVReadVgaCrtc(dev, 0, 0x25) & 0x01) << 10;
6626 htotal |= (NVReadVgaCrtc(dev, 0, 0x41) & 0x01) << 11; 6620 htotal |= (NVReadVgaCrtc(dev, 0, 0x41) & 0x01) << 11;
6627 NVLockVgaCrtcs(dev, true);
6628 6621
6629 return (htotal != 0); 6622 return (htotal != 0);
6630} 6623}
@@ -6668,14 +6661,12 @@ nouveau_bios_init(struct drm_device *dev)
6668 return ret; 6661 return ret;
6669 6662
6670 /* feature_byte on BMP is poor, but init always sets CR4B */ 6663 /* feature_byte on BMP is poor, but init always sets CR4B */
6671 NVLockVgaCrtcs(dev, false);
6672 if (bios->major_version < 5) 6664 if (bios->major_version < 5)
6673 bios->is_mobile = NVReadVgaCrtc(dev, 0, NV_CIO_CRE_4B) & 0x40; 6665 bios->is_mobile = NVReadVgaCrtc(dev, 0, NV_CIO_CRE_4B) & 0x40;
6674 6666
6675 /* all BIT systems need p_f_m_t for digital_min_front_porch */ 6667 /* all BIT systems need p_f_m_t for digital_min_front_porch */
6676 if (bios->is_mobile || bios->major_version >= 5) 6668 if (bios->is_mobile || bios->major_version >= 5)
6677 ret = parse_fp_mode_table(dev, bios); 6669 ret = parse_fp_mode_table(dev, bios);
6678 NVLockVgaCrtcs(dev, true);
6679 6670
6680 /* allow subsequent scripts to execute */ 6671 /* allow subsequent scripts to execute */
6681 bios->execute = true; 6672 bios->execute = true;