blob: 23b79ebce6c1fd08ca2b304f7e6be2463121c4b8 [file] [log] [blame]
Rafał Miłecki74338742009-11-03 00:53:02 +01001/*
2 * Permission is hereby granted, free of charge, to any person obtaining a
3 * copy of this software and associated documentation files (the "Software"),
4 * to deal in the Software without restriction, including without limitation
5 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
6 * and/or sell copies of the Software, and to permit persons to whom the
7 * Software is furnished to do so, subject to the following conditions:
8 *
9 * The above copyright notice and this permission notice shall be included in
10 * all copies or substantial portions of the Software.
11 *
12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
15 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
16 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
17 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
18 * OTHER DEALINGS IN THE SOFTWARE.
19 *
20 * Authors: Rafał Miłecki <zajec5@gmail.com>
Alex Deucher56278a82009-12-28 13:58:44 -050021 * Alex Deucher <alexdeucher@gmail.com>
Rafał Miłecki74338742009-11-03 00:53:02 +010022 */
23#include "drmP.h"
24#include "radeon.h"
Dave Airlief7352612010-02-18 15:58:36 +100025#include "avivod.h"
Rafał Miłecki74338742009-11-03 00:53:02 +010026
Rafał Miłeckic913e232009-12-22 23:02:16 +010027#define RADEON_IDLE_LOOP_MS 100
28#define RADEON_RECLOCK_DELAY_MS 200
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +010029#define RADEON_WAIT_VBLANK_TIMEOUT 200
Alex Deucher2031f772010-04-22 12:52:11 -040030#define RADEON_WAIT_IDLE_TIMEOUT 200
Rafał Miłeckic913e232009-12-22 23:02:16 +010031
Rafał Miłeckic913e232009-12-22 23:02:16 +010032static void radeon_pm_set_clocks_locked(struct radeon_device *rdev);
33static void radeon_pm_set_clocks(struct radeon_device *rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +010034static void radeon_pm_idle_work_handler(struct work_struct *work);
35static int radeon_debugfs_pm_init(struct radeon_device *rdev);
36
37static const char *pm_state_names[4] = {
38 "PM_STATE_DISABLED",
39 "PM_STATE_MINIMUM",
40 "PM_STATE_PAUSED",
41 "PM_STATE_ACTIVE"
42};
Rafał Miłecki74338742009-11-03 00:53:02 +010043
Alex Deucher0ec0e742009-12-23 13:21:58 -050044static const char *pm_state_types[5] = {
Alex Deucherd91eeb72010-04-05 15:26:43 -040045 "",
Alex Deucher0ec0e742009-12-23 13:21:58 -050046 "Powersave",
47 "Battery",
48 "Balanced",
49 "Performance",
50};
51
Alex Deucher56278a82009-12-28 13:58:44 -050052static void radeon_print_power_mode_info(struct radeon_device *rdev)
53{
54 int i, j;
55 bool is_default;
56
57 DRM_INFO("%d Power State(s)\n", rdev->pm.num_power_states);
58 for (i = 0; i < rdev->pm.num_power_states; i++) {
Alex Deuchera48b9b42010-04-22 14:03:55 -040059 if (rdev->pm.default_power_state_index == i)
Alex Deucher56278a82009-12-28 13:58:44 -050060 is_default = true;
61 else
62 is_default = false;
Alex Deucher0ec0e742009-12-23 13:21:58 -050063 DRM_INFO("State %d %s %s\n", i,
64 pm_state_types[rdev->pm.power_state[i].type],
65 is_default ? "(default)" : "");
Alex Deucher56278a82009-12-28 13:58:44 -050066 if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP))
Alex Deucher79daedc2010-04-22 14:25:19 -040067 DRM_INFO("\t%d PCIE Lanes\n", rdev->pm.power_state[i].pcie_lanes);
Alex Deuchera48b9b42010-04-22 14:03:55 -040068 if (rdev->pm.power_state[i].flags & RADEON_PM_SINGLE_DISPLAY_ONLY)
69 DRM_INFO("\tSingle display only\n");
Alex Deucher56278a82009-12-28 13:58:44 -050070 DRM_INFO("\t%d Clock Mode(s)\n", rdev->pm.power_state[i].num_clock_modes);
71 for (j = 0; j < rdev->pm.power_state[i].num_clock_modes; j++) {
72 if (rdev->flags & RADEON_IS_IGP)
73 DRM_INFO("\t\t%d engine: %d\n",
74 j,
75 rdev->pm.power_state[i].clock_info[j].sclk * 10);
76 else
77 DRM_INFO("\t\t%d engine/memory: %d/%d\n",
78 j,
79 rdev->pm.power_state[i].clock_info[j].sclk * 10,
80 rdev->pm.power_state[i].clock_info[j].mclk * 10);
81 }
82 }
83}
84
Alex Deucherbae6b562010-04-22 13:38:05 -040085void radeon_sync_with_vblank(struct radeon_device *rdev)
Rafał Miłeckid0d6cb82010-03-02 22:06:52 +010086{
87 if (rdev->pm.active_crtcs) {
88 rdev->pm.vblank_sync = false;
89 wait_event_timeout(
90 rdev->irq.vblank_queue, rdev->pm.vblank_sync,
91 msecs_to_jiffies(RADEON_WAIT_VBLANK_TIMEOUT));
92 }
93}
94
Rafał Miłecki74338742009-11-03 00:53:02 +010095int radeon_pm_init(struct radeon_device *rdev)
96{
Rafał Miłeckic913e232009-12-22 23:02:16 +010097 rdev->pm.state = PM_STATE_DISABLED;
98 rdev->pm.planned_action = PM_ACTION_NONE;
Alex Deuchera48b9b42010-04-22 14:03:55 -040099 rdev->pm.can_upclock = true;
100 rdev->pm.can_downclock = true;
Rafał Miłeckic913e232009-12-22 23:02:16 +0100101
Alex Deucher56278a82009-12-28 13:58:44 -0500102 if (rdev->bios) {
103 if (rdev->is_atom_bios)
104 radeon_atombios_get_power_modes(rdev);
105 else
106 radeon_combios_get_power_modes(rdev);
107 radeon_print_power_mode_info(rdev);
108 }
109
Rafał Miłecki74338742009-11-03 00:53:02 +0100110 if (radeon_debugfs_pm_init(rdev)) {
Rafał Miłeckic142c3e2009-11-06 11:38:34 +0100111 DRM_ERROR("Failed to register debugfs file for PM!\n");
Rafał Miłecki74338742009-11-03 00:53:02 +0100112 }
113
Rafał Miłeckic913e232009-12-22 23:02:16 +0100114 INIT_DELAYED_WORK(&rdev->pm.idle_work, radeon_pm_idle_work_handler);
115
Alex Deucher90c39052010-03-24 11:32:29 -0400116 if ((radeon_dynpm != -1 && radeon_dynpm) && (rdev->pm.num_power_states > 1)) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100117 rdev->pm.state = PM_STATE_PAUSED;
118 DRM_INFO("radeon: dynamic power management enabled\n");
119 }
120
121 DRM_INFO("radeon: power management initialized\n");
122
Rafał Miłecki74338742009-11-03 00:53:02 +0100123 return 0;
124}
125
Alex Deucher29fb52c2010-03-11 10:01:17 -0500126void radeon_pm_fini(struct radeon_device *rdev)
127{
Alex Deucher58e21df2010-03-22 13:31:08 -0400128 if (rdev->pm.state != PM_STATE_DISABLED) {
129 /* cancel work */
130 cancel_delayed_work_sync(&rdev->pm.idle_work);
131 /* reset default clocks */
132 rdev->pm.state = PM_STATE_DISABLED;
133 rdev->pm.planned_action = PM_ACTION_DEFAULT;
134 radeon_pm_set_clocks(rdev);
135 }
136
Alex Deucher29fb52c2010-03-11 10:01:17 -0500137 if (rdev->pm.i2c_bus)
138 radeon_i2c_destroy(rdev->pm.i2c_bus);
139}
140
Rafał Miłeckic913e232009-12-22 23:02:16 +0100141void radeon_pm_compute_clocks(struct radeon_device *rdev)
142{
143 struct drm_device *ddev = rdev->ddev;
Alex Deuchera48b9b42010-04-22 14:03:55 -0400144 struct drm_crtc *crtc;
Rafał Miłeckic913e232009-12-22 23:02:16 +0100145 struct radeon_crtc *radeon_crtc;
Rafał Miłeckic913e232009-12-22 23:02:16 +0100146
147 if (rdev->pm.state == PM_STATE_DISABLED)
148 return;
149
150 mutex_lock(&rdev->pm.mutex);
151
152 rdev->pm.active_crtcs = 0;
Alex Deuchera48b9b42010-04-22 14:03:55 -0400153 rdev->pm.active_crtc_count = 0;
154 list_for_each_entry(crtc,
155 &ddev->mode_config.crtc_list, head) {
156 radeon_crtc = to_radeon_crtc(crtc);
157 if (radeon_crtc->enabled) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100158 rdev->pm.active_crtcs |= (1 << radeon_crtc->crtc_id);
Alex Deuchera48b9b42010-04-22 14:03:55 -0400159 rdev->pm.active_crtc_count++;
Rafał Miłeckic913e232009-12-22 23:02:16 +0100160 }
161 }
162
Alex Deuchera48b9b42010-04-22 14:03:55 -0400163 if (rdev->pm.active_crtc_count > 1) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100164 if (rdev->pm.state == PM_STATE_ACTIVE) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100165 cancel_delayed_work(&rdev->pm.idle_work);
166
167 rdev->pm.state = PM_STATE_PAUSED;
168 rdev->pm.planned_action = PM_ACTION_UPCLOCK;
Alex Deuchera48b9b42010-04-22 14:03:55 -0400169 radeon_pm_set_clocks(rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100170
171 DRM_DEBUG("radeon: dynamic power management deactivated\n");
Rafał Miłeckic913e232009-12-22 23:02:16 +0100172 }
Alex Deuchera48b9b42010-04-22 14:03:55 -0400173 } else if (rdev->pm.active_crtc_count == 1) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100174 /* TODO: Increase clocks if needed for current mode */
175
176 if (rdev->pm.state == PM_STATE_MINIMUM) {
177 rdev->pm.state = PM_STATE_ACTIVE;
178 rdev->pm.planned_action = PM_ACTION_UPCLOCK;
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100179 radeon_pm_set_clocks(rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100180
181 queue_delayed_work(rdev->wq, &rdev->pm.idle_work,
182 msecs_to_jiffies(RADEON_IDLE_LOOP_MS));
Alex Deuchera48b9b42010-04-22 14:03:55 -0400183 } else if (rdev->pm.state == PM_STATE_PAUSED) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100184 rdev->pm.state = PM_STATE_ACTIVE;
185 queue_delayed_work(rdev->wq, &rdev->pm.idle_work,
186 msecs_to_jiffies(RADEON_IDLE_LOOP_MS));
187 DRM_DEBUG("radeon: dynamic power management activated\n");
188 }
Alex Deuchera48b9b42010-04-22 14:03:55 -0400189 } else { /* count == 0 */
Rafał Miłeckic913e232009-12-22 23:02:16 +0100190 if (rdev->pm.state != PM_STATE_MINIMUM) {
191 cancel_delayed_work(&rdev->pm.idle_work);
192
193 rdev->pm.state = PM_STATE_MINIMUM;
194 rdev->pm.planned_action = PM_ACTION_MINIMUM;
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100195 radeon_pm_set_clocks(rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100196 }
Rafał Miłeckic913e232009-12-22 23:02:16 +0100197 }
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100198
199 mutex_unlock(&rdev->pm.mutex);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100200}
201
Alex Deucherbae6b562010-04-22 13:38:05 -0400202bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish)
Dave Airlief7352612010-02-18 15:58:36 +1000203{
Alex Deucherbae6b562010-04-22 13:38:05 -0400204 u32 stat_crtc = 0;
Dave Airlief7352612010-02-18 15:58:36 +1000205 bool in_vbl = true;
206
Alex Deucherbae6b562010-04-22 13:38:05 -0400207 if (ASIC_IS_DCE4(rdev)) {
Dave Airlief7352612010-02-18 15:58:36 +1000208 if (rdev->pm.active_crtcs & (1 << 0)) {
Alex Deucherbae6b562010-04-22 13:38:05 -0400209 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC0_REGISTER_OFFSET);
210 if (!(stat_crtc & 1))
Dave Airlief7352612010-02-18 15:58:36 +1000211 in_vbl = false;
212 }
213 if (rdev->pm.active_crtcs & (1 << 1)) {
Alex Deucherbae6b562010-04-22 13:38:05 -0400214 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC1_REGISTER_OFFSET);
215 if (!(stat_crtc & 1))
216 in_vbl = false;
217 }
218 if (rdev->pm.active_crtcs & (1 << 2)) {
219 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC2_REGISTER_OFFSET);
220 if (!(stat_crtc & 1))
221 in_vbl = false;
222 }
223 if (rdev->pm.active_crtcs & (1 << 3)) {
224 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC3_REGISTER_OFFSET);
225 if (!(stat_crtc & 1))
226 in_vbl = false;
227 }
228 if (rdev->pm.active_crtcs & (1 << 4)) {
229 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC4_REGISTER_OFFSET);
230 if (!(stat_crtc & 1))
231 in_vbl = false;
232 }
233 if (rdev->pm.active_crtcs & (1 << 5)) {
234 stat_crtc = RREG32(EVERGREEN_CRTC_STATUS + EVERGREEN_CRTC5_REGISTER_OFFSET);
235 if (!(stat_crtc & 1))
236 in_vbl = false;
237 }
238 } else if (ASIC_IS_AVIVO(rdev)) {
239 if (rdev->pm.active_crtcs & (1 << 0)) {
240 stat_crtc = RREG32(D1CRTC_STATUS);
241 if (!(stat_crtc & 1))
242 in_vbl = false;
243 }
244 if (rdev->pm.active_crtcs & (1 << 1)) {
245 stat_crtc = RREG32(D2CRTC_STATUS);
246 if (!(stat_crtc & 1))
247 in_vbl = false;
248 }
249 } else {
250 if (rdev->pm.active_crtcs & (1 << 0)) {
251 stat_crtc = RREG32(RADEON_CRTC_STATUS);
252 if (!(stat_crtc & 1))
253 in_vbl = false;
254 }
255 if (rdev->pm.active_crtcs & (1 << 1)) {
256 stat_crtc = RREG32(RADEON_CRTC2_STATUS);
257 if (!(stat_crtc & 1))
Dave Airlief7352612010-02-18 15:58:36 +1000258 in_vbl = false;
259 }
260 }
261 if (in_vbl == false)
Alex Deucherbae6b562010-04-22 13:38:05 -0400262 DRM_INFO("not in vbl for pm change %08x at %s\n", stat_crtc,
263 finish ? "exit" : "entry");
Dave Airlief7352612010-02-18 15:58:36 +1000264 return in_vbl;
265}
Rafał Miłeckic913e232009-12-22 23:02:16 +0100266static void radeon_pm_set_clocks_locked(struct radeon_device *rdev)
267{
268 /*radeon_fence_wait_last(rdev);*/
Dave Airlief7352612010-02-18 15:58:36 +1000269
Alex Deucher530079a2009-12-23 14:39:36 -0500270 radeon_set_power_state(rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100271 rdev->pm.planned_action = PM_ACTION_NONE;
272}
273
274static void radeon_pm_set_clocks(struct radeon_device *rdev)
275{
Alex Deucher8a56df62010-03-15 17:09:05 -0400276 int i;
277
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100278 radeon_get_power_state(rdev, rdev->pm.planned_action);
279 mutex_lock(&rdev->cp.mutex);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100280
Alex Deucheref6e6cf2010-03-17 14:29:15 -0400281 /* wait for GPU idle */
282 rdev->pm.gui_idle = false;
283 rdev->irq.gui_idle = true;
284 radeon_irq_set(rdev);
285 wait_event_interruptible_timeout(
286 rdev->irq.idle_queue, rdev->pm.gui_idle,
287 msecs_to_jiffies(RADEON_WAIT_IDLE_TIMEOUT));
288 rdev->irq.gui_idle = false;
289 radeon_irq_set(rdev);
290
Alex Deucher8a56df62010-03-15 17:09:05 -0400291 for (i = 0; i < rdev->num_crtc; i++) {
292 if (rdev->pm.active_crtcs & (1 << i)) {
293 rdev->pm.req_vblank |= (1 << i);
294 drm_vblank_get(rdev->ddev, i);
295 }
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100296 }
Rafał Miłeckid0d6cb82010-03-02 22:06:52 +0100297 radeon_pm_set_clocks_locked(rdev);
Alex Deucher8a56df62010-03-15 17:09:05 -0400298 for (i = 0; i < rdev->num_crtc; i++) {
299 if (rdev->pm.req_vblank & (1 << i)) {
300 rdev->pm.req_vblank &= ~(1 << i);
301 drm_vblank_put(rdev->ddev, i);
302 }
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100303 }
304
Alex Deucherc00f53b2010-03-22 13:34:22 -0400305 /* update display watermarks based on new power state */
306 radeon_update_bandwidth_info(rdev);
307 if (rdev->pm.active_crtc_count)
308 radeon_bandwidth_update(rdev);
309
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100310 mutex_unlock(&rdev->cp.mutex);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100311}
312
313static void radeon_pm_idle_work_handler(struct work_struct *work)
314{
315 struct radeon_device *rdev;
316 rdev = container_of(work, struct radeon_device,
317 pm.idle_work.work);
318
319 mutex_lock(&rdev->pm.mutex);
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100320 if (rdev->pm.state == PM_STATE_ACTIVE) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100321 unsigned long irq_flags;
322 int not_processed = 0;
323
324 read_lock_irqsave(&rdev->fence_drv.lock, irq_flags);
325 if (!list_empty(&rdev->fence_drv.emited)) {
326 struct list_head *ptr;
327 list_for_each(ptr, &rdev->fence_drv.emited) {
328 /* count up to 3, that's enought info */
329 if (++not_processed >= 3)
330 break;
331 }
332 }
333 read_unlock_irqrestore(&rdev->fence_drv.lock, irq_flags);
334
335 if (not_processed >= 3) { /* should upclock */
336 if (rdev->pm.planned_action == PM_ACTION_DOWNCLOCK) {
337 rdev->pm.planned_action = PM_ACTION_NONE;
338 } else if (rdev->pm.planned_action == PM_ACTION_NONE &&
Alex Deuchera48b9b42010-04-22 14:03:55 -0400339 rdev->pm.can_upclock) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100340 rdev->pm.planned_action =
341 PM_ACTION_UPCLOCK;
342 rdev->pm.action_timeout = jiffies +
343 msecs_to_jiffies(RADEON_RECLOCK_DELAY_MS);
344 }
345 } else if (not_processed == 0) { /* should downclock */
346 if (rdev->pm.planned_action == PM_ACTION_UPCLOCK) {
347 rdev->pm.planned_action = PM_ACTION_NONE;
348 } else if (rdev->pm.planned_action == PM_ACTION_NONE &&
Alex Deuchera48b9b42010-04-22 14:03:55 -0400349 rdev->pm.can_downclock) {
Rafał Miłeckic913e232009-12-22 23:02:16 +0100350 rdev->pm.planned_action =
351 PM_ACTION_DOWNCLOCK;
352 rdev->pm.action_timeout = jiffies +
353 msecs_to_jiffies(RADEON_RECLOCK_DELAY_MS);
354 }
355 }
356
357 if (rdev->pm.planned_action != PM_ACTION_NONE &&
Rafał Miłecki73a6d3f2010-01-08 00:22:47 +0100358 jiffies > rdev->pm.action_timeout) {
359 radeon_pm_set_clocks(rdev);
Rafał Miłeckic913e232009-12-22 23:02:16 +0100360 }
361 }
362 mutex_unlock(&rdev->pm.mutex);
363
364 queue_delayed_work(rdev->wq, &rdev->pm.idle_work,
365 msecs_to_jiffies(RADEON_IDLE_LOOP_MS));
366}
367
Rafał Miłecki74338742009-11-03 00:53:02 +0100368/*
369 * Debugfs info
370 */
371#if defined(CONFIG_DEBUG_FS)
372
373static int radeon_debugfs_pm_info(struct seq_file *m, void *data)
374{
375 struct drm_info_node *node = (struct drm_info_node *) m->private;
376 struct drm_device *dev = node->minor->dev;
377 struct radeon_device *rdev = dev->dev_private;
378
Rafał Miłeckic913e232009-12-22 23:02:16 +0100379 seq_printf(m, "state: %s\n", pm_state_names[rdev->pm.state]);
Rafał Miłecki62340772009-12-15 21:46:58 +0100380 seq_printf(m, "default engine clock: %u0 kHz\n", rdev->clock.default_sclk);
381 seq_printf(m, "current engine clock: %u0 kHz\n", radeon_get_engine_clock(rdev));
382 seq_printf(m, "default memory clock: %u0 kHz\n", rdev->clock.default_mclk);
383 if (rdev->asic->get_memory_clock)
384 seq_printf(m, "current memory clock: %u0 kHz\n", radeon_get_memory_clock(rdev));
Rafał Miłeckiaa5120d2010-02-18 20:24:28 +0000385 if (rdev->asic->get_pcie_lanes)
386 seq_printf(m, "PCIE lanes: %d\n", radeon_get_pcie_lanes(rdev));
Rafał Miłecki74338742009-11-03 00:53:02 +0100387
388 return 0;
389}
390
391static struct drm_info_list radeon_pm_info_list[] = {
392 {"radeon_pm_info", radeon_debugfs_pm_info, 0, NULL},
393};
394#endif
395
Rafał Miłeckic913e232009-12-22 23:02:16 +0100396static int radeon_debugfs_pm_init(struct radeon_device *rdev)
Rafał Miłecki74338742009-11-03 00:53:02 +0100397{
398#if defined(CONFIG_DEBUG_FS)
399 return radeon_debugfs_add_files(rdev, radeon_pm_info_list, ARRAY_SIZE(radeon_pm_info_list));
400#else
401 return 0;
402#endif
403}