[Intel-gfx] [PATCH 4/8] drm/i915: Use {active, scaled}_planes to compute ilk watermarks
Jani Nikula
jani.nikula at linux.intel.com
Wed Feb 16 09:39:54 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>
>
> Use the {active,scaled}_planes bitmasks from the crtc state
> rather than poking at the plane state directly. One step
> towards eliminating the last use of the somewhat questionble
> intel_atomic_crtc_state_for_each_plane_state() macro which
> peeks into the plane state without actually holding the plane
> mutex.
>
> 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/intel_pm.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index 4f2f0e80beef..0fa3dce9bd54 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -3179,12 +3179,8 @@ static int ilk_compute_pipe_wm(struct intel_atomic_state *state,
> }
>
> pipe_wm->pipe_enabled = crtc_state->hw.active;
> - if (sprstate) {
> - pipe_wm->sprites_enabled = sprstate->uapi.visible;
> - pipe_wm->sprites_scaled = sprstate->uapi.visible &&
> - (drm_rect_width(&sprstate->uapi.dst) != drm_rect_width(&sprstate->uapi.src) >> 16 ||
> - drm_rect_height(&sprstate->uapi.dst) != drm_rect_height(&sprstate->uapi.src) >> 16);
> - }
> + pipe_wm->sprites_enabled = crtc_state->active_planes & BIT(PLANE_SPRITE0);
> + pipe_wm->sprites_scaled = crtc_state->scaled_planes & BIT(PLANE_SPRITE0);
>
> usable_level = max_level;
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list