]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/rockchip: psr: Remove flush by CRTC
authorTomasz Figa <tfiga@chromium.org>
Mon, 23 Apr 2018 10:50:03 +0000 (12:50 +0200)
committerAndrzej Hajda <a.hajda@samsung.com>
Tue, 24 Apr 2018 06:34:54 +0000 (08:34 +0200)
It is not used anymore after last changes and it was not even correct to
begin with as it assumed a 1:1 relation between a CRTC and encoder,
while in fact a CRTC can be attached to multiple encoders.

Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Thierry Escande <thierry.escande@collabora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180423105003.9004-28-enric.balletbo@collabora.com
drivers/gpu/drm/rockchip/rockchip_drm_psr.c
drivers/gpu/drm/rockchip/rockchip_drm_psr.h

index 74f6a6a887dded3c5cd47dba813e9cf9285f1bec..79d00d861a31f701451d3387a6cc6e8fc8e71234 100644 (file)
@@ -33,23 +33,6 @@ struct psr_drv {
        int (*set)(struct drm_encoder *encoder, bool enable);
 };
 
-static struct psr_drv *find_psr_by_crtc(struct drm_crtc *crtc)
-{
-       struct rockchip_drm_private *drm_drv = crtc->dev->dev_private;
-       struct psr_drv *psr;
-
-       mutex_lock(&drm_drv->psr_list_lock);
-       list_for_each_entry(psr, &drm_drv->psr_list, list) {
-               if (psr->encoder->crtc == crtc)
-                       goto out;
-       }
-       psr = ERR_PTR(-ENODEV);
-
-out:
-       mutex_unlock(&drm_drv->psr_list_lock);
-       return psr;
-}
-
 static struct psr_drv *find_psr_by_encoder(struct drm_encoder *encoder)
 {
        struct rockchip_drm_private *drm_drv = encoder->dev->dev_private;
@@ -166,24 +149,6 @@ static void rockchip_drm_do_flush(struct psr_drv *psr)
        mutex_unlock(&psr->lock);
 }
 
-/**
- * rockchip_drm_psr_flush - flush a single pipe
- * @crtc: CRTC of the pipe to flush
- *
- * Returns:
- * 0 on success, -errno on fail
- */
-int rockchip_drm_psr_flush(struct drm_crtc *crtc)
-{
-       struct psr_drv *psr = find_psr_by_crtc(crtc);
-       if (IS_ERR(psr))
-               return PTR_ERR(psr);
-
-       rockchip_drm_do_flush(psr);
-       return 0;
-}
-EXPORT_SYMBOL(rockchip_drm_psr_flush);
-
 /**
  * rockchip_drm_psr_flush_all - force to flush all registered PSR encoders
  * @dev: drm device
index 40e026c14168ee76db9f20047d598dd003bfde84..860c62494496e67665267ac5fccba76040fa46fb 100644 (file)
@@ -16,7 +16,6 @@
 #define __ROCKCHIP_DRM_PSR___
 
 void rockchip_drm_psr_flush_all(struct drm_device *dev);
-int rockchip_drm_psr_flush(struct drm_crtc *crtc);
 
 int rockchip_drm_psr_inhibit_put(struct drm_encoder *encoder);
 int rockchip_drm_psr_inhibit_get(struct drm_encoder *encoder);