mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 02:00:43 -04:00
drm/i915: Extract intel_bw_crtc_disable_noatomic()
Hoist the bw stuff into a separate function from intel_crtc_disable_noatomic_complete() so that the details are better hidden inside intel_bw.c. We can also skip the whole thing on pre-skl since the dbuf state isn't actually used on those platforms. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250306163420.3961-9-ville.syrjala@linux.intel.com
This commit is contained in:
@@ -1422,6 +1422,20 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void intel_bw_crtc_disable_noatomic(struct intel_crtc *crtc)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct intel_bw_state *bw_state =
|
||||
to_intel_bw_state(display->bw.obj.state);
|
||||
enum pipe pipe = crtc->pipe;
|
||||
|
||||
if (DISPLAY_VER(display) < 9)
|
||||
return;
|
||||
|
||||
bw_state->data_rate[pipe] = 0;
|
||||
bw_state->num_active_planes[pipe] = 0;
|
||||
}
|
||||
|
||||
static struct intel_global_state *
|
||||
intel_bw_duplicate_state(struct intel_global_obj *obj)
|
||||
{
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
struct drm_i915_private;
|
||||
struct intel_atomic_state;
|
||||
struct intel_crtc;
|
||||
struct intel_crtc_state;
|
||||
|
||||
struct intel_dbuf_bw {
|
||||
@@ -81,5 +82,6 @@ int intel_bw_calc_min_cdclk(struct intel_atomic_state *state,
|
||||
bool *need_cdclk_calc);
|
||||
int intel_bw_min_cdclk(struct drm_i915_private *i915,
|
||||
const struct intel_bw_state *bw_state);
|
||||
void intel_bw_crtc_disable_noatomic(struct intel_crtc *crtc);
|
||||
|
||||
#endif /* __INTEL_BW_H__ */
|
||||
|
||||
@@ -156,8 +156,6 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
|
||||
struct intel_bw_state *bw_state =
|
||||
to_intel_bw_state(i915->display.bw.obj.state);
|
||||
struct intel_pmdemand_state *pmdemand_state =
|
||||
to_intel_pmdemand_state(i915->display.pmdemand.obj.state);
|
||||
struct intel_crtc_state *crtc_state =
|
||||
@@ -177,9 +175,7 @@ static void intel_crtc_disable_noatomic_complete(struct intel_crtc *crtc)
|
||||
|
||||
intel_cdclk_crtc_disable_noatomic(crtc);
|
||||
skl_wm_crtc_disable_noatomic(crtc);
|
||||
|
||||
bw_state->data_rate[pipe] = 0;
|
||||
bw_state->num_active_planes[pipe] = 0;
|
||||
intel_bw_crtc_disable_noatomic(crtc);
|
||||
|
||||
intel_pmdemand_update_port_clock(display, pmdemand_state, pipe, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user