linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/9] drm: remove deprecated functions
@ 2018-11-15 22:16 Fernando Ramos
  2018-11-15 22:16 ` [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked" Fernando Ramos
                   ` (9 more replies)
  0 siblings, 10 replies; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

Hi all,

One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
"switch from reference/unreference to get/put". That's what this patch series is
about.

In the past year or so most of the functions had already been renamed and only a
few remained, which are the ones I fix here.

In addition, now that all calls to these deprecated functions are gone, this
patch also removes their implementation and the coccinelle script that takes
care of them (which is no longer needed).

Anyway, this is my first patch and I'm sure I've done something wrong. Please
let me know :)

Fernando Ramos (9):
  drm: replace "drm_gem_object_unreference_unlocked" function with
    "*put_unlocked"
  drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]"
    functions
  drm: replace "drm_dev_unref" function with "drm_dev_put"
  drm: remove deprecated "drm_dev_unref" function
  drm: replace "drm_connector_unreference" with "drm_connector_put"
  drm: remove deprecated "drm_connector_[un]reference" functions
  drm: remove deprecated "drm_framebuffer_[un]reference" functions
  drm: remove no longer needed drm-get-put coccinelle script
  docs: drm: remove no longer relevant TODO entry

 Documentation/gpu/todo.rst                   | 17 -----
 drivers/gpu/drm/arc/arcpgu_drv.c             |  4 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |  4 +-
 drivers/gpu/drm/bochs/bochs_mm.c             |  4 +-
 drivers/gpu/drm/bridge/tc358764.c            |  2 +-
 drivers/gpu/drm/drm_drv.c                    | 13 ----
 drivers/gpu/drm/etnaviv/etnaviv_drv.c        |  4 +-
 drivers/gpu/drm/mxsfb/mxsfb_drv.c            |  4 +-
 drivers/gpu/drm/rcar-du/rcar_du_drv.c        |  2 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c     |  4 +-
 drivers/gpu/drm/tve200/tve200_drv.c          |  4 +-
 drivers/gpu/drm/zte/zx_drm_drv.c             |  4 +-
 include/drm/drm_connector.h                  | 24 ------
 include/drm/drm_drv.h                        |  1 -
 include/drm/drm_framebuffer.h                | 24 ------
 include/drm/drm_gem.h                        | 50 -------------
 scripts/coccinelle/api/drm-get-put.cocci     | 78 --------------------
 17 files changed, 18 insertions(+), 225 deletions(-)
 delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci

-- 
2.19.1


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

