mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-06 04:19:23 -04:00
drm/i915/scaler: Use crtc_state to setup plane or pipe scaler
Pass crtc_state to intel_atomic_setup_scaler, this will help to check if pch_pfit enabled or not and also will be useful to pass scaler_state with the same which will be used later to store hscale and vscale values. -- v2: - Fix typos. (Ankit) Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250120172209.188488-3-mitulkumar.ajitkumar.golani@intel.com
This commit is contained in:
committed by
Ankit Nautiyal
parent
8c27c4e90e
commit
f42da9aa86
@@ -319,13 +319,15 @@ static int intel_allocate_scaler(struct intel_crtc_scaler_state *scaler_state,
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int intel_atomic_setup_scaler(struct intel_crtc_scaler_state *scaler_state,
|
||||
static int intel_atomic_setup_scaler(struct intel_crtc_state *crtc_state,
|
||||
int num_scalers_need, struct intel_crtc *crtc,
|
||||
const char *name, int idx,
|
||||
struct intel_plane_state *plane_state,
|
||||
int *scaler_id)
|
||||
{
|
||||
struct intel_display *display = to_intel_display(crtc);
|
||||
struct intel_crtc_scaler_state *scaler_state =
|
||||
&crtc_state->scaler_state;
|
||||
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
|
||||
u32 mode;
|
||||
|
||||
@@ -455,7 +457,7 @@ static int setup_crtc_scaler(struct intel_atomic_state *state,
|
||||
struct intel_crtc_scaler_state *scaler_state =
|
||||
&crtc_state->scaler_state;
|
||||
|
||||
return intel_atomic_setup_scaler(scaler_state,
|
||||
return intel_atomic_setup_scaler(crtc_state,
|
||||
hweight32(scaler_state->scaler_users),
|
||||
crtc, "CRTC", crtc->base.base.id,
|
||||
NULL, &scaler_state->scaler_id);
|
||||
@@ -490,7 +492,7 @@ static int setup_plane_scaler(struct intel_atomic_state *state,
|
||||
if (IS_ERR(plane_state))
|
||||
return PTR_ERR(plane_state);
|
||||
|
||||
return intel_atomic_setup_scaler(scaler_state,
|
||||
return intel_atomic_setup_scaler(crtc_state,
|
||||
hweight32(scaler_state->scaler_users),
|
||||
crtc, "PLANE", plane->base.base.id,
|
||||
plane_state, &plane_state->scaler_id);
|
||||
|
||||
Reference in New Issue
Block a user