Commit 38cf189f authored by Francisco Jerez's avatar Francisco Jerez

drm/nv04-nv10: Don't re-enable FIFO access multiple times after IRQ dispatch.

nvxx_graph_isr is already taking care of it. In some cases this
could've made you miss PGRAPH interrupts (e.g. when you were supposed
to get several IRQs of the same kind in a row).
Signed-off-by: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent ca130c22
...@@ -373,7 +373,6 @@ nv04_graph_context_switch(struct drm_device *dev) ...@@ -373,7 +373,6 @@ nv04_graph_context_switch(struct drm_device *dev)
struct nouveau_channel *chan = NULL; struct nouveau_channel *chan = NULL;
int chid; int chid;
pgraph->fifo_access(dev, false);
nouveau_wait_for_idle(dev); nouveau_wait_for_idle(dev);
/* If previous context is valid, we need to save it */ /* If previous context is valid, we need to save it */
...@@ -384,8 +383,6 @@ nv04_graph_context_switch(struct drm_device *dev) ...@@ -384,8 +383,6 @@ nv04_graph_context_switch(struct drm_device *dev)
chan = dev_priv->channels.ptr[chid]; chan = dev_priv->channels.ptr[chid];
if (chan) if (chan)
nv04_graph_load_context(chan); nv04_graph_load_context(chan);
pgraph->fifo_access(dev, true);
} }
static uint32_t *ctx_reg(struct graph_state *ctx, uint32_t reg) static uint32_t *ctx_reg(struct graph_state *ctx, uint32_t reg)
......
...@@ -794,11 +794,9 @@ static void ...@@ -794,11 +794,9 @@ static void
nv10_graph_context_switch(struct drm_device *dev) nv10_graph_context_switch(struct drm_device *dev)
{ {
struct drm_nouveau_private *dev_priv = dev->dev_private; struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
struct nouveau_channel *chan = NULL; struct nouveau_channel *chan = NULL;
int chid; int chid;
pgraph->fifo_access(dev, false);
nouveau_wait_for_idle(dev); nouveau_wait_for_idle(dev);
/* If previous context is valid, we need to save it */ /* If previous context is valid, we need to save it */
...@@ -809,8 +807,6 @@ nv10_graph_context_switch(struct drm_device *dev) ...@@ -809,8 +807,6 @@ nv10_graph_context_switch(struct drm_device *dev)
chan = dev_priv->channels.ptr[chid]; chan = dev_priv->channels.ptr[chid];
if (chan && chan->pgraph_ctx) if (chan && chan->pgraph_ctx)
nv10_graph_load_context(chan); nv10_graph_load_context(chan);
pgraph->fifo_access(dev, true);
} }
#define NV_WRITE_CTX(reg, val) do { \ #define NV_WRITE_CTX(reg, val) do { \
...@@ -980,8 +976,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan, ...@@ -980,8 +976,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan,
struct drm_device *dev = chan->dev; struct drm_device *dev = chan->dev;
struct graph_state *ctx = chan->pgraph_ctx; struct graph_state *ctx = chan->pgraph_ctx;
struct pipe_state *pipe = &ctx->pipe_state; struct pipe_state *pipe = &ctx->pipe_state;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
uint32_t pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3]; uint32_t pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3];
uint32_t xfmode0, xfmode1; uint32_t xfmode0, xfmode1;
int i; int i;
...@@ -1048,8 +1042,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan, ...@@ -1048,8 +1042,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan,
nouveau_wait_for_idle(dev); nouveau_wait_for_idle(dev);
pgraph->fifo_access(dev, true);
return 0; return 0;
} }
...@@ -1058,8 +1050,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, ...@@ -1058,8 +1050,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan,
u32 class, u32 mthd, u32 data) u32 class, u32 mthd, u32 data)
{ {
struct drm_device *dev = chan->dev; struct drm_device *dev = chan->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
nouveau_wait_for_idle(dev); nouveau_wait_for_idle(dev);
...@@ -1068,8 +1058,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan, ...@@ -1068,8 +1058,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan,
nv_wr32(dev, 0x004006b0, nv_wr32(dev, 0x004006b0,
nv_rd32(dev, 0x004006b0) | 0x8 << 24); nv_rd32(dev, 0x004006b0) | 0x8 << 24);
pgraph->fifo_access(dev, true);
return 0; return 0;
} }
......
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