* [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked"
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:38   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions Fernando Ramos
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

This patch unifies the naming of DRM functions for reference counting as
requested on Documentation/gpu/todo.rst

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 drivers/gpu/drm/bochs/bochs_mm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c
index a61c1ecb2bdc..e6ccf7fa92d4 100644
--- a/drivers/gpu/drm/bochs/bochs_mm.c
+++ b/drivers/gpu/drm/bochs/bochs_mm.c
@@ -414,7 +414,7 @@ int bochs_dumb_create(struct drm_file *file, struct drm_device *dev,
 		return ret;
 
 	ret = drm_gem_handle_create(file, gobj, &handle);
-	drm_gem_object_unreference_unlocked(gobj);
+	drm_gem_object_put_unlocked(gobj);
 	if (ret)
 		return ret;
 
@@ -454,6 +454,6 @@ int bochs_dumb_mmap_offset(struct drm_file *file, struct drm_device *dev,
 	bo = gem_to_bochs_bo(obj);
 	*offset = bochs_bo_mmap_offset(bo);
 
-	drm_gem_object_unreference_unlocked(obj);
+	drm_gem_object_put_unlocked(obj);
 	return 0;
 }
-- 
2.19.1


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

* [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
  2018-11-15 22:16 ` [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked" Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:38   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

There are no more places where these (deprecated) functions are being
used from, thus they can now be removed.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 include/drm/drm_gem.h | 50 -------------------------------------------
 1 file changed, 50 deletions(-)

diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h
index 3583b98a1718..daa34328b5be 100644
--- a/include/drm/drm_gem.h
+++ b/include/drm/drm_gem.h
@@ -222,56 +222,6 @@ __drm_gem_object_put(struct drm_gem_object *obj)
 void drm_gem_object_put_unlocked(struct drm_gem_object *obj);
 void drm_gem_object_put(struct drm_gem_object *obj);
 
-/**
- * drm_gem_object_reference - acquire a GEM buffer object reference
- * @obj: GEM buffer object
- *
- * This is a compatibility alias for drm_gem_object_get() and should not be
- * used by new code.
- */
-static inline void drm_gem_object_reference(struct drm_gem_object *obj)
-{
-	drm_gem_object_get(obj);
-}
-
-/**
- * __drm_gem_object_unreference - raw function to release a GEM buffer object
- *                                reference
- * @obj: GEM buffer object
- *
- * This is a compatibility alias for __drm_gem_object_put() and should not be
- * used by new code.
- */
-static inline void __drm_gem_object_unreference(struct drm_gem_object *obj)
-{
-	__drm_gem_object_put(obj);
-}
-
-/**
- * drm_gem_object_unreference_unlocked - release a GEM buffer object reference
- * @obj: GEM buffer object
- *
- * This is a compatibility alias for drm_gem_object_put_unlocked() and should
- * not be used by new code.
- */
-static inline void
-drm_gem_object_unreference_unlocked(struct drm_gem_object *obj)
-{
-	drm_gem_object_put_unlocked(obj);
-}
-
-/**
- * drm_gem_object_unreference - release a GEM buffer object reference
- * @obj: GEM buffer object
- *
- * This is a compatibility alias for drm_gem_object_put() and should not be
- * used by new code.
- */
-static inline void drm_gem_object_unreference(struct drm_gem_object *obj)
-{
-	drm_gem_object_put(obj);
-}
-
 int drm_gem_handle_create(struct drm_file *file_priv,
 			  struct drm_gem_object *obj,
 			  u32 *handlep);
-- 
2.19.1


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

* [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
  2018-11-15 22:16 ` [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked" Fernando Ramos
  2018-11-15 22:16 ` [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-15 23:00   ` Boris Brezillon
                     ` (4 more replies)
  2018-11-15 22:16 ` [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function Fernando Ramos
                   ` (6 subsequent siblings)
  9 siblings, 5 replies; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

This patch unifies the naming of DRM functions for reference counting as
requested on Documentation/gpu/todo.rst

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
 drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--
 drivers/gpu/drm/mxsfb/mxsfb_drv.c            | 4 ++--
 drivers/gpu/drm/rcar-du/rcar_du_drv.c        | 2 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c     | 4 ++--
 drivers/gpu/drm/tve200/tve200_drv.c          | 4 ++--
 drivers/gpu/drm/zte/zx_drm_drv.c             | 4 ++--
 8 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
index f067de4e1e82..dcb06d4e9135 100644
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -216,7 +216,7 @@ static int arcpgu_probe(struct platform_device *pdev)
 	arcpgu_unload(drm);
 
 err_unref:
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return ret;
 }
@@ -227,7 +227,7 @@ static int arcpgu_remove(struct platform_device *pdev)
 
 	drm_dev_unregister(drm);
 	arcpgu_unload(drm);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 843cac222e60..f8da51a63e2f 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -775,7 +775,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
 	atmel_hlcdc_dc_unload(ddev);
 
 err_unref:
-	drm_dev_unref(ddev);
+	drm_dev_put(ddev);
 
 	return ret;
 }
@@ -786,7 +786,7 @@ static int atmel_hlcdc_dc_drm_remove(struct platform_device *pdev)
 
 	drm_dev_unregister(ddev);
 	atmel_hlcdc_dc_unload(ddev);
-	drm_dev_unref(ddev);
+	drm_dev_put(ddev);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
index 83c1f46670bf..52802e6049e0 100644
--- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
+++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
@@ -550,7 +550,7 @@ static int etnaviv_bind(struct device *dev)
 out_bind:
 	kfree(priv);
 out_unref:
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return ret;
 }
@@ -567,7 +567,7 @@ static void etnaviv_unbind(struct device *dev)
 	drm->dev_private = NULL;
 	kfree(priv);
 
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 }
 
 static const struct component_master_ops etnaviv_master_ops = {
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 2393e6d16ffd..88ba003979e6 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -417,7 +417,7 @@ static int mxsfb_probe(struct platform_device *pdev)
 err_unload:
 	mxsfb_unload(drm);
 err_free:
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return ret;
 }
@@ -428,7 +428,7 @@ static int mxsfb_remove(struct platform_device *pdev)
 
 	drm_dev_unregister(drm);
 	mxsfb_unload(drm);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 084f58df4a8c..c7fe2433ab9e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -454,7 +454,7 @@ static int rcar_du_remove(struct platform_device *pdev)
 	drm_kms_helper_poll_fini(ddev);
 	drm_mode_config_cleanup(ddev);
 
-	drm_dev_unref(ddev);
+	drm_dev_put(ddev);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
index 6ececad6f845..8554102a6ead 100644
--- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
+++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
@@ -194,7 +194,7 @@ static int shmob_drm_remove(struct platform_device *pdev)
 	drm_kms_helper_poll_fini(ddev);
 	drm_mode_config_cleanup(ddev);
 	drm_irq_uninstall(ddev);
-	drm_dev_unref(ddev);
+	drm_dev_put(ddev);
 
 	return 0;
 }
@@ -290,7 +290,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
 	drm_kms_helper_poll_fini(ddev);
 	drm_mode_config_cleanup(ddev);
 err_free_drm_dev:
-	drm_dev_unref(ddev);
+	drm_dev_put(ddev);
 
 	return ret;
 }
diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
index 72efcecb44f7..28e2d03c0ccf 100644
--- a/drivers/gpu/drm/tve200/tve200_drv.c
+++ b/drivers/gpu/drm/tve200/tve200_drv.c
@@ -249,7 +249,7 @@ static int tve200_probe(struct platform_device *pdev)
 clk_disable:
 	clk_disable_unprepare(priv->pclk);
 dev_unref:
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	return ret;
 }
 
@@ -263,7 +263,7 @@ static int tve200_remove(struct platform_device *pdev)
 		drm_panel_bridge_remove(priv->bridge);
 	drm_mode_config_cleanup(drm);
 	clk_disable_unprepare(priv->pclk);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 
 	return 0;
 }
diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
index 11ef17c2d1c1..5b6f1eda52e0 100644
--- a/drivers/gpu/drm/zte/zx_drm_drv.c
+++ b/drivers/gpu/drm/zte/zx_drm_drv.c
@@ -114,7 +114,7 @@ static int zx_drm_bind(struct device *dev)
 	component_unbind_all(dev, drm);
 out_unregister:
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 	return ret;
 }
 
@@ -127,7 +127,7 @@ static void zx_drm_unbind(struct device *dev)
 	drm_mode_config_cleanup(drm);
 	component_unbind_all(dev, drm);
 	dev_set_drvdata(dev, NULL);
-	drm_dev_unref(drm);
+	drm_dev_put(drm);
 }
 
 static const struct component_master_ops zx_drm_master_ops = {
-- 
2.19.1


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

* [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (2 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:45   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put" Fernando Ramos
                   ` (5 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

There are no more places where this (deprecated) function is being used
from, thus it can now be removed.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 drivers/gpu/drm/drm_drv.c | 13 -------------
 include/drm/drm_drv.h     |  1 -
 2 files changed, 14 deletions(-)

diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c
index 36e8e9cbec52..22c8f8252207 100644
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -706,19 +706,6 @@ void drm_dev_put(struct drm_device *dev)
 }
 EXPORT_SYMBOL(drm_dev_put);
 
-/**
- * drm_dev_unref - Drop reference of a DRM device
- * @dev: device to drop reference of or NULL
- *
- * This is a compatibility alias for drm_dev_put() and should not be used by new
- * code.
- */
-void drm_dev_unref(struct drm_device *dev)
-{
-	drm_dev_put(dev);
-}
-EXPORT_SYMBOL(drm_dev_unref);
-
 static int create_compat_control_link(struct drm_device *dev)
 {
 	struct drm_minor *minor;
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index 3199ef70c007..abac47c10f1d 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -621,7 +621,6 @@ void drm_dev_unregister(struct drm_device *dev);
 
 void drm_dev_get(struct drm_device *dev);
 void drm_dev_put(struct drm_device *dev);
-void drm_dev_unref(struct drm_device *dev);
 void drm_put_dev(struct drm_device *dev);
 bool drm_dev_enter(struct drm_device *dev, int *idx);
 void drm_dev_exit(int idx);
-- 
2.19.1


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

* [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put"
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (3 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:47   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions Fernando Ramos
                   ` (4 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

This patch unifies the naming of DRM functions for reference counting as
requested on Documentation/gpu/todo.rst

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 drivers/gpu/drm/bridge/tc358764.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/tc358764.c b/drivers/gpu/drm/bridge/tc358764.c
index ee6b98efa9c2..afd491018bfc 100644
--- a/drivers/gpu/drm/bridge/tc358764.c
+++ b/drivers/gpu/drm/bridge/tc358764.c
@@ -379,7 +379,7 @@ static void tc358764_detach(struct drm_bridge *bridge)
 	drm_fb_helper_remove_one_connector(drm->fb_helper, &ctx->connector);
 	drm_panel_detach(ctx->panel);
 	ctx->panel = NULL;
-	drm_connector_unreference(&ctx->connector);
+	drm_connector_put(&ctx->connector);
 }
 
 static const struct drm_bridge_funcs tc358764_bridge_funcs = {
-- 
2.19.1


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

* [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (4 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put" Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-21 18:56   ` Lyude Paul
  2018-11-24 20:49   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions Fernando Ramos
                   ` (3 subsequent siblings)
  9 siblings, 2 replies; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

There are no more places where this (deprecated) function is being
used from, thus it can now be removed.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 include/drm/drm_connector.h | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 9ccad6b062f2..b91b206f1665 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1191,30 +1191,6 @@ static inline void drm_connector_put(struct drm_connector *connector)
 	drm_mode_object_put(&connector->base);
 }
 
-/**
- * drm_connector_reference - acquire a connector reference
- * @connector: DRM connector
- *
- * This is a compatibility alias for drm_connector_get() and should not be
- * used by new code.
- */
-static inline void drm_connector_reference(struct drm_connector *connector)
-{
-	drm_connector_get(connector);
-}
-
-/**
- * drm_connector_unreference - release a connector reference
- * @connector: DRM connector
- *
- * This is a compatibility alias for drm_connector_put() and should not be
- * used by new code.
- */
-static inline void drm_connector_unreference(struct drm_connector *connector)
-{
-	drm_connector_put(connector);
-}
-
 /**
  * drm_connector_is_unregistered - has the connector been unregistered from
  * userspace?
-- 
2.19.1


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

* [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (5 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:55   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script Fernando Ramos
                   ` (2 subsequent siblings)
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: Maarten Lankhorst, Maxime Ripard, Sean Paul, David Airlie,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

There are no more places where this (deprecated) function is being used
from, thus it can now be removed.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 include/drm/drm_framebuffer.h | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/include/drm/drm_framebuffer.h b/include/drm/drm_framebuffer.h
index c50502c656e5..c94acedfb08e 100644
--- a/include/drm/drm_framebuffer.h
+++ b/include/drm/drm_framebuffer.h
@@ -240,30 +240,6 @@ static inline void drm_framebuffer_put(struct drm_framebuffer *fb)
 	drm_mode_object_put(&fb->base);
 }
 
-/**
- * drm_framebuffer_reference - acquire a framebuffer reference
- * @fb: DRM framebuffer
- *
- * This is a compatibility alias for drm_framebuffer_get() and should not be
- * used by new code.
- */
-static inline void drm_framebuffer_reference(struct drm_framebuffer *fb)
-{
-	drm_framebuffer_get(fb);
-}
-
-/**
- * drm_framebuffer_unreference - release a framebuffer reference
- * @fb: DRM framebuffer
- *
- * This is a compatibility alias for drm_framebuffer_put() and should not be
- * used by new code.
- */
-static inline void drm_framebuffer_unreference(struct drm_framebuffer *fb)
-{
-	drm_framebuffer_put(fb);
-}
-
 /**
  * drm_framebuffer_read_refcount - read the framebuffer reference count.
  * @fb: framebuffer
-- 
2.19.1


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

* [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (6 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-18 11:04   ` Julia Lawall
  2018-11-24 20:58   ` Linus Walleij
  2018-11-15 22:16 ` [PATCH 9/9] docs: drm: remove no longer relevant TODO entry Fernando Ramos
  2018-11-15 22:38 ` [PATCH 0/9] drm: remove deprecated functions Linus Walleij
  9 siblings, 2 replies; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

The coccinelle script was used to rename some (deprecated) functions
which no longer exist now.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 scripts/coccinelle/api/drm-get-put.cocci | 78 ------------------------
 1 file changed, 78 deletions(-)
 delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci

diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
deleted file mode 100644
index 3a09c97ad87d..000000000000
--- a/scripts/coccinelle/api/drm-get-put.cocci
+++ /dev/null
@@ -1,78 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-///
-/// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
-/// drm_*_unreference() helpers.
-///
-// Confidence: High
-// Copyright: (C) 2017 NVIDIA Corporation
-// Options: --no-includes --include-headers
-//
-
-virtual patch
-virtual report
-
-@depends on patch@
-expression object;
-@@
-
-(
-- drm_connector_reference(object)
-+ drm_connector_get(object)
-|
-- drm_connector_unreference(object)
-+ drm_connector_put(object)
-|
-- drm_framebuffer_reference(object)
-+ drm_framebuffer_get(object)
-|
-- drm_framebuffer_unreference(object)
-+ drm_framebuffer_put(object)
-|
-- drm_gem_object_reference(object)
-+ drm_gem_object_get(object)
-|
-- drm_gem_object_unreference(object)
-+ drm_gem_object_put(object)
-|
-- __drm_gem_object_unreference(object)
-+ __drm_gem_object_put(object)
-|
-- drm_gem_object_unreference_unlocked(object)
-+ drm_gem_object_put_unlocked(object)
-|
-- drm_dev_unref(object)
-+ drm_dev_put(object)
-)
-
-@r depends on report@
-expression object;
-position p;
-@@
-
-(
-drm_connector_unreference@p(object)
-|
-drm_connector_reference@p(object)
-|
-drm_framebuffer_unreference@p(object)
-|
-drm_framebuffer_reference@p(object)
-|
-drm_gem_object_unreference@p(object)
-|
-drm_gem_object_reference@p(object)
-|
-__drm_gem_object_unreference(object)
-|
-drm_gem_object_unreference_unlocked(object)
-|
-drm_dev_unref@p(object)
-)
-
-@script:python depends on report@
-object << r.object;
-p << r.p;
-@@
-
-msg="WARNING: use get/put helpers to reference and dereference %s" % (object)
-coccilib.report.print_report(p[0], msg)
-- 
2.19.1


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

* [PATCH 9/9] docs: drm: remove no longer relevant TODO entry
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (7 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script Fernando Ramos
@ 2018-11-15 22:16 ` Fernando Ramos
  2018-11-24 20:59   ` Linus Walleij
  2018-11-15 22:38 ` [PATCH 0/9] drm: remove deprecated functions Linus Walleij
  9 siblings, 1 reply; 35+ messages in thread
From: Fernando Ramos @ 2018-11-15 22:16 UTC (permalink / raw)
  To: dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

This entry asked to rename all drm core "*_reference/_unrefence"
functions to "*_get/_put".

Now that this task is complete, we can remove this entry from the TODO
list.

Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
---
 Documentation/gpu/todo.rst | 17 -----------------
 1 file changed, 17 deletions(-)

diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst
index 77c2b3c25565..85433af65442 100644
--- a/Documentation/gpu/todo.rst
+++ b/Documentation/gpu/todo.rst
@@ -28,23 +28,6 @@ them, but also all the virtual ones used by KVM, so everyone qualifies).
 
 Contact: Daniel Vetter, Thierry Reding, respective driver maintainers
 
-Switch from reference/unreference to get/put
---------------------------------------------
-
-For some reason DRM core uses ``reference``/``unreference`` suffixes for
-refcounting functions, but kernel uses ``get``/``put`` (e.g.
-``kref_get``/``put()``). It would be good to switch over for consistency, and
-it's shorter. Needs to be done in 3 steps for each pair of functions:
-
-* Create new ``get``/``put`` functions, define the old names as compatibility
-  wrappers
-* Switch over each file/driver using a cocci-generated spatch.
-* Once all users of the old names are gone, remove them.
-
-This way drivers/patches in the progress of getting merged won't break.
-
-Contact: Daniel Vetter
-
 Convert existing KMS drivers to atomic modesetting
 --------------------------------------------------
 
-- 
2.19.1


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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
                   ` (8 preceding siblings ...)
  2018-11-15 22:16 ` [PATCH 9/9] docs: drm: remove no longer relevant TODO entry Fernando Ramos
@ 2018-11-15 22:38 ` Linus Walleij
  2018-11-21  9:42   ` Daniel Vetter
  9 siblings, 1 reply; 35+ messages in thread
From: Linus Walleij @ 2018-11-15 22:38 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Maarten Lankhorst, Maxime Ripard,
	sean, Dave Airlie, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, hamohammed.sa,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
> "switch from reference/unreference to get/put". That's what this patch series is
> about.

The series:
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
@ 2018-11-15 23:00   ` Boris Brezillon
  2018-11-16 10:15   ` Lucas Stach
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 35+ messages in thread
From: Boris Brezillon @ 2018-11-15 23:00 UTC (permalink / raw)
  To: Fernando Ramos
  Cc: dri-devel, David Airlie, Maarten Lankhorst, Maxime Ripard,
	Sean Paul, Jonathan Corbet, Alexey Brodkin, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Lucas Stach,
	Russell King, Christian Gmeiner, Marek Vasut, Stefan Agner,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

On Thu, 15 Nov 2018 23:16:23 +0100
Fernando Ramos <greenfoo@gluegarage.com> wrote:

> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
> 
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--

For the Atmel HLCDC driver

Acked-by: Boris Brezillon <boris.brezillon@bootlin.com>

>  drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c            | 4 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c        | 2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c     | 4 ++--
>  drivers/gpu/drm/tve200/tve200_drv.c          | 4 ++--
>  drivers/gpu/drm/zte/zx_drm_drv.c             | 4 ++--
>  8 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index f067de4e1e82..dcb06d4e9135 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -216,7 +216,7 @@ static int arcpgu_probe(struct platform_device *pdev)
>  	arcpgu_unload(drm);
>  
>  err_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -227,7 +227,7 @@ static int arcpgu_remove(struct platform_device *pdev)
>  
>  	drm_dev_unregister(drm);
>  	arcpgu_unload(drm);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index 843cac222e60..f8da51a63e2f 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -775,7 +775,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
>  	atmel_hlcdc_dc_unload(ddev);
>  
>  err_unref:
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return ret;
>  }
> @@ -786,7 +786,7 @@ static int atmel_hlcdc_dc_drm_remove(struct platform_device *pdev)
>  
>  	drm_dev_unregister(ddev);
>  	atmel_hlcdc_dc_unload(ddev);
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 83c1f46670bf..52802e6049e0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -550,7 +550,7 @@ static int etnaviv_bind(struct device *dev)
>  out_bind:
>  	kfree(priv);
>  out_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -567,7 +567,7 @@ static void etnaviv_unbind(struct device *dev)
>  	drm->dev_private = NULL;
>  	kfree(priv);
>  
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops etnaviv_master_ops = {
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 2393e6d16ffd..88ba003979e6 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -417,7 +417,7 @@ static int mxsfb_probe(struct platform_device *pdev)
>  err_unload:
>  	mxsfb_unload(drm);
>  err_free:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -428,7 +428,7 @@ static int mxsfb_remove(struct platform_device *pdev)
>  
>  	drm_dev_unregister(drm);
>  	mxsfb_unload(drm);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 084f58df4a8c..c7fe2433ab9e 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -454,7 +454,7 @@ static int rcar_du_remove(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 6ececad6f845..8554102a6ead 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -194,7 +194,7 @@ static int shmob_drm_remove(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  	drm_irq_uninstall(ddev);
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> @@ -290,7 +290,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  err_free_drm_dev:
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return ret;
>  }
> diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
> index 72efcecb44f7..28e2d03c0ccf 100644
> --- a/drivers/gpu/drm/tve200/tve200_drv.c
> +++ b/drivers/gpu/drm/tve200/tve200_drv.c
> @@ -249,7 +249,7 @@ static int tve200_probe(struct platform_device *pdev)
>  clk_disable:
>  	clk_disable_unprepare(priv->pclk);
>  dev_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  	return ret;
>  }
>  
> @@ -263,7 +263,7 @@ static int tve200_remove(struct platform_device *pdev)
>  		drm_panel_bridge_remove(priv->bridge);
>  	drm_mode_config_cleanup(drm);
>  	clk_disable_unprepare(priv->pclk);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
> index 11ef17c2d1c1..5b6f1eda52e0 100644
> --- a/drivers/gpu/drm/zte/zx_drm_drv.c
> +++ b/drivers/gpu/drm/zte/zx_drm_drv.c
> @@ -114,7 +114,7 @@ static int zx_drm_bind(struct device *dev)
>  	component_unbind_all(dev, drm);
>  out_unregister:
>  	dev_set_drvdata(dev, NULL);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  	return ret;
>  }
>  
> @@ -127,7 +127,7 @@ static void zx_drm_unbind(struct device *dev)
>  	drm_mode_config_cleanup(drm);
>  	component_unbind_all(dev, drm);
>  	dev_set_drvdata(dev, NULL);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops zx_drm_master_ops = {


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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
  2018-11-15 23:00   ` Boris Brezillon
@ 2018-11-16 10:15   ` Lucas Stach
  2018-11-16 17:04     ` Fernando
  2018-11-19 11:39   ` Stefan Agner
                     ` (2 subsequent siblings)
  4 siblings, 1 reply; 35+ messages in thread
From: Lucas Stach @ 2018-11-16 10:15 UTC (permalink / raw)
  To: Fernando Ramos, dri-devel
  Cc: David Airlie, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Jonathan Corbet, Alexey Brodkin, Boris Brezillon, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, Gerd Hoffmann,
	Archit Taneja, Andrzej Hajda, Laurent Pinchart, Russell King,
	Christian Gmeiner, Marek Vasut, Stefan Agner, Kieran Bingham,
	Linus Walleij, Shawn Guo, Julia Lawall, Gilles Muller,
	Nicolas Palix, Michal Marek, Haneen Mohammed, linux-doc,
	linux-kernel, linux-arm-kernel, virtualization, etnaviv,
	linux-renesas-soc, cocci

Am Donnerstag, den 15.11.2018, 23:16 +0100 schrieb Fernando Ramos:
> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
> 
> > Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--

At least the etnaviv part of the patch is already fixed in linux-next.

Regards,
Lucas

>  drivers/gpu/drm/mxsfb/mxsfb_drv.c            | 4 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c        | 2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c     | 4 ++--
>  drivers/gpu/drm/tve200/tve200_drv.c          | 4 ++--
>  drivers/gpu/drm/zte/zx_drm_drv.c             | 4 ++--
>  8 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index f067de4e1e82..dcb06d4e9135 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -216,7 +216,7 @@ static int arcpgu_probe(struct platform_device *pdev)
> >  	arcpgu_unload(drm);
>  
>  err_unref:
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return ret;
>  }
> @@ -227,7 +227,7 @@ static int arcpgu_remove(struct platform_device *pdev)
>  
> >  	drm_dev_unregister(drm);
> >  	arcpgu_unload(drm);
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return 0;
>  }
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index 843cac222e60..f8da51a63e2f 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -775,7 +775,7 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
> >  	atmel_hlcdc_dc_unload(ddev);
>  
>  err_unref:
> > -	drm_dev_unref(ddev);
> > +	drm_dev_put(ddev);
>  
> >  	return ret;
>  }
> @@ -786,7 +786,7 @@ static int atmel_hlcdc_dc_drm_remove(struct platform_device *pdev)
>  
> >  	drm_dev_unregister(ddev);
> >  	atmel_hlcdc_dc_unload(ddev);
> > -	drm_dev_unref(ddev);
> > +	drm_dev_put(ddev);
>  
> >  	return 0;
>  }
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 83c1f46670bf..52802e6049e0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -550,7 +550,7 @@ static int etnaviv_bind(struct device *dev)
>  out_bind:
> >  	kfree(priv);
>  out_unref:
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return ret;
>  }
> @@ -567,7 +567,7 @@ static void etnaviv_unbind(struct device *dev)
> >  	drm->dev_private = NULL;
> >  	kfree(priv);
>  
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops etnaviv_master_ops = {
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 2393e6d16ffd..88ba003979e6 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -417,7 +417,7 @@ static int mxsfb_probe(struct platform_device *pdev)
>  err_unload:
> >  	mxsfb_unload(drm);
>  err_free:
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return ret;
>  }
> @@ -428,7 +428,7 @@ static int mxsfb_remove(struct platform_device *pdev)
>  
> >  	drm_dev_unregister(drm);
> >  	mxsfb_unload(drm);
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return 0;
>  }
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 084f58df4a8c..c7fe2433ab9e 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -454,7 +454,7 @@ static int rcar_du_remove(struct platform_device *pdev)
> >  	drm_kms_helper_poll_fini(ddev);
> >  	drm_mode_config_cleanup(ddev);
>  
> > -	drm_dev_unref(ddev);
> > +	drm_dev_put(ddev);
>  
> >  	return 0;
>  }
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 6ececad6f845..8554102a6ead 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -194,7 +194,7 @@ static int shmob_drm_remove(struct platform_device *pdev)
> >  	drm_kms_helper_poll_fini(ddev);
> >  	drm_mode_config_cleanup(ddev);
> >  	drm_irq_uninstall(ddev);
> > -	drm_dev_unref(ddev);
> > +	drm_dev_put(ddev);
>  
> >  	return 0;
>  }
> @@ -290,7 +290,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
> >  	drm_kms_helper_poll_fini(ddev);
> >  	drm_mode_config_cleanup(ddev);
>  err_free_drm_dev:
> > -	drm_dev_unref(ddev);
> > +	drm_dev_put(ddev);
>  
> >  	return ret;
>  }
> diff --git a/drivers/gpu/drm/tve200/tve200_drv.c b/drivers/gpu/drm/tve200/tve200_drv.c
> index 72efcecb44f7..28e2d03c0ccf 100644
> --- a/drivers/gpu/drm/tve200/tve200_drv.c
> +++ b/drivers/gpu/drm/tve200/tve200_drv.c
> @@ -249,7 +249,7 @@ static int tve200_probe(struct platform_device *pdev)
>  clk_disable:
> >  	clk_disable_unprepare(priv->pclk);
>  dev_unref:
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
> >  	return ret;
>  }
>  
> @@ -263,7 +263,7 @@ static int tve200_remove(struct platform_device *pdev)
> >  		drm_panel_bridge_remove(priv->bridge);
> >  	drm_mode_config_cleanup(drm);
> >  	clk_disable_unprepare(priv->pclk);
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  
> >  	return 0;
>  }
> diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
> index 11ef17c2d1c1..5b6f1eda52e0 100644
> --- a/drivers/gpu/drm/zte/zx_drm_drv.c
> +++ b/drivers/gpu/drm/zte/zx_drm_drv.c
> @@ -114,7 +114,7 @@ static int zx_drm_bind(struct device *dev)
> >  	component_unbind_all(dev, drm);
>  out_unregister:
> >  	dev_set_drvdata(dev, NULL);
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
> >  	return ret;
>  }
>  
> @@ -127,7 +127,7 @@ static void zx_drm_unbind(struct device *dev)
> >  	drm_mode_config_cleanup(drm);
> >  	component_unbind_all(dev, drm);
> >  	dev_set_drvdata(dev, NULL);
> > -	drm_dev_unref(drm);
> > +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops zx_drm_master_ops = {

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-16 10:15   ` Lucas Stach
@ 2018-11-16 17:04     ` Fernando
  2018-11-20  9:53       ` Jani Nikula
  2018-11-24 20:44       ` Linus Walleij
  0 siblings, 2 replies; 35+ messages in thread
From: Fernando @ 2018-11-16 17:04 UTC (permalink / raw)
  To: Lucas Stach, dri-devel
  Cc: Haneen Mohammed, Alexandre Belloni, Gilles Muller, David Airlie,
	linux-kernel, Gerd Hoffmann, cocci, Marek Vasut, Jonathan Corbet,
	linux-doc, Alexey Brodkin, Maxime Ripard, Ludovic Desroches,
	Russell King, Nicolas Palix, etnaviv, Julia Lawall,
	virtualization, Sean Paul, linux-arm-kernel, Michal Marek,
	Boris Brezillon, Nicolas Ferre, linux-renesas-soc,
	Kieran Bingham, Shawn Guo, Laurent Pinchart

On Fri, Nov 16, 2018, at 11:15 AM, Lucas Stach wrote:
> Am Donnerstag, den 15.11.2018, 23:16 +0100 schrieb Fernando Ramos:
> > This patch unifies the naming of DRM functions for reference counting as
> > requested on Documentation/gpu/todo.rst
> > 
> > > Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> > ---
> >  drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
> >  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
> >  drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--
> 
> At least the etnaviv part of the patch is already fixed in linux-next.
> 
> Regards,
> Lucas
 

Thanks for the notice.

I'm new on this, how should I proceed? Should I create a new (V2) patch series with these changes reverted? Or will the maintainer automatically take care of this when merging?

And, related to this, what is the "good" branch to start developing new drm patches? Is is "drm-next" or "linux-next"? Or does it change depending on how much time until the merge window closes?

Thanks!

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

* Re: [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script
  2018-11-15 22:16 ` [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script Fernando Ramos
@ 2018-11-18 11:04   ` Julia Lawall
  2018-11-24 20:58   ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Julia Lawall @ 2018-11-18 11:04 UTC (permalink / raw)
  To: Fernando Ramos
  Cc: dri-devel, David Airlie, Maarten Lankhorst, Maxime Ripard,
	Sean Paul, Jonathan Corbet, Alexey Brodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, Russell King, Christian Gmeiner, Marek Vasut,
	Stefan Agner, Kieran Bingham, Linus Walleij, Shawn Guo,
	Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek,
	Haneen Mohammed, linux-doc, linux-kernel, linux-arm-kernel,
	virtualization, etnaviv, linux-renesas-soc, cocci



On Thu, 15 Nov 2018, Fernando Ramos wrote:

> The coccinelle script was used to rename some (deprecated) functions
> which no longer exist now.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Acked-by: Julia Lawall <julia.lawall@lip6.fr>


> ---
>  scripts/coccinelle/api/drm-get-put.cocci | 78 ------------------------
>  1 file changed, 78 deletions(-)
>  delete mode 100644 scripts/coccinelle/api/drm-get-put.cocci
>
> diff --git a/scripts/coccinelle/api/drm-get-put.cocci b/scripts/coccinelle/api/drm-get-put.cocci
> deleted file mode 100644
> index 3a09c97ad87d..000000000000
> --- a/scripts/coccinelle/api/drm-get-put.cocci
> +++ /dev/null
> @@ -1,78 +0,0 @@
> -// SPDX-License-Identifier: GPL-2.0
> -///
> -/// Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and
> -/// drm_*_unreference() helpers.
> -///
> -// Confidence: High
> -// Copyright: (C) 2017 NVIDIA Corporation
> -// Options: --no-includes --include-headers
> -//
> -
> -virtual patch
> -virtual report
> -
> -@depends on patch@
> -expression object;
> -@@
> -
> -(
> -- drm_connector_reference(object)
> -+ drm_connector_get(object)
> -|
> -- drm_connector_unreference(object)
> -+ drm_connector_put(object)
> -|
> -- drm_framebuffer_reference(object)
> -+ drm_framebuffer_get(object)
> -|
> -- drm_framebuffer_unreference(object)
> -+ drm_framebuffer_put(object)
> -|
> -- drm_gem_object_reference(object)
> -+ drm_gem_object_get(object)
> -|
> -- drm_gem_object_unreference(object)
> -+ drm_gem_object_put(object)
> -|
> -- __drm_gem_object_unreference(object)
> -+ __drm_gem_object_put(object)
> -|
> -- drm_gem_object_unreference_unlocked(object)
> -+ drm_gem_object_put_unlocked(object)
> -|
> -- drm_dev_unref(object)
> -+ drm_dev_put(object)
> -)
> -
> -@r depends on report@
> -expression object;
> -position p;
> -@@
> -
> -(
> -drm_connector_unreference@p(object)
> -|
> -drm_connector_reference@p(object)
> -|
> -drm_framebuffer_unreference@p(object)
> -|
> -drm_framebuffer_reference@p(object)
> -|
> -drm_gem_object_unreference@p(object)
> -|
> -drm_gem_object_reference@p(object)
> -|
> -__drm_gem_object_unreference(object)
> -|
> -drm_gem_object_unreference_unlocked(object)
> -|
> -drm_dev_unref@p(object)
> -)
> -
> -@script:python depends on report@
> -object << r.object;
> -p << r.p;
> -@@
> -
> -msg="WARNING: use get/put helpers to reference and dereference %s" % (object)
> -coccilib.report.print_report(p[0], msg)
> --
> 2.19.1
>
>

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
  2018-11-15 23:00   ` Boris Brezillon
  2018-11-16 10:15   ` Lucas Stach
@ 2018-11-19 11:39   ` Stefan Agner
  2018-11-19 12:13   ` Shawn Guo
  2018-11-24 20:44   ` Linus Walleij
  4 siblings, 0 replies; 35+ messages in thread
From: Stefan Agner @ 2018-11-19 11:39 UTC (permalink / raw)
  To: Fernando Ramos
  Cc: dri-devel, David Airlie, Maarten Lankhorst, Maxime Ripard,
	Sean Paul, Jonathan Corbet, Alexey Brodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, Russell King, Christian Gmeiner, Marek Vasut,
	Kieran Bingham, Linus Walleij, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

On 15.11.2018 23:16, Fernando Ramos wrote:
> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
> 
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c            | 4 ++--

For mxsfb:

Acked-by: Stefan Agner <stefan@agner.ch>

--
Stefan

>  drivers/gpu/drm/rcar-du/rcar_du_drv.c        | 2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c     | 4 ++--
>  drivers/gpu/drm/tve200/tve200_drv.c          | 4 ++--
>  drivers/gpu/drm/zte/zx_drm_drv.c             | 4 ++--
>  8 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/arc/arcpgu_drv.c b/drivers/gpu/drm/arc/arcpgu_drv.c
> index f067de4e1e82..dcb06d4e9135 100644
> --- a/drivers/gpu/drm/arc/arcpgu_drv.c
> +++ b/drivers/gpu/drm/arc/arcpgu_drv.c
> @@ -216,7 +216,7 @@ static int arcpgu_probe(struct platform_device *pdev)
>  	arcpgu_unload(drm);
>  
>  err_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -227,7 +227,7 @@ static int arcpgu_remove(struct platform_device *pdev)
>  
>  	drm_dev_unregister(drm);
>  	arcpgu_unload(drm);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> index 843cac222e60..f8da51a63e2f 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
> @@ -775,7 +775,7 @@ static int atmel_hlcdc_dc_drm_probe(struct
> platform_device *pdev)
>  	atmel_hlcdc_dc_unload(ddev);
>  
>  err_unref:
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return ret;
>  }
> @@ -786,7 +786,7 @@ static int atmel_hlcdc_dc_drm_remove(struct
> platform_device *pdev)
>  
>  	drm_dev_unregister(ddev);
>  	atmel_hlcdc_dc_unload(ddev);
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> index 83c1f46670bf..52802e6049e0 100644
> --- a/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> +++ b/drivers/gpu/drm/etnaviv/etnaviv_drv.c
> @@ -550,7 +550,7 @@ static int etnaviv_bind(struct device *dev)
>  out_bind:
>  	kfree(priv);
>  out_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -567,7 +567,7 @@ static void etnaviv_unbind(struct device *dev)
>  	drm->dev_private = NULL;
>  	kfree(priv);
>  
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops etnaviv_master_ops = {
> diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> index 2393e6d16ffd..88ba003979e6 100644
> --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
> @@ -417,7 +417,7 @@ static int mxsfb_probe(struct platform_device *pdev)
>  err_unload:
>  	mxsfb_unload(drm);
>  err_free:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return ret;
>  }
> @@ -428,7 +428,7 @@ static int mxsfb_remove(struct platform_device *pdev)
>  
>  	drm_dev_unregister(drm);
>  	mxsfb_unload(drm);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 084f58df4a8c..c7fe2433ab9e 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -454,7 +454,7 @@ static int rcar_du_remove(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> index 6ececad6f845..8554102a6ead 100644
> --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c
> @@ -194,7 +194,7 @@ static int shmob_drm_remove(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  	drm_irq_uninstall(ddev);
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return 0;
>  }
> @@ -290,7 +290,7 @@ static int shmob_drm_probe(struct platform_device *pdev)
>  	drm_kms_helper_poll_fini(ddev);
>  	drm_mode_config_cleanup(ddev);
>  err_free_drm_dev:
> -	drm_dev_unref(ddev);
> +	drm_dev_put(ddev);
>  
>  	return ret;
>  }
> diff --git a/drivers/gpu/drm/tve200/tve200_drv.c
> b/drivers/gpu/drm/tve200/tve200_drv.c
> index 72efcecb44f7..28e2d03c0ccf 100644
> --- a/drivers/gpu/drm/tve200/tve200_drv.c
> +++ b/drivers/gpu/drm/tve200/tve200_drv.c
> @@ -249,7 +249,7 @@ static int tve200_probe(struct platform_device *pdev)
>  clk_disable:
>  	clk_disable_unprepare(priv->pclk);
>  dev_unref:
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  	return ret;
>  }
>  
> @@ -263,7 +263,7 @@ static int tve200_remove(struct platform_device *pdev)
>  		drm_panel_bridge_remove(priv->bridge);
>  	drm_mode_config_cleanup(drm);
>  	clk_disable_unprepare(priv->pclk);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  
>  	return 0;
>  }
> diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
> index 11ef17c2d1c1..5b6f1eda52e0 100644
> --- a/drivers/gpu/drm/zte/zx_drm_drv.c
> +++ b/drivers/gpu/drm/zte/zx_drm_drv.c
> @@ -114,7 +114,7 @@ static int zx_drm_bind(struct device *dev)
>  	component_unbind_all(dev, drm);
>  out_unregister:
>  	dev_set_drvdata(dev, NULL);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  	return ret;
>  }
>  
> @@ -127,7 +127,7 @@ static void zx_drm_unbind(struct device *dev)
>  	drm_mode_config_cleanup(drm);
>  	component_unbind_all(dev, drm);
>  	dev_set_drvdata(dev, NULL);
> -	drm_dev_unref(drm);
> +	drm_dev_put(drm);
>  }
>  
>  static const struct component_master_ops zx_drm_master_ops = {

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
                     ` (2 preceding siblings ...)
  2018-11-19 11:39   ` Stefan Agner
@ 2018-11-19 12:13   ` Shawn Guo
  2018-11-24 20:44   ` Linus Walleij
  4 siblings, 0 replies; 35+ messages in thread
From: Shawn Guo @ 2018-11-19 12:13 UTC (permalink / raw)
  To: Fernando Ramos
  Cc: dri-devel, David Airlie, Maarten Lankhorst, Maxime Ripard,
	Sean Paul, Jonathan Corbet, Alexey Brodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, Russell King, Christian Gmeiner, Marek Vasut,
	Stefan Agner, Kieran Bingham, Linus Walleij, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	linux-doc, linux-kernel, linux-arm-kernel, virtualization,
	etnaviv, linux-renesas-soc, cocci

On Thu, Nov 15, 2018 at 11:16:23PM +0100, Fernando Ramos wrote:
> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
> 
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> ---
>  drivers/gpu/drm/arc/arcpgu_drv.c             | 4 ++--
>  drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++--
>  drivers/gpu/drm/etnaviv/etnaviv_drv.c        | 4 ++--
>  drivers/gpu/drm/mxsfb/mxsfb_drv.c            | 4 ++--
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c        | 2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c     | 4 ++--
>  drivers/gpu/drm/tve200/tve200_drv.c          | 4 ++--
>  drivers/gpu/drm/zte/zx_drm_drv.c             | 4 ++--

We have already queued a patch [1] from Thomas Zimmermann for
zx_drm_drv.

Shawn

[1] https://patchwork.kernel.org/patch/10615837/

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-16 17:04     ` Fernando
@ 2018-11-20  9:53       ` Jani Nikula
  2018-11-24 20:44       ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Jani Nikula @ 2018-11-20  9:53 UTC (permalink / raw)
  To: Fernando, Lucas Stach, dri-devel
  Cc: Haneen Mohammed, Alexandre Belloni, Gilles Muller, David Airlie,
	virtualization, Gerd Hoffmann, cocci, Marek Vasut,
	Jonathan Corbet, linux-doc, Alexey Brodkin, Maxime Ripard,
	Ludovic Desroches, Russell King, Nicolas Ferre, Nicolas Palix,
	etnaviv, Julia Lawall, Sean Paul, linux-arm-kernel, Michal Marek,
	Boris Brezillon, linux-kernel, linux-renesas-soc, Kieran Bingham,
	Shawn Guo, Laurent Pinchart

On Fri, 16 Nov 2018, Fernando <greenfoo@gluegarage.com> wrote:
> And, related to this, what is the "good" branch to start developing
> new drm patches? Is is "drm-next" or "linux-next"? Or does it change
> depending on how much time until the merge window closes?

I advise most of our developers to work on drm-tip because it contains
the latest stuff in drm core, i915, amd, most of the small drivers, as
well as sound. It's a bit like "linux-next for graphics". And you don't
really have to care about the merge cycles with that.

But YMMV, it probably doesn't work for everyone.

BR,
Jani.


-- 
Jani Nikula, Intel Open Source Graphics Center

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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-15 22:38 ` [PATCH 0/9] drm: remove deprecated functions Linus Walleij
@ 2018-11-21  9:42   ` Daniel Vetter
       [not found]     ` <22044302.7aKok9czXB@avalon>
  2018-11-24 21:17     ` Linus Walleij
  0 siblings, 2 replies; 35+ messages in thread
From: Daniel Vetter @ 2018-11-21  9:42 UTC (permalink / raw)
  To: Linus Walleij
  Cc: greenfoo, open list:DRM PANEL DRIVERS, Maarten Lankhorst,
	Maxime Ripard, sean, Dave Airlie, Jonathan Corbet, abrodkin,
	Boris Brezillon, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Gerd Hoffmann, Archit Taneja, Andrzej Hajda,
	Laurent Pinchart, Lucas Stach, linux+etnaviv, Christian Gmeiner,
	Marek Vasut, Stefan Agner, kieran.bingham+renesas, Shawn Guo,
	Julia Lawall, Gilles Muller, Nicolas Palix, michal.lkml,
	hamohammed.sa, linux-doc, linux-kernel, Linux ARM,
	virtualization, etnaviv, Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:38:35PM +0100, Linus Walleij wrote:
> On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:
> 
> > One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
> > "switch from reference/unreference to get/put". That's what this patch series is
> > about.
> 
> The series:
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

Since your reviewed it all, and there's a pile of acks for the driver
parts too: Want to go ahead and apply it too?

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

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

* Re: [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions
  2018-11-15 22:16 ` [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions Fernando Ramos
@ 2018-11-21 18:56   ` Lyude Paul
  2018-11-24 20:49   ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Lyude Paul @ 2018-11-21 18:56 UTC (permalink / raw)
  To: Fernando Ramos, dri-devel
  Cc: Haneen Mohammed, Alexandre Belloni, Gilles Muller, Maxime Ripard,
	linux-kernel, Gerd Hoffmann, cocci, Marek Vasut, Jonathan Corbet,
	linux-doc, Alexey Brodkin, David Airlie, Ludovic Desroches,
	Russell King, Nicolas Palix, etnaviv, Boris Brezillon,
	virtualization, Sean Paul, linux-arm-kernel, Michal Marek,
	Laurent Pinchart, Julia Lawall, Nicolas Ferre, linux-renesas-soc,
	Kieran Bingham, Shawn Guo

Reviewed-by: Lyude Paul <lyude@redhat.com>

On Thu, 2018-11-15 at 23:16 +0100, Fernando Ramos wrote:
> There are no more places where this (deprecated) function is being
> used from, thus it can now be removed.
> 
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>
> ---
>  include/drm/drm_connector.h | 24 ------------------------
>  1 file changed, 24 deletions(-)
> 
> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> index 9ccad6b062f2..b91b206f1665 100644
> --- a/include/drm/drm_connector.h
> +++ b/include/drm/drm_connector.h
> @@ -1191,30 +1191,6 @@ static inline void drm_connector_put(struct
> drm_connector *connector)
>  	drm_mode_object_put(&connector->base);
>  }
>  
> -/**
> - * drm_connector_reference - acquire a connector reference
> - * @connector: DRM connector
> - *
> - * This is a compatibility alias for drm_connector_get() and should not be
> - * used by new code.
> - */
> -static inline void drm_connector_reference(struct drm_connector *connector)
> -{
> -	drm_connector_get(connector);
> -}
> -
> -/**
> - * drm_connector_unreference - release a connector reference
> - * @connector: DRM connector
> - *
> - * This is a compatibility alias for drm_connector_put() and should not be
> - * used by new code.
> - */
> -static inline void drm_connector_unreference(struct drm_connector
> *connector)
> -{
> -	drm_connector_put(connector);
> -}
> -
>  /**
>   * drm_connector_is_unregistered - has the connector been unregistered from
>   * userspace?
-- 
Cheers,
	Lyude Paul


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

* Re: [PATCH 0/9] drm: remove deprecated functions
       [not found]     ` <22044302.7aKok9czXB@avalon>
@ 2018-11-22  8:55       ` Daniel Vetter
  0 siblings, 0 replies; 35+ messages in thread
From: Daniel Vetter @ 2018-11-22  8:55 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Daniel Vetter, Linus Walleij, greenfoo,
	open list:DRM PANEL DRIVERS, Maarten Lankhorst, Maxime Ripard,
	sean, Dave Airlie, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Lucas Stach,
	linux+etnaviv, Christian Gmeiner, Marek Vasut, Stefan Agner,
	kieran.bingham+renesas, Shawn Guo, Julia Lawall, Gilles Muller,
	Nicolas Palix, michal.lkml, hamohammed.sa, linux-doc,
	linux-kernel, Linux ARM, virtualization, etnaviv, Linux-Renesas,
	cocci

On Wed, Nov 21, 2018 at 08:21:29PM +0200, Laurent Pinchart wrote:
> Hi Daniel,
> 
> On Wednesday, 21 November 2018 11:42:33 EET Daniel Vetter wrote:
> > On Thu, Nov 15, 2018 at 11:38:35PM +0100, Linus Walleij wrote:
> > > On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos wrote:
> > >> One of the things in the DRM TODO list ("Documentation/gpu/todo.rst")
> > >> was to "switch from reference/unreference to get/put". That's what this
> > >> patch series is about.
> > > 
> > > The series:
> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> > 
> > Since your reviewed it all, and there's a pile of acks for the driver
> > parts too: Want to go ahead and apply it too?
> 
> Please remember to give at least a week to reviewers, especially with LPC last 
> week.

I think for this undisputed cocci series waiting for everyone is not
needed. There's really not much the driver-specific reviewer perspective
would help here.

In general I do agree though, if there's something driver maintainers can
have better insight on.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked"
  2018-11-15 22:16 ` [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked" Fernando Ramos
@ 2018-11-24 20:38   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:38 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

This is already fixed in drm-misc-next as it happens:

commit a0d4d42cb5854400baa47bf63d9aae65fa9f484e
Author: Thomas Zimmermann <tzimmermann@suse.de>
Date:   Wed Sep 26 13:36:23 2018 +0200

    drm/bochs: Replace drm_commit a0d4d42cb5854400baa47bf63d9aae65fa9f484e
Author: Thomas Zimmermann <tzimmermann@suse.de>
Date:   Wed Sep 26 13:36:23 2018 +0200

    drm/bochs: Replace drm_gem_object_unreference_unlocked with put function

    This patch unifies the naming of DRM functions for reference counting
    of struct drm_gem_object. The resulting code is more aligned with the
    rest of the Linux kernel interfaces.

    v2:
            * rebase onto fbdev rework

    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Link: http://patchwork.freedesktop.org/patch/msgid/20180926113623.22679-1-tzimmermann@suse.de
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
gem_object_unreference_unlocked with put function

    This patch unifies the naming of DRM functions for reference counting
    of struct drm_gem_object. The resulting code is more aligned with the
    rest of the Linux kernel interfaces.

    v2:
            * rebase onto fbdev rework

    Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
    Link: http://patchwork.freedesktop.org/patch/msgid/20180926113623.22679-1-tzimmermann@suse.de
    Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>

Going on to try and apply the rest.

Yours,
Linus Walleij

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

* Re: [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions
  2018-11-15 22:16 ` [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions Fernando Ramos
@ 2018-11-24 20:38   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:38 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> There are no more places where these (deprecated) functions are being
> used from, thus they can now be removed.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied to drm-misc-next.

Yours,
Linus Walleij

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-16 17:04     ` Fernando
  2018-11-20  9:53       ` Jani Nikula
@ 2018-11-24 20:44       ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:44 UTC (permalink / raw)
  To: greenfoo
  Cc: Lucas Stach, open list:DRM PANEL DRIVERS, Haneen Mohammed,
	Alexandre Belloni, Gilles Muller, Dave Airlie, virtualization,
	Gerd Hoffmann, cocci, Marek Vasut, Jonathan Corbet, linux-doc,
	abrodkin, Maxime Ripard, Ludovic Desroches, linux+etnaviv,
	Nicolas Ferre, Nicolas Palix, etnaviv, Julia Lawall, sean,
	Linux ARM, michal.lkml, Boris Brezillon, linux-kernel,
	Linux-Renesas, kieran.bingham+renesas, Shawn Guo,
	Laurent Pinchart

On Fri, Nov 16, 2018 at 6:04 PM Fernando <greenfoo@gluegarage.com> wrote:

> I'm new on this, how should I proceed? Should I create a new (V2) patch series with
> these changes reverted? Or will the maintainer automatically take care
> of this when merging?

I fixed it :) I think. At least I hope I didn't do something bad.

Yours,
Linus Walleij

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

* Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"
  2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
                     ` (3 preceding siblings ...)
  2018-11-19 12:13   ` Shawn Guo
@ 2018-11-24 20:44   ` Linus Walleij
  4 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:44 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied after some collecting ACKs and tweaking.

Yours,
Linus Walleij

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

* Re: [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function
  2018-11-15 22:16 ` [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function Fernando Ramos
@ 2018-11-24 20:45   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:45 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> There are no more places where this (deprecated) function is being used
> from, thus it can now be removed.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put"
  2018-11-15 22:16 ` [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put" Fernando Ramos
@ 2018-11-24 20:47   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:47 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> This patch unifies the naming of DRM functions for reference counting as
> requested on Documentation/gpu/todo.rst
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions
  2018-11-15 22:16 ` [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions Fernando Ramos
  2018-11-21 18:56   ` Lyude Paul
@ 2018-11-24 20:49   ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:49 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Maarten Lankhorst, Maxime Ripard,
	sean, Dave Airlie, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> There are no more places where this (deprecated) function is being
> used from, thus it can now be removed.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied collecting Paul's review tag.

Yours,
Linus Walleij

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

* Re: [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions
  2018-11-15 22:16 ` [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions Fernando Ramos
@ 2018-11-24 20:55   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:55 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Maarten Lankhorst, Maxime Ripard,
	sean, Dave Airlie, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> There are no more places where this (deprecated) function is being used
> from, thus it can now be removed.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script
  2018-11-15 22:16 ` [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script Fernando Ramos
  2018-11-18 11:04   ` Julia Lawall
@ 2018-11-24 20:58   ` Linus Walleij
  1 sibling, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:58 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:18 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> The coccinelle script was used to rename some (deprecated) functions
> which no longer exist now.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied with Julia's ACK.

Yours,
Linus Walleij

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

* Re: [PATCH 9/9] docs: drm: remove no longer relevant TODO entry
  2018-11-15 22:16 ` [PATCH 9/9] docs: drm: remove no longer relevant TODO entry Fernando Ramos
@ 2018-11-24 20:59   ` Linus Walleij
  0 siblings, 0 replies; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 20:59 UTC (permalink / raw)
  To: greenfoo
  Cc: open list:DRM PANEL DRIVERS, Dave Airlie, Maarten Lankhorst,
	Maxime Ripard, sean, Jonathan Corbet, abrodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, linux+etnaviv, Christian Gmeiner, Marek Vasut,
	Stefan Agner, kieran.bingham+renesas, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, michal.lkml, Haneen Mohammed,
	linux-doc, linux-kernel, Linux ARM, virtualization, etnaviv,
	Linux-Renesas, cocci

On Thu, Nov 15, 2018 at 11:18 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:

> This entry asked to rename all drm core "*_reference/_unrefence"
> functions to "*_get/_put".
>
> Now that this task is complete, we can remove this entry from the TODO
> list.
>
> Signed-off-by: Fernando Ramos <greenfoo@gluegarage.com>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-21  9:42   ` Daniel Vetter
       [not found]     ` <22044302.7aKok9czXB@avalon>
@ 2018-11-24 21:17     ` Linus Walleij
  2018-11-26 14:12       ` Daniel Vetter
  1 sibling, 1 reply; 35+ messages in thread
From: Linus Walleij @ 2018-11-24 21:17 UTC (permalink / raw)
  To: greenfoo, open list:DRM PANEL DRIVERS, Maarten Lankhorst,
	Maxime Ripard, sean, Dave Airlie, Jonathan Corbet, abrodkin,
	Boris Brezillon, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Gerd Hoffmann, Archit Taneja, Andrzej Hajda,
	Laurent Pinchart, Lucas Stach, linux+etnaviv, Christian Gmeiner,
	Marek Vasut, Stefan Agner, kieran.bingham+renesas, Shawn Guo,
	Julia Lawall, Gilles Muller, Nicolas Palix, michal.lkml,
	Haneen Mohammed, linux-doc, linux-kernel, Linux ARM,
	virtualization, etnaviv, Linux-Renesas, cocci

On Wed, Nov 21, 2018 at 10:42 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Nov 15, 2018 at 11:38:35PM +0100, Linus Walleij wrote:
> > On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:
> >
> > > One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
> > > "switch from reference/unreference to get/put". That's what this patch series is
> > > about.
> >
> > The series:
> > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
> Since your reviewed it all, and there's a pile of acks for the driver
> parts too: Want to go ahead and apply it too?

OK I did... the git was quirky, patches changes around
under my feet and dim started to complain about problems
with commits that weren't even mine.

It was especially scary.

But I think I managed to apply the patches and push the
branch now.

Yours,
Linus Walleij

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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-24 21:17     ` Linus Walleij
@ 2018-11-26 14:12       ` Daniel Vetter
  2018-11-29 14:45         ` Linus Walleij
  0 siblings, 1 reply; 35+ messages in thread
From: Daniel Vetter @ 2018-11-26 14:12 UTC (permalink / raw)
  To: Linus Walleij
  Cc: greenfoo, open list:DRM PANEL DRIVERS, Maarten Lankhorst,
	Maxime Ripard, sean, Dave Airlie, Jonathan Corbet, abrodkin,
	Boris Brezillon, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Gerd Hoffmann, Archit Taneja, Andrzej Hajda,
	Laurent Pinchart, Lucas Stach, linux+etnaviv, Christian Gmeiner,
	Marek Vasut, Stefan Agner, kieran.bingham+renesas, Shawn Guo,
	Julia Lawall, Gilles Muller, Nicolas Palix, michal.lkml,
	Haneen Mohammed, linux-doc, linux-kernel, Linux ARM,
	virtualization, etnaviv, Linux-Renesas, cocci

On Sat, Nov 24, 2018 at 10:17:13PM +0100, Linus Walleij wrote:
> On Wed, Nov 21, 2018 at 10:42 AM Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Thu, Nov 15, 2018 at 11:38:35PM +0100, Linus Walleij wrote:
> > > On Thu, Nov 15, 2018 at 11:17 PM Fernando Ramos <greenfoo@gluegarage.com> wrote:
> > >
> > > > One of the things in the DRM TODO list ("Documentation/gpu/todo.rst") was to
> > > > "switch from reference/unreference to get/put". That's what this patch series is
> > > > about.
> > >
> > > The series:
> > > Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> >
> > Since your reviewed it all, and there's a pile of acks for the driver
> > parts too: Want to go ahead and apply it too?
> 
> OK I did... the git was quirky, patches changes around
> under my feet and dim started to complain about problems
> with commits that weren't even mine.
> 
> It was especially scary.
> 
> But I think I managed to apply the patches and push the
> branch now.

Except when you're racing with someone else you should only see conflicts
with stuff you've just pushed. Or if someone forgot to fix up their mess.
What was the conflict? Looking at the git-rerere log I'm not exactly sure
what happened ... Looks like only one of the patches didn't apply cleanly
anymore because it was somewhat outdated. Otherwise nothing from you.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-26 14:12       ` Daniel Vetter
@ 2018-11-29 14:45         ` Linus Walleij
  2018-11-29 14:55           ` Daniel Vetter
  0 siblings, 1 reply; 35+ messages in thread
From: Linus Walleij @ 2018-11-29 14:45 UTC (permalink / raw)
  To: greenfoo, open list:DRM PANEL DRIVERS, Maarten Lankhorst,
	Maxime Ripard, sean, Dave Airlie, Jonathan Corbet, abrodkin,
	Boris Brezillon, Nicolas Ferre, Alexandre Belloni,
	Ludovic Desroches, Gerd Hoffmann, Archit Taneja, Andrzej Hajda,
	Laurent Pinchart, Lucas Stach, linux+etnaviv, Christian Gmeiner,
	Marek Vasut, Stefan Agner, kieran.bingham+renesas, Shawn Guo,
	Julia Lawall, Gilles Muller, Nicolas Palix, michal.lkml,
	Haneen Mohammed, linux-doc, linux-kernel, Linux ARM,
	virtualization, etnaviv, Linux-Renesas, cocci

On Mon, Nov 26, 2018 at 3:12 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> On Sat, Nov 24, 2018 at 10:17:13PM +0100, Linus Walleij wrote:

> > It was especially scary.
> >
> > But I think I managed to apply the patches and push the
> > branch now.
>
> Except when you're racing with someone else you should only see conflicts
> with stuff you've just pushed. Or if someone forgot to fix up their mess.
> What was the conflict?

dim push-branches was complaining that one of the commits was
missing the proper committer sign-off, it was the bottom commit under
mine (IIRC "drm/atomic-helper: WARN if fake_commit->hw_done is not
completed as expected")
and dim update-branches seemed to rebase and fix up my patches
and then everything was fine.

I just felt slightly out of control :D

Yours,
Linus Walleij

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

* Re: [PATCH 0/9] drm: remove deprecated functions
  2018-11-29 14:45         ` Linus Walleij
@ 2018-11-29 14:55           ` Daniel Vetter
  0 siblings, 0 replies; 35+ messages in thread
From: Daniel Vetter @ 2018-11-29 14:55 UTC (permalink / raw)
  To: Linus Walleij
  Cc: greenfoo, dri-devel, Maarten Lankhorst, Maxime Ripard, Sean Paul,
	Dave Airlie, Jonathan Corbet, Alexey Brodkin, Boris Brezillon,
	Nicolas Ferre, Alexandre Belloni, Ludovic Desroches,
	Gerd Hoffmann, Archit Taneja, Andrzej Hajda, Laurent Pinchart,
	Lucas Stach, Russell King, Christian Gmeiner, Marek Vasut,
	Stefan Agner, Kieran Bingham, Shawn Guo, Julia Lawall,
	Gilles Muller, Nicolas Palix, Michal Marek, Haneen Mohammed,
	Linux Doc Mailing List, Linux Kernel Mailing List, Linux ARM,
	open list:VIRTIO CORE, NET...,
	etnaviv, open list:DRM DRIVERS FOR RENESAS, cocci

On Thu, Nov 29, 2018 at 3:45 PM Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Mon, Nov 26, 2018 at 3:12 PM Daniel Vetter <daniel@ffwll.ch> wrote:
> > On Sat, Nov 24, 2018 at 10:17:13PM +0100, Linus Walleij wrote:
>
> > > It was especially scary.
> > >
> > > But I think I managed to apply the patches and push the
> > > branch now.
> >
> > Except when you're racing with someone else you should only see conflicts
> > with stuff you've just pushed. Or if someone forgot to fix up their mess.
> > What was the conflict?
>
> dim push-branches was complaining that one of the commits was
> missing the proper committer sign-off, it was the bottom commit under
> mine (IIRC "drm/atomic-helper: WARN if fake_commit->hw_done is not
> completed as expected")
> and dim update-branches seemed to rebase and fix up my patches
> and then everything was fine.

This sounds like you (or dim?) accidentaly amended that commit (which
changes the committer and results in the warning), and a rebase would
indeed have fixed that. If the first patch conflicts this can happen
because dim apply-branch doesn't bail out correctly. Or at least did
in the past, I recently fixed that in

commit ee299e510ae468aab27610bcbc4fdd4de932f74b
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Oct 17 08:53:00 2018 +0200

    dim: make apply-patch fail again

> I just felt slightly out of control :D

If your dim didn't have the above commit and you had a conflict it's
all explained. Otherwise I'm not sure what's been going on ...
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

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

end of thread, other threads:[~2018-11-29 14:55 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-15 22:16 [PATCH 0/9] drm: remove deprecated functions Fernando Ramos
2018-11-15 22:16 ` [PATCH 1/9] drm: replace "drm_gem_object_unreference_unlocked" function with "*put_unlocked" Fernando Ramos
2018-11-24 20:38   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 2/9] drm: remove deprecated "[__]drm_gem_object_[un]reference[_locked]" functions Fernando Ramos
2018-11-24 20:38   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put" Fernando Ramos
2018-11-15 23:00   ` Boris Brezillon
2018-11-16 10:15   ` Lucas Stach
2018-11-16 17:04     ` Fernando
2018-11-20  9:53       ` Jani Nikula
2018-11-24 20:44       ` Linus Walleij
2018-11-19 11:39   ` Stefan Agner
2018-11-19 12:13   ` Shawn Guo
2018-11-24 20:44   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 4/9] drm: remove deprecated "drm_dev_unref" function Fernando Ramos
2018-11-24 20:45   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 5/9] drm: replace "drm_connector_unreference" with "drm_connector_put" Fernando Ramos
2018-11-24 20:47   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 6/9] drm: remove deprecated "drm_connector_[un]reference" functions Fernando Ramos
2018-11-21 18:56   ` Lyude Paul
2018-11-24 20:49   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 7/9] drm: remove deprecated "drm_framebuffer_[un]reference" functions Fernando Ramos
2018-11-24 20:55   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 8/9] drm: remove no longer needed drm-get-put coccinelle script Fernando Ramos
2018-11-18 11:04   ` Julia Lawall
2018-11-24 20:58   ` Linus Walleij
2018-11-15 22:16 ` [PATCH 9/9] docs: drm: remove no longer relevant TODO entry Fernando Ramos
2018-11-24 20:59   ` Linus Walleij
2018-11-15 22:38 ` [PATCH 0/9] drm: remove deprecated functions Linus Walleij
2018-11-21  9:42   ` Daniel Vetter
     [not found]     ` <22044302.7aKok9czXB@avalon>
2018-11-22  8:55       ` Daniel Vetter
2018-11-24 21:17     ` Linus Walleij
2018-11-26 14:12       ` Daniel Vetter
2018-11-29 14:45         ` Linus Walleij
2018-11-29 14:55           ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).