From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Clark Subject: Re: [RFCv1 02/12] drm: add object property type Date: Mon, 7 Oct 2013 10:44:43 -0400 Message-ID: References: <1381020350-1125-1-git-send-email-robdclark@gmail.com> <1381020350-1125-3-git-send-email-robdclark@gmail.com> <20131007134335.GI9395@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by gabe.freedesktop.org (Postfix) with ESMTP id BE532E6BB8 for ; Mon, 7 Oct 2013 07:44:43 -0700 (PDT) Received: by mail-pb0-f46.google.com with SMTP id rq2so7166562pbb.5 for ; Mon, 07 Oct 2013 07:44:43 -0700 (PDT) In-Reply-To: <20131007134335.GI9395@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: =?ISO-8859-1?Q?Ville_Syrj=E4l=E4?= Cc: "dri-devel@lists.freedesktop.org" List-Id: dri-devel@lists.freedesktop.org On Mon, Oct 7, 2013 at 9:43 AM, Ville Syrj=E4l=E4 wrote: > On Sat, Oct 05, 2013 at 08:45:40PM -0400, Rob Clark wrote: >> diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h >> index 5508117..35921ba 100644 >> --- a/include/uapi/drm/drm_mode.h >> +++ b/include/uapi/drm/drm_mode.h >> @@ -231,6 +231,7 @@ struct drm_mode_get_connector { >> #define DRM_MODE_PROP_ENUM (1<<3) /* enumerated type with text string= s */ >> #define DRM_MODE_PROP_BLOB (1<<4) >> #define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated ty= pes */ >> +#define DRM_MODE_PROP_OBJECT (1<<6) /* drm mode object */ > > This way to using up one bit for each type sucks big time. IIRC we > discussed this at Fosdem and one idea was to leave the current bits as > sort of base types, and reserve a bunch of the other bits to indicate a > sub-type. For instance the new signed range and object ID prop types > could be sub-types of the current range type. oh, right.. current object-prop is just a straight rebase of the original patch, so I didn't change this yet. We probably don't want to use sub-type in cases where old userspace could misinterpret things, so not sure about signed-range to be a sub-type of range (if that is what you meant)... but maybe a good idea for PROP_MISC + PROP_SUBTYPE_OBJECT. Otoh, at the moment, the only other prop type I have in mind is ARRAY (although not sure if we can do single PROP_ARRAY or if we end up needing PROP_ARRAY_foo, for everything we might want an array of..) BR, -R > Maybe we should reserve a few more bits for new base types in case we > need them in the future, or just add sometime king DRM_MODE_PROP_MISC, > which is where we'd stick every sub-type that doesn't fit the current > base types. > > -- > Ville Syrj=E4l=E4 > Intel OTC