From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754473AbdDGHkf (ORCPT ); Fri, 7 Apr 2017 03:40:35 -0400 Received: from mail.fireflyinternet.com ([109.228.58.192]:50508 "EHLO fireflyinternet.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753972AbdDGHkF (ORCPT ); Fri, 7 Apr 2017 03:40:05 -0400 X-Default-Received-SPF: pass (skip=forwardok (res=PASS)) x-ip-name=78.156.65.138; Date: Fri, 7 Apr 2017 08:39:57 +0100 From: Chris Wilson To: Laura Abbott Cc: Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sumit Semwal Subject: Re: [RFC PATCH 2/2] drm/vgem: Enable dmabuf import interfaces Message-ID: <20170407073957.GT10496@nuc-i3427.alporthouse.com> Mail-Followup-To: Chris Wilson , Laura Abbott , Daniel Vetter , Sean Paul , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Sumit Semwal References: <1491520713-14277-1-git-send-email-labbott@redhat.com> <1491520713-14277-3-git-send-email-labbott@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1491520713-14277-3-git-send-email-labbott@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2017 at 04:18:33PM -0700, Laura Abbott wrote: > > Enable the GEM dma-buf import interfaces in addition to the export > interfaces. This lets vgem be used as a test source for other allocators > (e.g. Ion). > > +int vgem_gem_get_pages(struct drm_vgem_gem_object *obj) > +{ > + struct page **pages; > + > + if (obj->pages) > + return 0; > + > + pages = drm_gem_get_pages(&obj->base); > + if (IS_ERR(pages)) { > + return PTR_ERR(pages); > + } > + > + obj->pages = pages; That's a significant loss in functionality (it requires the entire object to fit into physical memory at the same time and requires a large vmalloc for 32b systems), for what? vgem only has the ability to mmap and export a fd -- both of which you already have if you have the dmabuf fd. The only extra interface is the signaling, which does not yet have a direct correspondence on dmabuf. (An obvious way to keep both would be to move the get_pages to importing and then differentiate in the faulthandler where to get the page from.) Can you provide more details on how you are using vgem to justify the changes? I'm also not particularly happy in losing testing of a virtual platform device from our CI. -Chris -- Chris Wilson, Intel Open Source Technology Centre