Skip to content

Commit bb800b5

Browse files
committed
drm/i915: Relocate intel_bw_crtc_update()
intel_bw_crtc_update() is only used by the readout path, so relocate the function next its only caller. Easier to read the code when related things are nearby. 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-19-ville.syrjala@linux.intel.com
1 parent e6001c9 commit bb800b5

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

drivers/gpu/drm/i915/display/intel_bw.c

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -806,24 +806,6 @@ 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-
static void intel_bw_crtc_update(struct intel_bw_state *bw_state,
810-
const struct intel_crtc_state *crtc_state)
811-
{
812-
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
813-
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
814-
815-
bw_state->data_rate[crtc->pipe] =
816-
intel_bw_crtc_data_rate(crtc_state);
817-
bw_state->num_active_planes[crtc->pipe] =
818-
intel_bw_crtc_num_active_planes(crtc_state);
819-
bw_state->force_check_qgv = true;
820-
821-
drm_dbg_kms(&i915->drm, "pipe %c data rate %u num active planes %u\n",
822-
pipe_name(crtc->pipe),
823-
bw_state->data_rate[crtc->pipe],
824-
bw_state->num_active_planes[crtc->pipe]);
825-
}
826-
827809
static unsigned int intel_bw_num_active_planes(struct drm_i915_private *dev_priv,
828810
const struct intel_bw_state *bw_state)
829811
{
@@ -1422,6 +1404,24 @@ int intel_bw_atomic_check(struct intel_atomic_state *state)
14221404
return 0;
14231405
}
14241406

1407+
static void intel_bw_crtc_update(struct intel_bw_state *bw_state,
1408+
const struct intel_crtc_state *crtc_state)
1409+
{
1410+
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
1411+
struct drm_i915_private *i915 = to_i915(crtc->base.dev);
1412+
1413+
bw_state->data_rate[crtc->pipe] =
1414+
intel_bw_crtc_data_rate(crtc_state);
1415+
bw_state->num_active_planes[crtc->pipe] =
1416+
intel_bw_crtc_num_active_planes(crtc_state);
1417+
bw_state->force_check_qgv = true;
1418+
1419+
drm_dbg_kms(&i915->drm, "pipe %c data rate %u num active planes %u\n",
1420+
pipe_name(crtc->pipe),
1421+
bw_state->data_rate[crtc->pipe],
1422+
bw_state->num_active_planes[crtc->pipe]);
1423+
}
1424+
14251425
void intel_bw_update_hw_state(struct intel_display *display)
14261426
{
14271427
struct intel_bw_state *bw_state =

0 commit comments

Comments
 (0)