From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Hellstrom Subject: Pairing drm_prime_handle_from_fd with close Date: Fri, 08 Nov 2013 11:02:37 +0100 Message-ID: <527CB6BD.4000702@vmware.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from smtp-outbound-1.vmware.com (smtp-outbound-1.vmware.com [208.91.2.12]) by gabe.freedesktop.org (Postfix) with ESMTP id 7F3F0FAF31 for ; Fri, 8 Nov 2013 02:02:41 -0800 (PST) Received: from sc9-mailhost2.vmware.com (sc9-mailhost2.vmware.com [10.113.161.72]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id A9F1D2964A for ; Fri, 8 Nov 2013 02:02:40 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (zcs-prod-ext-mta-1.vmware.com [10.113.62.223]) by sc9-mailhost2.vmware.com (Postfix) with ESMTP id A80FDB027D for ; Fri, 8 Nov 2013 02:02:40 -0800 (PST) Received: from zcs-prod-ext-mta-1.vmware.com (localhost.localdomain [127.0.0.1]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTP id 6071B120030 for ; Fri, 8 Nov 2013 02:09:46 -0800 (PST) Received: from linlap1.kontor.shipmail.org (zimbra-prod-ext-proxy-vip.vmware.com [10.113.63.87]) by zcs-prod-ext-mta-1.vmware.com (Postfix) with ESMTPSA for ; Fri, 8 Nov 2013 02:09:45 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org Hi! It seems like prime_handle_from_fd needs to be paired with a GEM_CLOSE ioctl instead of a new generic HANDLE_CLOSE ioctl. This oversight is not really a big problem but there are two solutions: 1) Create a new ioctl called HANDLE_CLOSE or something similar. 2) Use the GEM_CLOSE ioctl, but add a driver callback for drivers that are not GEM-aware. It seems like GEM_CLOSE has already spread into user-space clients, so unless someone tell me otherwise, I'll be using 2) for the vmwgfx prime implementation. Thanks, Thomas