diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-08-20 00:54:15 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-08-27 22:40:32 -0400 |
commit | a01ca78c8f118e5a24f1527ecf078ab56ddd4805 (patch) | |
tree | 34ccaf8913fcdf3a9be2794b27a30a52e8449bb0 /drivers/gpu/drm/nouveau/dispnv04/tvnv17.h | |
parent | 4e7e62d607a711bc8e8576a0fc7d8f242d25c9b3 (diff) |
drm/nouveau/nvif: simplify and tidy library interfaces
A variety of tweaks to the NVIF library interfaces, mostly ripping out
things that turned out to be not so useful.
- Removed refcounting from nvif_object, callers are expected to not be
stupid instead.
- nvif_client is directly reachable from anything derived from nvif_object,
removing the need for heuristics to locate it
- _new() versions of interfaces, that allocate memory for the object
they construct, have been removed. The vast majority of callers used
the embedded _init() interfaces.
- No longer storing constructor arguments (and the data returned from
nvkm) inside nvif_object, it's more or less unused and just wastes
memory.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv04/tvnv17.h')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv04/tvnv17.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.h b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.h index 225894cdcac2..459910b6bb32 100644 --- a/drivers/gpu/drm/nouveau/dispnv04/tvnv17.h +++ b/drivers/gpu/drm/nouveau/dispnv04/tvnv17.h | |||
@@ -131,13 +131,13 @@ static inline void nv_write_ptv(struct drm_device *dev, uint32_t reg, | |||
131 | uint32_t val) | 131 | uint32_t val) |
132 | { | 132 | { |
133 | struct nvif_device *device = &nouveau_drm(dev)->device; | 133 | struct nvif_device *device = &nouveau_drm(dev)->device; |
134 | nvif_wr32(device, reg, val); | 134 | nvif_wr32(&device->object, reg, val); |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline uint32_t nv_read_ptv(struct drm_device *dev, uint32_t reg) | 137 | static inline uint32_t nv_read_ptv(struct drm_device *dev, uint32_t reg) |
138 | { | 138 | { |
139 | struct nvif_device *device = &nouveau_drm(dev)->device; | 139 | struct nvif_device *device = &nouveau_drm(dev)->device; |
140 | return nvif_rd32(device, reg); | 140 | return nvif_rd32(&device->object, reg); |
141 | } | 141 | } |
142 | 142 | ||
143 | static inline void nv_write_tv_enc(struct drm_device *dev, uint8_t reg, | 143 | static inline void nv_write_tv_enc(struct drm_device *dev, uint8_t reg, |