Message ID | 20190823021216.5862-5-robh@kernel.org |
---|---|
State | Accepted |
Commit | fe20d1cc95827e240cfcb21490b05ef38518ee4e |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1786ily; Thu, 22 Aug 2019 19:12:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqx2BSHv1h28Bc/PBVlHAA6Ko6dLbXfI1N3q2yAWvo8o+NqklvEt6uNJ0pGvFpXQ/MPfghNF X-Received: by 2002:a65:6904:: with SMTP id s4mr1858324pgq.33.1566526360924; Thu, 22 Aug 2019 19:12:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566526360; cv=none; d=google.com; s=arc-20160816; b=D7iESdV1kcoBENtpneVApSspunhFZ3M6vFGfBbPr5vJ0dHxPhqik7T1PAJI4W2BhQn OCF6wXWXxSvQsoLolD1ino1osvkwE+IGUwEJWLFwdyieVo0zDpHL0PxTba4axcKAiaUE p8awMIQ/ADVcxvNnL1Oi31AB4wYYIsTBbcvF4M61kEv6CZg9kP/b5X7NDI0aCsMUOcXZ mGapKLHHVGC9ARzRw4ros3io4rsGUGgD4pIJ8uAbuo4MKOv5tysI0eAWxP9QPfMv89I4 kCQJWruGzttfSz3InKT3lN5bwccxLVTqIDXtT4dsaz2qt+zMiuUXuFJmBXMn4AhVrY3B 1FbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:delivered-to; bh=mpBLPkZIj951jHj6RXGuPCGzvi8zgVhic1rAYiAcQ4I=; b=Yqch9MOiTNqw80Cb7iyi+NEIrCh0NJz0S+j3spIV+/Mz1clBxFEHlcjig1aH6xGSjj HWC3KjdVhBks7OOOciWMUOKNXGAKtZk1K4W2N6Nr9NmXg1JSNtQkyH6ScW/38D+3fA07 nuT08v+4LFcT/kAk40ohOtfioHwcCNfQWxQ7OwikoLR/LAerTQe7R96teifVzu7D9Urk PhkwwmM0ISj4GfBrab9FCh+NaTxp8rFmw4q7E8L8MPZSLuM2021Fwsvy6EqnX4kG2viA qnlZ9+1PlU2D24AGI+UIy5WFzuLNiAVLKa51H98uzygfucuNluQqOdx2mbgVPuNWWTul Bh4w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTPS id h21si1095720pjq.19.2019.08.22.19.12.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Aug 2019 19:12:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DB5906EBA9; Fri, 23 Aug 2019 02:12:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ot1-f66.google.com (mail-ot1-f66.google.com [209.85.210.66]) by gabe.freedesktop.org (Postfix) with ESMTPS id A02A76EBA3 for <dri-devel@lists.freedesktop.org>; Fri, 23 Aug 2019 02:12:24 +0000 (UTC) Received: by mail-ot1-f66.google.com with SMTP id b1so7390873otp.6 for <dri-devel@lists.freedesktop.org>; Thu, 22 Aug 2019 19:12:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LH1bRwy5I9A+NDROM4NYf/ieDn59EUywDqCfaAShmXM=; b=dbTajU5D2Fjsr/WUIIuiRvwyJeTmOfD9XCz3lJTpQbR9x1FWRuJyVNF07GIlriPqfu R7NwVpkAv2vu2Td+x6N1DZxsxwE6foT45uGR+nNgfx1lkLd22ByMUTobHksc2vEl3f6v wopihC6eL+ih+Hslk8pqoIVTIoSNdKb1USYm7IgLA1lbGehI6d4Ky5UCMvvGVVvtgvM/ H0DsERutzQXWv5KhkSm1agdWSPHvqROyKdcZyIU9pxwjBoul2qyW6if79vHnIR7eh7DB 9QrPNDq9KN8aEzyv9RSWgUBMdcKU6PZVFY1WHY02lYWPe9Hyf3osz35juqXFDqK/9fLL 6UFw== X-Gm-Message-State: APjAAAV9/OWvGQOVZudYjDBKUA83Quy6Jmyc3ys1oxFECTpp0PQG47/V BcsmHwsahRAQnmfggjafEF/haUA= X-Received: by 2002:a9d:645a:: with SMTP id m26mr2091155otl.211.1566526343528; Thu, 22 Aug 2019 19:12:23 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id c1sm457747oic.31.2019.08.22.19.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2019 19:12:22 -0700 (PDT) From: Rob Herring <robh@kernel.org> To: dri-devel@lists.freedesktop.org Subject: [PATCH v2 4/8] drm/shmem: Do dma_unmap_sg before purging pages Date: Thu, 22 Aug 2019 21:12:12 -0500 Message-Id: <20190823021216.5862-5-robh@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190823021216.5862-1-robh@kernel.org> References: <20190823021216.5862-1-robh@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: Maxime Ripard <maxime.ripard@bootlin.com>, Tomeu Vizoso <tomeu.vizoso@collabora.com>, David Airlie <airlied@linux.ie>, Sean Paul <sean@poorly.run>, Steven Price <steven.price@arm.com>, Boris Brezillon <boris.brezillon@collabora.com>, Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>, Robin Murphy <robin.murphy@arm.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
[v2,1/8] drm/panfrost: Fix possible suspend in panfrost_remove
|
expand
|
diff --git a/drivers/gpu/drm/drm_gem_shmem_helper.c b/drivers/gpu/drm/drm_gem_shmem_helper.c index df8f2c8adb2b..5423ec56b535 100644 --- a/drivers/gpu/drm/drm_gem_shmem_helper.c +++ b/drivers/gpu/drm/drm_gem_shmem_helper.c @@ -390,6 +390,12 @@ void drm_gem_shmem_purge_locked(struct drm_gem_object *obj) WARN_ON(!drm_gem_shmem_is_purgeable(shmem)); + dma_unmap_sg(obj->dev->dev, shmem->sgt->sgl, + shmem->sgt->nents, DMA_BIDIRECTIONAL); + sg_free_table(shmem->sgt); + kfree(shmem->sgt); + shmem->sgt = NULL; + drm_gem_shmem_put_pages_locked(shmem); shmem->madv = -1;