public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers
@ 2025-12-18 13:25 Ludovic Desroches
  2025-12-18 13:25 ` [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller Ludovic Desroches
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:25 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Hi,

This set of patches is mostly about using available helpers when
possible to simplify the code and ease the maintenance.

There is a dependency on "drm/panel: simple: restore connector_type
fallback", otherwise the atmel-hlcdc driver may fail during the probe.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
Changes in v2:
- Fix patch 5 warning about uninitialized use of ret.
- Link to v1: https://lore.kernel.org/r/20251121-lcd_cleanup_mainline-v1-0-2587e6fe4d67@microchip.com

---
Ludovic Desroches (8):
      drm/atmel-hlcdc: use managed device resources for the display controller
      drm/atmel-hlcdc: add support for the nomodeset kernel parameter
      drm/atmel-hlcdc: use drmm_simple_encoder_alloc()
      drm/atmel-hlcdc: use drm_crtc_mask()
      drm/atmel-hlcdc: use devm_drm_of_get_bridge()
      drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes()
      drm/atmel-hlcdc: use drmm_universal_plane_alloc()
      drm/atmel-hlcdc: destroy properly the plane state in the reset callback

 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c   | 32 ++---------
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c     | 40 +++++++------
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h     |  1 +
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 50 +++++-----------
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c  | 73 +++++++++++-------------
 5 files changed, 75 insertions(+), 121 deletions(-)
---
base-commit: 88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b
change-id: 20251121-lcd_cleanup_mainline-b6acc75b5a09

Best regards,
-- 
Ludovic Desroches <ludovic.desroches@microchip.com>



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

* [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
@ 2025-12-18 13:25 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter Ludovic Desroches
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:25 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Take benefit of managed device resources to reduce the risk of memory
leak and to simplify error paths.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 25 ++++++++++++-------------
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h |  1 +
 2 files changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index dd70894c8f38e7303e06167594ac289cb345b510..8ed029381c555db10d596efc8d52753c47767633 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -751,11 +751,16 @@ static int atmel_hlcdc_dc_modeset_init(struct drm_device *dev)
 	return 0;
 }
 
+static struct atmel_hlcdc_dc *atmel_hlcdc_dc_of_dev(struct drm_device *dev)
+{
+	return container_of(dev, struct atmel_hlcdc_dc, dev);
+}
+
 static int atmel_hlcdc_dc_load(struct drm_device *dev)
 {
 	struct platform_device *pdev = to_platform_device(dev->dev);
 	const struct of_device_id *match;
-	struct atmel_hlcdc_dc *dc;
+	struct atmel_hlcdc_dc *dc = atmel_hlcdc_dc_of_dev(dev);
 	int ret;
 
 	match = of_match_node(atmel_hlcdc_of_match, dev->dev->parent->of_node);
@@ -769,10 +774,6 @@ static int atmel_hlcdc_dc_load(struct drm_device *dev)
 		return -EINVAL;
 	}
 
-	dc = devm_kzalloc(dev->dev, sizeof(*dc), GFP_KERNEL);
-	if (!dc)
-		return -ENOMEM;
-
 	dc->desc = match->data;
 	dc->hlcdc = dev_get_drvdata(dev->dev->parent);
 	dev->dev_private = dc;
@@ -853,16 +854,18 @@ static const struct drm_driver atmel_hlcdc_dc_driver = {
 
 static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
 {
+	struct atmel_hlcdc_dc *dc;
 	struct drm_device *ddev;
 	int ret;
 
-	ddev = drm_dev_alloc(&atmel_hlcdc_dc_driver, &pdev->dev);
-	if (IS_ERR(ddev))
-		return PTR_ERR(ddev);
+	dc = devm_drm_dev_alloc(&pdev->dev, &atmel_hlcdc_dc_driver, struct atmel_hlcdc_dc, dev);
+	if (IS_ERR(dc))
+		return PTR_ERR(dc);
+	ddev = &dc->dev;
 
 	ret = atmel_hlcdc_dc_load(ddev);
 	if (ret)
-		goto err_put;
+		return ret;
 
 	ret = drm_dev_register(ddev, 0);
 	if (ret)
@@ -875,9 +878,6 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
 err_unload:
 	atmel_hlcdc_dc_unload(ddev);
 
-err_put:
-	drm_dev_put(ddev);
-
 	return ret;
 }
 
@@ -887,7 +887,6 @@ static void atmel_hlcdc_dc_drm_remove(struct platform_device *pdev)
 
 	drm_dev_unregister(ddev);
 	atmel_hlcdc_dc_unload(ddev);
-	drm_dev_put(ddev);
 }
 
 static void atmel_hlcdc_dc_drm_shutdown(struct platform_device *pdev)
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
index 53d47f01db0bd4d906b73f9f2a46f2ef7326d8c6..26b26185cf34ac1678f385982caabd2dbbc22630 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h
@@ -350,6 +350,7 @@ struct atmel_hlcdc_dc {
 	struct dma_pool *dscrpool;
 	struct atmel_hlcdc *hlcdc;
 	struct drm_crtc *crtc;
+	struct drm_device dev;
 	struct atmel_hlcdc_layer *layers[ATMEL_HLCDC_MAX_LAYERS];
 	struct {
 		u32 imr;

-- 
2.51.0



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

* [PATCH v2 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
  2025-12-18 13:25 ` [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 3/8] drm/atmel-hlcdc: use drmm_simple_encoder_alloc() Ludovic Desroches
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

