static struct drm_driver driver = {
/* don't use mtrr's here, the Xserver or user space app should
* deal with them for intel hardware.
*/
.driver_features =
DRIVER_USE_AGP | DRIVER_REQUIRE_AGP | /* DRIVER_USE_MTRR |*/
DRIVER_HAVE_IRQ | DRIVER_IRQ_SHARED | DRIVER_GEM,
.load = i915_driver_load,
.unload = i915_driver_unload,
.open = i915_driver_open,
.lastclose = i915_driver_lastclose,
.preclose = i915_driver_preclose,
.postclose = i915_driver_postclose,
.suspend = i915_suspend,
.resume = i915_resume,
.device_is_agp = i915_driver_device_is_agp,
.enable_vblank = i915_enable_vblank,
.disable_vblank = i915_disable_vblank,
.irq_preinstall = i915_driver_irq_preinstall,
.irq_postinstall = i915_driver_irq_postinstall,

本文深入剖析了Linux内核中DRM驱动的实现,特别是针对i915硬件的驱动结构。重点讨论了driver结构体中的ioctls和fops成员,它们作为用户程序与驱动交互的接口。fops代表file_operations,用于建立用户空间与驱动的联系,而i915_ioctls则包含具体的设备控制操作,这些操作通过drm_ioctl分发给相应的处理函数。
最低0.47元/天 解锁文章
8527

被折叠的 条评论
为什么被折叠?



