[PATCH 4/5] drm: Add support for subclassing struct drm_device

2014-01-09 Thread David Herrmann
Hi On Thu, Jan 9, 2014 at 1:11 PM, Damien Lespiau wrote: > 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 dev

[PATCH 4/5] drm: Add support for subclassing struct drm_device

2014-01-09 Thread Damien Lespiau
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 driv

[PATCH 4/5] drm: Add support for subclassing struct drm_device

2014-01-08 Thread Daniel Vetter
On Wed, Jan 08, 2014 at 08:01:19PM +0100, David Herrmann wrote: > Hi > > On Wed, Jan 8, 2014 at 7:31 PM, Damien Lespiau > wrote: > > Currently, drivers are expected to allocate private data and attach it > > to dev_private in struct drm_device. > > > > This has the unfortunate property to requir

[PATCH 4/5] drm: Add support for subclassing struct drm_device

2014-01-08 Thread David Herrmann
Hi On Wed, Jan 8, 2014 at 7:31 PM, Damien Lespiau wrote: > Currently, drivers are expected to allocate private data and attach it > to dev_private in struct drm_device. > > This has the unfortunate property to require driver code to juggle > between the pointer to struct drm_device and dev->dev_

[PATCH 4/5] drm: Add support for subclassing struct drm_device

2014-01-08 Thread Damien Lespiau
Currently, drivers are expected to allocate private data and attach it to dev_private in struct drm_device. This has the unfortunate property to require driver code to juggle between the pointer to struct drm_device and dev->dev_private instead of using the same pointer if they could embed the dev