]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915/scaler: Add scaler prefill helpers
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 15 Oct 2025 12:56:45 +0000 (15:56 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 16 Oct 2025 15:21:24 +0000 (18:21 +0300)
commitb95e31cdfc87c780249ac3fcec2198ceb50d140d
treec9a0ef09730b5816fbc06910a453647ff08d9c06
parentd7cc4b6bc951c52d6dfc0e3cbcc81e900100c2a6
drm/i915/scaler: Add scaler prefill helpers

Add helpers to compute the required prefill line count and
adjustment factors for the scalers.

The "1st" variants hand out numbers for the first scaler stage
in the pipeline (pipe scaler if no plane scalers are enabled,
or the max from all the plane scaler). The "2nd" variants deal
with second scaler stage (pipe scaler when plane scaling is also
enabled, otherwise there is no second stage).

The _worst() variants give out worst case estimates, meant for
guardband sizing. The other variants are meant for the actual
vblank/guardband length check vs. prefill+pkgc/sagv latency.

The returned numbers are in .16 binary fixed point.

TODO: pretty rough, should check the actual scaler max scaling
      factors instead of just assuming 3x everywhere
TODO: Reorder scaler assignment vs. vblank length check to get
      the actual scale factors

v2: Drop debugs
v3: Ignore scale factors for the vblank length check for now
    since we don't have the scalers assigned yet

Reviewed-by: Uma Shankar <uma.shankar@intel.com> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20251015125645.11230-1-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/skl_scaler.c
drivers/gpu/drm/i915/display/skl_scaler.h