According to Documentation/admin-guide/kernel-parameters.txt, this
parameter can be used to disable kernel modesetting.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Dharma Balasubiramani <dharma.b@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 8ed029381c555db10d596efc8d52753c47767633..8ff582a394794aacf84f9e23fd59f123445926a3 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -858,6 +858,9 @@ static int atmel_hlcdc_dc_drm_probe(struct platform_device *pdev)
 	struct drm_device *ddev;
 	int ret;
 
+	if (drm_firmware_drivers_only())
+		return -ENODEV;
+
 	dc = devm_drm_dev_alloc(&pdev->dev, &atmel_hlcdc_dc_driver, struct atmel_hlcdc_dc, dev);
 	if (IS_ERR(dc))
 		return PTR_ERR(dc);

-- 
2.51.0



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

* [PATCH v2 3/8] drm/atmel-hlcdc: use drmm_simple_encoder_alloc()
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
  2025-12-18 13:25 ` [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 4/8] drm/atmel-hlcdc: use drm_crtc_mask() Ludovic Desroches
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Simplify the code using drmm_simple_encoder_alloc to handle allocation
and initialization at once.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 27 ++++++++----------------
 1 file changed, 9 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
index 0b8a86afb0965ca3085dd5524983a0072199ec0b..1f43e0feeedae54321a17efc266654e72e8b9d8e 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
@@ -73,22 +73,19 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 	struct drm_bridge *bridge;
 	int ret;
 
-	ep = of_graph_get_endpoint_by_regs(dev->dev->of_node, 0, endpoint);
-	if (!ep)
-		return -ENODEV;
-
 	ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
 					  &panel, &bridge);
-	if (ret) {
-		of_node_put(ep);
+	if (ret)
 		return ret;
-	}
 
-	output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL);
-	if (!output) {
-		of_node_put(ep);
-		return -ENOMEM;
-	}
+	output = drmm_simple_encoder_alloc(dev, struct atmel_hlcdc_rgb_output,
+					   encoder, DRM_MODE_ENCODER_NONE);
+	if (IS_ERR(output))
+		return PTR_ERR(output);
+
+	ep = of_graph_get_endpoint_by_regs(dev->dev->of_node, 0, endpoint);
+	if (!ep)
+		return -ENODEV;
 
 	output->bus_fmt = atmel_hlcdc_of_bus_fmt(ep);
 	of_node_put(ep);
@@ -97,10 +94,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 		return -EINVAL;
 	}
 
-	ret = drm_simple_encoder_init(dev, &output->encoder,
-				      DRM_MODE_ENCODER_NONE);
-	if (ret)
-		return ret;
 
 	output->encoder.possible_crtcs = 0x1;
 
@@ -120,8 +113,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 			drm_panel_bridge_remove(bridge);
 	}
 
-	drm_encoder_cleanup(&output->encoder);
-
 	return ret;
 }
 

-- 
2.51.0



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

* [PATCH v2 4/8] drm/atmel-hlcdc: use drm_crtc_mask()
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (2 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 3/8] drm/atmel-hlcdc: use drmm_simple_encoder_alloc() Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge() Ludovic Desroches
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Prefer using the drm_crtc_mask() helper instead of a raw value. It
involves reordering components initialization as we need a valid crtc.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c     | 12 ++++++------
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c |  4 +++-
 2 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
index 8ff582a394794aacf84f9e23fd59f123445926a3..d1f5451ebfeaf81c382b49d0c1a6c3c32e44866b 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -723,12 +723,6 @@ static int atmel_hlcdc_dc_modeset_init(struct drm_device *dev)
 
 	drm_mode_config_init(dev);
 
-	ret = atmel_hlcdc_create_outputs(dev);
-	if (ret) {
-		drm_err(dev, "failed to create HLCDC outputs: %d\n", ret);
-		return ret;
-	}
-
 	ret = atmel_hlcdc_create_planes(dev);
 	if (ret) {
 		drm_err(dev, "failed to create planes: %d\n", ret);
@@ -741,6 +735,12 @@ static int atmel_hlcdc_dc_modeset_init(struct drm_device *dev)
 		return ret;
 	}
 
+	ret = atmel_hlcdc_create_outputs(dev);
+	if (ret) {
+		drm_err(dev, "failed to create HLCDC outputs: %d\n", ret);
+		return ret;
+	}
+
 	dev->mode_config.min_width = dc->desc->min_width;
 	dev->mode_config.min_height = dc->desc->min_height;
 	dev->mode_config.max_width = dc->desc->max_width;
diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
index 1f43e0feeedae54321a17efc266654e72e8b9d8e..e582315f70a119f2b39057ff112bc427117b85f5 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
@@ -71,6 +71,8 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 	struct device_node *ep;
 	struct drm_panel *panel;
 	struct drm_bridge *bridge;
+	struct atmel_hlcdc_dc *dc = dev->dev_private;
+	struct drm_crtc *crtc = dc->crtc;
 	int ret;
 
 	ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
@@ -95,7 +97,6 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 	}
 
 
-	output->encoder.possible_crtcs = 0x1;
 
 	if (panel) {
 		bridge = drm_panel_bridge_add_typed(panel,
@@ -103,6 +104,7 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 		if (IS_ERR(bridge))
 			return PTR_ERR(bridge);
 	}
+	output->encoder.possible_crtcs = drm_crtc_mask(crtc);
 
 	if (bridge) {
 		ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);

-- 
2.51.0



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

* [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (3 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 4/8] drm/atmel-hlcdc: use drm_crtc_mask() Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2026-01-05  6:20   ` Manikandan.M
  2025-12-18 13:26 ` [PATCH v2 6/8] drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes() Ludovic Desroches
                   ` (3 subsequent siblings)
  8 siblings, 1 reply; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Get rid of drm_of_find_panel_or_bridge() as it is deprecated and use
