[Nouveau] [PATCH 08/10] drm/nouveau: use ioread32_native/iowrite32_native for fifo control registers

Ben Skeggs skeggsb at gmail.com
Sun Aug 19 23:30:52 PDT 2012


On Sun, Aug 19, 2012 at 11:00:03PM +0200, Marcin Slusarz wrote:
> Signed-off-by: Marcin Slusarz <marcin.slusarz at gmail.com>
> ---
> Do I miss something important why was it written this way?
Nope, you didn't.  It's a left-over from a *really* early revision of
the userspace version of the kernel module.

Thanks!

> ---
>  drivers/gpu/drm/nouveau/core/engine/fifo/base.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/core/engine/fifo/base.c b/drivers/gpu/drm/nouveau/core/engine/fifo/base.c
> index 543fcaf..bbb43c6 100644
> --- a/drivers/gpu/drm/nouveau/core/engine/fifo/base.c
> +++ b/drivers/gpu/drm/nouveau/core/engine/fifo/base.c
> @@ -122,14 +122,14 @@ u32
>  _nouveau_fifo_channel_rd32(struct nouveau_object *object, u32 addr)
>  {
>  	struct nouveau_fifo_chan *chan = (void *)object;
> -	return ((volatile u32 *)chan->user)[addr / 4];
> +	return ioread32_native(chan->user + addr);
>  }
>  
>  void
>  _nouveau_fifo_channel_wr32(struct nouveau_object *object, u32 addr, u32 data)
>  {
>  	struct nouveau_fifo_chan *chan = (void *)object;
> -	((volatile u32 *)chan->user)[addr / 4] = data;
> +	iowrite32_native(data, chan->user + addr);
>  }
>  
>  static int
> -- 
> 1.7.8.6
> 
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau


More information about the Nouveau mailing list