diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-08-30 16:14:51 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 16:19:15 +1000 |
commit | 2a7fdb2bc15b3bfc824eb969b3dc7efa3fb52463 (patch) | |
tree | 2153f3e0bf8f0deed90ea28e5d15c7429bb46711 | |
parent | 217275d03d7e1f3e62c7b0d9718df99456b7c356 (diff) | |
download | blackbird-op-linux-2a7fdb2bc15b3bfc824eb969b3dc7efa3fb52463.tar.gz blackbird-op-linux-2a7fdb2bc15b3bfc824eb969b3dc7efa3fb52463.zip |
drm/nouveau: have nv_mask return original register value
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index b1be617373b6..c684686f6c0f 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h @@ -1255,12 +1255,11 @@ static inline void nv_wr32(struct drm_device *dev, unsigned reg, u32 val) iowrite32_native(val, dev_priv->mmio + reg); } -static inline void nv_mask(struct drm_device *dev, u32 reg, u32 mask, u32 val) +static inline u32 nv_mask(struct drm_device *dev, u32 reg, u32 mask, u32 val) { u32 tmp = nv_rd32(dev, reg); - tmp &= ~mask; - tmp |= val; - nv_wr32(dev, reg, tmp); + nv_wr32(dev, reg, (tmp & ~mask) | val); + return tmp; } static inline u8 nv_rd08(struct drm_device *dev, unsigned reg) |