mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-30 20:10:14 +01:00
nouveau: Hookup nv40_graph_init.
Now I can get 3D + working grctx switching on my NV40 without the binary driver initialising the card first. However, this change also breaks 3D on my C51 even *with* the binary driver's help. So, it's likely that the weird voodoo is card-specific.
This commit is contained in:
parent
41da9fd2e5
commit
861017e6d5
2 changed files with 11 additions and 11 deletions
|
|
@ -72,17 +72,8 @@ int nouveau_firstopen(struct drm_device *dev)
|
|||
if (ret) return ret;
|
||||
|
||||
/* FIXME: doesn't belong here, and have no idea what it's for.. */
|
||||
if (dev_priv->card_type >= NV_40) {
|
||||
uint32_t pg0220_inst;
|
||||
|
||||
dev_priv->fb_obj = nouveau_dma_object_create(dev,
|
||||
0, nouveau_mem_fb_amount(dev),
|
||||
NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM);
|
||||
|
||||
pg0220_inst = nouveau_chip_instance_get(dev,
|
||||
dev_priv->fb_obj->instance);
|
||||
NV_WRITE(NV_PGRAPH_NV40_UNK220, pg0220_inst);
|
||||
}
|
||||
if (dev_priv->card_type >= NV_40)
|
||||
nv40_graph_init(dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -426,6 +426,7 @@ nv40_graph_init(drm_device_t *dev)
|
|||
drm_nouveau_private_t *dev_priv =
|
||||
(drm_nouveau_private_t *)dev->dev_private;
|
||||
uint32_t *ctx_voodoo;
|
||||
uint32_t pg0220_inst;
|
||||
int i;
|
||||
|
||||
switch (dev_priv->card_type) {
|
||||
|
|
@ -452,6 +453,14 @@ nv40_graph_init(drm_device_t *dev)
|
|||
/* No context present currently */
|
||||
NV_WRITE(0x40032C, 0x00000000);
|
||||
|
||||
/* No idea what this is for.. */
|
||||
dev_priv->fb_obj = nouveau_dma_object_create(dev,
|
||||
0, nouveau_mem_fb_amount(dev),
|
||||
NV_DMA_ACCESS_RW, NV_DMA_TARGET_VIDMEM);
|
||||
pg0220_inst = nouveau_chip_instance_get(dev,
|
||||
dev_priv->fb_obj->instance);
|
||||
NV_WRITE(NV_PGRAPH_NV40_UNK220, pg0220_inst);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue