All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm: Take mode_config.mutex in setcrtc ioctl
Date: Thu, 6 Apr 2017 15:09:04 -0400	[thread overview]
Message-ID: <CADnq5_O9TJV=HXLF7_1G6TZESqr_2a7s11bJxuUGAX7ziAn47Q@mail.gmail.com> (raw)
In-Reply-To: <20170406190654.6733-1-daniel.vetter@ffwll.ch>

On Thu, Apr 6, 2017 at 3:06 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Legacy drivers insist that we really take all the locks in this path,
> and the harm in doing so is minimal.
>
> v2: Like git add, it exists :(
>
> Fixes: 2ceb585a956c ("drm: Add explicit acquire ctx handling around ->set_config")
> Cc: Harry Wentland <harry.wentland@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Sean Paul <seanpaul@chromium.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: dri-devel@lists.freedesktop.org
> Cc: Alex Deucher <alexdeucher@gmail.com>
> Reported-by: Alex Deucher <alexdeucher@gmail.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

This actually matches what I tested locally.

Acked-and-tested-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/gpu/drm/drm_crtc.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index d69e180fc563..5af25ce5bf7c 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -576,6 +576,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
>         }
>         DRM_DEBUG_KMS("[CRTC:%d:%s]\n", crtc->base.id, crtc->name);
>
> +       mutex_lock(&crtc->dev->mode_config.mutex);
>         drm_modeset_acquire_init(&ctx, 0);
>  retry:
>         ret = drm_modeset_lock_all_ctx(crtc->dev, &ctx);
> @@ -721,6 +722,7 @@ int drm_mode_setcrtc(struct drm_device *dev, void *data,
>         }
>         drm_modeset_drop_locks(&ctx);
>         drm_modeset_acquire_fini(&ctx);
> +       mutex_unlock(&crtc->dev->mode_config.mutex);
>
>         return ret;
>  }
> --
> 2.11.0
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-04-06 19:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 18:55 [PATCH] drm: Take mode_config.mutex in setcrtc ioctl Daniel Vetter
2017-04-06 19:02 ` Alex Deucher
2017-04-06 19:06 ` Daniel Vetter
2017-04-06 19:09   ` Alex Deucher [this message]
2017-04-06 20:49     ` Daniel Vetter
2017-04-06 19:34 ` ✗ Fi.CI.BAT: failure for drm: Take mode_config.mutex in setcrtc ioctl (rev2) Patchwork
2017-04-07  7:25   ` 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_O9TJV=HXLF7_1G6TZESqr_2a7s11bJxuUGAX7ziAn47Q@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.