File tree Expand file tree Collapse file tree
drivers/gpu/drm/i915/display Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -806,8 +806,8 @@ static int intel_bw_crtc_min_cdclk(const struct intel_crtc_state *crtc_state)
806806 return DIV_ROUND_UP_ULL (mul_u32_u32 (intel_bw_crtc_data_rate (crtc_state ), 10 ), 512 );
807807}
808808
809- void intel_bw_crtc_update (struct intel_bw_state * bw_state ,
810- const struct intel_crtc_state * crtc_state )
809+ static void intel_bw_crtc_update (struct intel_bw_state * bw_state ,
810+ const struct intel_crtc_state * crtc_state )
811811{
812812 struct intel_crtc * crtc = to_intel_crtc (crtc_state -> uapi .crtc );
813813 struct drm_i915_private * i915 = to_i915 (crtc -> base .dev );
@@ -1422,6 +1422,23 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
14221422 return 0 ;
14231423}
14241424
1425+ void intel_bw_update_hw_state (struct intel_display * display )
1426+ {
1427+ struct intel_bw_state * bw_state =
1428+ to_intel_bw_state (display -> bw .obj .state );
1429+ struct intel_crtc * crtc ;
1430+
1431+ if (DISPLAY_VER (display ) < 9 )
1432+ return ;
1433+
1434+ for_each_intel_crtc (display -> drm , crtc ) {
1435+ const struct intel_crtc_state * crtc_state =
1436+ to_intel_crtc_state (crtc -> base .state );
1437+
1438+ intel_bw_crtc_update (bw_state , crtc_state );
1439+ }
1440+ }
1441+
14251442void intel_bw_crtc_disable_noatomic (struct intel_crtc * crtc )
14261443{
14271444 struct intel_display * display = to_intel_display (crtc );
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ struct drm_i915_private;
1616struct intel_atomic_state ;
1717struct intel_crtc ;
1818struct intel_crtc_state ;
19+ struct intel_display ;
1920
2021struct intel_dbuf_bw {
2122 unsigned int max_bw [I915_MAX_DBUF_SLICES ];
@@ -74,14 +75,13 @@ intel_atomic_get_bw_state(struct intel_atomic_state *state);
7475void intel_bw_init_hw (struct drm_i915_private * dev_priv );
7576int intel_bw_init (struct drm_i915_private * dev_priv );
7677int intel_bw_atomic_check (struct intel_atomic_state * state );
77- void intel_bw_crtc_update (struct intel_bw_state * bw_state ,
78- const struct intel_crtc_state * crtc_state );
7978int icl_pcode_restrict_qgv_points (struct drm_i915_private * dev_priv ,
8079 u32 points_mask );
8180int intel_bw_calc_min_cdclk (struct intel_atomic_state * state ,
8281 bool * need_cdclk_calc );
8382int intel_bw_min_cdclk (struct drm_i915_private * i915 ,
8483 const struct intel_bw_state * bw_state );
84+ void intel_bw_update_hw_state (struct intel_display * display );
8585void intel_bw_crtc_disable_noatomic (struct intel_crtc * crtc );
8686
8787#endif /* __INTEL_BW_H__ */
Original file line number Diff line number Diff line change @@ -825,8 +825,6 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
825825 drm_connector_list_iter_end (& conn_iter );
826826
827827 for_each_intel_crtc (& i915 -> drm , crtc ) {
828- struct intel_bw_state * bw_state =
829- to_intel_bw_state (i915 -> display .bw .obj .state );
830828 struct intel_crtc_state * crtc_state =
831829 to_intel_crtc_state (crtc -> base .state );
832830 struct intel_plane * plane ;
@@ -880,10 +878,9 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
880878
881879 intel_pmdemand_update_port_clock (display , pmdemand_state , pipe ,
882880 crtc_state -> port_clock );
883-
884- intel_bw_crtc_update (bw_state , crtc_state );
885881 }
886882
883+ intel_bw_update_hw_state (display );
887884 intel_cdclk_update_hw_state (display );
888885
889886 intel_pmdemand_init_pmdemand_params (display , pmdemand_state );
You can’t perform that action at this time.
0 commit comments