diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-22 21:17:57 -0400 |
|---|---|---|
| committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-25 21:42:55 -0400 |
| commit | 49eed80ad0cfa5d5d02992e8088463cbf1a5ff85 (patch) | |
| tree | 9cc245fada3cd7c3d0dd0cac18855a5bfb19c247 | |
| parent | 5620ba4680db0ba25b89952bdda41a9c8fd11f50 (diff) | |
drm/nouveau: add nv_mask register accessor
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| -rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 11c077899a12..9d53f3d1487d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
| @@ -1186,6 +1186,14 @@ static inline void nv_wr32(struct drm_device *dev, unsigned reg, u32 val) | |||
| 1186 | iowrite32_native(val, dev_priv->mmio + reg); | 1186 | iowrite32_native(val, dev_priv->mmio + reg); |
| 1187 | } | 1187 | } |
| 1188 | 1188 | ||
| 1189 | static inline void nv_mask(struct drm_device *dev, u32 reg, u32 mask, u32 val) | ||
| 1190 | { | ||
| 1191 | u32 tmp = nv_rd32(dev, reg); | ||
| 1192 | tmp &= ~mask; | ||
| 1193 | tmp |= val; | ||
| 1194 | nv_wr32(dev, reg, tmp); | ||
| 1195 | } | ||
| 1196 | |||
| 1189 | static inline u8 nv_rd08(struct drm_device *dev, unsigned reg) | 1197 | static inline u8 nv_rd08(struct drm_device *dev, unsigned reg) |
| 1190 | { | 1198 | { |
| 1191 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 1199 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
