mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
drm/i915/fbc: Extract _intel_fbc_cfb_size()
Pull the lower level stuff out from intel_fbc_cfb_size() into a separate function that doesn't depend on the plane_state. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240705145254.3355-13-ville.syrjala@linux.intel.com Reviewed-by: Uma Shankar <uma.shankar@intel.com>
This commit is contained in:
parent
f89d7664c3
commit
4d72202993
@ -217,13 +217,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)
|
||||
|
Loading…
Reference in New Issue
Block a user