Commit 7f245b20 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau: merge parsed_dcb and bios_parsed_dcb into dcb_table

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent a6678b2a
This diff is collapsed.
......@@ -77,12 +77,6 @@ struct dcb_i2c_entry {
struct nouveau_i2c_chan *chan;
};
struct parsed_dcb {
int entries;
struct dcb_entry entry[DCB_MAX_NUM_ENTRIES];
struct dcb_i2c_entry i2c[DCB_MAX_NUM_I2C_ENTRIES];
};
enum dcb_gpio_tag {
DCB_GPIO_TVDAC0 = 0xc,
DCB_GPIO_TVDAC1 = 0x2d,
......@@ -111,13 +105,15 @@ struct dcb_connector_table {
struct dcb_connector_table_entry entry[DCB_MAX_NUM_CONNECTOR_ENTRIES];
};
struct bios_parsed_dcb {
struct dcb_table {
uint8_t version;
struct parsed_dcb dcb;
int entries;
struct dcb_entry entry[DCB_MAX_NUM_ENTRIES];
uint8_t *i2c_table;
uint8_t i2c_default_indices;
struct dcb_i2c_entry i2c[DCB_MAX_NUM_I2C_ENTRIES];
uint16_t gpio_table_ptr;
struct dcb_gpio_table gpio;
......@@ -191,8 +187,6 @@ struct pll_lims {
};
struct nouveau_bios_info {
struct parsed_dcb *dcb;
uint8_t chip_version;
uint32_t dactestval;
......@@ -234,7 +228,7 @@ struct nvbios {
uint16_t some_script_ptr; /* BIT I + 14 */
uint16_t init96_tbl_ptr; /* BIT I + 16 */
struct bios_parsed_dcb bdcb;
struct dcb_table dcb;
struct {
int crtchead;
......
......@@ -259,11 +259,11 @@ nouveau_i2c_find(struct drm_device *dev, int index)
if (index >= DCB_MAX_NUM_I2C_ENTRIES)
return NULL;
if (!bios->bdcb.dcb.i2c[index].chan) {
if (nouveau_i2c_init(dev, &bios->bdcb.dcb.i2c[index], index))
if (!bios->dcb.i2c[index].chan) {
if (nouveau_i2c_init(dev, &bios->dcb.i2c[index], index))
return NULL;
}
return bios->bdcb.dcb.i2c[index].chan;
return bios->dcb.i2c[index].chan;
}
......@@ -93,7 +93,7 @@ int
nv04_display_create(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct parsed_dcb *dcb = dev_priv->vbios->dcb;
struct dcb_table *dcb = &dev_priv->VBIOS.dcb;
struct drm_encoder *encoder;
struct drm_crtc *crtc;
uint16_t connector[16] = { 0 };
......
......@@ -262,7 +262,7 @@ int nv04_tv_create(struct drm_device *dev, struct dcb_entry *entry)
nv_encoder->or = ffs(entry->or) - 1;
/* Run the slave-specific initialization */
adap = &dev_priv->vbios->dcb->i2c[i2c_index].chan->adapter;
adap = &dev_priv->VBIOS.dcb.i2c[i2c_index].chan->adapter;
was_locked = NVLockVgaCrtcs(dev, false);
......
......@@ -465,7 +465,7 @@ static int nv50_display_disable(struct drm_device *dev)
int nv50_display_create(struct drm_device *dev)
{
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct parsed_dcb *dcb = dev_priv->vbios->dcb;
struct dcb_table *dcb = &dev_priv->VBIOS.dcb;
uint32_t connector[16] = {};
int ret, i;
......@@ -667,8 +667,8 @@ nv50_display_irq_head(struct drm_device *dev, int *phead,
return -1;
}
for (i = 0; i < dev_priv->vbios->dcb->entries; i++) {
struct dcb_entry *dcbent = &dev_priv->vbios->dcb->entry[i];
for (i = 0; i < dev_priv->VBIOS.dcb.entries; i++) {
struct dcb_entry *dcbent = &dev_priv->VBIOS.dcb.entry[i];
if (dcbent->type != type)
continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment