Skip to contentSkip to conversation

drm: Remove drm_fbdev_cma_set_suspend()

PATCH In review Souptick Joarder 2 participants 3 messages Jul 30, 2018 – Aug 6, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: Remove drm_fbdev_cma_set_suspend()

drm_fbdev_cma_set_suspend() is not getting called from any other places. If there is no plan to use it in future we can remove this API.

---
 drivers/gpu/drm/drm_fb_cma_helper.c | 15 ---------------
 include/drm/drm_fb_cma_helper.h     |  1 -
 2 files changed, 16 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +0 -15
index 186d00a..4c283d9 100644
@@ -516,21 +516,6 @@ void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma)
 EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
 
 /**
- * drm_fbdev_cma_set_suspend - wrapper around drm_fb_helper_set_suspend
- * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
- * @state: desired state, zero to resume, non-zero to suspend
- *
- * Calls drm_fb_helper_set_suspend, which is a wrapper around
- * fb_set_suspend implemented by fbdev core.
- */
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state)
-{
-	if (fbdev_cma)
-		drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
-}
-EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);
-
-/**
  * drm_fbdev_cma_set_suspend_unlocked - wrapper around
  *                                      drm_fb_helper_set_suspend_unlocked
  * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
include/drm/drm_fb_cma_helper.h +0 -1
index d532f88a..52f09dc 100644
@@ -32,7 +32,6 @@ struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
 
 void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
 void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
 void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
 					bool state);
 
Signature · 1 line
1.9.1
#1 lore raw
Quoted 6 lines · Souptick Joarder

drm_fbdev_cma_set_suspend() is not getting called from any other places. If there is no plan to use it in future we can remove this API.

---

Any comment on this patch ?

Quoted 45 lines
 drivers/gpu/drm/drm_fb_cma_helper.c | 15 ---------------
 include/drm/drm_fb_cma_helper.h     |  1 -
 2 files changed, 16 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +0 -15
index 186d00a..4c283d9 100644
@@ -516,21 +516,6 @@ void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma)
 EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
 
 /**
- * drm_fbdev_cma_set_suspend - wrapper around drm_fb_helper_set_suspend
- * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
- * @state: desired state, zero to resume, non-zero to suspend
- *
- * Calls drm_fb_helper_set_suspend, which is a wrapper around
- * fb_set_suspend implemented by fbdev core.
- */
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state)
-{
-       if (fbdev_cma)
-               drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
-}
-EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);
-
-/**
  * drm_fbdev_cma_set_suspend_unlocked - wrapper around
  *                                      drm_fb_helper_set_suspend_unlocked
  * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
include/drm/drm_fb_cma_helper.h +0 -2
index d532f88a..52f09dc 100644
@@ -32,7 +32,6 @@ struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
 
 void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
 void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
 void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
                                        bool state);
 
--

1.9.1

#2 lore raw
In reply to Souptick Joarder
Quoted 5 lines · Souptick Joarder

drm_fbdev_cma_set_suspend() is not getting called from any other places. If there is no plan to use it in future we can remove this API.

cma version of fbdev helpers are indeed getting subsumed by fbdev helpers at large, so this makes sense I think.

Applied for 4.20, thanks for your patch.
-Daniel

Quoted 50 lines
---
 drivers/gpu/drm/drm_fb_cma_helper.c | 15 ---------------
 include/drm/drm_fb_cma_helper.h     |  1 -
 2 files changed, 16 deletions(-)
drivers/gpu/drm/drm_fb_cma_helper.c +0 -15
index 186d00a..4c283d9 100644
@@ -516,21 +516,6 @@ void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma)
 EXPORT_SYMBOL_GPL(drm_fbdev_cma_hotplug_event);
 
 /**
- * drm_fbdev_cma_set_suspend - wrapper around drm_fb_helper_set_suspend
- * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
- * @state: desired state, zero to resume, non-zero to suspend
- *
- * Calls drm_fb_helper_set_suspend, which is a wrapper around
- * fb_set_suspend implemented by fbdev core.
- */
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state)
-{
-	if (fbdev_cma)
-		drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
-}
-EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);
-
-/**
  * drm_fbdev_cma_set_suspend_unlocked - wrapper around
  *                                      drm_fb_helper_set_suspend_unlocked
  * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
include/drm/drm_fb_cma_helper.h +0 -1
index d532f88a..52f09dc 100644
@@ -32,7 +32,6 @@ struct drm_fbdev_cma *drm_fbdev_cma_init(struct drm_device *dev,
 
 void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
 void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
-void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, bool state);
 void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
 					bool state);
 
Signature · 6 lines
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel