From: Yongzhi Liu <lyz_cs@pku.edu.cn> To: emma@anholt.net, airlied@linux.ie, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yongzhi Liu <lyz_cs@pku.edu.cn> Subject: [PATCH] drm/v3d: Add missing unlock Date: Sat, 22 Jan 2022 08:26:27 -0800 [thread overview] Message-ID: <1642868787-61384-1-git-send-email-lyz_cs@pku.edu.cn> (raw) [why] Unlock is needed on the error handling path to prevent dead lock. [how] Fix this by adding drm_gem_unlock_reservations on the error handling path. Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn> --- drivers/gpu/drm/v3d/v3d_gem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index c7ed2e1..0c989dc 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -798,6 +798,8 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, if (!render->base.perfmon) { ret = -ENOENT; + drm_gem_unlock_reservations(last_job->bo, + last_job->bo_count, &acquire_ctx); goto fail; } } @@ -1027,6 +1029,8 @@ v3d_submit_csd_ioctl(struct drm_device *dev, void *data, args->perfmon_id); if (!job->base.perfmon) { ret = -ENOENT; + drm_gem_unlock_reservations(clean_job->bo, clean_job->bo_count, + &acquire_ctx); goto fail; } } -- 2.7.4
WARNING: multiple messages have this Message-ID (diff)
From: Yongzhi Liu <lyz_cs@pku.edu.cn> To: emma@anholt.net, airlied@linux.ie, daniel@ffwll.ch Cc: Yongzhi Liu <lyz_cs@pku.edu.cn>, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH] drm/v3d: Add missing unlock Date: Sat, 22 Jan 2022 08:26:27 -0800 [thread overview] Message-ID: <1642868787-61384-1-git-send-email-lyz_cs@pku.edu.cn> (raw) [why] Unlock is needed on the error handling path to prevent dead lock. [how] Fix this by adding drm_gem_unlock_reservations on the error handling path. Signed-off-by: Yongzhi Liu <lyz_cs@pku.edu.cn> --- drivers/gpu/drm/v3d/v3d_gem.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/v3d/v3d_gem.c b/drivers/gpu/drm/v3d/v3d_gem.c index c7ed2e1..0c989dc 100644 --- a/drivers/gpu/drm/v3d/v3d_gem.c +++ b/drivers/gpu/drm/v3d/v3d_gem.c @@ -798,6 +798,8 @@ v3d_submit_cl_ioctl(struct drm_device *dev, void *data, if (!render->base.perfmon) { ret = -ENOENT; + drm_gem_unlock_reservations(last_job->bo, + last_job->bo_count, &acquire_ctx); goto fail; } } @@ -1027,6 +1029,8 @@ v3d_submit_csd_ioctl(struct drm_device *dev, void *data, args->perfmon_id); if (!job->base.perfmon) { ret = -ENOENT; + drm_gem_unlock_reservations(clean_job->bo, clean_job->bo_count, + &acquire_ctx); goto fail; } } -- 2.7.4
next reply other threads:[~2022-01-22 16:29 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-01-22 16:26 Yongzhi Liu [this message] 2022-01-22 16:26 ` [PATCH] drm/v3d: Add missing unlock Yongzhi Liu 2022-01-26 20:57 ` Melissa Wen 2022-01-26 20:57 ` Melissa Wen 2022-01-27 10:14 ` [PATCH v2] drm/v3d: fix " Yongzhi Liu 2022-01-27 10:14 ` Yongzhi Liu 2022-01-28 12:55 ` Melissa Wen 2022-01-28 12:55 ` Melissa Wen 2022-01-28 13:41 ` [PATCH v3] " Yongzhi Liu 2022-01-28 13:41 ` Yongzhi Liu
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=1642868787-61384-1-git-send-email-lyz_cs@pku.edu.cn \ --to=lyz_cs@pku.edu.cn \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=dri-devel@lists.freedesktop.org \ --cc=emma@anholt.net \ --cc=linux-kernel@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: linkBe 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.