All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers
@ 2017-10-19 23:01 Noralf Trønnes
  2017-10-19 23:01 ` [PATCH 01/15] drm/fb-helper: Handle function NULL argument Noralf Trønnes
                   ` (16 more replies)
  0 siblings, 17 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This patchset adds fbdev .last_close and .output_poll_changed helpers to
reduce fbdev emulation footprint in drivers.

I don't know which drivers have their own tree or not, so if you want me
to apply your patch to drm-misc, please let me know.

I will do a separate patchset for the cma helper drivers.

Noralf.

Noralf Trønnes (15):
  drm/fb-helper: Handle function NULL argument
  drm: Add drm_device->drm_fb_helper_private pointer
  drm/fb-helper: Add .last_close and .output_poll_changed helpers
  drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/armada: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/exynos: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/gma500: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/i915: Use drm_fb_helper_output_poll_changed()
  drm/msm: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/nouveau: Use drm_fb_helper_output_poll_changed()
  drm/omap: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/radeon: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/rockchip: Use drm_fb_helper_lastclose() and _poll_changed()
  drm/tegra: Use drm_fb_helper_lastclose() and _poll_changed()
  staging: vboxvideo: Use drm_fb_helper_lastclose()

 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  9 +---
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      | 27 -----------
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     |  4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    |  4 --
 drivers/gpu/drm/armada/armada_drm.h         |  1 -
 drivers/gpu/drm/armada/armada_drv.c         |  8 +---
 drivers/gpu/drm/armada/armada_fb.c          | 11 +----
 drivers/gpu/drm/armada/armada_fbdev.c       |  8 ----
 drivers/gpu/drm/drm_fb_helper.c             | 69 +++++++++++++++++++++++------
 drivers/gpu/drm/exynos/exynos_drm_drv.c     |  8 +---
 drivers/gpu/drm/exynos/exynos_drm_fb.c      |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c   | 18 --------
 drivers/gpu/drm/exynos/exynos_drm_fbdev.h   |  2 -
 drivers/gpu/drm/gma500/framebuffer.c        |  9 +---
 drivers/gpu/drm/gma500/psb_drv.c            | 15 +------
 drivers/gpu/drm/i915/intel_display.c        |  2 +-
 drivers/gpu/drm/i915/intel_drv.h            |  5 ---
 drivers/gpu/drm/i915/intel_fbdev.c          |  8 ----
 drivers/gpu/drm/msm/msm_drv.c               | 18 +-------
 drivers/gpu/drm/nouveau/nouveau_display.c   |  3 +-
 drivers/gpu/drm/nouveau/nouveau_fbcon.c     |  8 ----
 drivers/gpu/drm/nouveau/nouveau_fbcon.h     |  2 -
 drivers/gpu/drm/nouveau/nouveau_vga.c       |  3 +-
 drivers/gpu/drm/nouveau/nv50_display.c      |  2 +-
 drivers/gpu/drm/omapdrm/omap_drv.c          | 34 +-------------
 drivers/gpu/drm/radeon/radeon_display.c     |  9 +---
 drivers/gpu/drm/radeon/radeon_fb.c          | 22 ---------
 drivers/gpu/drm/radeon/radeon_kms.c         |  5 +--
 drivers/gpu/drm/radeon/radeon_mode.h        |  3 --
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c |  9 +---
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c  |  9 +---
 drivers/gpu/drm/tegra/drm.c                 | 13 +-----
 drivers/gpu/drm/tegra/drm.h                 |  4 --
 drivers/gpu/drm/tegra/fb.c                  | 14 ------
 drivers/staging/vboxvideo/vbox_drv.c        |  2 +-
 drivers/staging/vboxvideo/vbox_drv.h        |  1 -
 drivers/staging/vboxvideo/vbox_main.c       | 12 -----
 include/drm/drm_device.h                    |  9 ++++
 include/drm/drm_fb_helper.h                 | 11 +++++
 39 files changed, 106 insertions(+), 297 deletions(-)

-- 
2.14.2

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

^ permalink raw reply	[flat|nested] 26+ messages in thread

* [PATCH 01/15] drm/fb-helper: Handle function NULL argument
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
@ 2017-10-19 23:01 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer Noralf Trønnes
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:01 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

Make functions tolerate that the drm_fb_helper argument is NULL.
This is useful for drivers that continue probing when fbdev emulation
fails and not having to do this check themselves.
Update docs for functions that already handles this.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_fb_helper.c | 28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 116d1f1337c7..954cdd48de92 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -150,6 +150,9 @@ int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper,
 {
 	int err;
 
+	if (!fb_helper)
+		return 0;
+
 	mutex_lock(&fb_helper->lock);
 	err = __drm_fb_helper_add_one_connector(fb_helper, connector);
 	mutex_unlock(&fb_helper->lock);
@@ -161,7 +164,7 @@ EXPORT_SYMBOL(drm_fb_helper_add_one_connector);
 /**
  * drm_fb_helper_single_add_all_connectors() - add all connectors to fbdev
  * 					       emulation helper
- * @fb_helper: fbdev initialized with drm_fb_helper_init
+ * @fb_helper: fbdev initialized with drm_fb_helper_init, can be NULL
  *
  * This functions adds all the available connectors for use with the given
  * fb_helper. This is a separate step to allow drivers to freely assign
@@ -179,7 +182,7 @@ int drm_fb_helper_single_add_all_connectors(struct drm_fb_helper *fb_helper)
 	struct drm_connector_list_iter conn_iter;
 	int i, ret = 0;
 
-	if (!drm_fbdev_emulation)
+	if (!drm_fbdev_emulation || !fb_helper)
 		return 0;
 
 	mutex_lock(&fb_helper->lock);
@@ -245,6 +248,9 @@ int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
 {
 	int err;
 
+	if (!fb_helper)
+		return 0;
+
 	mutex_lock(&fb_helper->lock);
 	err = __drm_fb_helper_remove_one_connector(fb_helper, connector);
 	mutex_unlock(&fb_helper->lock);
@@ -484,7 +490,7 @@ static int restore_fbdev_mode(struct drm_fb_helper *fb_helper)
 
 /**
  * drm_fb_helper_restore_fbdev_mode_unlocked - restore fbdev configuration
- * @fb_helper: fbcon to restore
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  *
  * This should be called from driver's drm &drm_driver.lastclose callback
  * when implementing an fbcon on top of kms using this helper. This ensures that
@@ -498,7 +504,7 @@ int drm_fb_helper_restore_fbdev_mode_unlocked(struct drm_fb_helper *fb_helper)
 	bool do_delayed;
 	int ret;
 
-	if (!drm_fbdev_emulation)
+	if (!drm_fbdev_emulation || !fb_helper)
 		return -ENODEV;
 
 	if (READ_ONCE(fb_helper->deferred_setup))
@@ -883,7 +889,7 @@ EXPORT_SYMBOL(drm_fb_helper_alloc_fbi);
 
 /**
  * drm_fb_helper_unregister_fbi - unregister fb_info framebuffer device
- * @fb_helper: driver-allocated fbdev helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  *
  * A wrapper around unregister_framebuffer, to release the fb_info
  * framebuffer device. This must be called before releasing all resources for
@@ -898,7 +904,7 @@ EXPORT_SYMBOL(drm_fb_helper_unregister_fbi);
 
 /**
  * drm_fb_helper_fini - finialize a &struct drm_fb_helper
- * @fb_helper: driver-allocated fbdev helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  *
  * This cleans up all remaining resources associated with @fb_helper. Must be
  * called after drm_fb_helper_unlink_fbi() was called.
@@ -937,7 +943,7 @@ EXPORT_SYMBOL(drm_fb_helper_fini);
 
 /**
  * drm_fb_helper_unlink_fbi - wrapper around unlink_framebuffer
- * @fb_helper: driver-allocated fbdev helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  *
  * A wrapper around unlink_framebuffer implemented by fbdev core
  */
@@ -1138,7 +1144,7 @@ EXPORT_SYMBOL(drm_fb_helper_cfb_imageblit);
 
 /**
  * drm_fb_helper_set_suspend - wrapper around fb_set_suspend
- * @fb_helper: driver-allocated fbdev helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  * @suspend: whether to suspend or resume
  *
  * A wrapper around fb_set_suspend implemented by fbdev core.
@@ -1155,7 +1161,7 @@ EXPORT_SYMBOL(drm_fb_helper_set_suspend);
 /**
  * drm_fb_helper_set_suspend_unlocked - wrapper around fb_set_suspend that also
  *                                      takes the console lock
- * @fb_helper: driver-allocated fbdev helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  * @suspend: whether to suspend or resume
  *
  * A wrapper around fb_set_suspend() that takes the console lock. If the lock
@@ -2568,7 +2574,7 @@ EXPORT_SYMBOL(drm_fb_helper_initial_config);
 /**
  * drm_fb_helper_hotplug_event - respond to a hotplug notification by
  *                               probing all the outputs attached to the fb
- * @fb_helper: the drm_fb_helper
+ * @fb_helper: driver-allocated fbdev helper, can be NULL
  *
  * Scan the connectors attached to the fb_helper and try to put together a
  * setup after notification of a change in output configuration.
@@ -2590,7 +2596,7 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
 {
 	int err = 0;
 
-	if (!drm_fbdev_emulation)
+	if (!drm_fbdev_emulation || !fb_helper)
 		return 0;
 
 	mutex_lock(&fb_helper->lock);
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
  2017-10-19 23:01 ` [PATCH 01/15] drm/fb-helper: Handle function NULL argument Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-20 13:29   ` Daniel Vetter
  2017-10-20 13:52   ` Ville Syrjälä
  2017-10-19 23:02 ` [PATCH 03/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (14 subsequent siblings)
  16 siblings, 2 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

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. The pointer is set by drm_fb_helper_init() and
cleared by drm_fb_helper_fini().

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---

This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
Changes since previous version:
- Change member name: fbdev -> drm_fb_helper_private
- Expand docs
- Set and clear pointer in drm_fb_helper_init/fini()

 drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
 include/drm/drm_device.h        |  9 +++++++++
 2 files changed, 20 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 954cdd48de92..c07b7af8de4c 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
 	struct drm_mode_config *config = &dev->mode_config;
 	int i;
 
-	if (!drm_fbdev_emulation)
+	if (!drm_fbdev_emulation) {
+		dev->drm_fb_helper_private = fb_helper;
 		return 0;
+	}
 
 	if (!max_conn_count)
 		return -EINVAL;
@@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
 		i++;
 	}
 
+	dev->drm_fb_helper_private = fb_helper;
+
 	return 0;
 out_free:
 	drm_fb_helper_crtc_free(fb_helper);
@@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
 {
 	struct fb_info *info;
 
-	if (!drm_fbdev_emulation || !fb_helper)
+	if (!fb_helper)
+		return;
+
+	fb_helper->dev->drm_fb_helper_private = NULL;
+
+	if (!drm_fbdev_emulation)
 		return;
 
 	cancel_work_sync(&fb_helper->resume_work);
diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
 	struct drm_vma_offset_manager *vma_offset_manager;
 	/*@} */
 	int switch_power_state;
+
+	/**
+	 * @drm_fb_helper_private:
+	 *
+	 * Pointer to the fbdev emulation structure.
+	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
+	 */
+	struct drm_fb_helper *drm_fb_helper_private;
 };
 
 #endif
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 03/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
  2017-10-19 23:01 ` [PATCH 01/15] drm/fb-helper: Handle function NULL argument Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 04/15] drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This adds helpers for the drm_driver->last_close and the
drm_mode_config_funcs->output_poll_changed callbacks.

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_fb_helper.c | 28 ++++++++++++++++++++++++++++
 include/drm/drm_fb_helper.h     | 11 +++++++++++
 2 files changed, 39 insertions(+)

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index c07b7af8de4c..5f32c11eb0d2 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -2633,6 +2633,34 @@ int drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper)
 }
 EXPORT_SYMBOL(drm_fb_helper_hotplug_event);
 
+/**
+ * drm_fb_helper_lastclose - DRM driver lastclose helper for fbdev emulation
+ * @dev: DRM device
+ *
+ * This function can be used as the &drm_driver->lastclose callback for drivers
+ * that only need to call drm_fb_helper_restore_fbdev_mode_unlocked().
+ */
+void drm_fb_helper_lastclose(struct drm_device *dev)
+{
+	drm_fb_helper_restore_fbdev_mode_unlocked(dev->drm_fb_helper_private);
+}
+EXPORT_SYMBOL(drm_fb_helper_lastclose);
+
+/**
+ * drm_fb_helper_output_poll_changed - DRM mode config \.output_poll_changed
+ *                                     helper for fbdev emulation
+ * @dev: DRM device
+ *
+ * This function can be used as the
+ * &drm_mode_config_funcs.output_poll_changed callback for drivers that only
+ * need to call drm_fb_helper_hotplug_event().
+ */
+void drm_fb_helper_output_poll_changed(struct drm_device *dev)
+{
+	drm_fb_helper_hotplug_event(dev->drm_fb_helper_private);
+}
+EXPORT_SYMBOL(drm_fb_helper_output_poll_changed);
+
 /* The Kconfig DRM_KMS_HELPER selects FRAMEBUFFER_CONSOLE (if !EXPERT)
  * but the module doesn't depend on any fb console symbols.  At least
  * attempt to load fbcon to avoid leaving the system without a usable console.
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index 33fe95927742..877e5b395c02 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -310,6 +310,9 @@ drm_pick_cmdline_mode(struct drm_fb_helper_connector *fb_helper_conn);
 int drm_fb_helper_add_one_connector(struct drm_fb_helper *fb_helper, struct drm_connector *connector);
 int drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
 				       struct drm_connector *connector);
+
+void drm_fb_helper_lastclose(struct drm_device *dev);
+void drm_fb_helper_output_poll_changed(struct drm_device *dev);
 #else
 static inline void drm_fb_helper_prepare(struct drm_device *dev,
 					struct drm_fb_helper *helper,
@@ -507,6 +510,14 @@ drm_fb_helper_remove_one_connector(struct drm_fb_helper *fb_helper,
 	return 0;
 }
 
+static inline void drm_fb_helper_lastclose(struct drm_device *dev)
+{
+}
+
+static inline void drm_fb_helper_output_poll_changed(struct drm_device *dev)
+{
+}
+
 #endif
 
 static inline int
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 04/15] drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (2 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 03/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 05/15] drm/armada: " Noralf Trønnes
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This driver can use drm_fb_helper_lastclose() in its .lastclose function.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c |  9 ++-------
 drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c      | 27 ---------------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c     |  4 +---
 drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h    |  4 ----
 4 files changed, 3 insertions(+), 41 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
index 6ad243293a78..c41262865616 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
@@ -34,6 +34,7 @@
 #include <linux/pm_runtime.h>
 #include <drm/drm_crtc_helper.h>
 #include <drm/drm_edid.h>
+#include <drm/drm_fb_helper.h>
 
 static void amdgpu_flip_callback(struct dma_fence *f, struct dma_fence_cb *cb)
 {
@@ -556,15 +557,9 @@ amdgpu_user_framebuffer_create(struct drm_device *dev,
 	return &amdgpu_fb->base;
 }
 
-static void amdgpu_output_poll_changed(struct drm_device *dev)
-{
-	struct amdgpu_device *adev = dev->dev_private;
-	amdgpu_fb_output_poll_changed(adev);
-}
-
 const struct drm_mode_config_funcs amdgpu_mode_funcs = {
 	.fb_create = amdgpu_user_framebuffer_create,
-	.output_poll_changed = amdgpu_output_poll_changed
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
 static const struct drm_prop_enum_list amdgpu_underscan_enum_list[] =
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
index 562930b17a6d..e38bf856f48b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c
@@ -288,12 +288,6 @@ static int amdgpufb_create(struct drm_fb_helper *helper,
 	return ret;
 }
 
-void amdgpu_fb_output_poll_changed(struct amdgpu_device *adev)
-{
-	if (adev->mode_info.rfbdev)
-		drm_fb_helper_hotplug_event(&adev->mode_info.rfbdev->helper);
-}
-
 static int amdgpu_fbdev_destroy(struct drm_device *dev, struct amdgpu_fbdev *rfbdev)
 {
 	struct amdgpu_framebuffer *rfb = &rfbdev->rfb;
@@ -397,24 +391,3 @@ bool amdgpu_fbdev_robj_is_fb(struct amdgpu_device *adev, struct amdgpu_bo *robj)
 		return true;
 	return false;
 }
-
-void amdgpu_fbdev_restore_mode(struct amdgpu_device *adev)
-{
-	struct amdgpu_fbdev *afbdev;
-	struct drm_fb_helper *fb_helper;
-	int ret;
-
-	if (!adev)
-		return;
-
-	afbdev = adev->mode_info.rfbdev;
-
-	if (!afbdev)
-		return;
-
-	fb_helper = &afbdev->helper;
-
-	ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
-	if (ret)
-		DRM_DEBUG("failed to restore crtc mode\n");
-}
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 4fd06f8d9768..db1e320be54a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -785,9 +785,7 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
  */
 void amdgpu_driver_lastclose_kms(struct drm_device *dev)
 {
-	struct amdgpu_device *adev = dev->dev_private;
-
-	amdgpu_fbdev_restore_mode(adev);
+	drm_fb_helper_lastclose(dev);
 	vga_switcheroo_process_delayed_switch();
 }
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
index 2af2678ddaf6..9e9cd0e1c558 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_mode.h
@@ -570,10 +570,6 @@ void amdgpu_fbdev_fini(struct amdgpu_device *adev);
 void amdgpu_fbdev_set_suspend(struct amdgpu_device *adev, int state);
 int amdgpu_fbdev_total_size(struct amdgpu_device *adev);
 bool amdgpu_fbdev_robj_is_fb(struct amdgpu_device *adev, struct amdgpu_bo *robj);
-void amdgpu_fbdev_restore_mode(struct amdgpu_device *adev);
-
-void amdgpu_fb_output_poll_changed(struct amdgpu_device *adev);
-
 
 int amdgpu_align_pitch(struct amdgpu_device *adev, int width, int bpp, bool tiled);
 
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 05/15] drm/armada: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (3 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 04/15] drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-23 10:10   ` Russell King - ARM Linux
  2017-10-19 23:02 ` [PATCH 06/15] drm/exynos: " Noralf Trønnes
                   ` (11 subsequent siblings)
  16 siblings, 1 reply; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/armada/armada_drm.h   |  1 -
 drivers/gpu/drm/armada/armada_drv.c   |  8 ++------
 drivers/gpu/drm/armada/armada_fb.c    | 11 +----------
 drivers/gpu/drm/armada/armada_fbdev.c |  8 --------
 4 files changed, 3 insertions(+), 25 deletions(-)

diff --git a/drivers/gpu/drm/armada/armada_drm.h b/drivers/gpu/drm/armada/armada_drm.h
index b064879ecdbd..cc4c557c9f66 100644
--- a/drivers/gpu/drm/armada/armada_drm.h
+++ b/drivers/gpu/drm/armada/armada_drm.h
@@ -84,7 +84,6 @@ void armada_drm_queue_unref_work(struct drm_device *,
 extern const struct drm_mode_config_funcs armada_drm_mode_config_funcs;
 
 int armada_fbdev_init(struct drm_device *);
-void armada_fbdev_lastclose(struct drm_device *);
 void armada_fbdev_fini(struct drm_device *);
 
 int armada_overlay_plane_create(struct drm_device *, unsigned long);
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index e857b88a9799..4b11b6b52f1d 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -10,6 +10,7 @@
 #include <linux/module.h>
 #include <linux/of_graph.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 #include <drm/drm_of.h>
 #include "armada_crtc.h"
 #include "armada_drm.h"
@@ -54,15 +55,10 @@ static struct drm_ioctl_desc armada_ioctls[] = {
 	DRM_IOCTL_DEF_DRV(ARMADA_GEM_PWRITE, armada_gem_pwrite_ioctl, 0),
 };
 
-static void armada_drm_lastclose(struct drm_device *dev)
-{
-	armada_fbdev_lastclose(dev);
-}
-
 DEFINE_DRM_GEM_FOPS(armada_drm_fops);
 
 static struct drm_driver armada_drm_driver = {
-	.lastclose		= armada_drm_lastclose,
+	.lastclose		= drm_fb_helper_lastclose,
 	.gem_free_object_unlocked = armada_gem_free_object,
 	.prime_handle_to_fd	= drm_gem_prime_handle_to_fd,
 	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
diff --git a/drivers/gpu/drm/armada/armada_fb.c b/drivers/gpu/drm/armada/armada_fb.c
index a38d5a0892a9..ac92bce07ecd 100644
--- a/drivers/gpu/drm/armada/armada_fb.c
+++ b/drivers/gpu/drm/armada/armada_fb.c
@@ -154,16 +154,7 @@ static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
 	return ERR_PTR(ret);
 }
 
-static void armada_output_poll_changed(struct drm_device *dev)
-{
-	struct armada_private *priv = dev->dev_private;
-	struct drm_fb_helper *fbh = priv->fbdev;
-
-	if (fbh)
-		drm_fb_helper_hotplug_event(fbh);
-}
-
 const struct drm_mode_config_funcs armada_drm_mode_config_funcs = {
 	.fb_create		= armada_fb_create,
-	.output_poll_changed	= armada_output_poll_changed,
+	.output_poll_changed	= drm_fb_helper_output_poll_changed,
 };
diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
index a2ce83f84800..2a59db0994b2 100644
--- a/drivers/gpu/drm/armada/armada_fbdev.c
+++ b/drivers/gpu/drm/armada/armada_fbdev.c
@@ -159,14 +159,6 @@ int armada_fbdev_init(struct drm_device *dev)
 	return ret;
 }
 
-void armada_fbdev_lastclose(struct drm_device *dev)
-{
-	struct armada_private *priv = dev->dev_private;
-
-	if (priv->fbdev)
-		drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
-}
-
 void armada_fbdev_fini(struct drm_device *dev)
 {
 	struct armada_private *priv = dev->dev_private;
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 06/15] drm/exynos: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (4 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 05/15] drm/armada: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 07/15] drm/gma500: " Noralf Trønnes
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Inki Dae <inki.dae@samsung.com>
Cc: Joonyoung Shim <jy0922.shim@samsung.com>
Cc: Seung-Woo Kim <sw0312.kim@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/exynos/exynos_drm_drv.c   |  8 ++------
 drivers/gpu/drm/exynos/exynos_drm_fb.c    |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c | 18 ------------------
 drivers/gpu/drm/exynos/exynos_drm_fbdev.h |  2 --
 4 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c
index e651a58c18cf..70f4895ac49c 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c
@@ -16,6 +16,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 
 #include <linux/component.h>
 
@@ -89,11 +90,6 @@ static void exynos_drm_postclose(struct drm_device *dev, struct drm_file *file)
 	file->driver_priv = NULL;
 }
 
