diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-09-16 02:25:26 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-09-24 02:27:13 -0400 |
commit | 442b626ece6fbbe7f52c03a09f85ae5755f29eab (patch) | |
tree | 923e916c7a8ff361ea1ad16e91c219a661d75c27 /drivers/gpu/drm/nouveau/nouveau_state.c | |
parent | 02c30ca0a1d6d8b878fc32f47b3b25192ef4a8ef (diff) |
drm/nv04-nv40: import initial pm backend
Currently just hooked up to the already-existing nouveau_hw, which should
handle all relevant chipsets as well as we currently can.
This will likely be eventually split out and improved into chipset specific
code at a later point.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_state.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index bbe9ba015bca..f9f77de6bbc0 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -96,6 +96,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
96 | engine->gpio.get = NULL; | 96 | engine->gpio.get = NULL; |
97 | engine->gpio.set = NULL; | 97 | engine->gpio.set = NULL; |
98 | engine->gpio.irq_enable = NULL; | 98 | engine->gpio.irq_enable = NULL; |
99 | engine->pm.clock_get = nv04_pm_clock_get; | ||
100 | engine->pm.clock_pre = nv04_pm_clock_pre; | ||
101 | engine->pm.clock_set = nv04_pm_clock_set; | ||
99 | break; | 102 | break; |
100 | case 0x10: | 103 | case 0x10: |
101 | engine->instmem.init = nv04_instmem_init; | 104 | engine->instmem.init = nv04_instmem_init; |
@@ -147,6 +150,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
147 | engine->gpio.get = nv10_gpio_get; | 150 | engine->gpio.get = nv10_gpio_get; |
148 | engine->gpio.set = nv10_gpio_set; | 151 | engine->gpio.set = nv10_gpio_set; |
149 | engine->gpio.irq_enable = NULL; | 152 | engine->gpio.irq_enable = NULL; |
153 | engine->pm.clock_get = nv04_pm_clock_get; | ||
154 | engine->pm.clock_pre = nv04_pm_clock_pre; | ||
155 | engine->pm.clock_set = nv04_pm_clock_set; | ||
150 | break; | 156 | break; |
151 | case 0x20: | 157 | case 0x20: |
152 | engine->instmem.init = nv04_instmem_init; | 158 | engine->instmem.init = nv04_instmem_init; |
@@ -198,6 +204,9 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
198 | engine->gpio.get = nv10_gpio_get; | 204 | engine->gpio.get = nv10_gpio_get; |
199 | engine->gpio.set = nv10_gpio_set; | 205 | engine->gpio.set = nv10_gpio_set; |
200 | engine->gpio.irq_enable = NULL; | 206 | engine->gpio.irq_enable = NULL; |
207 | engine->pm.clock_get = nv04_pm_clock_get; | ||
208 | engine->pm.clock_pre = nv04_pm_clock_pre; | ||
209 | engine->pm.clock_set = nv04_pm_clock_set; | ||
201 | break; | 210 | break; |
202 | case 0x30: | 211 | case 0x30: |
203 | engine->instmem.init = nv04_instmem_init; | 212 | engine->instmem.init = nv04_instmem_init; |
@@ -249,6 +258,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
249 | engine->gpio.get = nv10_gpio_get; | 258 | engine->gpio.get = nv10_gpio_get; |
250 | engine->gpio.set = nv10_gpio_set; | 259 | engine->gpio.set = nv10_gpio_set; |
251 | engine->gpio.irq_enable = NULL; | 260 | engine->gpio.irq_enable = NULL; |
261 | engine->pm.clock_get = nv04_pm_clock_get; | ||
262 | engine->pm.clock_pre = nv04_pm_clock_pre; | ||
263 | engine->pm.clock_set = nv04_pm_clock_set; | ||
264 | engine->pm.voltage_get = nouveau_voltage_gpio_get; | ||
265 | engine->pm.voltage_set = nouveau_voltage_gpio_set; | ||
252 | break; | 266 | break; |
253 | case 0x40: | 267 | case 0x40: |
254 | case 0x60: | 268 | case 0x60: |
@@ -301,6 +315,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
301 | engine->gpio.get = nv10_gpio_get; | 315 | engine->gpio.get = nv10_gpio_get; |
302 | engine->gpio.set = nv10_gpio_set; | 316 | engine->gpio.set = nv10_gpio_set; |
303 | engine->gpio.irq_enable = NULL; | 317 | engine->gpio.irq_enable = NULL; |
318 | engine->pm.clock_get = nv04_pm_clock_get; | ||
319 | engine->pm.clock_pre = nv04_pm_clock_pre; | ||
320 | engine->pm.clock_set = nv04_pm_clock_set; | ||
321 | engine->pm.voltage_get = nouveau_voltage_gpio_get; | ||
322 | engine->pm.voltage_set = nouveau_voltage_gpio_set; | ||
304 | break; | 323 | break; |
305 | case 0x50: | 324 | case 0x50: |
306 | case 0x80: /* gotta love NVIDIA's consistency.. */ | 325 | case 0x80: /* gotta love NVIDIA's consistency.. */ |