接前一篇文章:DRM全解析 —— ADD_FB(5)
本文参考以下博文:
特此致谢!
上回说到Intel i915、AMD Raedon和AMDGP三类显卡驱动中均调用了drm_framebuffer_init函数。本回就来讲解一下这个函数。
drm_framebuffer_init函数在drivers/gpu/drm/drm_framebuffer.c中,代码如下:
/**
* drm_framebuffer_init - initialize a framebuffer
* @dev: DRM device
* @fb: framebuffer to be initialized
* @funcs: ... with these functions
*
* Allocates an ID for the framebuffer's parent mode object, sets its mode
* functions & device file and adds it to the master fd list.
*
* IMP