[Intel-gfx] [PATCH 2/2] drm/i915: Add a FIXME about crtc !active vs. watermarks
Daniel Vetter
daniel at ffwll.ch
Mon May 2 09:13:49 UTC 2016
On Fri, Apr 29, 2016 at 05:31:18PM +0300, ville.syrjala at linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> When the crtc is enabled but !active, we should still compute the
> watermarks as if the planes were visible. That would make it more
> likely that the we can later transition to active without errors.
>
> Add a FIXME to remind people that we're doing the wrong thing now.
> We should perhaps just move the wm computation for each individual plane
> into the .check_plane hook, and later we'd just combine the results from
> all active planes.
>
> Cc: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Cc: Matt Roper <matthew.d.roper at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
In general atomic check code shouldn't ever look at crtc->active, except
in special cases (like when checking whether a transition would work). We
still have a bit a mess in that regard.
Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
> drivers/gpu/drm/i915/intel_display.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 5ffccf6e7f36..00059d18b0f0 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -11833,6 +11833,11 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
> * Visibility is calculated as if the crtc was on, but
> * after scaler setup everything depends on it being off
> * when the crtc isn't active.
> + *
> + * FIXME this is wrong for watermarks. Watermarks should also
> + * be computed as if the pipe would be active. Perhaps move
> + * per-plane wm computation to the .check_plane() hook, and
> + * only combine the results from all planes in the current place?
> */
> if (!is_crtc_enabled)
> to_intel_plane_state(plane_state)->visible = visible = false;
> --
> 2.7.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
More information about the Intel-gfx
mailing list