mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-05 01:58:02 +02:00
nouveau: mandatory "oops I forgot half of the files" commit
This commit is contained in:
parent
74ea019863
commit
9d779e2c88
5 changed files with 33 additions and 17 deletions
|
|
@ -21,7 +21,7 @@ i810-objs := i810_drv.o i810_dma.o
|
|||
i915-objs := i915_drv.o i915_dma.o i915_irq.o i915_mem.o i915_fence.o \
|
||||
i915_buffer.o
|
||||
nouveau-objs := nouveau_drv.o nouveau_state.o nouveau_fifo.o nouveau_mem.o \
|
||||
nouveau_object.o nouveau_irq.o nouveau_notifier.o \
|
||||
nouveau_object.o nouveau_irq.o nouveau_notifier.o nouveau_swmthd.o \
|
||||
nouveau_sgdma.o nouveau_dma.o \
|
||||
nv04_timer.o \
|
||||
nv04_mc.o nv40_mc.o nv50_mc.o \
|
||||
|
|
|
|||
1
linux-core/nouveau_swmthd.c
Symbolic link
1
linux-core/nouveau_swmthd.c
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../shared-core/nouveau_swmthd.c
|
||||
1
linux-core/nouveau_swmthd.h
Symbolic link
1
linux-core/nouveau_swmthd.h
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../shared-core/nouveau_swmthd.h
|
||||
|
|
@ -35,6 +35,7 @@
|
|||
#include "nouveau_drm.h"
|
||||
#include "nouveau_drv.h"
|
||||
#include "nouveau_reg.h"
|
||||
#include "nouveau_swmthd.h"
|
||||
|
||||
void nouveau_irq_preinstall(struct drm_device *dev)
|
||||
{
|
||||
|
|
@ -340,20 +341,27 @@ nouveau_graph_dump_trap_info(struct drm_device *dev)
|
|||
static void nouveau_pgraph_irq_handler(struct drm_device *dev)
|
||||
{
|
||||
struct drm_nouveau_private *dev_priv = dev->dev_private;
|
||||
uint32_t status, nsource;
|
||||
uint32_t status, nsource, method;
|
||||
uint32_t obj_class;
|
||||
|
||||
status = NV_READ(NV03_PGRAPH_INTR);
|
||||
if (!status)
|
||||
return;
|
||||
while ( (status = NV_READ(NV03_PGRAPH_INTR)) ) {
|
||||
nsource = NV_READ(NV03_PGRAPH_NSOURCE);
|
||||
|
||||
if (status & NV_PGRAPH_INTR_NOTIFY) {
|
||||
DRM_DEBUG("PGRAPH notify interrupt\n");
|
||||
|
||||
nouveau_graph_dump_trap_info(dev);
|
||||
if ( dev_priv->card_type == NV_04 && (nsource & NV03_PGRAPH_NSOURCE_ILLEGAL_MTHD ) ) {
|
||||
/* NV4 (nvidia TNT 1) reports software methods with PGRAPH NOTIFY ILLEGAL_MTHD*/
|
||||
method = NV_READ(NV04_PGRAPH_TRAPPED_ADDR) & 0x1FFC;
|
||||
obj_class = NV_READ(NV04_PGRAPH_CTX_SWITCH1) & 0xFFF;
|
||||
DRM_DEBUG("Got NV04 software method method %x for class %#x\n", method, obj_class);
|
||||
|
||||
if ( nouveau_sw_method_execute(dev, obj_class, method) )
|
||||
DRM_ERROR("Unable to execute NV04 software method %x for object class %x. Please report.\n", method, obj_class);
|
||||
}
|
||||
status &= ~NV_PGRAPH_INTR_NOTIFY;
|
||||
NV_WRITE(NV03_PGRAPH_INTR, NV_PGRAPH_INTR_NOTIFY);
|
||||
NV_WRITE(NV04_PGRAPH_FIFO, 1);
|
||||
}
|
||||
|
||||
if (status & NV_PGRAPH_INTR_ERROR) {
|
||||
|
|
@ -392,8 +400,9 @@ static void nouveau_pgraph_irq_handler(struct drm_device *dev)
|
|||
DRM_ERROR("Unhandled PGRAPH interrupt: STAT=0x%08x\n", status);
|
||||
NV_WRITE(NV03_PGRAPH_INTR, status);
|
||||
}
|
||||
NV_WRITE(NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING);
|
||||
}
|
||||
|
||||
NV_WRITE(NV03_PMC_INTR_0, NV_PMC_INTR_0_PGRAPH_PENDING);
|
||||
}
|
||||
|
||||
static void nouveau_crtc_irq_handler(struct drm_device *dev, int crtc)
|
||||
|
|
|
|||
|
|
@ -482,16 +482,22 @@ int nv04_graph_init(struct drm_device *dev) {
|
|||
NV_WRITE(NV03_PGRAPH_INTR, 0xFFFFFFFF);
|
||||
NV_WRITE(NV03_PGRAPH_INTR_EN, 0xFFFFFFFF);
|
||||
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_0, 0x000001FF);
|
||||
NV_WRITE(NV04_PGRAPH_VALID1, 0);
|
||||
NV_WRITE(NV04_PGRAPH_VALID2, 0);
|
||||
/*NV_WRITE(NV04_PGRAPH_DEBUG_0, 0x000001FF);
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_0, 0x001FFFFF);*/
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_0, 0x1231c000);
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_1, 0xf2d91100);
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_2, 0x11d5f870);
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_3, 0x0004FF31);
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_3, 0x4004FF31 |
|
||||
(0x00D00000) |
|
||||
(1<<29) |
|
||||
(1<<31));
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_3, 0xfad4ff31);
|
||||
/*1231C000 blob, 001 haiku*/
|
||||
//*V_WRITE(NV04_PGRAPH_DEBUG_1, 0xf2d91100);*/
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_1, 0x72111100);
|
||||
/*0x72111100 blob , 01 haiku*/
|
||||
/*NV_WRITE(NV04_PGRAPH_DEBUG_2, 0x11d5f870);*/
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_2, 0x11d5f071);
|
||||
/*haiku same*/
|
||||
|
||||
/*NV_WRITE(NV04_PGRAPH_DEBUG_3, 0xfad4ff31);*/
|
||||
NV_WRITE(NV04_PGRAPH_DEBUG_3, 0x10d4ff31);
|
||||
/*haiku and blob 10d4*/
|
||||
|
||||
NV_WRITE(NV04_PGRAPH_STATE , 0xFFFFFFFF);
|
||||
NV_WRITE(NV04_PGRAPH_CTX_CONTROL , 0x10010100);
|
||||
|
|
@ -507,4 +513,3 @@ int nv04_graph_init(struct drm_device *dev) {
|
|||
void nv04_graph_takedown(struct drm_device *dev)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue