Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752739AbdGFAmj (ORCPT ); Wed, 5 Jul 2017 20:42:39 -0400 Received: from mail-vk0-f43.google.com ([209.85.213.43]:32820 "EHLO mail-vk0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbdGFAmh (ORCPT ); Wed, 5 Jul 2017 20:42:37 -0400 MIME-Version: 1.0 In-Reply-To: <20170705222406.28124-7-keithp@keithp.com> References: <20170705222406.28124-1-keithp@keithp.com> <20170705222406.28124-7-keithp@keithp.com> From: Dave Airlie Date: Thu, 6 Jul 2017 10:42:31 +1000 Message-ID: Subject: Re: [PATCH 6/6] drm: Add four ioctls for managing drm mode object leases [v3] To: Keith Packard Cc: LKML , Dave Airlie , Daniel Vetter , dri-devel Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1814 Lines: 72 > +/** > + * Lease mode resources, creating another drm_master. > + */ > +struct drm_mode_create_lease { > + /** Pointer to array of object ids (__u32) */ > + __u64 object_ids; > + /** Number of object ids */ > + __u32 object_count; > + /** flags for new FD (O_CLOEXEC, etc) */ > + __u32 flags; > + > + /** Return: unique identifier for lessee. */ > + __u32 lessee_id; > + /** Return: file descriptor to new drm_master file */ > + __u32 fd; > +}; > + > +/** > + * List lesses from a drm_master > + */ > +struct drm_mode_list_lessees { > + /** Number of lessees. > + * On input, provides length of the array. > + * On output, provides total number. No > + * more than the input number will be written > + * back, so two calls can be used to get > + * the size and then the data. > + */ > + __u32 count_lessees; > + > + /** Pointer to lessees. > + * pointer to __u64 array of lessee ids > + */ > + __u64 lessees_ptr; > +}; I think this needs a pad ^. > + > +/** > + * Get leased objects > + */ > +struct drm_mode_get_lease { > + /** Number of leased objects. > + * On input, provides length of the array. > + * On output, provides total number. No > + * more than the input number will be written > + * back, so two calls can be used to get > + * the size and then the data. > + */ > + __u32 count_objects; > + > + /** Pointer to objects. > + * pointer to __u32 array of object ids > + */ > + __u64 objects_ptr; And this. > +}; > + > +/** > + * Revoke lease > + */ > +struct drm_mode_revoke_lease { > + /** Unique ID of lessee > + */ > + __u32 lessee_id; And this. Dave.