File tree Expand file tree Collapse file tree 3 files changed +22
-8
lines changed
drivers/gpu/drm/i915/display Expand file tree Collapse file tree 3 files changed +22
-8
lines changed 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)
806
806
return DIV_ROUND_UP_ULL (mul_u32_u32 (intel_bw_crtc_data_rate (crtc_state ), 10 ), 512 );
807
807
}
808
808
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 )
811
811
{
812
812
struct intel_crtc * crtc = to_intel_crtc (crtc_state -> uapi .crtc );
813
813
struct drm_i915_private * i915 = to_i915 (crtc -> base .dev );
@@ -1422,6 +1422,23 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
1422
1422
return 0 ;
1423
1423
}
1424
1424
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
+
1425
1442
void intel_bw_crtc_disable_noatomic (struct intel_crtc * crtc )
1426
1443
{
1427
1444
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;
16
16
struct intel_atomic_state ;
17
17
struct intel_crtc ;
18
18
struct intel_crtc_state ;
19
+ struct intel_display ;
19
20
20
21
struct intel_dbuf_bw {
21
22
unsigned int max_bw [I915_MAX_DBUF_SLICES ];
@@ -74,14 +75,13 @@ intel_atomic_get_bw_state(struct intel_atomic_state *state);
74
75
void intel_bw_init_hw (struct drm_i915_private * dev_priv );
75
76
int intel_bw_init (struct drm_i915_private * dev_priv );
76
77
int 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 );
79
78
int icl_pcode_restrict_qgv_points (struct drm_i915_private * dev_priv ,
80
79
u32 points_mask );
81
80
int intel_bw_calc_min_cdclk (struct intel_atomic_state * state ,
82
81
bool * need_cdclk_calc );
83
82
int intel_bw_min_cdclk (struct drm_i915_private * i915 ,
84
83
const struct intel_bw_state * bw_state );
84
+ void intel_bw_update_hw_state (struct intel_display * display );
85
85
void intel_bw_crtc_disable_noatomic (struct intel_crtc * crtc );
86
86
87
87
#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)
825
825
drm_connector_list_iter_end (& conn_iter );
826
826
827
827
for_each_intel_crtc (& i915 -> drm , crtc ) {
828
- struct intel_bw_state * bw_state =
829
- to_intel_bw_state (i915 -> display .bw .obj .state );
830
828
struct intel_crtc_state * crtc_state =
831
829
to_intel_crtc_state (crtc -> base .state );
832
830
struct intel_plane * plane ;
@@ -880,10 +878,9 @@ static void intel_modeset_readout_hw_state(struct drm_i915_private *i915)
880
878
881
879
intel_pmdemand_update_port_clock (display , pmdemand_state , pipe ,
882
880
crtc_state -> port_clock );
883
-
884
- intel_bw_crtc_update (bw_state , crtc_state );
885
881
}
886
882
883
+ intel_bw_update_hw_state (display );
887
884
intel_cdclk_update_hw_state (display );
888
885
889
886
intel_pmdemand_init_pmdemand_params (display , pmdemand_state );
You can’t perform that action at this time.
0 commit comments