aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c7
-rw-r--r--drivers/gpu/drm/radeon/rv770_dpm.c14
-rw-r--r--include/uapi/drm/radeon_drm.h2
3 files changed, 15 insertions, 8 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 5bf50cec017e..9e3af24e1b05 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -470,6 +470,13 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
470 DRM_DEBUG_KMS("BACKEND_ENABLED_MASK is si+ only!\n"); 470 DRM_DEBUG_KMS("BACKEND_ENABLED_MASK is si+ only!\n");
471 } 471 }
472 break; 472 break;
473 case RADEON_INFO_MAX_SCLK:
474 if ((rdev->pm.pm_method == PM_METHOD_DPM) &&
475 rdev->pm.dpm_enabled)
476 *value = rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.sclk * 10;
477 else
478 *value = rdev->pm.default_sclk * 10;
479 break;
473 default: 480 default:
474 DRM_DEBUG_KMS("Invalid request %d\n", info->request); 481 DRM_DEBUG_KMS("Invalid request %d\n", info->request);
475 return -EINVAL; 482 return -EINVAL;
diff --git a/drivers/gpu/drm/radeon/rv770_dpm.c b/drivers/gpu/drm/radeon/rv770_dpm.c
index b95267846ff2..cb730cddfb9a 100644
--- a/drivers/gpu/drm/radeon/rv770_dpm.c
+++ b/drivers/gpu/drm/radeon/rv770_dpm.c
@@ -2251,14 +2251,12 @@ static void rv7xx_parse_pplib_clock_info(struct radeon_device *rdev,
2251 pl->vddci = vddci; 2251 pl->vddci = vddci;
2252 } 2252 }
2253 2253
2254 if (rdev->family >= CHIP_BARTS) { 2254 if ((rps->class & ATOM_PPLIB_CLASSIFICATION_UI_MASK) ==
2255 if ((rps->class & ATOM_PPLIB_CLASSIFICATION_UI_MASK) == 2255 ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE) {
2256 ATOM_PPLIB_CLASSIFICATION_UI_PERFORMANCE) { 2256 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.sclk = pl->sclk;
2257 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.sclk = pl->sclk; 2257 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.mclk = pl->mclk;
2258 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.mclk = pl->mclk; 2258 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.vddc = pl->vddc;
2259 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.vddc = pl->vddc; 2259 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.vddci = pl->vddci;
2260 rdev->pm.dpm.dyn_state.max_clock_voltage_on_ac.vddci = pl->vddci;
2261 }
2262 } 2260 }
2263} 2261}
2264 2262
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index fe421e8a431b..d9ea3a73afe2 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -985,6 +985,8 @@ struct drm_radeon_cs {
985#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18 985#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18
986/* query the number of render backends */ 986/* query the number of render backends */
987#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19 987#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19
988/* max engine clock - needed for OpenCL */
989#define RADEON_INFO_MAX_SCLK 0x1a
988 990
989 991
990struct drm_radeon_info { 992struct drm_radeon_info {