All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 04/15] drm/atomic-helper: remove modeset_lock_all from helper_resume
Date: Wed, 5 Apr 2017 15:31:39 -0400	[thread overview]
Message-ID: <CADnq5_ONkpyJN=YqaCocxkWh8c-zuYsDV0na5qazV-5395eQww@mail.gmail.com> (raw)
In-Reply-To: <20170403083304.9083-5-daniel.vetter@ffwll.ch>

On Mon, Apr 3, 2017 at 4:32 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Atomic code rely shouldn't rely on the magic hidden acquire context.

Repeated rely in commit message.  I'm assuming you mean:
"Atomic code shouldn't rely on the magic hidden acquire context."

>
> v2: Remove unused config local var (gcc).
>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 8999da789bb0..978dd8f49476 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -2623,14 +2623,22 @@ EXPORT_SYMBOL(drm_atomic_helper_commit_duplicated_state);
>  int drm_atomic_helper_resume(struct drm_device *dev,
>                              struct drm_atomic_state *state)
>  {
> -       struct drm_mode_config *config = &dev->mode_config;
> +       struct drm_modeset_acquire_ctx ctx;
>         int err;
>
>         drm_mode_config_reset(dev);
>
> -       drm_modeset_lock_all(dev);
> -       err = drm_atomic_helper_commit_duplicated_state(state, config->acquire_ctx);
> -       drm_modeset_unlock_all(dev);
> +       drm_modeset_acquire_init(&ctx, 0);
> +       while (1) {
> +               err = drm_atomic_helper_commit_duplicated_state(state, &ctx);
> +               if (err != -EDEADLK)
> +                       break;
> +
> +               drm_modeset_backoff(&ctx);
> +       }
> +
> +       drm_modeset_drop_locks(&ctx);
> +       drm_modeset_acquire_fini(&ctx);
>
>         return err;
>  }
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-04-05 19:31 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03  8:32 [PATCH 00/15] acquire ctx wire-up, part 2 Daniel Vetter
2017-04-03  8:32 ` [PATCH 01/15] drm: Make drm_modeset_lock_crtc internal Daniel Vetter
2017-04-03 22:00   ` kbuild test robot
2017-04-03  8:32 ` [PATCH 02/15] drm: Remove drm_modeset_(un)lock_crtc Daniel Vetter
2017-04-03 22:13   ` kbuild test robot
2017-04-04  5:39     ` [Intel-gfx] " Daniel Vetter
2017-04-14 16:20       ` Mike Lothian
2017-04-18  6:32         ` [Intel-gfx] " Daniel Vetter
2017-04-03  8:32 ` [PATCH 03/15] drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx Daniel Vetter
2017-04-03  8:32 ` [PATCH 04/15] drm/atomic-helper: remove modeset_lock_all from helper_resume Daniel Vetter
2017-04-05 19:31   ` Alex Deucher [this message]
2017-04-03  8:32 ` [PATCH 05/15] drm: drop modeset_lock_all from drm_state_info Daniel Vetter
2017-04-03  8:32 ` [PATCH 06/15] drm: Drop modeset_lock_all from the getproperty ioctl Daniel Vetter
2017-04-13 20:03   ` Alex Deucher
2017-04-13 20:18     ` [Intel-gfx] " Chris Wilson
2017-04-03  8:32 ` [PATCH 07/15] drm: Only take crtc lock in get_gamma ioctl Daniel Vetter
2017-04-03  8:32 ` [PATCH 08/15] drm/i915: Nuke intel_atomic_legacy_gamma_set Daniel Vetter
2017-04-04 10:44   ` Maarten Lankhorst
2017-04-05 11:16     ` Daniel Vetter
2017-04-03  8:32 ` [PATCH 09/15] drm/msm: Nerf zpos property Daniel Vetter
2017-04-05 13:24   ` Daniel Vetter
2017-04-03  8:32 ` [PATCH 10/15] drm/fb-helper: Give up on kgdb for atomic drivers Daniel Vetter
2017-04-03  8:33 ` [PATCH 11/15] drm: Add explicit acquire ctx handling around ->gamma_set Daniel Vetter
2017-04-03  8:33 ` [PATCH 12/15] drm: Add acquire ctx to ->gamma_set hook Daniel Vetter
2017-04-03 18:28   ` Sinclair Yeh
2017-04-06 16:51   ` Eric Anholt
2017-04-06 18:00     ` Daniel Vetter
2017-04-03  8:33 ` [PATCH 13/15] drm/atomic-helper: Remove legacy backoff hack from gamma_set Daniel Vetter
2017-04-03  8:33 ` [PATCH 14/15] drm: extract legacy framebuffer remove Daniel Vetter
2017-04-03  8:33 ` [PATCH 15/15] drm/fb-helper: Extract _legacy kms functions Daniel Vetter
2017-04-03  9:28 ` ✓ Fi.CI.BAT: success for acquire ctx wire-up, part 2 Patchwork
2017-04-05 19:45 ` [PATCH 00/15] " Alex Deucher
2017-04-06  8:23   ` Daniel Vetter

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='CADnq5_ONkpyJN=YqaCocxkWh8c-zuYsDV0na5qazV-5395eQww@mail.gmail.com' \
    --to=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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.