aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/omap_gem.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2019-12-05 11:11:06 +1000
committerDave Airlie <airlied@redhat.com>2019-12-05 11:11:11 +1000
commitb53bd16fec3d52ff7be1648a9b0a747288f52cf8 (patch)
treed65f815038ead19011f12834e6e1f0b211e00d9d /drivers/gpu/drm/omapdrm/omap_gem.c
parentMerge tag 'drm/tegra/for-5.5-rc1-fixes' of git://anongit.freedesktop.org/tegra/linux into drm-next (diff)
parentdrm/dp_mst: Correct the bug in drm_dp_update_payload_part1() (diff)
downloadlinux-dev-b53bd16fec3d52ff7be1648a9b0a747288f52cf8.tar.xz
linux-dev-b53bd16fec3d52ff7be1648a9b0a747288f52cf8.zip
Merge tag 'drm-misc-next-fixes-2019-12-04' of git://anongit.freedesktop.org/drm/drm-misc into drm-next
mgag200- Fix hw with broken 'startadd' support (Thomas) mst- Avoid skipping payloads in payload deletion loop (Wayne) omap- Fix dma_addr refcounting (Tomi) Cc: Wayne Lin <Wayne.Lin@amd.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Dave Airlie <airlied@redhat.com> From: Sean Paul <sean@poorly.run> Link: https://patchwork.freedesktop.org/patch/msgid/20191204212255.GA256395@art_vandelay
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_gem.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_gem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omapdrm/omap_gem.c
index e518d93ca6df..d08ae95ecc0a 100644
--- a/drivers/gpu/drm/omapdrm/omap_gem.c
+++ b/drivers/gpu/drm/omapdrm/omap_gem.c
@@ -843,9 +843,13 @@ fail:
*/
static void omap_gem_unpin_locked(struct drm_gem_object *obj)
{
+ struct omap_drm_private *priv = obj->dev->dev_private;
struct omap_gem_object *omap_obj = to_omap_bo(obj);
int ret;
+ if (omap_gem_is_contiguous(omap_obj) || !priv->has_dmm)
+ return;
+
if (refcount_dec_and_test(&omap_obj->dma_addr_cnt)) {
ret = tiler_unpin(omap_obj->block);
if (ret) {