[RFC] Subclassing struct drm_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was reminded on Monday that we'd like to be able to subclass struct
drm_device so we don't have to always juggle between a pointer to a struct
drm_device and its drv_private field to access everything we care about.

It'd be nicer for those two pointers to have the same value to avoid a few
extra instructions pretty everywhere.

Turns out, there's a cheap way to go towards that goal, just make DRM core
allocate enough space for drivers that want to subclass struct drm_device and
have a transition path where dev_private points to the start of the structure.

I've converted i915 to do just that, seems to still boot. Of course, a number
of nice refactoring are possible once dev == dev_priv, but that'd be for follow
up patches on top.

Thoughts?

-- 
Damien

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux