Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2767950imj; Mon, 11 Feb 2019 08:10:47 -0800 (PST) X-Google-Smtp-Source: AHgI3IZZpYSx41kti6XlDHvE9ZA/OiCzYn2JqXbsvVT+apkAnEhNFav5diJVTQcv92TGqscHNrLg X-Received: by 2002:a62:5f47:: with SMTP id t68mr17914217pfb.89.1549901447061; Mon, 11 Feb 2019 08:10:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549901447; cv=none; d=google.com; s=arc-20160816; b=X1Fe26hIR0diNjvF+3PK6sLE2e2OIQLTL3eK2HqMms0wn3Fo4NiDFeA6kvPCMeuws7 WYK1IHp4TYU5Sz5KaiFFy0v3wQ7BNAp0cwIRrWqeTCrcbWzWTUqd/9ftHNwBAqmGd8QB AeSdMFFrb7ozCEfm/7VfhaicTuYLAuWU0lnBpuceZYOnf6Iax6he3/6dfURSDGdwtUEl ya0/RM8O+VZi82oTjV7uWbMCpIAPA8SdmWbEP509lZC7pIQtJxhoANelBBVAteQqrKoe n4bidTOy9DBr+Xf99ukqjtv45JyqDRCInSSIZhZVjVftXaVOTKMqoHv6Pbd7bsmBCfX0 T3ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=OFKZqB/f8uV8+W0xqgypuLUJsEQtBs8IRNCSvFU+GnA=; b=xgTPiI/X+Fr+95QQijN/ya4bnm+jNSHgtuAGemADVKScXdEPskvj9O/14aqRcfLW59 uQ+QsuMuSawtDVC86IretOQKciNRKEQEp+DKo5hVTotVmkZRTGqpHwwQewbXkGscA0fI l+FtzFc25m19nTnVT/d92oOJMSCAU0vJINR3u3rCuOBIBxR3gJczLhAjOIo0On/oMPy1 l+88CdK31APpSdm1nLwEu4TgM/LVfZVVo3rIZv+wjY6e7k2rGjWkCBfl1DI1y2TuVMe0 WIU5AFBX0D9vp/lYqxwdH2VwyKzYH9b6CRe+KDPo56hvbIe7FISjeLjmYsFQgVIfdnUX Q94A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="oJ1e9/Ov"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si10671843plp.424.2019.02.11.08.10.31; Mon, 11 Feb 2019 08:10:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="oJ1e9/Ov"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729635AbfBKQJa (ORCPT + 99 others); Mon, 11 Feb 2019 11:09:30 -0500 Received: from mail.kernel.org ([198.145.29.99]:58782 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729368AbfBKOZX (ORCPT ); Mon, 11 Feb 2019 09:25:23 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F1AA2214DA; Mon, 11 Feb 2019 14:25:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895122; bh=79m+Nk+lf61QRKOswr2Y7pdtJDF06KLqmRAFsEhz8vc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oJ1e9/OvMRSqCOaEwVMV3Os/Ldd8anYXgcGr5+1lbyaDEoxrtOA2cMO5RDACpzMoG QFFYxzWAfdNSE81LssYmPK5u0juvEF8nSzLxdTSZFSLV3B6jdYo9B5aY3T/UKRTzdY lbo7mLqkCayPOVazo2XDk0KqaOuVQk8Z3A8++tSY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Eric Anholt , Daniel Vetter , Dave Emett , Sasha Levin Subject: [PATCH 4.20 099/352] drm/v3d: Fix prime imports of buffers from other drivers. Date: Mon, 11 Feb 2019 15:15:26 +0100 Message-Id: <20190211141852.112153451@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ 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 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 Reviewed-by: Dave Emett Signed-off-by: Sasha Levin --- 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