[Intel-gfx] [PATCH 3/8] drm/i915: Introduce scaled_planes bitmask
Jani Nikula
jani.nikula at linux.intel.com
Wed Feb 16 09:39:21 UTC 2022
On Fri, 11 Feb 2022, Ville Syrjala <ville.syrjala at linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Add another plane bitmask, this time tracking which planes are
> scaled. This is going to be useful in ILK watermark computations,
> and skl+ pipe scaler assignments.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_atomic_plane.c | 5 +++++
> drivers/gpu/drm/i915/display/intel_display_types.h | 1 +
> 2 files changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_atomic_plane.c b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> index bba2f105b7dd..79720bd5a485 100644
> --- a/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> +++ b/drivers/gpu/drm/i915/display/intel_atomic_plane.c
> @@ -323,6 +323,7 @@ void intel_plane_set_invisible(struct intel_crtc_state *crtc_state,
> struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane);
>
> crtc_state->active_planes &= ~BIT(plane->id);
> + crtc_state->scaled_planes &= ~BIT(plane->id);
> crtc_state->nv12_planes &= ~BIT(plane->id);
> crtc_state->c8_planes &= ~BIT(plane->id);
> crtc_state->data_rate[plane->id] = 0;
> @@ -536,6 +537,10 @@ int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_
> if (new_plane_state->uapi.visible)
> new_crtc_state->active_planes |= BIT(plane->id);
>
> + if (new_plane_state->uapi.visible &&
> + intel_plane_is_scaled(new_plane_state))
> + new_crtc_state->scaled_planes |= BIT(plane->id);
> +
> if (new_plane_state->uapi.visible &&
> intel_format_info_is_yuv_semiplanar(fb->format, fb->modifier))
> new_crtc_state->nv12_planes |= BIT(plane->id);
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 60e15226a8cb..7a5c1e334449 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1168,6 +1168,7 @@ struct intel_crtc_state {
>
> /* bitmask of actually visible planes (enum plane_id) */
> u8 active_planes;
> + u8 scaled_planes;
> u8 nv12_planes;
> u8 c8_planes;
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list