Re: [PATCH v2 45/60] drm/omap: dss: Add function to retrieve display for an output

2018-06-10 Thread Sebastian Reichel
Hi,

On Sat, May 26, 2018 at 08:25:03PM +0300, Laurent Pinchart wrote:
> Add a new omapdss_display_get() function to retrieve the omap_dss_device
> for a given DSS output. This will be used when reversing the direction
> of the DSS pipeline handling logic.
> 
> Signed-off-by: Laurent Pinchart 
> ---

Reviewed-by: Sebastian Reichel 

-- Sebastian

>  drivers/gpu/drm/omapdrm/dss/display.c | 9 +
>  drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 +
>  2 files changed, 10 insertions(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/dss/display.c 
> b/drivers/gpu/drm/omapdrm/dss/display.c
> index 65ca71859c7d..697dab0435d6 100644
> --- a/drivers/gpu/drm/omapdrm/dss/display.c
> +++ b/drivers/gpu/drm/omapdrm/dss/display.c
> @@ -49,3 +49,12 @@ void omapdss_display_init(struct omap_dss_device *dssdev)
> "display%u", id);
>  }
>  EXPORT_SYMBOL_GPL(omapdss_display_init);
> +
> +struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output)
> +{
> + while (output->next)
> + output = output->next;
> +
> + return omapdss_device_get(output);
> +}
> +EXPORT_SYMBOL_GPL(omapdss_display_get);
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h 
> b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> index 723124f6e596..1d7263fc6077 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -491,6 +491,7 @@ static inline bool omapdss_is_initialized(void)
>  #define for_each_dss_display(d) \
>   while ((d = omapdss_device_get_next(d, true, false)) != NULL)
>  void omapdss_display_init(struct omap_dss_device *dssdev);
> +struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output);
>  
>  void omapdss_device_register(struct omap_dss_device *dssdev);
>  void omapdss_device_unregister(struct omap_dss_device *dssdev);
> -- 
> Regards,
> 
> Laurent Pinchart
> 
> ___
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v2 45/60] drm/omap: dss: Add function to retrieve display for an output

2018-05-26 Thread Laurent Pinchart
Add a new omapdss_display_get() function to retrieve the omap_dss_device
for a given DSS output. This will be used when reversing the direction
of the DSS pipeline handling logic.

Signed-off-by: Laurent Pinchart 
---
 drivers/gpu/drm/omapdrm/dss/display.c | 9 +
 drivers/gpu/drm/omapdrm/dss/omapdss.h | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/omapdrm/dss/display.c 
b/drivers/gpu/drm/omapdrm/dss/display.c
index 65ca71859c7d..697dab0435d6 100644
--- a/drivers/gpu/drm/omapdrm/dss/display.c
+++ b/drivers/gpu/drm/omapdrm/dss/display.c
@@ -49,3 +49,12 @@ void omapdss_display_init(struct omap_dss_device *dssdev)
  "display%u", id);
 }
 EXPORT_SYMBOL_GPL(omapdss_display_init);
+
+struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output)
+{
+   while (output->next)
+   output = output->next;
+
+   return omapdss_device_get(output);
+}
+EXPORT_SYMBOL_GPL(omapdss_display_get);
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h 
b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 723124f6e596..1d7263fc6077 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -491,6 +491,7 @@ static inline bool omapdss_is_initialized(void)
 #define for_each_dss_display(d) \
while ((d = omapdss_device_get_next(d, true, false)) != NULL)
 void omapdss_display_init(struct omap_dss_device *dssdev);
+struct omap_dss_device *omapdss_display_get(struct omap_dss_device *output);
 
 void omapdss_device_register(struct omap_dss_device *dssdev);
 void omapdss_device_unregister(struct omap_dss_device *dssdev);
-- 
Regards,

Laurent Pinchart

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