aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_combios.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_combios.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index a74217cd192f..e0138b674aca 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -2557,6 +2557,7 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
2557 u16 offset, misc, misc2 = 0; 2557 u16 offset, misc, misc2 = 0;
2558 u8 rev, blocks, tmp; 2558 u8 rev, blocks, tmp;
2559 int state_index = 0; 2559 int state_index = 0;
2560 struct radeon_i2c_bus_rec i2c_bus;
2560 2561
2561 rdev->pm.default_power_state_index = -1; 2562 rdev->pm.default_power_state_index = -1;
2562 2563
@@ -2575,7 +2576,6 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
2575 offset = combios_get_table_offset(dev, COMBIOS_OVERDRIVE_INFO_TABLE); 2576 offset = combios_get_table_offset(dev, COMBIOS_OVERDRIVE_INFO_TABLE);
2576 if (offset) { 2577 if (offset) {
2577 u8 thermal_controller = 0, gpio = 0, i2c_addr = 0, clk_bit = 0, data_bit = 0; 2578 u8 thermal_controller = 0, gpio = 0, i2c_addr = 0, clk_bit = 0, data_bit = 0;
2578 struct radeon_i2c_bus_rec i2c_bus;
2579 2579
2580 rev = RBIOS8(offset); 2580 rev = RBIOS8(offset);
2581 2581
@@ -2617,6 +2617,25 @@ void radeon_combios_get_power_modes(struct radeon_device *rdev)
2617 i2c_new_device(&rdev->pm.i2c_bus->adapter, &info); 2617 i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
2618 } 2618 }
2619 } 2619 }
2620 } else {
2621 /* boards with a thermal chip, but no overdrive table */
2622
2623 /* Asus 9600xt has an f75375 on the monid bus */
2624 if ((dev->pdev->device == 0x4152) &&
2625 (dev->pdev->subsystem_vendor == 0x1043) &&
2626 (dev->pdev->subsystem_device == 0xc002)) {
2627 i2c_bus = combios_setup_i2c_bus(rdev, DDC_MONID, 0, 0);
2628 rdev->pm.i2c_bus = radeon_i2c_lookup(rdev, &i2c_bus);
2629 if (rdev->pm.i2c_bus) {
2630 struct i2c_board_info info = { };
2631 const char *name = "f75375";
2632 info.addr = 0x28;
2633 strlcpy(info.type, name, sizeof(info.type));
2634 i2c_new_device(&rdev->pm.i2c_bus->adapter, &info);
2635 DRM_INFO("Possible %s thermal controller at 0x%02x\n",
2636 name, info.addr);
2637 }
2638 }
2620 } 2639 }
2621 2640
2622 if (rdev->flags & RADEON_IS_MOBILITY) { 2641 if (rdev->flags & RADEON_IS_MOBILITY) {