diff mbox

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

Message ID 20171015163042.35017-3-noralf@tronnes.org (mailing list archive)
State New, archived
Headers show

Commit Message

Noralf Trønnes Oct. 15, 2017, 4:30 p.m. UTC
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@tronnes.org>
---
 include/drm/drm_device.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Daniel Vetter Oct. 17, 2017, 12:41 p.m. UTC | #1
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@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@ffwll.ch>

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

Patch

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.
+	 */
+	struct drm_fb_helper *fbdev;
 };
 
 #endif