Public paste
Undefined
By: Guest | Date: Dec 27 2009 22:09 | Format: None | Expires: never | Size: 1.22 KB | Hits: 890

  1. diff --git a/drivers/gpu/drm/nouveau/nouveau_channel.c b/drivers/gpu/drm/nouveau/nouveau_channel.c
  2. index c1ac34b..f2527d3 100644
  3. --- a/drivers/gpu/drm/nouveau/nouveau_channel.c
  4. +++ b/drivers/gpu/drm/nouveau/nouveau_channel.c
  5. @@ -317,6 +317,9 @@ nouveau_channel_free(struct nouveau_channel *chan)
  6.         /* Ensure the channel is no longer active on the GPU */
  7.         pfifo->reassign(dev, false);
  8.  
  9. +       if (pfifo->channel_id(dev) == chan->id)
  10. +               pfifo->cache_flush(dev);
  11. +
  12.         if (pgraph->channel(dev) == chan) {
  13.                 pgraph->fifo_access(dev, false);
  14.                 pgraph->unload_context(dev);
  15. diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
  16. index a6b573e..9c2e4bf 100644
  17. --- a/drivers/gpu/drm/nouveau/nouveau_state.c
  18. +++ b/drivers/gpu/drm/nouveau/nouveau_state.c
  19. @@ -293,6 +293,7 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
  20.                 engine->fifo.disable            = nv04_fifo_disable;
  21.                 engine->fifo.enable             = nv04_fifo_enable;
  22.                 engine->fifo.reassign           = nv04_fifo_reassign;
  23. +               engine->fifo.cache_flush        = nv04_fifo_cache_flush;
  24.                 engine->fifo.channel_id         = nv50_fifo_channel_id;
  25.                 engine->fifo.create_context     = nv50_fifo_create_context;
  26.                 engine->fifo.destroy_context    = nv50_fifo_destroy_context;