-static void exynos_drm_lastclose(struct drm_device *dev)
-{
-	exynos_drm_fbdev_restore_mode(dev);
-}
-
 static const struct vm_operations_struct exynos_drm_gem_vm_ops = {
 	.fault = exynos_drm_gem_fault,
 	.open = drm_gem_vm_open,
@@ -140,7 +136,7 @@ static struct drm_driver exynos_drm_driver = {
 	.driver_features	= DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME
 				  | DRIVER_ATOMIC | DRIVER_RENDER,
 	.open			= exynos_drm_open,
-	.lastclose		= exynos_drm_lastclose,
+	.lastclose		= drm_fb_helper_lastclose,
 	.postclose		= exynos_drm_postclose,
 	.gem_free_object_unlocked = exynos_drm_gem_free_object,
 	.gem_vm_ops		= &exynos_drm_gem_vm_ops,
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos/exynos_drm_fb.c
index 8208df56a88f..0faaf829f5bf 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fb.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fb.c
@@ -205,7 +205,7 @@ static struct drm_mode_config_helper_funcs exynos_drm_mode_config_helpers = {
 
 static const struct drm_mode_config_funcs exynos_drm_mode_config_funcs = {
 	.fb_create = exynos_user_fb_create,
-	.output_poll_changed = exynos_drm_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = exynos_atomic_check,
 	.atomic_commit = drm_atomic_helper_commit,
 };
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
index dfb66ecf417b..132dd52d0ac7 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.c
@@ -270,24 +270,6 @@ void exynos_drm_fbdev_fini(struct drm_device *dev)
 	private->fb_helper = NULL;
 }
 
-void exynos_drm_fbdev_restore_mode(struct drm_device *dev)
-{
-	struct exynos_drm_private *private = dev->dev_private;
-
-	if (!private || !private->fb_helper)
-		return;
-
-	drm_fb_helper_restore_fbdev_mode_unlocked(private->fb_helper);
-}
-
-void exynos_drm_output_poll_changed(struct drm_device *dev)
-{
-	struct exynos_drm_private *private = dev->dev_private;
-	struct drm_fb_helper *fb_helper = private->fb_helper;
-
-	drm_fb_helper_hotplug_event(fb_helper);
-}
-
 void exynos_drm_fbdev_suspend(struct drm_device *dev)
 {
 	struct exynos_drm_private *private = dev->dev_private;
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
index 645d1bb7f665..b33847223a85 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_fbdev.h
@@ -19,8 +19,6 @@
 
 int exynos_drm_fbdev_init(struct drm_device *dev);
 void exynos_drm_fbdev_fini(struct drm_device *dev);
-void exynos_drm_fbdev_restore_mode(struct drm_device *dev);
-void exynos_drm_output_poll_changed(struct drm_device *dev);
 void exynos_drm_fbdev_suspend(struct drm_device *drm);
 void exynos_drm_fbdev_resume(struct drm_device *drm);
 
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 07/15] drm/gma500: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (5 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 06/15] drm/exynos: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 08/15] drm/i915: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/gma500/framebuffer.c |  9 +--------
 drivers/gpu/drm/gma500/psb_drv.c     | 15 +--------------
 2 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 2570c7f647a6..cb0a2ae916e0 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -576,13 +576,6 @@ static void psb_fbdev_fini(struct drm_device *dev)
 	dev_priv->fbdev = NULL;
 }
 
-static void psbfb_output_poll_changed(struct drm_device *dev)
-{
-	struct drm_psb_private *dev_priv = dev->dev_private;
-	struct psb_fbdev *fbdev = (struct psb_fbdev *)dev_priv->fbdev;
-	drm_fb_helper_hotplug_event(&fbdev->psb_fb_helper);
-}
-
 /**
  *	psb_user_framebuffer_create_handle - add hamdle to a framebuffer
  *	@fb: framebuffer
@@ -623,7 +616,7 @@ static void psb_user_framebuffer_destroy(struct drm_framebuffer *fb)
 
 static const struct drm_mode_config_funcs psb_mode_funcs = {
 	.fb_create = psb_user_framebuffer_create,
-	.output_poll_changed = psbfb_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
 static void psb_setup_outputs(struct drm_device *dev)
diff --git a/drivers/gpu/drm/gma500/psb_drv.c b/drivers/gpu/drm/gma500/psb_drv.c
index 37a3be71acd9..7ab4c532f1d4 100644
--- a/drivers/gpu/drm/gma500/psb_drv.c
+++ b/drivers/gpu/drm/gma500/psb_drv.c
@@ -107,19 +107,6 @@ MODULE_DEVICE_TABLE(pci, pciidlist);
 static const struct drm_ioctl_desc psb_ioctls[] = {
 };
 
-static void psb_driver_lastclose(struct drm_device *dev)
-{
-	int ret;
-	struct drm_psb_private *dev_priv = dev->dev_private;
-	struct psb_fbdev *fbdev = dev_priv->fbdev;
-
-	ret = drm_fb_helper_restore_fbdev_mode_unlocked(&fbdev->psb_fb_helper);
-	if (ret)
-		DRM_DEBUG("failed to restore crtc mode\n");
-
-	return;
-}
-
 static int psb_do_init(struct drm_device *dev)
 {
 	struct drm_psb_private *dev_priv = dev->dev_private;
@@ -479,7 +466,7 @@ static struct drm_driver driver = {
 			   DRIVER_MODESET | DRIVER_GEM,
 	.load = psb_driver_load,
 	.unload = psb_driver_unload,
-	.lastclose = psb_driver_lastclose,
+	.lastclose = drm_fb_helper_lastclose,
 
 	.num_ioctls = ARRAY_SIZE(psb_ioctls),
 	.irq_preinstall = psb_irq_preinstall,
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 08/15] drm/i915: Use drm_fb_helper_output_poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (6 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 07/15] drm/gma500: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 09/15] drm/msm: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 drivers/gpu/drm/i915/intel_drv.h     | 5 -----
 drivers/gpu/drm/i915/intel_fbdev.c   | 8 --------
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f780f39e0758..b205e2c782bb 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -14123,7 +14123,7 @@ static void intel_atomic_state_free(struct drm_atomic_state *state)
 static const struct drm_mode_config_funcs intel_mode_funcs = {
 	.fb_create = intel_user_framebuffer_create,
 	.get_format_info = intel_get_format_info,
-	.output_poll_changed = intel_fbdev_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = intel_atomic_check,
 	.atomic_commit = intel_atomic_commit,
 	.atomic_state_alloc = intel_atomic_state_alloc,
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index 463ed152e6b1..dfcf5ba220e8 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1607,7 +1607,6 @@ extern void intel_fbdev_initial_config_async(struct drm_device *dev);
 extern void intel_fbdev_unregister(struct drm_i915_private *dev_priv);
 extern void intel_fbdev_fini(struct drm_i915_private *dev_priv);
 extern void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous);
-extern void intel_fbdev_output_poll_changed(struct drm_device *dev);
 extern void intel_fbdev_restore_mode(struct drm_device *dev);
 #else
 static inline int intel_fbdev_init(struct drm_device *dev)
@@ -1631,10 +1630,6 @@ static inline void intel_fbdev_set_suspend(struct drm_device *dev, int state, bo
 {
 }
 
-static inline void intel_fbdev_output_poll_changed(struct drm_device *dev)
-{
-}
-
 static inline void intel_fbdev_restore_mode(struct drm_device *dev)
 {
 }
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index f2bb8116227c..35babbadfc5a 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -796,14 +796,6 @@ void intel_fbdev_set_suspend(struct drm_device *dev, int state, bool synchronous
 	console_unlock();
 }
 
-void intel_fbdev_output_poll_changed(struct drm_device *dev)
-{
-	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
-
-	if (ifbdev)
-		drm_fb_helper_hotplug_event(&ifbdev->helper);
-}
-
 void intel_fbdev_restore_mode(struct drm_device *dev)
 {
 	struct intel_fbdev *ifbdev = to_i915(dev)->fbdev;
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 09/15] drm/msm: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (7 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 08/15] drm/i915: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 10/15] drm/nouveau: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/msm/msm_drv.c | 18 ++----------------
 1 file changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index 606df7bea97b..1bddbbc6fd3e 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -34,16 +34,9 @@
 #define MSM_VERSION_MINOR	2
 #define MSM_VERSION_PATCHLEVEL	0
 
-static void msm_fb_output_poll_changed(struct drm_device *dev)
-{
-	struct msm_drm_private *priv = dev->dev_private;
-	if (priv->fbdev)
-		drm_fb_helper_hotplug_event(priv->fbdev);
-}
-
 static const struct drm_mode_config_funcs mode_config_funcs = {
 	.fb_create = msm_framebuffer_create,
-	.output_poll_changed = msm_fb_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = msm_atomic_check,
 	.atomic_commit = msm_atomic_commit,
 	.atomic_state_alloc = msm_atomic_state_alloc,
@@ -545,13 +538,6 @@ static void msm_postclose(struct drm_device *dev, struct drm_file *file)
 	kfree(ctx);
 }
 
-static void msm_lastclose(struct drm_device *dev)
-{
-	struct msm_drm_private *priv = dev->dev_private;
-	if (priv->fbdev)
-		drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
-}
-
 static irqreturn_t msm_irq(int irq, void *arg)
 {
 	struct drm_device *dev = arg;
@@ -825,7 +811,7 @@ static struct drm_driver msm_driver = {
 				DRIVER_MODESET,
 	.open               = msm_open,
 	.postclose           = msm_postclose,
-	.lastclose          = msm_lastclose,
+	.lastclose          = drm_fb_helper_lastclose,
 	.irq_handler        = msm_irq,
 	.irq_preinstall     = msm_irq_preinstall,
 	.irq_postinstall    = msm_irq_postinstall,
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 10/15] drm/nouveau: Use drm_fb_helper_output_poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (8 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 09/15] drm/msm: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 11/15] drm/omap: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This driver can use drm_fb_helper_output_poll_changed() instead of
its own nouveau_fbcon_output_poll_changed().

Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 3 ++-
 drivers/gpu/drm/nouveau/nouveau_fbcon.c   | 8 --------
 drivers/gpu/drm/nouveau/nouveau_fbcon.h   | 2 --
 drivers/gpu/drm/nouveau/nouveau_vga.c     | 3 ++-
 drivers/gpu/drm/nouveau/nv50_display.c    | 2 +-
 5 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 2e7785f49e6d..009713404cc4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -29,6 +29,7 @@
 #include <drm/drm_atomic.h>
 #include <drm/drm_atomic_helper.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 
 #include <nvif/class.h>
 
@@ -292,7 +293,7 @@ nouveau_user_framebuffer_create(struct drm_device *dev,
 
 static const struct drm_mode_config_funcs nouveau_mode_config_funcs = {
 	.fb_create = nouveau_user_framebuffer_create,
-	.output_poll_changed = nouveau_fbcon_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
 
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index f7707849bb53..60ca03c27ec4 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -411,14 +411,6 @@ nouveau_fbcon_create(struct drm_fb_helper *helper,
 	return ret;
 }
 
-void
-nouveau_fbcon_output_poll_changed(struct drm_device *dev)
-{
-	struct nouveau_drm *drm = nouveau_drm(dev);
-	if (drm->fbcon)
-		drm_fb_helper_hotplug_event(&drm->fbcon->helper);
-}
-
 static int
 nouveau_fbcon_destroy(struct drm_device *dev, struct nouveau_fbdev *fbcon)
 {
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.h b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
index e2bca729721e..a6f192ea3fa6 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.h
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.h
@@ -68,8 +68,6 @@ void nouveau_fbcon_set_suspend(struct drm_device *dev, int state);
 void nouveau_fbcon_accel_save_disable(struct drm_device *dev);
 void nouveau_fbcon_accel_restore(struct drm_device *dev);
 
-void nouveau_fbcon_output_poll_changed(struct drm_device *dev);
-
 extern int nouveau_nofbaccel;
 
 #endif /* __NV50_FBCON_H__ */
diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index 48393a4f6331..ac97c30c5bbd 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -3,6 +3,7 @@
 
 #include <drm/drmP.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 
 #include "nouveau_drv.h"
 #include "nouveau_acpi.h"
@@ -60,7 +61,7 @@ static void
 nouveau_switcheroo_reprobe(struct pci_dev *pdev)
 {
 	struct drm_device *dev = pci_get_drvdata(pdev);
-	nouveau_fbcon_output_poll_changed(dev);
+	drm_fb_helper_output_poll_changed(dev);
 }
 
 static bool
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 2dbf62a2ac41..5b3db08e50e4 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -4308,7 +4308,7 @@ nv50_disp_atomic_state_alloc(struct drm_device *dev)
 static const struct drm_mode_config_funcs
 nv50_disp_func = {
 	.fb_create = nouveau_user_framebuffer_create,
-	.output_poll_changed = nouveau_fbcon_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = nv50_disp_atomic_check,
 	.atomic_commit = nv50_disp_atomic_commit,
 	.atomic_state_alloc = nv50_disp_atomic_state_alloc,
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 11/15] drm/omap: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (9 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 10/15] drm/nouveau: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 12/15] drm/radeon: " Noralf Trønnes
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 34 ++--------------------------------
 1 file changed, 2 insertions(+), 32 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index cdf5b0601eba..96857c508ee0 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -46,14 +46,6 @@
  *                 devices
  */
 
-static void omap_fb_output_poll_changed(struct drm_device *dev)
-{
-	struct omap_drm_private *priv = dev->dev_private;
-	DBG("dev=%p", dev);
-	if (priv->fbdev)
-		drm_fb_helper_hotplug_event(priv->fbdev);
-}
-
 static void omap_atomic_wait_for_completion(struct drm_device *dev,
 					    struct drm_atomic_state *old_state)
 {
@@ -132,7 +124,7 @@ static const struct drm_mode_config_helper_funcs omap_mode_config_helper_funcs =
 
 static const struct drm_mode_config_funcs omap_mode_config_funcs = {
 	.fb_create = omap_framebuffer_create,
-	.output_poll_changed = omap_fb_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = drm_atomic_helper_check,
 	.atomic_commit = drm_atomic_helper_commit,
 };
@@ -467,28 +459,6 @@ static int dev_open(struct drm_device *dev, struct drm_file *file)
 	return 0;
 }
 
-/**
- * lastclose - clean up after all DRM clients have exited
- * @dev: DRM device
- *
- * Take care of cleaning up after all DRM clients have exited.  In the
- * mode setting case, we want to restore the kernel's initial mode (just
- * in case the last client left us in a bad state).
- */
-static void dev_lastclose(struct drm_device *dev)
-{
-	struct omap_drm_private *priv = dev->dev_private;
-	int ret;
-
-	DBG("lastclose: dev=%p", dev);
-
-	if (priv->fbdev) {
-		ret = drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
-		if (ret)
-			DBG("failed to restore crtc mode");
-	}
-}
-
 static const struct vm_operations_struct omap_gem_vm_ops = {
 	.fault = omap_gem_fault,
 	.open = drm_gem_vm_open,
@@ -511,7 +481,7 @@ static struct drm_driver omap_drm_driver = {
 	.driver_features = DRIVER_MODESET | DRIVER_GEM  | DRIVER_PRIME |
 		DRIVER_ATOMIC | DRIVER_RENDER,
 	.open = dev_open,
-	.lastclose = dev_lastclose,
+	.lastclose = drm_fb_helper_lastclose,
 #ifdef CONFIG_DEBUG_FS
 	.debugfs_init = omap_debugfs_init,
 #endif
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 12/15] drm/radeon: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (10 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 11/15] drm/omap: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 13/15] drm/rockchip: " Noralf Trønnes
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This driver can use drm_fb_helper_lastclose() in its .lastclose function.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/radeon/radeon_display.c |  9 ++-------
 drivers/gpu/drm/radeon/radeon_fb.c      | 22 ----------------------
 drivers/gpu/drm/radeon/radeon_kms.c     |  5 ++---
 drivers/gpu/drm/radeon/radeon_mode.h    |  3 ---
 4 files changed, 4 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index ddfe91efa61e..dfda5e0ed166 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -32,6 +32,7 @@
 
 #include <linux/pm_runtime.h>
 #include <drm/drm_crtc_helper.h>
+#include <drm/drm_fb_helper.h>
 #include <drm/drm_plane_helper.h>
 #include <drm/drm_edid.h>
 
@@ -1362,15 +1363,9 @@ radeon_user_framebuffer_create(struct drm_device *dev,
 	return &radeon_fb->base;
 }
 
-static void radeon_output_poll_changed(struct drm_device *dev)
-{
-	struct radeon_device *rdev = dev->dev_private;
-	radeon_fb_output_poll_changed(rdev);
-}
-
 static const struct drm_mode_config_funcs radeon_mode_funcs = {
 	.fb_create = radeon_user_framebuffer_create,
-	.output_poll_changed = radeon_output_poll_changed
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 };
 
 static const struct drm_prop_enum_list radeon_tmds_pll_enum_list[] =
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index 2fcf805d3a16..8a582af52073 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -307,12 +307,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
 	return ret;
 }
 
-void radeon_fb_output_poll_changed(struct radeon_device *rdev)
-{
-	if (rdev->mode_info.rfbdev)
-		drm_fb_helper_hotplug_event(&rdev->mode_info.rfbdev->helper);
-}
-
 static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfbdev)
 {
 	struct radeon_framebuffer *rfb = &rfbdev->rfb;
@@ -423,19 +417,3 @@ void radeon_fb_remove_connector(struct radeon_device *rdev, struct drm_connector
 	if (rdev->mode_info.rfbdev)
 		drm_fb_helper_remove_one_connector(&rdev->mode_info.rfbdev->helper, connector);
 }
-
-void radeon_fbdev_restore_mode(struct radeon_device *rdev)
-{
-	struct radeon_fbdev *rfbdev = rdev->mode_info.rfbdev;
-	struct drm_fb_helper *fb_helper;
-	int ret;
-
-	if (!rfbdev)
-		return;
-
-	fb_helper = &rfbdev->helper;
-
-	ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
-	if (ret)
-		DRM_DEBUG("failed to restore crtc mode\n");
-}
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index dfee8f7d94ae..e4c1bb8c21fa 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -26,6 +26,7 @@
  *          Jerome Glisse
  */
 #include <drm/drmP.h>
+#include <drm/drm_fb_helper.h>
 #include "radeon.h"
 #include <drm/radeon_drm.h>
 #include "radeon_asic.h"
@@ -636,9 +637,7 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
  */
 void radeon_driver_lastclose_kms(struct drm_device *dev)
 {
-	struct radeon_device *rdev = dev->dev_private;
-
-	radeon_fbdev_restore_mode(rdev);
+	drm_fb_helper_lastclose(dev);
 	vga_switcheroo_process_delayed_switch();
 }
 
diff --git a/drivers/gpu/drm/radeon/radeon_mode.h b/drivers/gpu/drm/radeon/radeon_mode.h
index da44ac234f64..567156a7beae 100644
--- a/drivers/gpu/drm/radeon/radeon_mode.h
+++ b/drivers/gpu/drm/radeon/radeon_mode.h
@@ -988,9 +988,6 @@ int radeon_fbdev_init(struct radeon_device *rdev);
 void radeon_fbdev_fini(struct radeon_device *rdev);
 void radeon_fbdev_set_suspend(struct radeon_device *rdev, int state);
 bool radeon_fbdev_robj_is_fb(struct radeon_device *rdev, struct radeon_bo *robj);
-void radeon_fbdev_restore_mode(struct radeon_device *rdev);
-
-void radeon_fb_output_poll_changed(struct radeon_device *rdev);
 
 void radeon_crtc_handle_vblank(struct radeon_device *rdev, int crtc_id);
 
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 13/15] drm/rockchip: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (11 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 12/15] drm/radeon: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 14/15] drm/tegra: " Noralf Trønnes
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 9 +--------
 drivers/gpu/drm/rockchip/rockchip_drm_fb.c  | 9 +--------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 76d63de5921d..d85431400a0d 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -207,13 +207,6 @@ static void rockchip_drm_unbind(struct device *dev)
 	drm_dev_unref(drm_dev);
 }
 
