Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345402
b: refs/heads/master
c: ab77214
h: refs/heads/master
v: v3
  • Loading branch information
Ben Skeggs committed Nov 28, 2012
1 parent 30b01be commit 8c7f898
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 3 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: 70cabe4a14ae606a5329abb5489e4ef0d896d03d
refs/heads/master: ab77214a8eb008efbba413fd04bdacc81d20f813
42 changes: 40 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,52 @@ nv50_disp_base_dtor(struct nouveau_object *object)
static int
nv50_disp_base_init(struct nouveau_object *object)
{
struct nv50_disp_priv *priv = (void *)object->engine;
struct nv50_disp_base *base = (void *)object;
int ret;
int ret, i;
u32 tmp;

ret = nouveau_parent_init(&base->base);
if (ret)
return ret;

/* caps */
/* The below segments of code copying values from one register to
* another appear to inform EVO of the display capabilities or
* something similar. NFI what the 0x614004 caps are for..
*/
tmp = nv_rd32(priv, 0x614004);
nv_wr32(priv, 0x610184, tmp);

/* ... CRTC caps */
for (i = 0; i < priv->head.nr; i++) {
tmp = nv_rd32(priv, 0x616100 + (i * 0x800));
nv_wr32(priv, 0x610190 + (i * 0x10), tmp);
tmp = nv_rd32(priv, 0x616104 + (i * 0x800));
nv_wr32(priv, 0x610194 + (i * 0x10), tmp);
tmp = nv_rd32(priv, 0x616108 + (i * 0x800));
nv_wr32(priv, 0x610198 + (i * 0x10), tmp);
tmp = nv_rd32(priv, 0x61610c + (i * 0x800));
nv_wr32(priv, 0x61019c + (i * 0x10), tmp);
}

/* ... DAC caps */
for (i = 0; i < priv->dac.nr; i++) {
tmp = nv_rd32(priv, 0x61a000 + (i * 0x800));
nv_wr32(priv, 0x6101d0 + (i * 0x04), tmp);
}

/* ... SOR caps */
for (i = 0; i < priv->sor.nr; i++) {
tmp = nv_rd32(priv, 0x61c000 + (i * 0x800));
nv_wr32(priv, 0x6101e0 + (i * 0x04), tmp);
}

/* ... EXT caps */
for (i = 0; i < 3; i++) {
tmp = nv_rd32(priv, 0x61e000 + (i * 0x800));
nv_wr32(priv, 0x6101f0 + (i * 0x04), tmp);
}

/* intr 100 */
/* 6194e8 shit */
/* intr */
Expand Down

0 comments on commit 8c7f898

Please sign in to comment.