From: poma <pomidorabelisima@gmail.com>
To: Frediano Ziglio <fziglio@redhat.com>, David Airlie <airlied@linux.ie>
Cc: spice-devel@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2 2/2] drm/qxl: avoid dependency lock
Date: Thu, 1 Oct 2015 16:01:59 +0200 [thread overview]
Message-ID: <560D3CD7.6090000@gmail.com> (raw)
In-Reply-To: <1443101115-21715-3-git-send-email-fziglio@redhat.com>
On 24.09.2015 15:25, Frediano Ziglio wrote:
> qxl_bo_unref calls drm_gem_object_unreference_unlocked which
> locks dev->struct_mutex. However this lock could be already
> locked if the call came from qxl_gem_object_free.
> As we don't need to call qxl_bo_ref/qxl_bo_unref cause
> qxl_release_list_add will hold a reference by itself avoid
> to call them and the possible deadlock.
>
> Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
> ---
> drivers/gpu/drm/qxl/qxl_release.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drivers/gpu/drm/qxl/qxl_release.c
> index b66ec33..4efa8e2 100644
> --- a/drivers/gpu/drm/qxl/qxl_release.c
> +++ b/drivers/gpu/drm/qxl/qxl_release.c
> @@ -307,7 +307,7 @@ int qxl_alloc_surface_release_reserved(struct qxl_device *qdev,
> idr_ret = qxl_release_alloc(qdev, QXL_RELEASE_SURFACE_CMD, release);
> if (idr_ret < 0)
> return idr_ret;
> - bo = qxl_bo_ref(to_qxl_bo(entry->tv.bo));
> + bo = to_qxl_bo(entry->tv.bo);
>
> (*release)->release_offset = create_rel->release_offset + 64;
>
> @@ -316,8 +316,6 @@ int qxl_alloc_surface_release_reserved(struct qxl_device *qdev,
> info = qxl_release_map(qdev, *release);
> info->id = idr_ret;
> qxl_release_unmap(qdev, *release, info);
> -
> - qxl_bo_unref(&bo);
> return 0;
> }
>
>
Tested with:
- Rawhide-Xfce-Live-1001.iso
\ 4.3.0-0.rc3.git2.4.fc24.x86_64
+ v2-1-2-drm-qxl-avoid-buffer-reservation-in-qxl_crtc_page_flip.patch
+ v2-2-2-drm-qxl-avoid-dependency-lock.patch
Tested-by: poma <pomidorabelisima@gmail.com>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2015-10-01 14:01 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-24 13:25 [PATCH v2 0/2] Dependency locks fixes for QXL driver Frediano Ziglio
2015-09-24 13:25 ` [PATCH v2 1/2] drm/qxl: avoid buffer reservation in qxl_crtc_page_flip Frediano Ziglio
2015-09-24 13:25 ` [PATCH v2 2/2] drm/qxl: avoid dependency lock Frediano Ziglio
2015-10-01 14:01 ` poma [this message]
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=560D3CD7.6090000@gmail.com \
--to=pomidorabelisima@gmail.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=fziglio@redhat.com \
--cc=spice-devel@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.