[PATCH 26/29] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush()
Gustavo Padovan
gustavo at padovan.org
Wed Jan 7 11:29:14 PST 2015
2014-12-30 Inki Dae <inki.dae at samsung.com>:
> On 2014년 12월 18일 22:58, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> >
> > Add CRTC callbacks .atomic_begin() .atomic_flush(). On exynos they
> > unprotect the windows before the commit and protects it after based on
> > a plane mask tha store which plane will be updated.
>
> tha? Typo?
Okay.
>
> >
> > For that we create two new exynos_crtc callbacks: .win_protect() and
> > .win_unprotect(). The only driver that implement those now is FIMD.
> >
> > Signed-off-by: Gustavo Padovan <gustavo.padovan at collabora.co.uk>
> > ---
> > drivers/gpu/drm/exynos/exynos_drm_crtc.c | 34 +++++++++++++++++++
> > drivers/gpu/drm/exynos/exynos_drm_drv.h | 4 +++
> > drivers/gpu/drm/exynos/exynos_drm_fimd.c | 56 ++++++++++++++++++++++---------
> > drivers/gpu/drm/exynos/exynos_drm_plane.c | 4 +++
> > 4 files changed, 82 insertions(+), 16 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> > index 74980c5..f231eb8 100644
> > --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> > +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c
> > @@ -156,6 +156,38 @@ static void exynos_drm_crtc_disable(struct drm_crtc *crtc)
> > }
> > }
> >
> > +static void exynos_crtc_atomic_begin(struct drm_crtc *crtc)
> > +{
> > + struct exynos_drm_crtc *exynos_crtc = to_exynos_crtc(crtc);
> > + struct drm_plane *plane;
> > + int index = 0;
> > +
>
> Isn't drm_modest_lock_all(dev) required? Or is this function atomic
> context? I didn't look into all codes yet so there may be my missing point.
the atomic code already protects it by calling drm_modeset_lock_all() so we
are running in a safe context.
Gustavo
More information about the dri-devel
mailing list