From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Sasha Levin <sashal@kernel.org>, dri-devel@lists.freedesktop.org
Subject: [PATCH AUTOSEL 4.20 107/304] drm/v3d: Fix prime imports of buffers from other drivers.
Date: Mon, 28 Jan 2019 10:40:24 -0500 [thread overview]
Message-ID: <20190128154341.47195-107-sashal@kernel.org> (raw)
In-Reply-To: <20190128154341.47195-1-sashal@kernel.org>
From: Eric Anholt <eric@anholt.net>
[ Upstream commit 62d1a752874962f072de8a779e960fcd2ab4847b ]
v3d_bo_get_pages() checks this to decide to map the imported buffer
instead of the backing shmem file. The caller was about to set this
value anyway, and there's no error path in between. Ideally we
wouldn't even allocate the shmem file for our imports, but that's a
more invasive fix.
Signed-off-by: Eric Anholt <eric@anholt.net>
Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D V3.x+")
Link: https://patchwork.freedesktop.org/patch/msgid/20181128230927.10951-3-eric@anholt.net
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Dave Emett <david.emett@broadcom.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/v3d/v3d_bo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/v3d/v3d_bo.c b/drivers/gpu/drm/v3d/v3d_bo.c
index 54d96518a131..a08766d39eab 100644
--- a/drivers/gpu/drm/v3d/v3d_bo.c
+++ b/drivers/gpu/drm/v3d/v3d_bo.c
@@ -293,6 +293,7 @@ v3d_prime_import_sg_table(struct drm_device *dev,
bo->resv = attach->dmabuf->resv;
bo->sgt = sgt;
+ obj->import_attach = attach;
v3d_bo_get_pages(bo);
v3d_mmu_insert_ptes(bo);
--
2.19.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-01-28 15:48 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190128154341.47195-1-sashal@kernel.org>
2019-01-28 15:38 ` [PATCH AUTOSEL 4.20 012/304] gpu: ipu-v3: image-convert: Prevent race between run and unprepare Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 033/304] drm/vc4: ->x_scaling[1] should never be set to VC4_SCALING_NONE Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 053/304] drm/rockchip: fix for mailbox read size Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 071/304] drm: rcar-du: Fix external clock error checks Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 096/304] drm: Clear state->acquire_ctx before leaving drm_atomic_helper_commit_duplicated_state() Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 097/304] drm: Move drm_mode_setcrtc() local re-init to failure path Sasha Levin
2019-01-28 15:40 ` Sasha Levin [this message]
[not found] ` <20190128154341.47195-1-sashal-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2019-01-28 15:38 ` [PATCH AUTOSEL 4.20 013/304] drm/amd/display: Fix potential nullptr error Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 055/304] drm/amd/display: fix gamma not being applied correctly Sasha Levin
2019-01-28 15:39 ` [PATCH AUTOSEL 4.20 056/304] drm/amd/display: calculate stream->phy_pix_clk before clock mapping Sasha Levin
2019-01-28 15:40 ` [PATCH AUTOSEL 4.20 129/304] drm/amdgpu/powerplay: fix clock stretcher limits on polaris (v2) Sasha Levin
2019-01-28 15:41 ` [PATCH AUTOSEL 4.20 161/304] drm/msm/dsi: fix dsi clock names in DSI 10nm PLL driver Sasha Levin
2019-01-28 15:41 ` [PATCH AUTOSEL 4.20 162/304] drm/msm: dpu: Only check flush register against pending flushes Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 218/304] drm/amd/display: Add retry to read ddc_clock pin Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 219/304] drm/amd/display: Wait edp HPD to high in detect_sink Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 221/304] drm/amd/display: fix YCbCr420 blank color Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 243/304] drm/amd/display: validate extended dongle caps Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 244/304] video: clps711x-fb: release disp device node in probe() Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 246/304] fbdev: fbmem: behave better with small rotated displays and many CPUs Sasha Levin
2019-01-28 15:42 ` [PATCH AUTOSEL 4.20 251/304] fbdev: fbcon: Fix unregister crash when more than one framebuffer Sasha Levin
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=20190128154341.47195-107-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox