aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2019-10-03 09:59:29 +0200
committerMaxime Ripard <mripard@kernel.org>2019-10-03 09:59:29 +0200
commit77fdaa091d79c87323a9f3912a25f73e02ea2a01 (patch)
tree0e47e2d3c4a966277dbaec075f4685187fdae482 /drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
parentdrm/omap: fix max fclk divider for omap36xx (diff)
parentLinux 5.4-rc1 (diff)
downloadlinux-dev-77fdaa091d79c87323a9f3912a25f73e02ea2a01.tar.xz
linux-dev-77fdaa091d79c87323a9f3912a25f73e02ea2a01.zip
Merge drm/drm-fixes into drm-misc-fixes
We haven't backmerged for a while, let's start the -rc period by pulling rc1. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
index 0835ac041acf..7dd46eb96d67 100644
--- a/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/clk_mgr_internal.h
@@ -64,6 +64,8 @@ enum dentist_divider_range {
***************************************************************************************
*/
+/* Macros */
+
#define TO_CLK_MGR_INTERNAL(clk_mgr)\
container_of(clk_mgr, struct clk_mgr_internal, base)
@@ -189,6 +191,7 @@ struct state_dependent_clocks {
struct clk_mgr_internal {
struct clk_mgr base;
+ int smu_ver;
struct pp_smu_funcs *pp_smu;
struct clk_mgr_internal_funcs *funcs;
@@ -213,6 +216,8 @@ struct clk_mgr_internal {
bool dfs_bypass_enabled;
/* True if the DFS-bypass feature is enabled and active. */
bool dfs_bypass_active;
+
+ uint32_t dfs_ref_freq_khz;
/*
* Cache the display clock returned by VBIOS if DFS-bypass is enabled.
* This is basically "Crystal Frequency In KHz" (XTALIN) frequency
@@ -276,8 +281,14 @@ static inline bool should_set_clock(bool safe_to_lower, int calc_clk, int cur_cl
static inline bool should_update_pstate_support(bool safe_to_lower, bool calc_support, bool cur_support)
{
- // Whenever we are transitioning pstate support, we always want to notify prior to committing state
- return (calc_support != cur_support) ? !safe_to_lower : false;
+ if (cur_support != calc_support) {
+ if (calc_support == true && safe_to_lower)
+ return true;
+ else if (calc_support == false && !safe_to_lower)
+ return true;
+ }
+
+ return false;
}
int clk_mgr_helper_get_active_display_cnt(