diff mbox series

[v3,44/56] drm/omap: simplify omap_display_id

Message ID 20201105120333.947408-45-tomi.valkeinen@ti.com
State New
Headers show
Series Convert DSI code to use drm_mipi_dsi and drm_panel | expand

Commit Message

Tomi Valkeinen Nov. 5, 2020, 12:03 p.m. UTC
From: Sebastian Reichel <sebastian.reichel@collabora.com>

We no longer need to check for the DSS API, since all encoders,
panels and connectors have been converted to the bridge API.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
 drivers/gpu/drm/omapdrm/omap_drv.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

Comments

Laurent Pinchart Nov. 9, 2020, 11:03 a.m. UTC | #1
Hi Tomi and Sebastian,

Thank you for the patch.

On Thu, Nov 05, 2020 at 02:03:21PM +0200, Tomi Valkeinen wrote:
> From: Sebastian Reichel <sebastian.reichel@collabora.com>

> 

> We no longer need to check for the DSS API, since all encoders,

> panels and connectors have been converted to the bridge API.

> 

> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>


Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>


> ---

>  drivers/gpu/drm/omapdrm/omap_drv.c | 9 +--------

>  1 file changed, 1 insertion(+), 8 deletions(-)

> 

> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c

> index 20b5b4e9071c..dbb8e95234b3 100644

> --- a/drivers/gpu/drm/omapdrm/omap_drv.c

> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c

> @@ -206,14 +206,7 @@ static int omap_display_id(struct omap_dss_device *output)

>  {

>  	struct device_node *node = NULL;

>  

> -	if (output->next) {

> -		struct omap_dss_device *display = output;

> -

> -		while (display->next)

> -			display = display->next;

> -

> -		node = display->dev->of_node;

> -	} else if (output->bridge) {

> +	if (output->bridge) {

>  		struct drm_bridge *bridge = output->bridge;

>  

>  		while (drm_bridge_get_next_bridge(bridge))

> 


-- 
Regards,

Laurent Pinchart
diff mbox series

Patch

diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/omapdrm/omap_drv.c
index 20b5b4e9071c..dbb8e95234b3 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.c
+++ b/drivers/gpu/drm/omapdrm/omap_drv.c
@@ -206,14 +206,7 @@  static int omap_display_id(struct omap_dss_device *output)
 {
 	struct device_node *node = NULL;
 
-	if (output->next) {
-		struct omap_dss_device *display = output;
-
-		while (display->next)
-			display = display->next;
-
-		node = display->dev->of_node;
-	} else if (output->bridge) {
+	if (output->bridge) {
 		struct drm_bridge *bridge = output->bridge;
 
 		while (drm_bridge_get_next_bridge(bridge))