[Intel-gfx] [PATCH 21/42] drm/i915: Remove use of crtc->config from intel_overlay.c
Daniel Vetter
daniel at ffwll.ch
Tue May 12 02:06:35 PDT 2015
On Mon, May 11, 2015 at 04:24:57PM +0200, Maarten Lankhorst wrote:
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
General comment: Imo the commit message should have a short explanation
for why it's ok to use the the current or new state respectively in any
given conversion. Can be super-repetive ;-) E.g. here this is about the
legacy overlay code which locks out any other updates unconditionally,
hence the atomic state can't change and we want the current one.
This is somewhat important as soon as we start to queue multiple updates
and commit them asynchronously, there crtc->config and crtc->state can end
up being different ...
-Daniel
> ---
> drivers/gpu/drm/i915/intel_overlay.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
> index 5fd2d5ac02e2..fa0ff6974dcc 100644
> --- a/drivers/gpu/drm/i915/intel_overlay.c
> +++ b/drivers/gpu/drm/i915/intel_overlay.c
> @@ -857,13 +857,13 @@ int intel_overlay_switch_off(struct intel_overlay *overlay)
> }
>
> static int check_overlay_possible_on_crtc(struct intel_overlay *overlay,
> - struct intel_crtc *crtc)
> + struct drm_crtc *crtc)
> {
> - if (!crtc->active)
> + if (!crtc->state->active)
> return -EINVAL;
>
> /* can't use the overlay with double wide pipe */
> - if (crtc->config->double_wide)
> + if (to_intel_crtc_state(crtc->state)->double_wide)
> return -EINVAL;
>
> return 0;
> @@ -1127,7 +1127,7 @@ int intel_overlay_put_image(struct drm_device *dev, void *data,
> if (ret != 0)
> goto out_unlock;
>
> - ret = check_overlay_possible_on_crtc(overlay, crtc);
> + ret = check_overlay_possible_on_crtc(overlay, &crtc->base);
> if (ret != 0)
> goto out_unlock;
>
> --
> 2.1.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://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