All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo@padovan.org>
To: Inki Dae <inki.dae@samsung.com>
Cc: linux-samsung-soc <linux-samsung-soc@vger.kernel.org>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH -v2 10/14] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush()
Date: Tue, 10 Feb 2015 10:43:08 -0200	[thread overview]
Message-ID: <20150210124308.GB1991@joana> (raw)
In-Reply-To: <54D97749.7000208@samsung.com>

2015-02-10 Inki Dae <inki.dae@samsung.com>:

> On 2015년 02월 10일 02:07, Gustavo Padovan wrote:
> > 2015-02-09 Daniel Stone <daniel@fooishbar.org>:
> > 
> >> Hi Inki,
> >>
> >> On 9 February 2015 at 14:53, Inki Dae <inki.dae@samsung.com> wrote:
> >>> I'm merging this patch series but I found two issues. One is already
> >>> pointed out.
> >>
> >> Fantastic - thanks a lot for doing this!
> >>
> >>> On 2015년 02월 07일 04:37, Gustavo Padovan wrote:
> >>>> @@ -628,20 +638,6 @@ static void fimd_win_commit(struct exynos_drm_crtc *crtc, unsigned int win)
> >>>>               return;
> >>>>       }
> >>>>
> >>>> -     /*
> >>>> -      * SHADOWCON/PRTCON register is used for enabling timing.
> >>>> -      *
> >>>> -      * for example, once only width value of a register is set,
> >>>> -      * if the dma is started then fimd hardware could malfunction so
> >>>> -      * with protect window setting, the register fields with prefix '_F'
> >>>> -      * wouldn't be updated at vsync also but updated once unprotect window
> >>>> -      * is set.
> >>>> -      */
> >>>> -
> >>>> -     /* protect windows */
> >>>> -     fimd_shadow_protect_win(ctx, win, true);
> >>>
> >>> You removed to protect shadow register updating at vsync so fimd
> >>> hardware could malfunction if setcrtc/page flip/setplane are requested
> >>> by userspace. Actually, when I run modetest repeatedly, I could see
> >>> overlay isn't rarely turned on.
> >>>
> >>> So how about calling win_protect/unprotect callbacks like below? If you
> >>> are ok, I can modify it and merge it.
> >>
> >> I think you are missing some details about atomic and the helpers.
> >>
> >> The helpers wrap _all_ legacy codepaths, e.g. SetCrtc, SetPlane, etc.
> >> All of these operations are intercepted by the code in
> >> drm_atomic_helper.c / drm_plane_helper.c code, and the legacy
> >> operations are turned into atomic operations. For the driver - there
> >> are no legacy operations.
> 
> Yes, SetCrtc does this but not page flip and SetPlane. When I had page
> flip and SetPlane test using modetest, win_protect/unprotect callbacks
> are never called. In my opinion, they, page flip and SetPlane, also are
> required for win_protect/unprotect when updating overlay registers.

Once atomic phase 3 all operations will call win_protect/win_unprotect. I'll
send the next version of this patchset with the atomic phase 3 patches
included.

> 
> In addition, I could find some issues.
> 
> With regard to SetPlane relevent codes, it seems considered for
> win_protect/unprotect but actually, they are never called because when
> atomic_check callback is called, plane->crtc is NULL which would be set
>  at exynos_plane_mode_set function. However, exynos_plane_mode_set
> function is called later than atomic_check callback.
> 
> One more thing, it seems your below patch makes possible_crtc of each
> crtc driver have wrong value because this patch calls exynos_plane_init
> function before fimd_ctx_initialize and vidi_ctx_initialize functions
> are called.

Sure, I can fix this. Thanks for your review.

	Gustavo
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-02-10 12:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-06 19:37 [PATCH -v2 00/14] drm/exynos: clean up + atomic phase 1 and 2 Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 01/14] drm/exynos: remove unused exynos_crtc->win_enable() callback Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 02/14] drm/exynos: remove struct *_win_data abstraction on planes Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 03/14] drm/exynos: preset zpos value for overlay planes Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 04/14] drm/exynos: make zpos property immutable Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 05/14] drm/exynos: remove exynos_plane_destroy() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 06/14] drm/exynos: remove leftover functions declarations Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 07/14] drm/exynos: track vblank events on a per crtc basis Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 08/14] drm/exynos: atomic phase 1: use drm_plane_helper_update() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 09/14] drm/exynos: atomic phase 1: use drm_plane_helper_disable() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 10/14] drm/exynos: atomic phase 1: add atomic_begin()/atomic_flush() Gustavo Padovan
2015-02-09 14:53   ` Inki Dae
2015-02-09 16:10     ` Daniel Stone
2015-02-09 17:07       ` Gustavo Padovan
2015-02-10  3:13         ` Inki Dae
2015-02-10 12:43           ` Gustavo Padovan [this message]
2015-02-06 19:37 ` [PATCH -v2 11/14] drm/exynos: atomic phase 1: add .mode_set_nofb() callback Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 12/14] drm/exynos: atomic phase 2: wire up state reset(), duplicate() and destroy() Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 13/14] drm/exynos: atomic phase 2: keep track of framebuffer pointer Gustavo Padovan
2015-02-06 19:37 ` [PATCH -v2 14/14] drm/exynos: make exynos_plane_mode_set() static Gustavo Padovan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150210124308.GB1991@joana \
    --to=gustavo@padovan.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=inki.dae@samsung.com \
    --cc=linux-samsung-soc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.