Skip to content

Commit

Permalink
amd-gpu: more sane way of doing an RB write
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Sealey committed Dec 11, 2012
1 parent e98a2a5 commit 7b5ab2e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/mxc/amd-gpu/include/gsl_ringbuffer.h
Expand Up @@ -29,6 +29,7 @@
#ifndef __GSL_RINGBUFFER_H
#define __GSL_RINGBUFFER_H

#include <linux/io.h>

//////////////////////////////////////////////////////////////////////////////
// defines
Expand Down Expand Up @@ -161,9 +162,12 @@ typedef struct _gsl_ringbuffer_t {
// ----------
// ring write
// ----------
#define GSL_RB_WRITE(ring, data) \
KGSL_DEBUG(GSL_DBGFLAGS_DUMPX, KGSL_DEBUG_DUMPX(BB_DUMP_RINGBUF_WRT, (unsigned int)ring, data, 0, "GSL_RB_WRITE")); \
*(unsigned int *)(ring)++ = (unsigned int)(data);
#define GSL_RB_WRITE(ring, data) \
do { \
mb(); \
writel(data, ring); \
ring++; \
} while (0)

// ---------
// timestamp
Expand Down

0 comments on commit 7b5ab2e

Please sign in to comment.