aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_pm.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-08-01 20:42:55 -0400
committerDave Airlie <airlied@redhat.com>2010-08-01 20:47:07 -0400
commitd9fdaafbe912a34ef06ed569c6606fe2811f325b (patch)
tree31b4d09d5c20e20c6ab8a579f3d0801a2f94e742 /drivers/gpu/drm/radeon/radeon_pm.c
parentd6486813d2d0658c34f62212ba9a64be4d01c317 (diff)
drm/radeon/kms: move a bunch of modesetting debug to correct debug usage.
This migrates a bunch of DRM_DEBUG->DRM_DEBUG_KMS so we can get more modesetting related info without all the other ioctl handling easily. Also the PM code moves to DRM_DEBUG_DRIVER mostly. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_pm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_pm.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_pm.c b/drivers/gpu/drm/radeon/radeon_pm.c
index ed66062ae9d0..a3d25f419853 100644
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -62,9 +62,9 @@ static int radeon_acpi_event(struct notifier_block *nb,
62 62
63 if (strcmp(entry->device_class, ACPI_AC_CLASS) == 0) { 63 if (strcmp(entry->device_class, ACPI_AC_CLASS) == 0) {
64 if (power_supply_is_system_supplied() > 0) 64 if (power_supply_is_system_supplied() > 0)
65 DRM_DEBUG("pm: AC\n"); 65 DRM_DEBUG_DRIVER("pm: AC\n");
66 else 66 else
67 DRM_DEBUG("pm: DC\n"); 67 DRM_DEBUG_DRIVER("pm: DC\n");
68 68
69 if (rdev->pm.pm_method == PM_METHOD_PROFILE) { 69 if (rdev->pm.pm_method == PM_METHOD_PROFILE) {
70 if (rdev->pm.profile == PM_PROFILE_AUTO) { 70 if (rdev->pm.profile == PM_PROFILE_AUTO) {
@@ -198,7 +198,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
198 radeon_set_engine_clock(rdev, sclk); 198 radeon_set_engine_clock(rdev, sclk);
199 radeon_pm_debug_check_in_vbl(rdev, true); 199 radeon_pm_debug_check_in_vbl(rdev, true);
200 rdev->pm.current_sclk = sclk; 200 rdev->pm.current_sclk = sclk;
201 DRM_DEBUG("Setting: e: %d\n", sclk); 201 DRM_DEBUG_DRIVER("Setting: e: %d\n", sclk);
202 } 202 }
203 203
204 /* set memory clock */ 204 /* set memory clock */
@@ -207,7 +207,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
207 radeon_set_memory_clock(rdev, mclk); 207 radeon_set_memory_clock(rdev, mclk);
208 radeon_pm_debug_check_in_vbl(rdev, true); 208 radeon_pm_debug_check_in_vbl(rdev, true);
209 rdev->pm.current_mclk = mclk; 209 rdev->pm.current_mclk = mclk;
210 DRM_DEBUG("Setting: m: %d\n", mclk); 210 DRM_DEBUG_DRIVER("Setting: m: %d\n", mclk);
211 } 211 }
212 212
213 if (misc_after) 213 if (misc_after)
@@ -219,7 +219,7 @@ static void radeon_set_power_state(struct radeon_device *rdev)
219 rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index; 219 rdev->pm.current_power_state_index = rdev->pm.requested_power_state_index;
220 rdev->pm.current_clock_mode_index = rdev->pm.requested_clock_mode_index; 220 rdev->pm.current_clock_mode_index = rdev->pm.requested_clock_mode_index;
221 } else 221 } else
222 DRM_DEBUG("pm: GUI not idle!!!\n"); 222 DRM_DEBUG_DRIVER("pm: GUI not idle!!!\n");
223} 223}
224 224
225static void radeon_pm_set_clocks(struct radeon_device *rdev) 225static void radeon_pm_set_clocks(struct radeon_device *rdev)
@@ -294,27 +294,27 @@ static void radeon_pm_print_states(struct radeon_device *rdev)
294 struct radeon_power_state *power_state; 294 struct radeon_power_state *power_state;
295 struct radeon_pm_clock_info *clock_info; 295 struct radeon_pm_clock_info *clock_info;
296 296
297 DRM_DEBUG("%d Power State(s)\n", rdev->pm.num_power_states); 297 DRM_DEBUG_DRIVER("%d Power State(s)\n", rdev->pm.num_power_states);
298 for (i = 0; i < rdev->pm.num_power_states; i++) { 298 for (i = 0; i < rdev->pm.num_power_states; i++) {
299 power_state = &rdev->pm.power_state[i]; 299 power_state = &rdev->pm.power_state[i];
300 DRM_DEBUG("State %d: %s\n", i, 300 DRM_DEBUG_DRIVER("State %d: %s\n", i,
301 radeon_pm_state_type_name[power_state->type]); 301 radeon_pm_state_type_name[power_state->type]);
302 if (i == rdev->pm.default_power_state_index) 302 if (i == rdev->pm.default_power_state_index)
303 DRM_DEBUG("\tDefault"); 303 DRM_DEBUG_DRIVER("\tDefault");
304 if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP)) 304 if ((rdev->flags & RADEON_IS_PCIE) && !(rdev->flags & RADEON_IS_IGP))
305 DRM_DEBUG("\t%d PCIE Lanes\n", power_state->pcie_lanes); 305 DRM_DEBUG_DRIVER("\t%d PCIE Lanes\n", power_state->pcie_lanes);
306 if (power_state->flags & RADEON_PM_STATE_SINGLE_DISPLAY_ONLY) 306 if (power_state->flags & RADEON_PM_STATE_SINGLE_DISPLAY_ONLY)
307 DRM_DEBUG("\tSingle display only\n"); 307 DRM_DEBUG_DRIVER("\tSingle display only\n");
308 DRM_DEBUG("\t%d Clock Mode(s)\n", power_state->num_clock_modes); 308 DRM_DEBUG_DRIVER("\t%d Clock Mode(s)\n", power_state->num_clock_modes);
309 for (j = 0; j < power_state->num_clock_modes; j++) { 309 for (j = 0; j < power_state->num_clock_modes; j++) {
310 clock_info = &(power_state->clock_info[j]); 310 clock_info = &(power_state->clock_info[j]);
311 if (rdev->flags & RADEON_IS_IGP) 311 if (rdev->flags & RADEON_IS_IGP)
312 DRM_DEBUG("\t\t%d e: %d%s\n", 312 DRM_DEBUG_DRIVER("\t\t%d e: %d%s\n",
313 j, 313 j,
314 clock_info->sclk * 10, 314 clock_info->sclk * 10,
315 clock_info->flags & RADEON_PM_MODE_NO_DISPLAY ? "\tNo display only" : ""); 315 clock_info->flags & RADEON_PM_MODE_NO_DISPLAY ? "\tNo display only" : "");
316 else 316 else
317 DRM_DEBUG("\t\t%d e: %d\tm: %d\tv: %d%s\n", 317 DRM_DEBUG_DRIVER("\t\t%d e: %d\tm: %d\tv: %d%s\n",
318 j, 318 j,
319 clock_info->sclk * 10, 319 clock_info->sclk * 10,
320 clock_info->mclk * 10, 320 clock_info->mclk * 10,
@@ -657,7 +657,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
657 radeon_pm_get_dynpm_state(rdev); 657 radeon_pm_get_dynpm_state(rdev);
658 radeon_pm_set_clocks(rdev); 658 radeon_pm_set_clocks(rdev);
659 659
660 DRM_DEBUG("radeon: dynamic power management deactivated\n"); 660 DRM_DEBUG_DRIVER("radeon: dynamic power management deactivated\n");
661 } 661 }
662 } else if (rdev->pm.active_crtc_count == 1) { 662 } else if (rdev->pm.active_crtc_count == 1) {
663 /* TODO: Increase clocks if needed for current mode */ 663 /* TODO: Increase clocks if needed for current mode */
@@ -674,7 +674,7 @@ void radeon_pm_compute_clocks(struct radeon_device *rdev)
674 rdev->pm.dynpm_state = DYNPM_STATE_ACTIVE; 674 rdev->pm.dynpm_state = DYNPM_STATE_ACTIVE;
675 queue_delayed_work(rdev->wq, &rdev->pm.dynpm_idle_work, 675 queue_delayed_work(rdev->wq, &rdev->pm.dynpm_idle_work,
676 msecs_to_jiffies(RADEON_IDLE_LOOP_MS)); 676 msecs_to_jiffies(RADEON_IDLE_LOOP_MS));
677 DRM_DEBUG("radeon: dynamic power management activated\n"); 677 DRM_DEBUG_DRIVER("radeon: dynamic power management activated\n");
678 } 678 }
679 } else { /* count == 0 */ 679 } else { /* count == 0 */
680 if (rdev->pm.dynpm_state != DYNPM_STATE_MINIMUM) { 680 if (rdev->pm.dynpm_state != DYNPM_STATE_MINIMUM) {
@@ -770,7 +770,7 @@ static bool radeon_pm_debug_check_in_vbl(struct radeon_device *rdev, bool finish
770 bool in_vbl = radeon_pm_in_vbl(rdev); 770 bool in_vbl = radeon_pm_in_vbl(rdev);
771 771
772 if (in_vbl == false) 772 if (in_vbl == false)
773 DRM_DEBUG("not in vbl for pm change %08x at %s\n", stat_crtc, 773 DRM_DEBUG_DRIVER("not in vbl for pm change %08x at %s\n", stat_crtc,
774 finish ? "exit" : "entry"); 774 finish ? "exit" : "entry");
775 return in_vbl; 775 return in_vbl;
776} 776}