[PATCH v2 2/8] drm: Add drm_device->fbdev pointer

Daniel Vetter daniel at ffwll.ch
Tue Oct 17 12:41:38 UTC 2017


On Sun, Oct 15, 2017 at 06:30:36PM +0200, Noralf Trønnes wrote:
> drm_fb_helper is *the* way of doing fbdev emulation so add a pointer to
> struct drm_device. This makes it possible to add callback helpers for
> .last_close and .output_poll_changed further reducing fbdev emulation
> footprint in drivers.
> 
> Signed-off-by: Noralf Trønnes <noralf at tronnes.org>
> ---
>  include/drm/drm_device.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index e21af87a2f3c..3c104b15a0c8 100644
> --- a/include/drm/drm_device.h
> +++ b/include/drm/drm_device.h
> @@ -17,6 +17,7 @@ struct drm_vblank_crtc;
>  struct drm_sg_mem;
>  struct drm_local_map;
>  struct drm_vma_offset_manager;
> +struct drm_fb_helper;
>  
>  struct inode;
>  
> @@ -185,6 +186,13 @@ struct drm_device {
>  	struct drm_vma_offset_manager *vma_offset_manager;
>  	/*@} */
>  	int switch_power_state;
> +
> +	/**
> +	 * @fbdev:
> +	 *
> +	 * Optional pointer to the fbdev emulation structure.

Needs more helper in here, to make it even more obvious that it's optional
and not part of the core drm stuff.

Maybe call the member itself fbdev_helper_private or something like that.

With that bit of bikeshed applied to make it more over-the-top:

Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>

> +	 */
> +	struct drm_fb_helper *fbdev;
>  };
>  
>  #endif
> -- 
> 2.14.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the dri-devel mailing list