devm_drm_of_get_bridge() instead.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 25 +++++-------------------
 1 file changed, 5 insertions(+), 20 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
index e582315f70a119f2b39057ff112bc427117b85f5..e8aea905fb10d20d89c0cfd7937039b44d8a55b7 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
@@ -69,16 +69,14 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 {
 	struct atmel_hlcdc_rgb_output *output;
 	struct device_node *ep;
-	struct drm_panel *panel;
 	struct drm_bridge *bridge;
 	struct atmel_hlcdc_dc *dc = dev->dev_private;
 	struct drm_crtc *crtc = dc->crtc;
-	int ret;
+	int ret = 0;
 
-	ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
-					  &panel, &bridge);
-	if (ret)
-		return ret;
+	bridge = devm_drm_of_get_bridge(dev->dev, dev->dev->of_node, 0, endpoint);
+	if (IS_ERR(bridge))
+		return PTR_ERR(bridge);
 
 	output = drmm_simple_encoder_alloc(dev, struct atmel_hlcdc_rgb_output,
 					   encoder, DRM_MODE_ENCODER_NONE);
@@ -97,23 +95,10 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
 	}
 
 
-
-	if (panel) {
-		bridge = drm_panel_bridge_add_typed(panel,
-						    DRM_MODE_CONNECTOR_Unknown);
-		if (IS_ERR(bridge))
-			return PTR_ERR(bridge);
-	}
 	output->encoder.possible_crtcs = drm_crtc_mask(crtc);
 
