diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-01-20 18:47:19 +0100 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2020-01-31 16:00:44 +0100 |
commit | 1965de63a93aecd788874e921f074b52fbea81a8 (patch) | |
tree | b51bb5f82b3ffb632cdebc8fd34b071337916a2c /drivers/gpu/drm/i915/i915_drv.h | |
parent | drm/i915: Simplify intel_set_cdclk_{pre,post}_plane_update() calling convention (diff) | |
download | linux-1965de63a93aecd788874e921f074b52fbea81a8.tar.xz linux-1965de63a93aecd788874e921f074b52fbea81a8.zip |
drm/i915: Extract intel_cdclk_state
Use the same structure to store the cdclk state in both
intel_atomic_state and dev_priv. First step towards proper
old vs. new cdclk states.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200120174728.21095-10-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 51 |
1 files changed, 32 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7baf1e740eff..1ab8238e09fe 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -65,6 +65,7 @@ #include "i915_utils.h" #include "display/intel_bios.h" +#include "display/intel_cdclk.h" #include "display/intel_display.h" #include "display/intel_display_power.h" #include "display/intel_dpll_mgr.h" @@ -887,6 +888,33 @@ struct i915_selftest_stash { atomic_t counter; }; +struct intel_cdclk_state { + /* + * Logical configuration of cdclk (used for all scaling, + * watermark, etc. calculations and checks). This is + * computed as if all enabled crtcs were active. + */ + struct intel_cdclk_config logical; + + /* + * Actual configuration of cdclk, can be different from the + * logical configuration only when all crtc's are DPMS off. + */ + struct intel_cdclk_config actual; + + /* minimum acceptable cdclk for each pipe */ + int min_cdclk[I915_MAX_PIPES]; + /* minimum acceptable voltage level for each pipe */ + u8 min_voltage_level[I915_MAX_PIPES]; + + /* pipe to which cd2x update is synchronized */ + enum pipe pipe; + + /* forced minimum cdclk for glk+ audio w/a */ + int force_min_cdclk; + bool force_min_cdclk_changed; +}; + struct drm_i915_private { struct drm_device drm; @@ -1007,29 +1035,14 @@ struct drm_i915_private { * For reading holding any crtc lock is sufficient, * for writing must hold all of them. */ + struct intel_cdclk_state cdclk_state; + struct { - /* - * The current logical cdclk configuration. - * See intel_atomic_state.cdclk.logical - */ - struct intel_cdclk_config logical; - /* - * The current actual cdclk configuration. - * See intel_atomic_state.cdclk.actual - */ - struct intel_cdclk_config actual; /* The current hardware cdclk configuration */ struct intel_cdclk_config hw; /* cdclk, divider, and ratio table from bspec */ const struct intel_cdclk_vals *table; - - int force_min_cdclk; - - /* minimum acceptable cdclk for each pipe */ - int min_cdclk[I915_MAX_PIPES]; - /* minimum acceptable voltage level for each pipe */ - u8 min_voltage_level[I915_MAX_PIPES]; } cdclk; /** @@ -1086,8 +1099,8 @@ struct drm_i915_private { struct mutex dpll_lock; /* - * For reading active_pipes, min_cdclk, min_voltage_level holding - * any crtc lock is sufficient, for writing must hold all of them. + * For reading active_pipes, cdclk_state holding any crtc + * lock is sufficient, for writing must hold all of them. */ u8 active_pipes; |