Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282637
b: refs/heads/master
c: 0f8067c
h: refs/heads/master
i:
  282635: 0beb66a
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent 69f7aac commit 37b7e5a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 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: f9f9f536312d4c3ca39502ccf6a3af60cfe38ff4
refs/heads/master: 0f8067c7054d22f240fca376e01430eecdc112df
29 changes: 6 additions & 23 deletions trunk/drivers/gpu/drm/nouveau/nouveau_bios.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
#define NV_CIO_CRE_44_HEADA 0x0
#define NV_CIO_CRE_44_HEADB 0x3
#define FEATURE_MOBILE 0x10 /* also FEATURE_QUADRO for BMP */
#define LEGACY_I2C_CRT 0x80
#define LEGACY_I2C_PANEL 0x81
#define LEGACY_I2C_TV 0x82

#define EDID1_LEN 128

Expand Down Expand Up @@ -6433,15 +6430,18 @@ fabricate_dcb_encoder_table(struct drm_device *dev, struct nvbios *bios)
#endif

/* Make up some sane defaults */
fabricate_dcb_output(dcb, OUTPUT_ANALOG, LEGACY_I2C_CRT, 1, 1);
fabricate_dcb_output(dcb, OUTPUT_ANALOG,
bios->legacy.i2c_indices.crt, 1, 1);

if (nv04_tv_identify(dev, bios->legacy.i2c_indices.tv) >= 0)
fabricate_dcb_output(dcb, OUTPUT_TV, LEGACY_I2C_TV,
fabricate_dcb_output(dcb, OUTPUT_TV,
bios->legacy.i2c_indices.tv,
all_heads, 0);

else if (bios->tmds.output0_script_ptr ||
bios->tmds.output1_script_ptr)
fabricate_dcb_output(dcb, OUTPUT_TMDS, LEGACY_I2C_PANEL,
fabricate_dcb_output(dcb, OUTPUT_TMDS,
bios->legacy.i2c_indices.panel,
all_heads, 1);
}

Expand Down Expand Up @@ -6649,22 +6649,6 @@ fixup_legacy_connector(struct nvbios *bios)
}
}

static void
fixup_legacy_i2c(struct nvbios *bios)
{
struct dcb_table *dcb = &bios->dcb;
int i;

for (i = 0; i < dcb->entries; i++) {
if (dcb->entry[i].i2c_index == LEGACY_I2C_CRT)
dcb->entry[i].i2c_index = bios->legacy.i2c_indices.crt;
if (dcb->entry[i].i2c_index == LEGACY_I2C_PANEL)
dcb->entry[i].i2c_index = bios->legacy.i2c_indices.panel;
if (dcb->entry[i].i2c_index == LEGACY_I2C_TV)
dcb->entry[i].i2c_index = bios->legacy.i2c_indices.tv;
}
}

static int load_nv17_hwsq_ucode_entry(struct drm_device *dev, struct nvbios *bios, uint16_t hwsq_offset, int entry)
{
/*
Expand Down Expand Up @@ -6934,7 +6918,6 @@ nouveau_bios_init(struct drm_device *dev)
if (ret)
return ret;

fixup_legacy_i2c(bios);
fixup_legacy_connector(bios);

if (!bios->major_version) /* we don't run version 0 bios */
Expand Down

0 comments on commit 37b7e5a

Please sign in to comment.