-	if (bridge) {
+	if (bridge)
 		ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);
-		if (!ret)
-			return 0;
-
-		if (panel)
-			drm_panel_bridge_remove(bridge);
-	}
 
 	return ret;
 }

-- 
2.51.0



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

* [PATCH v2 6/8] drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes()
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (4 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge() Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 7/8] drm/atmel-hlcdc: use drmm_universal_plane_alloc() Ludovic Desroches
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Use drmm_crtc_alloc_with_planes() to simplify the code. As we no longer
have to take care about cleanup, we can get rid of
atmel_hlcdc_crtc_destroy().

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 32 +++++---------------------
 1 file changed, 6 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
index e0efc7309b1b256520eff29462431476f8589255..b075f291847f9eb91e07b7844382871f38ed5f81 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c
@@ -509,14 +509,6 @@ static const struct drm_crtc_helper_funcs lcdc_crtc_helper_funcs = {
 	.atomic_disable = atmel_hlcdc_crtc_atomic_disable,
 };
 
-static void atmel_hlcdc_crtc_destroy(struct drm_crtc *c)
-{
-	struct atmel_hlcdc_crtc *crtc = drm_crtc_to_atmel_hlcdc_crtc(c);
-
-	drm_crtc_cleanup(c);
-	kfree(crtc);
-}
-
 static void atmel_hlcdc_crtc_finish_page_flip(struct atmel_hlcdc_crtc *crtc)
 {
 	struct drm_device *dev = crtc->base.dev;
@@ -607,7 +599,6 @@ static void atmel_hlcdc_crtc_disable_vblank(struct drm_crtc *c)
 static const struct drm_crtc_funcs atmel_hlcdc_crtc_funcs = {
 	.page_flip = drm_atomic_helper_page_flip,
 	.set_config = drm_atomic_helper_set_config,
-	.destroy = atmel_hlcdc_crtc_destroy,
 	.reset = atmel_hlcdc_crtc_reset,
 	.atomic_duplicate_state =  atmel_hlcdc_crtc_duplicate_state,
 	.atomic_destroy_state = atmel_hlcdc_crtc_destroy_state,
@@ -620,15 +611,8 @@ int atmel_hlcdc_crtc_create(struct drm_device *dev)
 	struct atmel_hlcdc_plane *primary = NULL, *cursor = NULL;
 	struct atmel_hlcdc_dc *dc = dev->dev_private;
 	struct atmel_hlcdc_crtc *crtc;
-	int ret;
 	int i;
 
-	crtc = kzalloc(sizeof(*crtc), GFP_KERNEL);
-	if (!crtc)
-		return -ENOMEM;
-
-	crtc->dc = dc;
-
 	for (i = 0; i < ATMEL_HLCDC_MAX_LAYERS; i++) {
 		if (!dc->layers[i])
 			continue;
@@ -646,13 +630,13 @@ int atmel_hlcdc_crtc_create(struct drm_device *dev)
 			break;
 		}
 	}
+	crtc = drmm_crtc_alloc_with_planes(dev, struct atmel_hlcdc_crtc, base,
+					   &primary->base, &cursor->base, &atmel_hlcdc_crtc_funcs,
+					   NULL);
+	if (IS_ERR(crtc))
+		return PTR_ERR(crtc);
 
-	ret = drm_crtc_init_with_planes(dev, &crtc->base, &primary->base,
-					&cursor->base, &atmel_hlcdc_crtc_funcs,
-					NULL);
-	if (ret < 0)
-		goto fail;
-
+	crtc->dc = dc;
 	crtc->id = drm_crtc_index(&crtc->base);
 
 	for (i = 0; i < ATMEL_HLCDC_MAX_LAYERS; i++) {
@@ -674,8 +658,4 @@ int atmel_hlcdc_crtc_create(struct drm_device *dev)
 	dc->crtc = &crtc->base;
 
 	return 0;
-
-fail:
-	atmel_hlcdc_crtc_destroy(&crtc->base);
-	return ret;
 }

-- 
2.51.0



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

* [PATCH v2 7/8] drm/atmel-hlcdc: use drmm_universal_plane_alloc()
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (5 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 6/8] drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes() Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2025-12-18 13:26 ` [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback Ludovic Desroches
  2026-01-20 11:22 ` [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Manikandan.M
  8 siblings, 0 replies; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

Use the drmm_universal_plane_alloc() helper to simplify the code. Using
it, we no longer need to register the destroy callback for
drm_plane_funcs.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 21 +++++++--------------
 1 file changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index 92132be9823f1e705d266f9547702ea9530bd043..c1f3aaae29fb9f6b947f81e2fb4e7a61e10ac5d9 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -1225,7 +1225,6 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,
 static const struct drm_plane_funcs layer_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,
-	.destroy = drm_plane_cleanup,
 	.reset = atmel_hlcdc_plane_reset,
 	.atomic_duplicate_state = atmel_hlcdc_plane_atomic_duplicate_state,
 	.atomic_destroy_state = atmel_hlcdc_plane_atomic_destroy_state,
@@ -1239,12 +1238,6 @@ static int atmel_hlcdc_plane_create(struct drm_device *dev,
 	enum drm_plane_type type;
 	int ret;
 
-	plane = devm_kzalloc(dev->dev, sizeof(*plane), GFP_KERNEL);
-	if (!plane)
-		return -ENOMEM;
-
-	atmel_hlcdc_layer_init(&plane->layer, desc, dc->hlcdc->regmap);
-
 	if (desc->type == ATMEL_HLCDC_BASE_LAYER)
 		type = DRM_PLANE_TYPE_PRIMARY;
 	else if (desc->type == ATMEL_HLCDC_CURSOR_LAYER)
@@ -1252,13 +1245,13 @@ static int atmel_hlcdc_plane_create(struct drm_device *dev,
 	else
 		type = DRM_PLANE_TYPE_OVERLAY;
 
-	ret = drm_universal_plane_init(dev, &plane->base, 0,
-				       &layer_plane_funcs,
-				       desc->formats->formats,
-				       desc->formats->nformats,
-				       NULL, type, NULL);
-	if (ret)
-		return ret;
+	plane = drmm_universal_plane_alloc(dev, struct atmel_hlcdc_plane, base, 0,
+					   &layer_plane_funcs, desc->formats->formats,
+					   desc->formats->nformats, NULL, type, NULL);
+	if (IS_ERR(plane))
+		return PTR_ERR(plane);
+
+	atmel_hlcdc_layer_init(&plane->layer, desc, dc->hlcdc->regmap);
 
 	drm_plane_helper_add(&plane->base,
 			     &atmel_hlcdc_layer_plane_helper_funcs);

-- 
2.51.0



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

* [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (6 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 7/8] drm/atmel-hlcdc: use drmm_universal_plane_alloc() Ludovic Desroches
@ 2025-12-18 13:26 ` Ludovic Desroches
  2026-01-05  6:24   ` Manikandan.M
  2026-01-20 11:22 ` [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Manikandan.M
  8 siblings, 1 reply; 12+ messages in thread
From: Ludovic Desroches @ 2025-12-18 13:26 UTC (permalink / raw)
  To: Manikandan Muralidharan, Dharma Balasubiramani, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Nicolas Ferre, Alexandre Belloni, Claudiu Beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel, Ludovic Desroches

If there is a plane state to destroy when doing a plane reset, destroy
it using the atmel_hlcdc_plane_destroy_state() function. So we call
__drm_atomic_helper_plane_destroy_state() and avoid code duplication.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 52 ++++++++++++-------------
 1 file changed, 26 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
index c1f3aaae29fb9f6b947f81e2fb4e7a61e10ac5d9..81dc730362322a4bae9b48dca97b06baa1e331e7 100644
--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
@@ -1155,32 +1155,6 @@ static int atmel_hlcdc_plane_alloc_dscrs(struct drm_plane *p,
 	return -ENOMEM;
 }
 
-static void atmel_hlcdc_plane_reset(struct drm_plane *p)
-{
-	struct atmel_hlcdc_plane_state *state;
-
-	if (p->state) {
-		state = drm_plane_state_to_atmel_hlcdc_plane_state(p->state);
-
-		if (state->base.fb)
-			drm_framebuffer_put(state->base.fb);
-
-		kfree(state);
-		p->state = NULL;
-	}
-
-	state = kzalloc(sizeof(*state), GFP_KERNEL);
-	if (state) {
-		if (atmel_hlcdc_plane_alloc_dscrs(p, state)) {
-			kfree(state);
-			drm_err(p->dev,
-				"Failed to allocate initial plane state\n");
-			return;
-		}
-		__drm_atomic_helper_plane_reset(p, &state->base);
-	}
-}
-
 static struct drm_plane_state *
 atmel_hlcdc_plane_atomic_duplicate_state(struct drm_plane *p)
 {
@@ -1222,6 +1196,32 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,
 	kfree(state);
 }
 
+static void atmel_hlcdc_plane_reset(struct drm_plane *p)
+{
+	struct atmel_hlcdc_plane_state *state;
+	struct atmel_hlcdc_dc *dc = p->dev->dev_private;
+	struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
+
+	if (p->state) {
+		atmel_hlcdc_plane_atomic_destroy_state(p, p->state);
+		p->state = NULL;
+	}
+
+	state = kzalloc(sizeof(*state), GFP_KERNEL);
+	if (state) {
+		if (atmel_hlcdc_plane_alloc_dscrs(p, state)) {
+			kfree(state);
+			drm_err(p->dev,
+				"Failed to allocate initial plane state\n");
+			return;
+		}
+		__drm_atomic_helper_plane_reset(p, &state->base);
+	}
+
+	if (plane->layer.desc->layout.csc)
+		dc->desc->ops->lcdc_csc_init(plane, plane->layer.desc);
+}
+
 static const struct drm_plane_funcs layer_plane_funcs = {
 	.update_plane = drm_atomic_helper_update_plane,
 	.disable_plane = drm_atomic_helper_disable_plane,

-- 
2.51.0



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

* Re: [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge()
  2025-12-18 13:26 ` [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge() Ludovic Desroches
@ 2026-01-05  6:20   ` Manikandan.M
  0 siblings, 0 replies; 12+ messages in thread
From: Manikandan.M @ 2026-01-05  6:20 UTC (permalink / raw)
  To: Ludovic.Desroches, Dharma.B, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, Nicolas.Ferre, alexandre.belloni,
	claudiu.beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel

On 18/12/25 6:56 pm, Ludovic Desroches wrote:
> Get rid of drm_of_find_panel_or_bridge() as it is deprecated and use
> devm_drm_of_get_bridge() instead.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>

> ---
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 25 +++++-------------------
>   1 file changed, 5 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> index e582315f70a119f2b39057ff112bc427117b85f5..e8aea905fb10d20d89c0cfd7937039b44d8a55b7 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c
> @@ -69,16 +69,14 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
>   {
>   	struct atmel_hlcdc_rgb_output *output;
>   	struct device_node *ep;
> -	struct drm_panel *panel;
>   	struct drm_bridge *bridge;
>   	struct atmel_hlcdc_dc *dc = dev->dev_private;
>   	struct drm_crtc *crtc = dc->crtc;
> -	int ret;
> +	int ret = 0;
>   
> -	ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint,
> -					  &panel, &bridge);
> -	if (ret)
> -		return ret;
> +	bridge = devm_drm_of_get_bridge(dev->dev, dev->dev->of_node, 0, endpoint);
> +	if (IS_ERR(bridge))
> +		return PTR_ERR(bridge);
>   
>   	output = drmm_simple_encoder_alloc(dev, struct atmel_hlcdc_rgb_output,
>   					   encoder, DRM_MODE_ENCODER_NONE);
> @@ -97,23 +95,10 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint)
>   	}
>   
>   
> -
> -	if (panel) {
> -		bridge = drm_panel_bridge_add_typed(panel,
> -						    DRM_MODE_CONNECTOR_Unknown);
> -		if (IS_ERR(bridge))
> -			return PTR_ERR(bridge);
> -	}
>   	output->encoder.possible_crtcs = drm_crtc_mask(crtc);
>   
> -	if (bridge) {
> +	if (bridge)
>   		ret = drm_bridge_attach(&output->encoder, bridge, NULL, 0);
> -		if (!ret)
> -			return 0;
> -
> -		if (panel)
> -			drm_panel_bridge_remove(bridge);
> -	}
>   
>   	return ret;
>   }
> 

-- 
Thanks and Regards,
Manikandan M.


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

* Re: [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback
  2025-12-18 13:26 ` [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback Ludovic Desroches
@ 2026-01-05  6:24   ` Manikandan.M
  0 siblings, 0 replies; 12+ messages in thread
From: Manikandan.M @ 2026-01-05  6:24 UTC (permalink / raw)
  To: Ludovic.Desroches, Dharma.B, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, Nicolas.Ferre, alexandre.belloni,
	claudiu.beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel

On 18/12/25 6:56 pm, Ludovic Desroches wrote:
> If there is a plane state to destroy when doing a plane reset, destroy
> it using the atmel_hlcdc_plane_destroy_state() function. So we call
> __drm_atomic_helper_plane_destroy_state() and avoid code duplication.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>

Reviewed-by: Manikandan Muralidharan <manikandan.m@microchip.com>

> ---
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 52 ++++++++++++-------------
>   1 file changed, 26 insertions(+), 26 deletions(-)
> 
> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> index c1f3aaae29fb9f6b947f81e2fb4e7a61e10ac5d9..81dc730362322a4bae9b48dca97b06baa1e331e7 100644
> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c
> @@ -1155,32 +1155,6 @@ static int atmel_hlcdc_plane_alloc_dscrs(struct drm_plane *p,
>   	return -ENOMEM;
>   }
>   
> -static void atmel_hlcdc_plane_reset(struct drm_plane *p)
> -{
> -	struct atmel_hlcdc_plane_state *state;
> -
> -	if (p->state) {
> -		state = drm_plane_state_to_atmel_hlcdc_plane_state(p->state);
> -
> -		if (state->base.fb)
> -			drm_framebuffer_put(state->base.fb);
> -
> -		kfree(state);
> -		p->state = NULL;
> -	}
> -
> -	state = kzalloc(sizeof(*state), GFP_KERNEL);
> -	if (state) {
> -		if (atmel_hlcdc_plane_alloc_dscrs(p, state)) {
> -			kfree(state);
> -			drm_err(p->dev,
> -				"Failed to allocate initial plane state\n");
> -			return;
> -		}
> -		__drm_atomic_helper_plane_reset(p, &state->base);
> -	}
> -}
> -
>   static struct drm_plane_state *
>   atmel_hlcdc_plane_atomic_duplicate_state(struct drm_plane *p)
>   {
> @@ -1222,6 +1196,32 @@ static void atmel_hlcdc_plane_atomic_destroy_state(struct drm_plane *p,
>   	kfree(state);
>   }
>   
> +static void atmel_hlcdc_plane_reset(struct drm_plane *p)
> +{
> +	struct atmel_hlcdc_plane_state *state;
> +	struct atmel_hlcdc_dc *dc = p->dev->dev_private;
> +	struct atmel_hlcdc_plane *plane = drm_plane_to_atmel_hlcdc_plane(p);
> +
> +	if (p->state) {
> +		atmel_hlcdc_plane_atomic_destroy_state(p, p->state);
> +		p->state = NULL;
> +	}
> +
> +	state = kzalloc(sizeof(*state), GFP_KERNEL);
> +	if (state) {
> +		if (atmel_hlcdc_plane_alloc_dscrs(p, state)) {
> +			kfree(state);
> +			drm_err(p->dev,
> +				"Failed to allocate initial plane state\n");
> +			return;
> +		}
> +		__drm_atomic_helper_plane_reset(p, &state->base);
> +	}
> +
> +	if (plane->layer.desc->layout.csc)
> +		dc->desc->ops->lcdc_csc_init(plane, plane->layer.desc);
> +}
> +
>   static const struct drm_plane_funcs layer_plane_funcs = {
>   	.update_plane = drm_atomic_helper_update_plane,
>   	.disable_plane = drm_atomic_helper_disable_plane,
> 

-- 
Thanks and Regards,
Manikandan M.


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

* Re: [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers
  2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
                   ` (7 preceding siblings ...)
  2025-12-18 13:26 ` [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback Ludovic Desroches
@ 2026-01-20 11:22 ` Manikandan.M
  8 siblings, 0 replies; 12+ messages in thread
From: Manikandan.M @ 2026-01-20 11:22 UTC (permalink / raw)
  To: Ludovic.Desroches, Dharma.B, maarten.lankhorst, mripard,
	tzimmermann, airlied, simona, Nicolas.Ferre, alexandre.belloni,
	claudiu.beznea
  Cc: dri-devel, linux-arm-kernel, linux-kernel

On 18/12/25 6:55 pm, Ludovic Desroches wrote:
> Hi,
> 
> This set of patches is mostly about using available helpers when
> possible to simplify the code and ease the maintenance.
> 
> There is a dependency on "drm/panel: simple: restore connector_type
> fallback", otherwise the atmel-hlcdc driver may fail during the probe.
> 
> Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>

Applied to drm-misc-next.

Thanks!
> ---
> Changes in v2:
> - Fix patch 5 warning about uninitialized use of ret.
> - Link to v1: https://lore.kernel.org/r/20251121-lcd_cleanup_mainline-v1-0-2587e6fe4d67@microchip.com
> 
> ---
> Ludovic Desroches (8):
>        drm/atmel-hlcdc: use managed device resources for the display controller
>        drm/atmel-hlcdc: add support for the nomodeset kernel parameter
>        drm/atmel-hlcdc: use drmm_simple_encoder_alloc()
>        drm/atmel-hlcdc: use drm_crtc_mask()
>        drm/atmel-hlcdc: use devm_drm_of_get_bridge()
>        drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes()
>        drm/atmel-hlcdc: use drmm_universal_plane_alloc()
>        drm/atmel-hlcdc: destroy properly the plane state in the reset callback
> 
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c   | 32 ++---------
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c     | 40 +++++++------
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h     |  1 +
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 50 +++++-----------
>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c  | 73 +++++++++++-------------
>   5 files changed, 75 insertions(+), 121 deletions(-)
> ---
> base-commit: 88cbd8ac379cf5ce68b7efcfd4d1484a6871ee0b
> change-id: 20251121-lcd_cleanup_mainline-b6acc75b5a09
> 
> Best regards,

-- 
Thanks and Regards,
Manikandan M.


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

end of thread, other threads:[~2026-01-20 11:22 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-18 13:25 [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Ludovic Desroches
2025-12-18 13:25 ` [PATCH v2 1/8] drm/atmel-hlcdc: use managed device resources for the display controller Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 2/8] drm/atmel-hlcdc: add support for the nomodeset kernel parameter Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 3/8] drm/atmel-hlcdc: use drmm_simple_encoder_alloc() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 4/8] drm/atmel-hlcdc: use drm_crtc_mask() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 5/8] drm/atmel-hlcdc: use devm_drm_of_get_bridge() Ludovic Desroches
2026-01-05  6:20   ` Manikandan.M
2025-12-18 13:26 ` [PATCH v2 6/8] drm/atmel-hlcdc: use drmm_crtc_alloc_with_planes() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 7/8] drm/atmel-hlcdc: use drmm_universal_plane_alloc() Ludovic Desroches
2025-12-18 13:26 ` [PATCH v2 8/8] drm/atmel-hlcdc: destroy properly the plane state in the reset callback Ludovic Desroches
2026-01-05  6:24   ` Manikandan.M
2026-01-20 11:22 ` [PATCH v2 0/8] drm/atmel-hlcdc: make more use of helpers Manikandan.M

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox