* [PATCH 08/10] drm/nouveau: use ioread32_native/iowrite32_native for fifo control registers
@ 2012-08-19 21:00 Marcin Slusarz
[not found] ` <1345410004-27729-8-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2012-08-19 21:00 UTC (permalink / raw)
To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Signed-off-by: Marcin Slusarz <marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
Do I miss something important why was it written this way?
---
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
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1345410004-27729-8-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH 08/10] drm/nouveau: use ioread32_native/iowrite32_native for fifo control registers [not found] ` <1345410004-27729-8-git-send-email-marcin.slusarz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2012-08-20 6:30 ` Ben Skeggs 0 siblings, 0 replies; 2+ messages in thread From: Ben Skeggs @ 2012-08-20 6:30 UTC (permalink / raw) To: Marcin Slusarz; +Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-20 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.