Re: [PATCH] drm/i915: Clear crtc atomic flags at beginning of transaction

Rodrigo Vivi
2015-02-24T17:43:51Z

Hi Matt,

It probably doesn't fix because the issue is to have many commits
without a check, having many commits with intel_crtc->atomic zeroed
already.
imho cleaning it more wouldn't solve it... but anyway, let me try.

Thanks,
Rodrigo.

On Mon, Feb 23, 2015 at 6:14 PM, Matt Roper <matthew.d.roper@intel.com> wrote:
> Once we have full atomic modeset, these kind of flags should be in a
> real intel_crtc_state that's tracked properly. In the meantime, make
> sure we clear out any old flags at the beginning of a transaction so
> that we don't wind up seeing leftover flags from old transactions that
> were checked, but never went to the commit step.
>
> Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
> Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
> ---
> Rodrigo, does this solve the frontbuffer problems you're seeing? I haven't had
> time to test this myself, but I think this will fix at least one problem that
> may or may not have been the source of your troubles.
>
> drivers/gpu/drm/i915/intel_atomic.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_atomic.c b/drivers/gpu/drm/i915/intel_atomic.c
> index 011b896..fe51e23 100644
> --- a/drivers/gpu/drm/i915/intel_atomic.c
> +++ b/drivers/gpu/drm/i915/intel_atomic.c
> @@ -76,6 +76,8 @@ int intel_atomic_check(struct drm_device *dev,
> state->allow_modeset = false;
> for (i = 0; i < ncrtcs; i++) {
> struct intel_crtc *crtc = to_intel_crtc(state->crtcs[i]);
> + if (crtc)
> + memset(&crtc->atomic, 0, sizeof(crtc->atomic));
> if (crtc && crtc->pipe != nuclear_pipe)
> not_nuclear = true;
> }
> --
> 1.8.5.1
>

--
Rodrigo Vivi
Blog: http://blog.vivi.eng.br