From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [RFC PATCH 2/3] drm/ipvr: drm driver for vxd392 Date: Sun, 19 Oct 2014 13:28:52 +0200 Message-ID: <20141019112852.GM26941@phenom.ffwll.local> References: <1413202502-19026-1-git-send-email-yao.cheng@intel.com> <1413202502-19026-3-git-send-email-yao.cheng@intel.com> <8FF7D634BEE4C2428EFFAB6B7E919E4B017B9DFE@shsmsx102.ccr.corp.intel.com> <20141016102843.GK2655@bremse.labri.fr> <8FF7D634BEE4C2428EFFAB6B7E919E4B017BCDAC@shsmsx102.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: David Herrmann Cc: "dri-devel@lists.freedesktop.org" , "Jiang, Fei" , "Vetter, Daniel" , Intel Graphics Development List-Id: dri-devel@lists.freedesktop.org On Thu, Oct 16, 2014 at 03:47:08PM +0200, David Herrmann wrote: > Hi > > On Thu, Oct 16, 2014 at 3:39 PM, Cheng, Yao wrote: > > Accepted :) I will update the patch to implement the mmap interface and remove the legacy MMAP_IOCTL. > > BTW I didn't see a field to get mmap_offset in struct drm_gem_open, I guess something like a new "GET_MMAP_OFFSET_IOCTL" need be added to support mapping flinked/primed BO, is it? > > Yes. There is currently no generic interface to get mmap offsets for > any gem bo (because some of them may not be mapped from user-space or > require extra parameters). > > So, either support dumb-buffers (if you don't need any advanced > parameters like tiling or cache constraints), or add an > MMAP_OFFSET_IOCTL like you proposed (and most drivers do so). Dave Airlie _really_ doesn't like it if userspace abuses the dumb buffer interface for rendering. That really should only be used for sw rendering for boot splash and similar. Some armsoc drivers don't really follow that though. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch