lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 19 Dec 2017 13:14:56 +0800
From:   Chen-Yu Tsai <wens@...e.org>
To:     Maxime Ripard <maxime.ripard@...e-electrons.com>
Cc:     Daniel Vetter <daniel.vetter@...el.com>,
        David Airlie <airlied@...ux.ie>, Chen-Yu Tsai <wens@...e.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
        Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
        Neil Armstrong <narmstrong@...libre.com>, thomas@...sch.nl
Subject: Re: [PATCH v2 06/12] drm/sun4i: engine: Create an atomic_begin callback

On Mon, Dec 18, 2017 at 10:57 PM, Maxime Ripard
<maxime.ripard@...e-electrons.com> wrote:
> We have to implement some display engine specific behaviours in
> atomic_begin. Let's add a function for that.
>
> Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
> ---
>  drivers/gpu/drm/sun4i/sun4i_crtc.c   |  6 +++++-
>  drivers/gpu/drm/sun4i/sunxi_engine.h | 13 +++++++++++++
>  2 files changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/sun4i/sun4i_crtc.c b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> index 2a565325714f..f549f2874353 100644
> --- a/drivers/gpu/drm/sun4i/sun4i_crtc.c
> +++ b/drivers/gpu/drm/sun4i/sun4i_crtc.c
> @@ -64,6 +64,7 @@ static void sun4i_crtc_atomic_begin(struct drm_crtc *crtc,
>  {
>         struct sun4i_crtc *scrtc = drm_crtc_to_sun4i_crtc(crtc);
>         struct drm_device *dev = crtc->dev;
> +       struct sunxi_engine *engine = scrtc->engine;
>         unsigned long flags;
>
>         if (crtc->state->event) {
> @@ -73,7 +74,10 @@ static void sun4i_crtc_atomic_begin(struct drm_crtc *crtc,
>                 scrtc->event = crtc->state->event;
>                 spin_unlock_irqrestore(&dev->event_lock, flags);
>                 crtc->state->event = NULL;
> -        }
> +       }
> +
> +       if (engine->ops->atomic_begin)
> +               engine->ops->atomic_begin(engine, old_state);
>  }
>
>  static void sun4i_crtc_atomic_flush(struct drm_crtc *crtc,
> diff --git a/drivers/gpu/drm/sun4i/sunxi_engine.h b/drivers/gpu/drm/sun4i/sunxi_engine.h
> index b810c26d78bb..ec4d54f596d4 100644
> --- a/drivers/gpu/drm/sun4i/sunxi_engine.h
> +++ b/drivers/gpu/drm/sun4i/sunxi_engine.h
> @@ -33,6 +33,19 @@ struct sunxi_engine_ops {
>         void (*apply_color_correction)(struct sunxi_engine *engine);
>
>         /**
> +        * @atomic_begin:
> +        *
> +        * This callback allows to prepare our backend for an atomic

... our engine ...

Otherwise,

Reviewed-by: Chen-Yu Tsai <wens@...e.org>

> +        * update. This is mirroring the
> +        * &drm_crtc_helper_funcs.atomic_begin callback, so any
> +        * documentation there applies.
> +        *
> +        * This function is optional.
> +        */
> +       void (*atomic_begin)(struct sunxi_engine *engine,
> +                            struct drm_crtc_state *old_state);
> +
> +       /**
>          * @atomic_check:
>          *
>          * This callback allows to validate plane-update related CRTC
> --
> git-series 0.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