From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damien Lespiau Subject: Re: [PATCH 4/5] drm: Add support for subclassing struct drm_device Date: Thu, 9 Jan 2014 12:11:55 +0000 Message-ID: <20140109121155.GB8255@strange.config> References: <1389205912-16632-1-git-send-email-damien.lespiau@intel.com> <1389205912-16632-5-git-send-email-damien.lespiau@intel.com> <20140108202651.GW4770@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <20140108202651.GW4770@phenom.ffwll.local> 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: Daniel Vetter Cc: Intel Graphics Development , "dri-devel@lists.freedesktop.org" List-Id: intel-gfx@lists.freedesktop.org On Wed, Jan 08, 2014 at 09:26:51PM +0100, Daniel Vetter wrote: > > So the parent structure is expected to have "struct drm_device" at > > offset 0? I'd rather like to see a "drm_dev_init()" alongside > > drm_dev_alloc() similar to device_initialize(). > > Yeah, I think for subclassing we want drivers in charge to kmalloc the > entire thing and embedded struct drm_device wherever they please to do so. > Adding struct_size stuff all over the place still forces us through the > midlayer ... > > I'm trying to get there with my giant drm cleanup series (which contains > some of the same dev_priv_size cleanups like yours). Dunno whether it's > worth all to much to start embedding before we have that all ready since > imo the big value in demidlayering is that it allows us to fix up the > init/teardown sequence. That it also allows struct drm_device embedding is > kinda neat, but not my main goal. > -Daniel I'm not sure why would people want struct drm_device at a non-0 offset, but in any case, if Daniel is already looking into this, let's scrap that series. At least we know that it doesn't have to be a long term plan and we can do it as soon as we want. -- Damien