From a48b9b4edb8bb87deb13b9f088a595cf71457b69 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 22 Apr 2010 14:03:55 -0400 Subject: drm/radeon/kms/pm: add asic specific callbacks for getting power state (v2) This also simplifies the code and enables reclocking with multiple heads active by tracking whether the power states are single or multi-head capable. Eventually, we will want to select a power state based on external factors (AC/DC state, user selection, etc.). (v2) Update for evergreen Signed-off-by: Alex Deucher Signed-off-by: Dave Airlie --- drivers/gpu/drm/radeon/radeon_asic.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'drivers/gpu/drm/radeon/radeon_asic.c') diff --git a/drivers/gpu/drm/radeon/radeon_asic.c b/drivers/gpu/drm/radeon/radeon_asic.c index 48893fbb6582..1053115ba652 100644 --- a/drivers/gpu/drm/radeon/radeon_asic.c +++ b/drivers/gpu/drm/radeon/radeon_asic.c @@ -166,6 +166,7 @@ static struct radeon_asic r100_asic = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -206,6 +207,7 @@ static struct radeon_asic r200_asic = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -247,6 +249,7 @@ static struct radeon_asic r300_asic = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -287,6 +290,7 @@ static struct radeon_asic r300_asic_pcie = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -328,6 +332,7 @@ static struct radeon_asic r420_asic = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -369,6 +374,7 @@ static struct radeon_asic rs400_asic = { .hpd_set_polarity = &r100_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -410,6 +416,7 @@ static struct radeon_asic rs600_asic = { .hpd_set_polarity = &rs600_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -451,6 +458,7 @@ static struct radeon_asic rs690_asic = { .hpd_set_polarity = &rs600_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -492,6 +500,7 @@ static struct radeon_asic rv515_asic = { .hpd_set_polarity = &rs600_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -533,6 +542,7 @@ static struct radeon_asic r520_asic = { .hpd_set_polarity = &rs600_hpd_set_polarity, .ioctl_wait_idle = NULL, .gui_idle = &r100_gui_idle, + .get_power_state = &r100_get_power_state, .set_power_state = &r100_set_power_state, }; @@ -573,6 +583,7 @@ static struct radeon_asic r600_asic = { .hpd_set_polarity = &r600_hpd_set_polarity, .ioctl_wait_idle = r600_ioctl_wait_idle, .gui_idle = &r600_gui_idle, + .get_power_state = &r600_get_power_state, .set_power_state = &r600_set_power_state, }; @@ -613,6 +624,7 @@ static struct radeon_asic rs780_asic = { .hpd_set_polarity = &r600_hpd_set_polarity, .ioctl_wait_idle = r600_ioctl_wait_idle, .gui_idle = &r600_gui_idle, + .get_power_state = &r600_get_power_state, .set_power_state = &r600_set_power_state, }; @@ -653,6 +665,7 @@ static struct radeon_asic rv770_asic = { .hpd_set_polarity = &r600_hpd_set_polarity, .ioctl_wait_idle = r600_ioctl_wait_idle, .gui_idle = &r600_gui_idle, + .get_power_state = &r600_get_power_state, .set_power_state = &r600_set_power_state, }; @@ -691,6 +704,7 @@ static struct radeon_asic evergreen_asic = { .hpd_sense = &evergreen_hpd_sense, .hpd_set_polarity = &evergreen_hpd_set_polarity, .gui_idle = &r600_gui_idle, + .get_power_state = &r600_get_power_state, .set_power_state = &r600_set_power_state, }; -- cgit v1.2.3