aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-11-20 08:43:51 -0500
committerFrancisco Jerez <currojerez@riseup.net>2010-12-07 21:00:20 -0500
commit38cf189fa13e988f85efb6de26315e762cecc260 (patch)
tree3f2572b44a4d2d56632fcc3f59e85dfc356acac1 /drivers/gpu
parentca130c2267d0719c92ed188e15082d6baad6c046 (diff)
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: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nv04_graph.c3
-rw-r--r--drivers/gpu/drm/nouveau/nv10_graph.c12
2 files changed, 0 insertions, 15 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c
index 0bc616d35eb6..af75015068d6 100644
--- a/drivers/gpu/drm/nouveau/nv04_graph.c
+++ b/drivers/gpu/drm/nouveau/nv04_graph.c
@@ -373,7 +373,6 @@ nv04_graph_context_switch(struct drm_device *dev)
373 struct nouveau_channel *chan = NULL; 373 struct nouveau_channel *chan = NULL;
374 int chid; 374 int chid;
375 375
376 pgraph->fifo_access(dev, false);
377 nouveau_wait_for_idle(dev); 376 nouveau_wait_for_idle(dev);
378 377
379 /* If previous context is valid, we need to save it */ 378 /* If previous context is valid, we need to save it */
@@ -384,8 +383,6 @@ nv04_graph_context_switch(struct drm_device *dev)
384 chan = dev_priv->channels.ptr[chid]; 383 chan = dev_priv->channels.ptr[chid];
385 if (chan) 384 if (chan)
386 nv04_graph_load_context(chan); 385 nv04_graph_load_context(chan);
387
388 pgraph->fifo_access(dev, true);
389} 386}
390 387
391static uint32_t *ctx_reg(struct graph_state *ctx, uint32_t reg) 388static uint32_t *ctx_reg(struct graph_state *ctx, uint32_t reg)
diff --git a/drivers/gpu/drm/nouveau/nv10_graph.c b/drivers/gpu/drm/nouveau/nv10_graph.c
index 536b39e4a9e2..8c92edb7bbcd 100644
--- a/drivers/gpu/drm/nouveau/nv10_graph.c
+++ b/drivers/gpu/drm/nouveau/nv10_graph.c
@@ -794,11 +794,9 @@ static void
794nv10_graph_context_switch(struct drm_device *dev) 794nv10_graph_context_switch(struct drm_device *dev)
795{ 795{
796 struct drm_nouveau_private *dev_priv = dev->dev_private; 796 struct drm_nouveau_private *dev_priv = dev->dev_private;
797 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
798 struct nouveau_channel *chan = NULL; 797 struct nouveau_channel *chan = NULL;
799 int chid; 798 int chid;
800 799
801 pgraph->fifo_access(dev, false);
802 nouveau_wait_for_idle(dev); 800 nouveau_wait_for_idle(dev);
803 801
804 /* If previous context is valid, we need to save it */ 802 /* If previous context is valid, we need to save it */
@@ -809,8 +807,6 @@ nv10_graph_context_switch(struct drm_device *dev)
809 chan = dev_priv->channels.ptr[chid]; 807 chan = dev_priv->channels.ptr[chid];
810 if (chan && chan->pgraph_ctx) 808 if (chan && chan->pgraph_ctx)
811 nv10_graph_load_context(chan); 809 nv10_graph_load_context(chan);
812
813 pgraph->fifo_access(dev, true);
814} 810}
815 811
816#define NV_WRITE_CTX(reg, val) do { \ 812#define NV_WRITE_CTX(reg, val) do { \
@@ -980,8 +976,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan,
980 struct drm_device *dev = chan->dev; 976 struct drm_device *dev = chan->dev;
981 struct graph_state *ctx = chan->pgraph_ctx; 977 struct graph_state *ctx = chan->pgraph_ctx;
982 struct pipe_state *pipe = &ctx->pipe_state; 978 struct pipe_state *pipe = &ctx->pipe_state;
983 struct drm_nouveau_private *dev_priv = dev->dev_private;
984 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
985 uint32_t pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3]; 979 uint32_t pipe_0x0040[1], pipe_0x64c0[8], pipe_0x6a80[3], pipe_0x6ab0[3];
986 uint32_t xfmode0, xfmode1; 980 uint32_t xfmode0, xfmode1;
987 int i; 981 int i;
@@ -1048,8 +1042,6 @@ nv17_graph_mthd_lma_window(struct nouveau_channel *chan,
1048 1042
1049 nouveau_wait_for_idle(dev); 1043 nouveau_wait_for_idle(dev);
1050 1044
1051 pgraph->fifo_access(dev, true);
1052
1053 return 0; 1045 return 0;
1054} 1046}
1055 1047
@@ -1058,8 +1050,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan,
1058 u32 class, u32 mthd, u32 data) 1050 u32 class, u32 mthd, u32 data)
1059{ 1051{
1060 struct drm_device *dev = chan->dev; 1052 struct drm_device *dev = chan->dev;
1061 struct drm_nouveau_private *dev_priv = dev->dev_private;
1062 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
1063 1053
1064 nouveau_wait_for_idle(dev); 1054 nouveau_wait_for_idle(dev);
1065 1055
@@ -1068,8 +1058,6 @@ nv17_graph_mthd_lma_enable(struct nouveau_channel *chan,
1068 nv_wr32(dev, 0x004006b0, 1058 nv_wr32(dev, 0x004006b0,
1069 nv_rd32(dev, 0x004006b0) | 0x8 << 24); 1059 nv_rd32(dev, 0x004006b0) | 0x8 << 24);
1070 1060
1071 pgraph->fifo_access(dev, true);
1072
1073 return 0; 1061 return 0;
1074} 1062}
1075 1063