Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
a0e259f3
Commit
a0e259f3
authored
Apr 28, 2003
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DRI CVS merge: memory barrier updates
parent
3c4f858a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
8 deletions
+9
-8
drivers/char/drm/drm_os_linux.h
drivers/char/drm/drm_os_linux.h
+3
-2
drivers/char/drm/mga_drv.h
drivers/char/drm/mga_drv.h
+4
-4
drivers/char/drm/r128_drv.h
drivers/char/drm/r128_drv.h
+1
-1
drivers/char/drm/radeon_drv.h
drivers/char/drm/radeon_drv.h
+1
-1
No files found.
drivers/char/drm/drm_os_linux.h
View file @
a0e259f3
...
...
@@ -11,8 +11,9 @@
#define DRM_READ32(map, offset) readl(((unsigned long)(map)->handle) + (offset))
#define DRM_WRITE8(map, offset, val) writeb(val, ((unsigned long)(map)->handle) + (offset))
#define DRM_WRITE32(map, offset, val) writel(val, ((unsigned long)(map)->handle) + (offset))
#define DRM_READMEMORYBARRIER(map) mb()
#define DRM_WRITEMEMORYBARRIER(map) wmb()
#define DRM_READMEMORYBARRIER() rmb()
#define DRM_WRITEMEMORYBARRIER() wmb()
#define DRM_MEMORYBARRIER() mb()
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
...
...
drivers/char/drm/mga_drv.h
View file @
a0e259f3
...
...
@@ -131,7 +131,7 @@ extern int mga_getparam( DRM_IOCTL_ARGS );
extern
int
mga_warp_install_microcode
(
drm_mga_private_t
*
dev_priv
);
extern
int
mga_warp_init
(
drm_mga_private_t
*
dev_priv
);
#define mga_flush_write_combine() DRM_WRITEMEMORYBARRIER(
dev_priv->primary
)
#define mga_flush_write_combine() DRM_WRITEMEMORYBARRIER()
#if defined(__linux__) && defined(__alpha__)
#define MGA_BASE( reg ) ((unsigned long)(dev_priv->mmio->handle))
...
...
@@ -142,12 +142,12 @@ extern int mga_warp_init( drm_mga_private_t *dev_priv );
#define MGA_READ( reg ) (_MGA_READ((u32 *)MGA_ADDR(reg)))
#define MGA_READ8( reg ) (_MGA_READ((u8 *)MGA_ADDR(reg)))
#define MGA_WRITE( reg, val ) do { DRM_WRITEMEMORYBARRIER(
dev_priv->mmio
); MGA_DEREF( reg ) = val; } while (0)
#define MGA_WRITE8( reg, val ) do { DRM_WRITEMEMORYBARRIER(
dev_priv->mmio
); MGA_DEREF8( reg ) = val; } while (0)
#define MGA_WRITE( reg, val ) do { DRM_WRITEMEMORYBARRIER(); MGA_DEREF( reg ) = val; } while (0)
#define MGA_WRITE8( reg, val ) do { DRM_WRITEMEMORYBARRIER(); MGA_DEREF8( reg ) = val; } while (0)
static
inline
u32
_MGA_READ
(
u32
*
addr
)
{
DRM_
READMEMORYBARRIER
(
dev_priv
->
mmio
);
DRM_
MEMORYBARRIER
(
);
return
*
(
volatile
u32
*
)
addr
;
}
#else
...
...
drivers/char/drm/r128_drv.h
View file @
a0e259f3
...
...
@@ -440,7 +440,7 @@ do { \
#if defined(__powerpc__)
#define r128_flush_write_combine() (void) GET_RING_HEAD( &dev_priv->ring )
#else
#define r128_flush_write_combine() DRM_WRITEMEMORYBARRIER(
dev_priv->ring_rptr
)
#define r128_flush_write_combine() DRM_WRITEMEMORYBARRIER()
#endif
...
...
drivers/char/drm/radeon_drv.h
View file @
a0e259f3
...
...
@@ -852,7 +852,7 @@ do { \
#define COMMIT_RING() do { \
/* Flush writes to ring */
\
DRM_
READMEMORYBARRIER( dev_priv->mmio );
\
DRM_
MEMORYBARRIER();
\
GET_RING_HEAD( dev_priv ); \
RADEON_WRITE( RADEON_CP_RB_WPTR, dev_priv->ring.tail ); \
/* read from PCI bus to ensure correct posting */
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment