[PATCH 12/20] drm/i915/fbc: Extract _intel_fbc_cfb_size()
Shankar, Uma
uma.shankar at intel.com
Wed Jul 10 08:28:56 UTC 2024
> -----Original Message-----
> From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Ville
> Syrjala
> Sent: Friday, July 5, 2024 8:23 PM
> To: intel-gfx at lists.freedesktop.org
> Cc: intel-xe at lists.freedesktop.org
> Subject: [PATCH 12/20] drm/i915/fbc: Extract _intel_fbc_cfb_size()
>
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Pull the lower level stuff out from intel_fbc_cfb_size() into a separate function
> that doesn't depend on the plane_state.
Looks Good to me.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_fbc.c | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_fbc.c
> b/drivers/gpu/drm/i915/display/intel_fbc.c
> index 47b715e5d533..293e1a3b9a9d 100644
> --- a/drivers/gpu/drm/i915/display/intel_fbc.c
> +++ b/drivers/gpu/drm/i915/display/intel_fbc.c
> @@ -218,13 +218,18 @@ static unsigned int intel_fbc_max_cfb_height(struct
> intel_display *display)
> return 1536;
> }
>
> +static unsigned int _intel_fbc_cfb_size(struct intel_display *display,
> + unsigned int height, unsigned int stride)
> {
> + return min(height, intel_fbc_max_cfb_height(display)) * stride; }
> +
> static unsigned int intel_fbc_cfb_size(const struct intel_plane_state
> *plane_state) {
> struct intel_display *display = to_intel_display(plane_state->uapi.plane-
> >dev);
> unsigned int height = drm_rect_height(&plane_state->uapi.src) >> 16;
>
> - return min(height, intel_fbc_max_cfb_height(display)) *
> - intel_fbc_cfb_stride(plane_state);
> + return _intel_fbc_cfb_size(display, height,
> +intel_fbc_cfb_stride(plane_state));
> }
>
> static u16 intel_fbc_override_cfb_stride(const struct intel_plane_state
> *plane_state)
> --
> 2.44.2
More information about the Intel-gfx
mailing list