From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Stuebner 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> References: <20180115171614.14474-1-thierry.escande@collabora.com> <20180115171614.14474-4-thierry.escande@collabora.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: <20180115171614.14474-4-thierry.escande@collabora.com> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-rockchip.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