-static void rockchip_drm_lastclose(struct drm_device *dev)
-{
-	struct rockchip_drm_private *priv = dev->dev_private;
-
-	drm_fb_helper_restore_fbdev_mode_unlocked(&priv->fbdev_helper);
-}
-
 static const struct file_operations rockchip_drm_driver_fops = {
 	.owner = THIS_MODULE,
 	.open = drm_open,
@@ -228,7 +221,7 @@ static const struct file_operations rockchip_drm_driver_fops = {
 static struct drm_driver rockchip_drm_driver = {
 	.driver_features	= DRIVER_MODESET | DRIVER_GEM |
 				  DRIVER_PRIME | DRIVER_ATOMIC,
-	.lastclose		= rockchip_drm_lastclose,
+	.lastclose		= drm_fb_helper_lastclose,
 	.gem_vm_ops		= &drm_gem_cma_vm_ops,
 	.gem_free_object_unlocked = rockchip_gem_free_object,
 	.dumb_create		= rockchip_gem_dumb_create,
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
index cd2ace0c3caa..e266539e04e5 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_fb.c
@@ -167,20 +167,13 @@ rockchip_user_fb_create(struct drm_device *dev, struct drm_file *file_priv,
 	return ERR_PTR(ret);
 }
 
-static void rockchip_drm_output_poll_changed(struct drm_device *dev)
-{
-	struct rockchip_drm_private *private = dev->dev_private;
-
-	drm_fb_helper_hotplug_event(&private->fbdev_helper);
-}
-
 static const struct drm_mode_config_helper_funcs rockchip_mode_config_helpers = {
 	.atomic_commit_tail = drm_atomic_helper_commit_tail_rpm,
 };
 
 static const struct drm_mode_config_funcs rockchip_drm_mode_config_funcs = {
 	.fb_create = rockchip_user_fb_create,
-	.output_poll_changed = rockchip_drm_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 	.atomic_check = drm_atomic_helper_check,
 	.atomic_commit = drm_atomic_helper_commit,
 };
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 14/15] drm/tegra: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (12 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 13/15] drm/rockchip: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-19 23:02 ` [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose() Noralf Trønnes
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: daniel.vetter, tomi.valkeinen, joonas.lahtinen, sw0312.kim,
	hdegoede, kyungmin.park, thierry.reding, bskeggs, rodrigo.vivi,
	alexander.deucher, linux, intel-gfx, christian.koenig

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
It can also use drm_fb_helper_output_poll_changed() as its
.output_poll_changed callback.

Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/tegra/drm.c | 13 ++-----------
 drivers/gpu/drm/tegra/drm.h |  4 ----
 drivers/gpu/drm/tegra/fb.c  | 14 --------------
 3 files changed, 2 insertions(+), 29 deletions(-)

diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index 597d563d636a..73bca7ac1271 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -120,7 +120,7 @@ static int tegra_atomic_commit(struct drm_device *drm,
 static const struct drm_mode_config_funcs tegra_drm_mode_funcs = {
 	.fb_create = tegra_fb_create,
 #ifdef CONFIG_DRM_FBDEV_EMULATION
-	.output_poll_changed = tegra_fb_output_poll_changed,
+	.output_poll_changed = drm_fb_helper_output_poll_changed,
 #endif
 	.atomic_check = drm_atomic_helper_check,
 	.atomic_commit = tegra_atomic_commit,
@@ -287,15 +287,6 @@ static void tegra_drm_context_free(struct tegra_drm_context *context)
 	kfree(context);
 }
 
-static void tegra_drm_lastclose(struct drm_device *drm)
-{
-#ifdef CONFIG_DRM_FBDEV_EMULATION
-	struct tegra_drm *tegra = drm->dev_private;
-
-	tegra_fbdev_restore_mode(tegra->fbdev);
-#endif
-}
-
 static struct host1x_bo *
 host1x_bo_lookup(struct drm_file *file, u32 handle)
 {
@@ -1100,7 +1091,7 @@ static struct drm_driver tegra_drm_driver = {
 	.unload = tegra_drm_unload,
 	.open = tegra_drm_open,
 	.postclose = tegra_drm_postclose,
-	.lastclose = tegra_drm_lastclose,
+	.lastclose = drm_fb_helper_lastclose,
 
 #if defined(CONFIG_DEBUG_FS)
 	.debugfs_init = tegra_debugfs_init,
diff --git a/drivers/gpu/drm/tegra/drm.h b/drivers/gpu/drm/tegra/drm.h
index 063f5d397526..55b6aff25b9b 100644
--- a/drivers/gpu/drm/tegra/drm.h
+++ b/drivers/gpu/drm/tegra/drm.h
@@ -290,10 +290,6 @@ int tegra_drm_fb_init(struct drm_device *drm);
 void tegra_drm_fb_exit(struct drm_device *drm);
 void tegra_drm_fb_suspend(struct drm_device *drm);
 void tegra_drm_fb_resume(struct drm_device *drm);
-#ifdef CONFIG_DRM_FBDEV_EMULATION
-void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev);
-void tegra_fb_output_poll_changed(struct drm_device *drm);
-#endif
 
 extern struct platform_driver tegra_dc_driver;
 extern struct platform_driver tegra_hdmi_driver;
diff --git a/drivers/gpu/drm/tegra/fb.c b/drivers/gpu/drm/tegra/fb.c
index 80540c1c66dc..8dfe3c6c217e 100644
--- a/drivers/gpu/drm/tegra/fb.c
+++ b/drivers/gpu/drm/tegra/fb.c
@@ -361,20 +361,6 @@ static void tegra_fbdev_exit(struct tegra_fbdev *fbdev)
 	drm_fb_helper_fini(&fbdev->base);
 	tegra_fbdev_free(fbdev);
 }
-
-void tegra_fbdev_restore_mode(struct tegra_fbdev *fbdev)
-{
-	if (fbdev)
-		drm_fb_helper_restore_fbdev_mode_unlocked(&fbdev->base);
-}
-
-void tegra_fb_output_poll_changed(struct drm_device *drm)
-{
-	struct tegra_drm *tegra = drm->dev_private;
-
-	if (tegra->fbdev)
-		drm_fb_helper_hotplug_event(&tegra->fbdev->base);
-}
 #endif
 
 int tegra_drm_fb_prepare(struct drm_device *drm)
-- 
2.14.2

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

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose()
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (13 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 14/15] drm/tegra: " Noralf Trønnes
@ 2017-10-19 23:02 ` Noralf Trønnes
  2017-10-23  6:43   ` Hans de Goede
  2017-10-19 23:46 ` ✓ Fi.CI.BAT: success for drm/fb-helper: Add .last_close and .output_poll_changed helpers Patchwork
  2017-10-20  1:02 ` ✓ Fi.CI.IGT: " Patchwork
  16 siblings, 1 reply; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-19 23:02 UTC (permalink / raw)
  To: dri-devel
  Cc: Noralf Trønnes, jy0922.shim, daniel.vetter, tomi.valkeinen,
	sw0312.kim, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

This driver can use drm_fb_helper_lastclose() as its .lastclose callback.

Cc: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/staging/vboxvideo/vbox_drv.c  |  2 +-
 drivers/staging/vboxvideo/vbox_drv.h  |  1 -
 drivers/staging/vboxvideo/vbox_main.c | 12 ------------
 3 files changed, 1 insertion(+), 14 deletions(-)

diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
index e18642e5027e..a4d8d7898e3d 100644
--- a/drivers/staging/vboxvideo/vbox_drv.c
+++ b/drivers/staging/vboxvideo/vbox_drv.c
@@ -229,7 +229,7 @@ static struct drm_driver driver = {
 
 	.load = vbox_driver_load,
 	.unload = vbox_driver_unload,
-	.lastclose = vbox_driver_lastclose,
+	.lastclose = drm_fb_helper_lastclose,
 	.master_set = vbox_master_set,
 	.master_drop = vbox_master_drop,
 
diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h
index 4b9302703b36..7273d7e9bc9b 100644
--- a/drivers/staging/vboxvideo/vbox_drv.h
+++ b/drivers/staging/vboxvideo/vbox_drv.h
@@ -128,7 +128,6 @@ struct vbox_private {
 
 int vbox_driver_load(struct drm_device *dev, unsigned long flags);
 void vbox_driver_unload(struct drm_device *dev);
-void vbox_driver_lastclose(struct drm_device *dev);
 
 struct vbox_gem_object;
 
diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
index 80bd039fa08e..c3d756620fd5 100644
--- a/drivers/staging/vboxvideo/vbox_main.c
+++ b/drivers/staging/vboxvideo/vbox_main.c
@@ -421,18 +421,6 @@ void vbox_driver_unload(struct drm_device *dev)
 	vbox_hw_fini(vbox);
 }
 
-/**
- * @note this is described in the DRM framework documentation.  AST does not
- * have it, but we get an oops on driver unload if it is not present.
- */
-void vbox_driver_lastclose(struct drm_device *dev)
-{
-	struct vbox_private *vbox = dev->dev_private;
-
-	if (vbox->fbdev)
-		drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
-}
-
 int vbox_gem_create(struct drm_device *dev,
 		    u32 size, bool iskernel, struct drm_gem_object **obj)
 {
-- 
2.14.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 26+ messages in thread

* ✓ Fi.CI.BAT: success for drm/fb-helper: Add .last_close and .output_poll_changed helpers
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (14 preceding siblings ...)
  2017-10-19 23:02 ` [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose() Noralf Trønnes
@ 2017-10-19 23:46 ` Patchwork
  2017-10-20  1:02 ` ✓ Fi.CI.IGT: " Patchwork
  16 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2017-10-19 23:46 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: intel-gfx

== Series Details ==

Series: drm/fb-helper: Add .last_close and .output_poll_changed helpers
URL   : https://patchwork.freedesktop.org/series/32332/
State : success

== Summary ==

Series 32332v1 drm/fb-helper: Add .last_close and .output_poll_changed helpers
https://patchwork.freedesktop.org/api/1.0/series/32332/revisions/1/mbox/

Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                incomplete -> PASS       (fi-skl-6700hq)
Test kms_pipe_crc_basic:
        Subgroup read-crc-pipe-b-frame-sequence:
                notrun     -> INCOMPLETE (fi-skl-6700hq)
        Subgroup suspend-read-crc-pipe-b:
                pass       -> DMESG-WARN (fi-byt-n2820) fdo#101705

fdo#101705 https://bugs.freedesktop.org/show_bug.cgi?id=101705

fi-bdw-5557u     total:289  pass:268  dwarn:0   dfail:0   fail:0   skip:21  time:441s
fi-bdw-gvtdvm    total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:451s
fi-blb-e6850     total:289  pass:223  dwarn:1   dfail:0   fail:0   skip:65  time:371s
fi-bsw-n3050     total:289  pass:243  dwarn:0   dfail:0   fail:0   skip:46  time:530s
fi-bwr-2160      total:289  pass:183  dwarn:0   dfail:0   fail:0   skip:106 time:266s
fi-bxt-dsi       total:289  pass:259  dwarn:0   dfail:0   fail:0   skip:30  time:494s
fi-bxt-j4205     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:496s
fi-byt-j1900     total:289  pass:253  dwarn:1   dfail:0   fail:0   skip:35  time:489s
fi-byt-n2820     total:289  pass:249  dwarn:1   dfail:0   fail:0   skip:39  time:472s
fi-cfl-s         total:289  pass:253  dwarn:4   dfail:0   fail:0   skip:32  time:551s
fi-elk-e7500     total:289  pass:229  dwarn:0   dfail:0   fail:0   skip:60  time:418s
fi-gdg-551       total:289  pass:178  dwarn:1   dfail:0   fail:1   skip:109 time:250s
fi-glk-1         total:289  pass:261  dwarn:0   dfail:0   fail:0   skip:28  time:581s
fi-hsw-4770      total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:445s
fi-hsw-4770r     total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:428s
fi-ilk-650       total:289  pass:228  dwarn:0   dfail:0   fail:0   skip:61  time:431s
fi-ivb-3520m     total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:493s
fi-ivb-3770      total:289  pass:260  dwarn:0   dfail:0   fail:0   skip:29  time:462s
fi-kbl-7500u     total:289  pass:264  dwarn:1   dfail:0   fail:0   skip:24  time:487s
fi-kbl-7560u     total:289  pass:270  dwarn:0   dfail:0   fail:0   skip:19  time:572s
fi-kbl-7567u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:475s
fi-kbl-r         total:289  pass:262  dwarn:0   dfail:0   fail:0   skip:27  time:582s
fi-pnv-d510      total:289  pass:222  dwarn:1   dfail:0   fail:0   skip:66  time:547s
fi-skl-6260u     total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:450s
fi-skl-6700hq    total:242  pass:217  dwarn:0   dfail:0   fail:0   skip:24 
fi-skl-6700k     total:289  pass:265  dwarn:0   dfail:0   fail:0   skip:24  time:527s
fi-skl-6770hq    total:289  pass:269  dwarn:0   dfail:0   fail:0   skip:20  time:497s
fi-skl-gvtdvm    total:289  pass:266  dwarn:0   dfail:0   fail:0   skip:23  time:455s
fi-snb-2520m     total:289  pass:250  dwarn:0   dfail:0   fail:0   skip:39  time:570s
fi-snb-2600      total:289  pass:249  dwarn:0   dfail:0   fail:0   skip:40  time:417s

87b113da0ae43b97650ddcec6c05ef69469e2107 drm-tip: 2017y-10m-19d-18h-14m-41s UTC integration manifest
742ccf2c2da0 staging: vboxvideo: Use drm_fb_helper_lastclose()
70c0b14c7764 drm/tegra: Use drm_fb_helper_lastclose() and _poll_changed()
6fef91fd7667 drm/rockchip: Use drm_fb_helper_lastclose() and _poll_changed()
0e49f03da2fd drm/radeon: Use drm_fb_helper_lastclose() and _poll_changed()
344ce1a5ea30 drm/omap: Use drm_fb_helper_lastclose() and _poll_changed()
3e04ff4cbc8a drm/nouveau: Use drm_fb_helper_output_poll_changed()
c90505059e8b drm/msm: Use drm_fb_helper_lastclose() and _poll_changed()
dee1ecaeb0a4 drm/i915: Use drm_fb_helper_output_poll_changed()
8566e07a2b26 drm/gma500: Use drm_fb_helper_lastclose() and _poll_changed()
480449dcb8c9 drm/exynos: Use drm_fb_helper_lastclose() and _poll_changed()
b720bee357cf drm/armada: Use drm_fb_helper_lastclose() and _poll_changed()
4e12c87943f2 drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed()
34ce6de2b311 drm/fb-helper: Add .last_close and .output_poll_changed helpers
61ec81d147cf drm: Add drm_device->drm_fb_helper_private pointer
62d16aed8fa6 drm/fb-helper: Handle function NULL argument

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6117/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* ✓ Fi.CI.IGT: success for drm/fb-helper: Add .last_close and .output_poll_changed helpers
  2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
                   ` (15 preceding siblings ...)
  2017-10-19 23:46 ` ✓ Fi.CI.BAT: success for drm/fb-helper: Add .last_close and .output_poll_changed helpers Patchwork
@ 2017-10-20  1:02 ` Patchwork
  16 siblings, 0 replies; 26+ messages in thread
From: Patchwork @ 2017-10-20  1:02 UTC (permalink / raw)
  To: Noralf Trønnes; +Cc: intel-gfx

== Series Details ==

Series: drm/fb-helper: Add .last_close and .output_poll_changed helpers
URL   : https://patchwork.freedesktop.org/series/32332/
State : success

== Summary ==

Test kms_setmode:
        Subgroup basic:
                pass       -> FAIL       (shard-hsw) fdo#99912

fdo#99912 https://bugs.freedesktop.org/show_bug.cgi?id=99912

shard-hsw        total:2540 pass:1429 dwarn:1   dfail:0   fail:9   skip:1101 time:9197s

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6117/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-19 23:02 ` [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer Noralf Trønnes
@ 2017-10-20 13:29   ` Daniel Vetter
  2017-10-20 13:52   ` Ville Syrjälä
  1 sibling, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2017-10-20 13:29 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: jy0922.shim, daniel.vetter, tomi.valkeinen, sw0312.kim,
	dri-devel, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, linux, intel-gfx,
	christian.koenig, mark.yao

On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
> cleared by drm_fb_helper_fini().
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
> 
> This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
> Changes since previous version:
> - Change member name: fbdev -> drm_fb_helper_private
> - Expand docs
> - Set and clear pointer in drm_fb_helper_init/fini()

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

> 
>  drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
>  include/drm/drm_device.h        |  9 +++++++++
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 954cdd48de92..c07b7af8de4c 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
>  	struct drm_mode_config *config = &dev->mode_config;
>  	int i;
>  
> -	if (!drm_fbdev_emulation)
> +	if (!drm_fbdev_emulation) {
> +		dev->drm_fb_helper_private = fb_helper;
>  		return 0;
> +	}
>  
>  	if (!max_conn_count)
>  		return -EINVAL;
> @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
>  		i++;
>  	}
>  
> +	dev->drm_fb_helper_private = fb_helper;
> +
>  	return 0;
>  out_free:
>  	drm_fb_helper_crtc_free(fb_helper);
> @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
>  {
>  	struct fb_info *info;
>  
> -	if (!drm_fbdev_emulation || !fb_helper)
> +	if (!fb_helper)
> +		return;
> +
> +	fb_helper->dev->drm_fb_helper_private = NULL;
> +
> +	if (!drm_fbdev_emulation)
>  		return;
>  
>  	cancel_work_sync(&fb_helper->resume_work);
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
>  	struct drm_vma_offset_manager *vma_offset_manager;
>  	/*@} */
>  	int switch_power_state;
> +
> +	/**
> +	 * @drm_fb_helper_private:
> +	 *
> +	 * Pointer to the fbdev emulation structure.
> +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
> +	 */
> +	struct drm_fb_helper *drm_fb_helper_private;
>  };
>  
>  #endif
> -- 
> 2.14.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-19 23:02 ` [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer Noralf Trønnes
  2017-10-20 13:29   ` Daniel Vetter
@ 2017-10-20 13:52   ` Ville Syrjälä
  2017-10-20 15:44     ` Noralf Trønnes
  1 sibling, 1 reply; 26+ messages in thread
From: Ville Syrjälä @ 2017-10-20 13:52 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: daniel.vetter, intel-gfx, joonas.lahtinen, sw0312.kim, linux,
	dri-devel, hdegoede, kyungmin.park, tomi.valkeinen,
	thierry.reding, bskeggs, rodrigo.vivi, alexander.deucher,
	christian.koenig

On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
> cleared by drm_fb_helper_fini().
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
> 
> This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
> Changes since previous version:
> - Change member name: fbdev -> drm_fb_helper_private
> - Expand docs
> - Set and clear pointer in drm_fb_helper_init/fini()
> 
>  drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
>  include/drm/drm_device.h        |  9 +++++++++
>  2 files changed, 20 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 954cdd48de92..c07b7af8de4c 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
>  	struct drm_mode_config *config = &dev->mode_config;
>  	int i;
>  
> -	if (!drm_fbdev_emulation)
> +	if (!drm_fbdev_emulation) {
> +		dev->drm_fb_helper_private = fb_helper;
>  		return 0;
> +	}
>  
>  	if (!max_conn_count)
>  		return -EINVAL;
> @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
>  		i++;
>  	}
>  
> +	dev->drm_fb_helper_private = fb_helper;
> +
>  	return 0;
>  out_free:
>  	drm_fb_helper_crtc_free(fb_helper);
> @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
>  {
>  	struct fb_info *info;
>  
> -	if (!drm_fbdev_emulation || !fb_helper)
> +	if (!fb_helper)
> +		return;
> +
> +	fb_helper->dev->drm_fb_helper_private = NULL;
> +
> +	if (!drm_fbdev_emulation)
>  		return;
>  
>  	cancel_work_sync(&fb_helper->resume_work);
> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
>  	struct drm_vma_offset_manager *vma_offset_manager;
>  	/*@} */
>  	int switch_power_state;
> +
> +	/**
> +	 * @drm_fb_helper_private:
> +	 *
> +	 * Pointer to the fbdev emulation structure.
> +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
> +	 */
> +	struct drm_fb_helper *drm_fb_helper_private;

Just 'fb_helper' maybe? Not sure what the _private here is supposed to
mean, and drm_ seems very much redundant.

>  };
>  
>  #endif
> -- 
> 2.14.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-20 13:52   ` Ville Syrjälä
@ 2017-10-20 15:44     ` Noralf Trønnes
  2017-10-20 16:00       ` Ville Syrjälä
  0 siblings, 1 reply; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-20 15:44 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: daniel.vetter, intel-gfx, sw0312.kim, linux, dri-devel, hdegoede,
	kyungmin.park, tomi.valkeinen, bskeggs, rodrigo.vivi,
	alexander.deucher, christian.koenig


Den 20.10.2017 15.52, skrev Ville Syrjälä:
> On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
>> cleared by drm_fb_helper_fini().
>>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>> ---
>>
>> This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
>> Changes since previous version:
>> - Change member name: fbdev -> drm_fb_helper_private
>> - Expand docs
>> - Set and clear pointer in drm_fb_helper_init/fini()
>>
>>   drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
>>   include/drm/drm_device.h        |  9 +++++++++
>>   2 files changed, 20 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
>> index 954cdd48de92..c07b7af8de4c 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
>>   	struct drm_mode_config *config = &dev->mode_config;
>>   	int i;
>>   
>> -	if (!drm_fbdev_emulation)
>> +	if (!drm_fbdev_emulation) {
>> +		dev->drm_fb_helper_private = fb_helper;
>>   		return 0;
>> +	}
>>   
>>   	if (!max_conn_count)
>>   		return -EINVAL;
>> @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
>>   		i++;
>>   	}
>>   
>> +	dev->drm_fb_helper_private = fb_helper;
>> +
>>   	return 0;
>>   out_free:
>>   	drm_fb_helper_crtc_free(fb_helper);
>> @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
>>   {
>>   	struct fb_info *info;
>>   
>> -	if (!drm_fbdev_emulation || !fb_helper)
>> +	if (!fb_helper)
>> +		return;
>> +
>> +	fb_helper->dev->drm_fb_helper_private = NULL;
>> +
>> +	if (!drm_fbdev_emulation)
>>   		return;
>>   
>>   	cancel_work_sync(&fb_helper->resume_work);
>> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
>> index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
>>   	struct drm_vma_offset_manager *vma_offset_manager;
>>   	/*@} */
>>   	int switch_power_state;
>> +
>> +	/**
>> +	 * @drm_fb_helper_private:
>> +	 *
>> +	 * Pointer to the fbdev emulation structure.
>> +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
>> +	 */
>> +	struct drm_fb_helper *drm_fb_helper_private;
> Just 'fb_helper' maybe? Not sure what the _private here is supposed to
> mean, and drm_ seems very much redundant.

I first called it fbdev, Daniel suggested fbdev_helper_private, then I
took it all the way and called it drm_fb_helper_private. I believe the
_private part is an indication that this is not part of the core, but a
helper, like drm_plane->helper_private.

fb_helper is the common variable name used in drm_fb_helper (which
really should have been called drm_fbdev_helper imo).

These are the names that drivers use:

     struct amdgpu_fbdev *rfbdev;
     struct drm_fb_helper    *fbdev;
     struct ast_fbdev *fbdev;
     struct drm_fb_helper fb.helper;
     struct cirrus_fbdev        *gfbdev;
     struct drm_fb_helper    fb_helper;
     struct drm_fb_helper *fb_helper;
     void *fbdev;
     struct hibmc_fbdev *fbdev;
     struct mga_fbdev *mfbdev;
     struct drm_fb_helper *fbdev;
     struct nouveau_fbdev *fbcon;
     struct drm_fb_helper *fbdev;
     struct qxl_fbdev *qfbdev;
     struct radeon_fbdev *rfbdev;
     struct drm_fb_helper fbdev_helper;
     struct tegra_fbdev *fbdev;
     struct udl_fbdev *fbdev;
     struct virtio_gpu_fbdev *vgfbdev;
     struct vbox_fbdev *fbdev;

Noralf.

>>   };
>>   
>>   #endif
>> -- 
>> 2.14.2
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-20 15:44     ` Noralf Trønnes
@ 2017-10-20 16:00       ` Ville Syrjälä
  2017-10-20 17:11         ` Noralf Trønnes
  0 siblings, 1 reply; 26+ messages in thread
From: Ville Syrjälä @ 2017-10-20 16:00 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: daniel.vetter, intel-gfx, sw0312.kim, linux, dri-devel, hdegoede,
	kyungmin.park, tomi.valkeinen, bskeggs, rodrigo.vivi,
	alexander.deucher, christian.koenig

On Fri, Oct 20, 2017 at 05:44:15PM +0200, Noralf Trønnes wrote:
> 
> Den 20.10.2017 15.52, skrev Ville Syrjälä:
> > On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
> >> cleared by drm_fb_helper_fini().
> >>
> >> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> >> ---
> >>
> >> This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
> >> Changes since previous version:
> >> - Change member name: fbdev -> drm_fb_helper_private
> >> - Expand docs
> >> - Set and clear pointer in drm_fb_helper_init/fini()
> >>
> >>   drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
> >>   include/drm/drm_device.h        |  9 +++++++++
> >>   2 files changed, 20 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> >> index 954cdd48de92..c07b7af8de4c 100644
> >> --- a/drivers/gpu/drm/drm_fb_helper.c
> >> +++ b/drivers/gpu/drm/drm_fb_helper.c
> >> @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
> >>   	struct drm_mode_config *config = &dev->mode_config;
> >>   	int i;
> >>   
> >> -	if (!drm_fbdev_emulation)
> >> +	if (!drm_fbdev_emulation) {
> >> +		dev->drm_fb_helper_private = fb_helper;
> >>   		return 0;
> >> +	}
> >>   
> >>   	if (!max_conn_count)
> >>   		return -EINVAL;
> >> @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
> >>   		i++;
> >>   	}
> >>   
> >> +	dev->drm_fb_helper_private = fb_helper;
> >> +
> >>   	return 0;
> >>   out_free:
> >>   	drm_fb_helper_crtc_free(fb_helper);
> >> @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
> >>   {
> >>   	struct fb_info *info;
> >>   
> >> -	if (!drm_fbdev_emulation || !fb_helper)
> >> +	if (!fb_helper)
> >> +		return;
> >> +
> >> +	fb_helper->dev->drm_fb_helper_private = NULL;
> >> +
> >> +	if (!drm_fbdev_emulation)
> >>   		return;
> >>   
> >>   	cancel_work_sync(&fb_helper->resume_work);
> >> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> >> index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
> >>   	struct drm_vma_offset_manager *vma_offset_manager;
> >>   	/*@} */
> >>   	int switch_power_state;
> >> +
> >> +	/**
> >> +	 * @drm_fb_helper_private:
> >> +	 *
> >> +	 * Pointer to the fbdev emulation structure.
> >> +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
> >> +	 */
> >> +	struct drm_fb_helper *drm_fb_helper_private;
> > Just 'fb_helper' maybe? Not sure what the _private here is supposed to
> > mean, and drm_ seems very much redundant.
> 
> I first called it fbdev, Daniel suggested fbdev_helper_private, then I
> took it all the way and called it drm_fb_helper_private. I believe the
> _private part is an indication that this is not part of the core, but a
> helper, like drm_plane->helper_private.

IMO those we should rename to helper_funcs since that's what they always
are. IIRC they used to be void* and then the _private made more sense to
me since you couldn't directly know what they were pointing at.

To me _private means that it's totally up to driver to specify what to
put there (eg. like we have private_flags in the mode structure).

And I believe the "helper" part in "fb_helper" should be enough of a hint
to anyone that this has something to do with a helper ;)

> 
> fb_helper is the common variable name used in drm_fb_helper (which
> really should have been called drm_fbdev_helper imo).

Yeah. On a first glance one might think drm_fb_helper has something
to do with drm_framebuffers.

> 
> These are the names that drivers use:
> 
>      struct amdgpu_fbdev *rfbdev;
>      struct drm_fb_helper    *fbdev;
>      struct ast_fbdev *fbdev;
>      struct drm_fb_helper fb.helper;
>      struct cirrus_fbdev        *gfbdev;
>      struct drm_fb_helper    fb_helper;
>      struct drm_fb_helper *fb_helper;
>      void *fbdev;
>      struct hibmc_fbdev *fbdev;
>      struct mga_fbdev *mfbdev;
>      struct drm_fb_helper *fbdev;
>      struct nouveau_fbdev *fbcon;
>      struct drm_fb_helper *fbdev;
>      struct qxl_fbdev *qfbdev;
>      struct radeon_fbdev *rfbdev;
>      struct drm_fb_helper fbdev_helper;
>      struct tegra_fbdev *fbdev;
>      struct udl_fbdev *fbdev;
>      struct virtio_gpu_fbdev *vgfbdev;
>      struct vbox_fbdev *fbdev;
> 
> Noralf.
> 
> >>   };
> >>   
> >>   #endif
> >> -- 
> >> 2.14.2
> >>
> >> _______________________________________________
> >> dri-devel mailing list
> >> dri-devel@lists.freedesktop.org
> >> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-20 16:00       ` Ville Syrjälä
@ 2017-10-20 17:11         ` Noralf Trønnes
  2017-10-30  9:25           ` Daniel Vetter
  0 siblings, 1 reply; 26+ messages in thread
From: Noralf Trønnes @ 2017-10-20 17:11 UTC (permalink / raw)
  To: Ville Syrjälä
  Cc: daniel.vetter, intel-gfx, sw0312.kim, linux, dri-devel, hdegoede,
	kyungmin.park, tomi.valkeinen, bskeggs, rodrigo.vivi,
	alexander.deucher, christian.koenig


Den 20.10.2017 18.00, skrev Ville Syrjälä:
> On Fri, Oct 20, 2017 at 05:44:15PM +0200, Noralf Trønnes wrote:
>> Den 20.10.2017 15.52, skrev Ville Syrjälä:
>>> On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
>>>> cleared by drm_fb_helper_fini().
>>>>
>>>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
>>>> ---
>>>>
>>>> This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
>>>> Changes since previous version:
>>>> - Change member name: fbdev -> drm_fb_helper_private
>>>> - Expand docs
>>>> - Set and clear pointer in drm_fb_helper_init/fini()
>>>>
>>>>    drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
>>>>    include/drm/drm_device.h        |  9 +++++++++
>>>>    2 files changed, 20 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
>>>> index 954cdd48de92..c07b7af8de4c 100644
>>>> --- a/drivers/gpu/drm/drm_fb_helper.c
>>>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>>>> @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
>>>>    	struct drm_mode_config *config = &dev->mode_config;
>>>>    	int i;
>>>>    
>>>> -	if (!drm_fbdev_emulation)
>>>> +	if (!drm_fbdev_emulation) {
>>>> +		dev->drm_fb_helper_private = fb_helper;
>>>>    		return 0;
>>>> +	}
>>>>    
>>>>    	if (!max_conn_count)
>>>>    		return -EINVAL;
>>>> @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
>>>>    		i++;
>>>>    	}
>>>>    
>>>> +	dev->drm_fb_helper_private = fb_helper;
>>>> +
>>>>    	return 0;
>>>>    out_free:
>>>>    	drm_fb_helper_crtc_free(fb_helper);
>>>> @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
>>>>    {
>>>>    	struct fb_info *info;
>>>>    
>>>> -	if (!drm_fbdev_emulation || !fb_helper)
>>>> +	if (!fb_helper)
>>>> +		return;
>>>> +
>>>> +	fb_helper->dev->drm_fb_helper_private = NULL;
>>>> +
>>>> +	if (!drm_fbdev_emulation)
>>>>    		return;
>>>>    
>>>>    	cancel_work_sync(&fb_helper->resume_work);
>>>> diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
>>>> index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
>>>>    	struct drm_vma_offset_manager *vma_offset_manager;
>>>>    	/*@} */
>>>>    	int switch_power_state;
>>>> +
>>>> +	/**
>>>> +	 * @drm_fb_helper_private:
>>>> +	 *
>>>> +	 * Pointer to the fbdev emulation structure.
>>>> +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
>>>> +	 */
>>>> +	struct drm_fb_helper *drm_fb_helper_private;
>>> Just 'fb_helper' maybe? Not sure what the _private here is supposed to
>>> mean, and drm_ seems very much redundant.
>> I first called it fbdev, Daniel suggested fbdev_helper_private, then I
>> took it all the way and called it drm_fb_helper_private. I believe the
>> _private part is an indication that this is not part of the core, but a
>> helper, like drm_plane->helper_private.
> IMO those we should rename to helper_funcs since that's what they always
> are. IIRC they used to be void* and then the _private made more sense to
> me since you couldn't directly know what they were pointing at.
>
> To me _private means that it's totally up to driver to specify what to
> put there (eg. like we have private_flags in the mode structure).
>
> And I believe the "helper" part in "fb_helper" should be enough of a hint
> to anyone that this has something to do with a helper ;)

Daniel, do you have any objections to calling it: fb_helper?

Noralf.

>> fb_helper is the common variable name used in drm_fb_helper (which
>> really should have been called drm_fbdev_helper imo).
> Yeah. On a first glance one might think drm_fb_helper has something
> to do with drm_framebuffers.
>
>> These are the names that drivers use:
>>
>>       struct amdgpu_fbdev *rfbdev;
>>       struct drm_fb_helper    *fbdev;
>>       struct ast_fbdev *fbdev;
>>       struct drm_fb_helper fb.helper;
>>       struct cirrus_fbdev        *gfbdev;
>>       struct drm_fb_helper    fb_helper;
>>       struct drm_fb_helper *fb_helper;
>>       void *fbdev;
>>       struct hibmc_fbdev *fbdev;
>>       struct mga_fbdev *mfbdev;
>>       struct drm_fb_helper *fbdev;
>>       struct nouveau_fbdev *fbcon;
>>       struct drm_fb_helper *fbdev;
>>       struct qxl_fbdev *qfbdev;
>>       struct radeon_fbdev *rfbdev;
>>       struct drm_fb_helper fbdev_helper;
>>       struct tegra_fbdev *fbdev;
>>       struct udl_fbdev *fbdev;
>>       struct virtio_gpu_fbdev *vgfbdev;
>>       struct vbox_fbdev *fbdev;
>>
>> Noralf.
>>
>>>>    };
>>>>    
>>>>    #endif
>>>> -- 
>>>> 2.14.2
>>>>
>>>> _______________________________________________
>>>> dri-devel mailing list
>>>> dri-devel@lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose()
  2017-10-19 23:02 ` [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose() Noralf Trønnes
@ 2017-10-23  6:43   ` Hans de Goede
  0 siblings, 0 replies; 26+ messages in thread
From: Hans de Goede @ 2017-10-23  6:43 UTC (permalink / raw)
  To: Noralf Trønnes, dri-devel
  Cc: jy0922.shim, daniel.vetter, tomi.valkeinen, sw0312.kim, inki.dae,
	kyungmin.park, bskeggs, rodrigo.vivi, alexander.deucher, linux,
	intel-gfx, christian.koenig, mark.yao

HI,

On 20-10-17 01:02, Noralf Trønnes wrote:
> This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
> 
> Cc: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Thank you for doing this, looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>   drivers/staging/vboxvideo/vbox_drv.c  |  2 +-
>   drivers/staging/vboxvideo/vbox_drv.h  |  1 -
>   drivers/staging/vboxvideo/vbox_main.c | 12 ------------
>   3 files changed, 1 insertion(+), 14 deletions(-)
> 
> diff --git a/drivers/staging/vboxvideo/vbox_drv.c b/drivers/staging/vboxvideo/vbox_drv.c
> index e18642e5027e..a4d8d7898e3d 100644
> --- a/drivers/staging/vboxvideo/vbox_drv.c
> +++ b/drivers/staging/vboxvideo/vbox_drv.c
> @@ -229,7 +229,7 @@ static struct drm_driver driver = {
>   
>   	.load = vbox_driver_load,
>   	.unload = vbox_driver_unload,
> -	.lastclose = vbox_driver_lastclose,
> +	.lastclose = drm_fb_helper_lastclose,
>   	.master_set = vbox_master_set,
>   	.master_drop = vbox_master_drop,
>   
> diff --git a/drivers/staging/vboxvideo/vbox_drv.h b/drivers/staging/vboxvideo/vbox_drv.h
> index 4b9302703b36..7273d7e9bc9b 100644
> --- a/drivers/staging/vboxvideo/vbox_drv.h
> +++ b/drivers/staging/vboxvideo/vbox_drv.h
> @@ -128,7 +128,6 @@ struct vbox_private {
>   
>   int vbox_driver_load(struct drm_device *dev, unsigned long flags);
>   void vbox_driver_unload(struct drm_device *dev);
> -void vbox_driver_lastclose(struct drm_device *dev);
>   
>   struct vbox_gem_object;
>   
> diff --git a/drivers/staging/vboxvideo/vbox_main.c b/drivers/staging/vboxvideo/vbox_main.c
> index 80bd039fa08e..c3d756620fd5 100644
> --- a/drivers/staging/vboxvideo/vbox_main.c
> +++ b/drivers/staging/vboxvideo/vbox_main.c
> @@ -421,18 +421,6 @@ void vbox_driver_unload(struct drm_device *dev)
>   	vbox_hw_fini(vbox);
>   }
>   
> -/**
> - * @note this is described in the DRM framework documentation.  AST does not
> - * have it, but we get an oops on driver unload if it is not present.
> - */
> -void vbox_driver_lastclose(struct drm_device *dev)
> -{
> -	struct vbox_private *vbox = dev->dev_private;
> -
> -	if (vbox->fbdev)
> -		drm_fb_helper_restore_fbdev_mode_unlocked(&vbox->fbdev->helper);
> -}
> -
>   int vbox_gem_create(struct drm_device *dev,
>   		    u32 size, bool iskernel, struct drm_gem_object **obj)
>   {
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 05/15] drm/armada: Use drm_fb_helper_lastclose() and _poll_changed()
  2017-10-19 23:02 ` [PATCH 05/15] drm/armada: " Noralf Trønnes
@ 2017-10-23 10:10   ` Russell King - ARM Linux
  0 siblings, 0 replies; 26+ messages in thread
From: Russell King - ARM Linux @ 2017-10-23 10:10 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: jy0922.shim, daniel.vetter, tomi.valkeinen, sw0312.kim,
	dri-devel, inki.dae, hdegoede, kyungmin.park, bskeggs,
	rodrigo.vivi, alexander.deucher, intel-gfx, christian.koenig,
	mark.yao

On Fri, Oct 20, 2017 at 01:02:03AM +0200, Noralf Trønnes wrote:
> This driver can use drm_fb_helper_lastclose() as its .lastclose callback.
> It can also use drm_fb_helper_output_poll_changed() as its
> .output_poll_changed callback.
> 
> Cc: Russell King <linux@armlinux.org.uk>

Acked-by: Russell King <rmk+kernel@armlinux.org.uk>

Thanks.

> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  drivers/gpu/drm/armada/armada_drm.h   |  1 -
>  drivers/gpu/drm/armada/armada_drv.c   |  8 ++------
>  drivers/gpu/drm/armada/armada_fb.c    | 11 +----------
>  drivers/gpu/drm/armada/armada_fbdev.c |  8 --------
>  4 files changed, 3 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/gpu/drm/armada/armada_drm.h b/drivers/gpu/drm/armada/armada_drm.h
> index b064879ecdbd..cc4c557c9f66 100644
> --- a/drivers/gpu/drm/armada/armada_drm.h
> +++ b/drivers/gpu/drm/armada/armada_drm.h
> @@ -84,7 +84,6 @@ void armada_drm_queue_unref_work(struct drm_device *,
>  extern const struct drm_mode_config_funcs armada_drm_mode_config_funcs;
>  
>  int armada_fbdev_init(struct drm_device *);
> -void armada_fbdev_lastclose(struct drm_device *);
>  void armada_fbdev_fini(struct drm_device *);
>  
>  int armada_overlay_plane_create(struct drm_device *, unsigned long);
> diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
> index e857b88a9799..4b11b6b52f1d 100644
> --- a/drivers/gpu/drm/armada/armada_drv.c
> +++ b/drivers/gpu/drm/armada/armada_drv.c
> @@ -10,6 +10,7 @@
>  #include <linux/module.h>
>  #include <linux/of_graph.h>
>  #include <drm/drm_crtc_helper.h>
> +#include <drm/drm_fb_helper.h>
>  #include <drm/drm_of.h>
>  #include "armada_crtc.h"
>  #include "armada_drm.h"
> @@ -54,15 +55,10 @@ static struct drm_ioctl_desc armada_ioctls[] = {
>  	DRM_IOCTL_DEF_DRV(ARMADA_GEM_PWRITE, armada_gem_pwrite_ioctl, 0),
>  };
>  
> -static void armada_drm_lastclose(struct drm_device *dev)
> -{
> -	armada_fbdev_lastclose(dev);
> -}
> -
>  DEFINE_DRM_GEM_FOPS(armada_drm_fops);
>  
>  static struct drm_driver armada_drm_driver = {
> -	.lastclose		= armada_drm_lastclose,
> +	.lastclose		= drm_fb_helper_lastclose,
>  	.gem_free_object_unlocked = armada_gem_free_object,
>  	.prime_handle_to_fd	= drm_gem_prime_handle_to_fd,
>  	.prime_fd_to_handle	= drm_gem_prime_fd_to_handle,
> diff --git a/drivers/gpu/drm/armada/armada_fb.c b/drivers/gpu/drm/armada/armada_fb.c
> index a38d5a0892a9..ac92bce07ecd 100644
> --- a/drivers/gpu/drm/armada/armada_fb.c
> +++ b/drivers/gpu/drm/armada/armada_fb.c
> @@ -154,16 +154,7 @@ static struct drm_framebuffer *armada_fb_create(struct drm_device *dev,
>  	return ERR_PTR(ret);
>  }
>  
> -static void armada_output_poll_changed(struct drm_device *dev)
> -{
> -	struct armada_private *priv = dev->dev_private;
> -	struct drm_fb_helper *fbh = priv->fbdev;
> -
> -	if (fbh)
> -		drm_fb_helper_hotplug_event(fbh);
> -}
> -
>  const struct drm_mode_config_funcs armada_drm_mode_config_funcs = {
>  	.fb_create		= armada_fb_create,
> -	.output_poll_changed	= armada_output_poll_changed,
> +	.output_poll_changed	= drm_fb_helper_output_poll_changed,
>  };
> diff --git a/drivers/gpu/drm/armada/armada_fbdev.c b/drivers/gpu/drm/armada/armada_fbdev.c
> index a2ce83f84800..2a59db0994b2 100644
> --- a/drivers/gpu/drm/armada/armada_fbdev.c
> +++ b/drivers/gpu/drm/armada/armada_fbdev.c
> @@ -159,14 +159,6 @@ int armada_fbdev_init(struct drm_device *dev)
>  	return ret;
>  }
>  
> -void armada_fbdev_lastclose(struct drm_device *dev)
> -{
> -	struct armada_private *priv = dev->dev_private;
> -
> -	if (priv->fbdev)
> -		drm_fb_helper_restore_fbdev_mode_unlocked(priv->fbdev);
> -}
> -
>  void armada_fbdev_fini(struct drm_device *dev)
>  {
>  	struct armada_private *priv = dev->dev_private;
> -- 
> 2.14.2
> 

-- 
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 8.8Mbps down 630kbps up
According to speedtest.net: 8.21Mbps down 510kbps up
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 26+ messages in thread

* Re: [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer
  2017-10-20 17:11         ` Noralf Trønnes
@ 2017-10-30  9:25           ` Daniel Vetter
  0 siblings, 0 replies; 26+ messages in thread
From: Daniel Vetter @ 2017-10-30  9:25 UTC (permalink / raw)
  To: Noralf Trønnes
  Cc: daniel.vetter, intel-gfx, joonas.lahtinen, sw0312.kim, linux,
	dri-devel, hdegoede, kyungmin.park, tomi.valkeinen,
	thierry.reding, bskeggs, rodrigo.vivi, alexander.deucher,
	christian.koenig

On Fri, Oct 20, 2017 at 07:11:18PM +0200, Noralf Trønnes wrote:
> 
> Den 20.10.2017 18.00, skrev Ville Syrjälä:
> > On Fri, Oct 20, 2017 at 05:44:15PM +0200, Noralf Trønnes wrote:
> > > Den 20.10.2017 15.52, skrev Ville Syrjälä:
> > > > On Fri, Oct 20, 2017 at 01:02:00AM +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. The pointer is set by drm_fb_helper_init() and
> > > > > cleared by drm_fb_helper_fini().
> > > > > 
> > > > > Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> > > > > ---
> > > > > 
> > > > > This patch was initially part of the patchset: drm/tinydrm: Use vmalloc BO
> > > > > Changes since previous version:
> > > > > - Change member name: fbdev -> drm_fb_helper_private
> > > > > - Expand docs
> > > > > - Set and clear pointer in drm_fb_helper_init/fini()
> > > > > 
> > > > >    drivers/gpu/drm/drm_fb_helper.c | 13 +++++++++++--
> > > > >    include/drm/drm_device.h        |  9 +++++++++
> > > > >    2 files changed, 20 insertions(+), 2 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> > > > > index 954cdd48de92..c07b7af8de4c 100644
> > > > > --- a/drivers/gpu/drm/drm_fb_helper.c
> > > > > +++ b/drivers/gpu/drm/drm_fb_helper.c
> > > > > @@ -799,8 +799,10 @@ int drm_fb_helper_init(struct drm_device *dev,
> > > > >    	struct drm_mode_config *config = &dev->mode_config;
> > > > >    	int i;
> > > > > -	if (!drm_fbdev_emulation)
> > > > > +	if (!drm_fbdev_emulation) {
> > > > > +		dev->drm_fb_helper_private = fb_helper;
> > > > >    		return 0;
> > > > > +	}
> > > > >    	if (!max_conn_count)
> > > > >    		return -EINVAL;
> > > > > @@ -835,6 +837,8 @@ int drm_fb_helper_init(struct drm_device *dev,
> > > > >    		i++;
> > > > >    	}
> > > > > +	dev->drm_fb_helper_private = fb_helper;
> > > > > +
> > > > >    	return 0;
> > > > >    out_free:
> > > > >    	drm_fb_helper_crtc_free(fb_helper);
> > > > > @@ -913,7 +917,12 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
> > > > >    {
> > > > >    	struct fb_info *info;
> > > > > -	if (!drm_fbdev_emulation || !fb_helper)
> > > > > +	if (!fb_helper)
> > > > > +		return;
> > > > > +
> > > > > +	fb_helper->dev->drm_fb_helper_private = NULL;
> > > > > +
> > > > > +	if (!drm_fbdev_emulation)
> > > > >    		return;
> > > > >    	cancel_work_sync(&fb_helper->resume_work);
> > > > > diff --git a/include/drm/drm_device.h b/include/drm/drm_device.h
> > > > > index e21af87a2f3c..6b26262658ae 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,14 @@ struct drm_device {
> > > > >    	struct drm_vma_offset_manager *vma_offset_manager;
> > > > >    	/*@} */
> > > > >    	int switch_power_state;
> > > > > +
> > > > > +	/**
> > > > > +	 * @drm_fb_helper_private:
> > > > > +	 *
> > > > > +	 * Pointer to the fbdev emulation structure.
> > > > > +	 * Set by drm_fb_helper_init() and cleared by drm_fb_helper_fini().
> > > > > +	 */
> > > > > +	struct drm_fb_helper *drm_fb_helper_private;
> > > > Just 'fb_helper' maybe? Not sure what the _private here is supposed to
> > > > mean, and drm_ seems very much redundant.
> > > I first called it fbdev, Daniel suggested fbdev_helper_private, then I
> > > took it all the way and called it drm_fb_helper_private. I believe the
> > > _private part is an indication that this is not part of the core, but a
> > > helper, like drm_plane->helper_private.
> > IMO those we should rename to helper_funcs since that's what they always
> > are. IIRC they used to be void* and then the _private made more sense to
> > me since you couldn't directly know what they were pointing at.
> > 
> > To me _private means that it's totally up to driver to specify what to
> > put there (eg. like we have private_flags in the mode structure).
> > 
> > And I believe the "helper" part in "fb_helper" should be enough of a hint
> > to anyone that this has something to do with a helper ;)
> 
> Daniel, do you have any objections to calling it: fb_helper?

I retract my bikeshed, looks like you&Ville are much more informed :-)
-Daniel

> 
> Noralf.
> 
> > > fb_helper is the common variable name used in drm_fb_helper (which
> > > really should have been called drm_fbdev_helper imo).
> > Yeah. On a first glance one might think drm_fb_helper has something
> > to do with drm_framebuffers.
> > 
> > > These are the names that drivers use:
> > > 
> > >       struct amdgpu_fbdev *rfbdev;
> > >       struct drm_fb_helper    *fbdev;
> > >       struct ast_fbdev *fbdev;
> > >       struct drm_fb_helper fb.helper;
> > >       struct cirrus_fbdev        *gfbdev;
> > >       struct drm_fb_helper    fb_helper;
> > >       struct drm_fb_helper *fb_helper;
> > >       void *fbdev;
> > >       struct hibmc_fbdev *fbdev;
> > >       struct mga_fbdev *mfbdev;
> > >       struct drm_fb_helper *fbdev;
> > >       struct nouveau_fbdev *fbcon;
> > >       struct drm_fb_helper *fbdev;
> > >       struct qxl_fbdev *qfbdev;
> > >       struct radeon_fbdev *rfbdev;
> > >       struct drm_fb_helper fbdev_helper;
> > >       struct tegra_fbdev *fbdev;
> > >       struct udl_fbdev *fbdev;
> > >       struct virtio_gpu_fbdev *vgfbdev;
> > >       struct vbox_fbdev *fbdev;
> > > 
> > > Noralf.
> > > 
> > > > >    };
> > > > >    #endif
> > > > > -- 
> > > > > 2.14.2
> > > > > 
> > > > > _______________________________________________
> > > > > dri-devel mailing list
> > > > > dri-devel@lists.freedesktop.org
> > > > > https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2017-10-30  9:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-19 23:01 [PATCH 00/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
2017-10-19 23:01 ` [PATCH 01/15] drm/fb-helper: Handle function NULL argument Noralf Trønnes
2017-10-19 23:02 ` [PATCH 02/15] drm: Add drm_device->drm_fb_helper_private pointer Noralf Trønnes
2017-10-20 13:29   ` Daniel Vetter
2017-10-20 13:52   ` Ville Syrjälä
2017-10-20 15:44     ` Noralf Trønnes
2017-10-20 16:00       ` Ville Syrjälä
2017-10-20 17:11         ` Noralf Trønnes
2017-10-30  9:25           ` Daniel Vetter
2017-10-19 23:02 ` [PATCH 03/15] drm/fb-helper: Add .last_close and .output_poll_changed helpers Noralf Trønnes
2017-10-19 23:02 ` [PATCH 04/15] drm/amdgpu: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-19 23:02 ` [PATCH 05/15] drm/armada: " Noralf Trønnes
2017-10-23 10:10   ` Russell King - ARM Linux
2017-10-19 23:02 ` [PATCH 06/15] drm/exynos: " Noralf Trønnes
2017-10-19 23:02 ` [PATCH 07/15] drm/gma500: " Noralf Trønnes
2017-10-19 23:02 ` [PATCH 08/15] drm/i915: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
2017-10-19 23:02 ` [PATCH 09/15] drm/msm: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-19 23:02 ` [PATCH 10/15] drm/nouveau: Use drm_fb_helper_output_poll_changed() Noralf Trønnes
2017-10-19 23:02 ` [PATCH 11/15] drm/omap: Use drm_fb_helper_lastclose() and _poll_changed() Noralf Trønnes
2017-10-19 23:02 ` [PATCH 12/15] drm/radeon: " Noralf Trønnes
2017-10-19 23:02 ` [PATCH 13/15] drm/rockchip: " Noralf Trønnes
2017-10-19 23:02 ` [PATCH 14/15] drm/tegra: " Noralf Trønnes
2017-10-19 23:02 ` [PATCH 15/15] staging: vboxvideo: Use drm_fb_helper_lastclose() Noralf Trønnes
2017-10-23  6:43   ` Hans de Goede
2017-10-19 23:46 ` ✓ Fi.CI.BAT: success for drm/fb-helper: Add .last_close and .output_poll_changed helpers Patchwork
2017-10-20  1:02 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.