]> www.infradead.org Git - linux.git/commitdiff
drm/i915: Do more bw readout
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 26 Mar 2025 16:25:36 +0000 (18:25 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 4 Apr 2025 16:59:18 +0000 (19:59 +0300)
Update a bunch of bw related stuff during readout:
- bw_state->dbuf_bw possible now that the wm readout
  has given us access to the plane ddb data
- cdclk_state->bw_min_cdclk

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250326162544.3642-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_bw.c
drivers/gpu/drm/i915/display/intel_cdclk.c

index 19b516084fac8bb3e8ecdd8a401844317c2bfcf0..69f3de0bba6a1d7786f2246a8825130c68fd1e2b 100644 (file)
@@ -1495,6 +1495,8 @@ void intel_bw_update_hw_state(struct intel_display *display)
 
                if (DISPLAY_VER(display) >= 11)
                        intel_bw_crtc_update(bw_state, crtc_state);
+
+               skl_crtc_calc_dbuf_bw(&bw_state->dbuf_bw[pipe], crtc_state);
        }
 }
 
@@ -1510,6 +1512,7 @@ void intel_bw_crtc_disable_noatomic(struct intel_crtc *crtc)
 
        bw_state->data_rate[pipe] = 0;
        bw_state->num_active_planes[pipe] = 0;
+       memset(&bw_state->dbuf_bw[pipe], 0, sizeof(bw_state->dbuf_bw[pipe]));
 }
 
 static struct intel_global_state *
index 984fd9f98c9f77777f903456f5838179a774af5e..ea2fbee2d62f21a79be92ae8276f44d5ea718fa0 100644 (file)
@@ -3341,6 +3341,8 @@ int intel_modeset_calc_cdclk(struct intel_atomic_state *state)
 
 void intel_cdclk_update_hw_state(struct intel_display *display)
 {
+       const struct intel_bw_state *bw_state =
+               to_intel_bw_state(display->bw.obj.state);
        struct intel_cdclk_state *cdclk_state =
                to_intel_cdclk_state(display->cdclk.obj.state);
        struct intel_crtc *crtc;
@@ -3358,6 +3360,8 @@ void intel_cdclk_update_hw_state(struct intel_display *display)
                cdclk_state->min_cdclk[pipe] = intel_crtc_compute_min_cdclk(crtc_state);
                cdclk_state->min_voltage_level[pipe] = crtc_state->min_voltage_level;
        }
+
+       cdclk_state->bw_min_cdclk = intel_bw_min_cdclk(display, bw_state);
 }
 
 void intel_cdclk_crtc_disable_noatomic(struct intel_crtc *crtc)