Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205108
b: refs/heads/master
c: 946fd35
h: refs/heads/master
v: v3
  • Loading branch information
Francisco Jerez authored and Ben Skeggs committed Jul 26, 2010
1 parent 72e4577 commit ea565b8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c88c2e0631b03ffb1485f8790a5b659beb1ac0be
refs/heads/master: 946fd35f88ae7ef910229e7995ab0c32d52517b4
13 changes: 2 additions & 11 deletions trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -6550,11 +6550,8 @@ nouveau_run_vbios_init(struct drm_device *dev)
struct nvbios *bios = &dev_priv->vbios;
int i, ret = 0;

NVLockVgaCrtcs(dev, false);
if (nv_two_heads(dev)) {
bios->state.crtchead = 0;
NVSetOwner(dev, 0);
}
/* Reset the BIOS head to 0. */
bios->state.crtchead = 0;

if (bios->major_version < 5) /* BMP only */
load_nv17_hw_sequencer_ucode(dev, bios);
Expand Down Expand Up @@ -6587,8 +6584,6 @@ nouveau_run_vbios_init(struct drm_device *dev)
}
}

NVLockVgaCrtcs(dev, true);

return ret;
}

Expand Down Expand Up @@ -6618,13 +6613,11 @@ nouveau_bios_posted(struct drm_device *dev)
return true;
}

NVLockVgaCrtcs(dev, false);
htotal = NVReadVgaCrtc(dev, 0, 0x06);
htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x01) << 8;
htotal |= (NVReadVgaCrtc(dev, 0, 0x07) & 0x20) << 4;
htotal |= (NVReadVgaCrtc(dev, 0, 0x25) & 0x01) << 10;
htotal |= (NVReadVgaCrtc(dev, 0, 0x41) & 0x01) << 11;
NVLockVgaCrtcs(dev, true);

return (htotal != 0);
}
Expand Down Expand Up @@ -6668,14 +6661,12 @@ nouveau_bios_init(struct drm_device *dev)
return ret;

/* feature_byte on BMP is poor, but init always sets CR4B */
NVLockVgaCrtcs(dev, false);
if (bios->major_version < 5)
bios->is_mobile = NVReadVgaCrtc(dev, 0, NV_CIO_CRE_4B) & 0x40;

/* all BIT systems need p_f_m_t for digital_min_front_porch */
if (bios->is_mobile || bios->major_version >= 5)
ret = parse_fp_mode_table(dev, bios);
NVLockVgaCrtcs(dev, true);

/* allow subsequent scripts to execute */
bios->execute = true;
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/gpu/drm/nouveau/nouveau_i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,21 +305,18 @@ nouveau_i2c_identify(struct drm_device *dev, const char *what,
struct i2c_board_info *info, int index)
{
struct nouveau_i2c_chan *i2c = nouveau_i2c_find(dev, index);
int was_locked, i;
int i;

was_locked = NVLockVgaCrtcs(dev, false);
NV_DEBUG(dev, "Probing %ss on I2C bus: %d\n", what, index);

for (i = 0; info[i].addr; i++) {
if (nouveau_probe_i2c_addr(i2c, info[i].addr)) {
NV_INFO(dev, "Detected %s: %s\n", what, info[i].type);
goto out;
return i;
}
}

NV_DEBUG(dev, "No devices found.\n");
out:
NVLockVgaCrtcs(dev, was_locked);

return info[i].addr ? i : -ENODEV;
return -ENODEV;
}

0 comments on commit ea565b8

Please sign in to comment.