All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Skeggs <skeggsb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 08/10] drm/nouveau: use ioread32_native/iowrite32_native for fifo control registers
Date: Mon, 20 Aug 2012 16:30:52 +1000	[thread overview]
Message-ID: <20120820063052.GD2013@nisroch.redhat.com> (raw)
In-Reply-To: <1345410004-27729-8-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Sun, Aug 19, 2012 at 11:00:03PM +0200, Marcin Slusarz wrote:
> Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
> 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-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
> http://lists.freedesktop.org/mailman/listinfo/nouveau

      parent reply	other threads:[~2012-08-20  6:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-19 21:00 [PATCH 08/10] drm/nouveau: use ioread32_native/iowrite32_native for fifo control registers Marcin Slusarz
     [not found] ` <1345410004-27729-8-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-08-20  6:30   ` Ben Skeggs [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120820063052.GD2013@nisroch.redhat.com \
    --to=skeggsb-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.