Skip to contentSkip to conversation

drm/radeon/kms: add PM quirk for Asus Radeon HD 3200

PATCH In review Rafał Miłecki 2 participants 4 messages Mar 5, 2010 – Mar 14, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: add PM quirk for Asus Radeon HD 3200

---
 drivers/gpu/drm/radeon/radeon_pm.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_pm.c +18 -0
index 6b65f15..a2ea0be 100644
@@ -79,6 +79,23 @@ static void radeon_print_power_mode_info(struct radeon_device *rdev)
 	}
 }
 
+static void radeon_apply_pm_quirks(struct radeon_device *rdev)
+{
+	/* Asus Radeon HD 3200 contains power states with reversed types */
+	/* We received single report like this so far. See FDO bug #26347.
+	   In case of more reports we may consider some detecting algorithm */
+	if ((rdev->pdev->device == 0x9610) &&
+	    (rdev->pdev->subsystem_vendor == 0x1043) &&
+	    (rdev->pdev->subsystem_device == 0x82f1)) {
+		rdev->pm.power_state[0].type = POWER_STATE_TYPE_PERFORMANCE;
+		rdev->pm.power_state[1].type = POWER_STATE_TYPE_DEFAULT;
+		rdev->pm.default_power_state = &rdev->pm.power_state[1];
+		rdev->pm.current_power_state = rdev->pm.default_power_state;
+		rdev->pm.current_clock_mode =
+			rdev->pm.default_power_state->default_clock_mode;
+	}
+}
+
 static struct radeon_power_state * radeon_pick_power_state(struct radeon_device *rdev,
 							   enum radeon_pm_state_type type)
 {
@@ -235,6 +252,7 @@ int radeon_pm_init(struct radeon_device *rdev)
 			radeon_atombios_get_power_modes(rdev);
 		else
 			radeon_combios_get_power_modes(rdev);
+		radeon_apply_pm_quirks(rdev);
 		radeon_print_power_mode_info(rdev);
 	}
 
Signature · 14 lines
1.6.4.2


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#1 lore raw

2010/3/5 Rafał Miłecki <[email protected]>:

Quoted 1 line

NACK. I've got a better way to deal with this.

Alex

Quoted 44 lines

---
 drivers/gpu/drm/radeon/radeon_pm.c |   18 ++++++++++++++++++

 1 files changed, 18 insertions(+), 0 deletions(-)
drivers/gpu/drm/radeon/radeon_pm.c +17 -0
index 6b65f15..a2ea0be 100644
@@ -79,6 +79,23 @@ static void radeon_print_power_mode_info(struct radeon_device *rdev)
        }
  }
 
+static void radeon_apply_pm_quirks(struct radeon_device *rdev)
+{
+       /* Asus Radeon HD 3200 contains power states with reversed types */
+       /* We received single report like this so far. See FDO bug #26347.
+          In case of more reports we may consider some detecting algorithm */
+       if ((rdev->pdev->device == 0x9610) &&
+           (rdev->pdev->subsystem_vendor == 0x1043) &&
+           (rdev->pdev->subsystem_device == 0x82f1)) {
+               rdev->pm.power_state[0].type = POWER_STATE_TYPE_PERFORMANCE;
+               rdev->pm.power_state[1].type = POWER_STATE_TYPE_DEFAULT;
+               rdev->pm.default_power_state = &rdev->pm.power_state[1];
+               rdev->pm.current_power_state = rdev->pm.default_power_state;
+               rdev->pm.current_clock_mode =
+                       rdev->pm.default_power_state->default_clock_mode;
+       }
+}
+
  static struct radeon_power_state * radeon_pick_power_state(struct radeon_device *rdev,
                                                           enum radeon_pm_state_type type)
  {
@@ -235,6 +252,7 @@ int radeon_pm_init(struct radeon_device *rdev)
                        radeon_atombios_get_power_modes(rdev);

               else radeon_combios_get_power_modes(rdev);
+               radeon_apply_pm_quirks(rdev); radeon_print_power_mode_info(rdev); }

--
1.6.4.2

Quoted 12 lines

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel

#2 lore raw

W dniu 14 marca 2010 21:48 użytkownik Alex Deucher

Quoted 4 lines · <[email protected]> napisał:

2010/3/5 Rafał Miłecki <[email protected]>:

Quoted 1 line

NACK.  I've got a better way to deal with this.

Post it. I see we love missing merge windows :|

Signature · 13 lines
Rafał

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
#3 lore raw

2010/3/14 Rafał Miłecki <[email protected]>:

Quoted 8 lines

W dniu 14 marca 2010 21:48 użytkownik Alex Deucher

Quoted 4 lines · <[email protected]> napisał:

2010/3/5 Rafał Miłecki <[email protected]>:

Quoted 1 line

NACK.  I've got a better way to deal with this.

Post it. I see we love missing merge windows :|

On their way. Unfortunately, this weekend was the first chance I had to look at PM stuff in a while.

Alex

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--