Received: by 10.223.176.46 with SMTP id f43csp2748015wra; Mon, 22 Jan 2018 02:45:14 -0800 (PST) X-Google-Smtp-Source: AH8x225+NOgZysIL+NIxXXHUvpDkf0VPlbtA5zoPRoD2LOOUh9Yd/mrC5FNEAlBUajv42uClRvSI X-Received: by 2002:a17:902:7886:: with SMTP id q6-v6mr3266082pll.247.1516617914014; Mon, 22 Jan 2018 02:45:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516617913; cv=none; d=google.com; s=arc-20160816; b=l1az5hwdqIKGaxdOPD4h2booGmwMTQvBWhYqMDUPcLvW/GaXU6Yj5zXDO+sc4et/Lg L8Fc3ADMgK8+m6WwoKhSivpcUys1+kVyoaKLtdLTfoKLeKIWXG4H8JTp+vULp6ufgYI/ lgevV+HbYqB/NHifdedWotIQ/pK0MoHgQ9x5o9JnCSBae+fje9o/heaVi1dxqO0Q+qi6 lXA4C0yzw16m7XizUn8VrSDpLhVbMV6sSg8/ULKSMzY6eavkM5bBoFNIa0L37UfPRQWe 8qCgGkj9tK72Jd9Se4s5ndsNuUfBzwqRjMgaY7hbDON1rD0G2HAbAEw20j7f6cVjUE6N u4gg== 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 :references:in-reply-to:user-agent:message-id:date:subject:cc:to :from:arc-authentication-results; bh=mQah5SbrDrFyUGzBAc3pF6PUzN7tsIMghq64dBuCFlg=; b=TU8hRdB86bzKLt+E9YJVXVXhbrYdgH7JR0yNZdnVJLeh7WY2oLkiZx5smDSq/CWy88 7BF+TF+xYvb6ZkLxWFzNDIKoptm2UdoplxsDI4fHYgXYeyEcOwl8dV+2iVBAQxTOfKvQ DLitaL5Dw7D99PXgRC2uhKLUgkMG7FBuvwu1e7zlxhP3Ly0eld17t65CKHlE5k76BHpP EBP9JYmVuVLCLSoPUf3KvoE6fYfDJJAUzwdc8+L0po32y0cEPGeqDTwQv+UPaty9o0Rb VxwFvP2gVtTB+jrjkTCt1N3dImWIM64vIWvVV6gMUT0AoN5yXfdqQPss8LlndCQas7OU 0uQg== ARC-Authentication-Results: i=1; mx.google.com; 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 bf1-v6si877055plb.155.2018.01.22.02.44.59; Mon, 22 Jan 2018 02:45:13 -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; 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 S1751167AbeAVKoh convert rfc822-to-8bit (ORCPT + 99 others); Mon, 22 Jan 2018 05:44:37 -0500 Received: from gloria.sntech.de ([95.129.55.99]:60232 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbeAVKog (ORCPT ); Mon, 22 Jan 2018 05:44:36 -0500 Received: from ip9234b295.dynamic.kabel-deutschland.de ([146.52.178.149] helo=phil.localnet) by gloria.sntech.de with esmtpsa (TLS1.1:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1edZaU-00084y-CE; Mon, 22 Jan 2018 11:44:26 +0100 From: Heiko Stuebner To: linux-rockchip@lists.infradead.org Cc: Thierry Escande , Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , zain wang , Lin Huang , linux-kernel@vger.kernel.org, Douglas Anderson , dri-devel@lists.freedesktop.org, Tomasz Figa , Yakir Yang , =?ISO-8859-1?Q?=D8rjan?= Eide , Mark Yao , Haixia Shi Subject: Re: [PATCH 03/40] drm/rockchip: Respect page offset for PRIME mmap calls Date: Mon, 22 Jan 2018 11:44:25 +0100 Message-ID: <2335179.Wol6YGBpGI@phil> User-Agent: KMail/5.2.3 (Linux/4.14.0-3-amd64; KDE/5.37.0; x86_64; ; ) In-Reply-To: <20180115171614.14474-4-thierry.escande@collabora.com> References: <20180115171614.14474-1-thierry.escande@collabora.com> <20180115171614.14474-4-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8BIT Content-Type: text/plain; charset="iso-8859-1" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, 15. Januar 2018, 18:15:37 CET schrieb Thierry Escande: > From: ?rjan Eide > > When mapping external DMA-bufs through the PRIME mmap call, we might be > given an offset which has to be respected. However for the internal DRM > GEM mmap path, we have to ignore the fake mmap offset used to identify > the buffer only. Currently the code always zeroes out vma->vm_pgoff, > which breaks the former. > > This patch fixes the problem by moving the vm_pgoff assignment to a > function that is used only for GEM mmap path, so that the PRIME path > retains the original offset. > > Cc: Daniel Kurtz > Signed-off-by: ?rjan Eide > Signed-off-by: Tomasz Figa > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande On rk3036 + lima and rk3328 + lima Tested-by: Heiko Stuebner