Since we don't support and don't use VBIF_NRT, VBIF_RT is the only
possible VBIF type. To simplify the driver, drop vbif_idx from the VBIF
instance structure. As the last users of VBIF_RT and enum dpu_vbif are
gone, drop them too.

Signed-off-by: Dmitry Baryshkov <[email protected]>
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h |  4 ----
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c |  1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h |  1 -
 drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c    | 30 ++++++++---------------------
 4 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
index a169628eb512..0e65bf5ddc4a 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_mdss.h
@@ -284,10 +284,6 @@ enum dpu_wd_timer {
        WD_TIMER_MAX
 };
 
-enum dpu_vbif {
-       VBIF_RT,
-};
-
 /**
  * enum dpu_3d_blend_mode
  * Desribes how the 3d data is blended
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
index de70d6b00972..112df3f31e2b 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c
@@ -236,7 +236,6 @@ struct dpu_hw_vbif *dpu_hw_vbif_init(struct drm_device *dev,
        /*
         * Assign ops
         */
-       c->idx = VBIF_RT;
        c->cap = cfg;
        _setup_vbif_ops(&c->ops, c->cap->features);
 
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h
index 9ac49448e432..96ec4e35e549 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.h
@@ -98,7 +98,6 @@ struct dpu_hw_vbif {
        struct dpu_hw_blk_reg_map hw;
 
        /* vbif */
-       enum dpu_vbif idx;
        const struct dpu_vbif_cfg *cap;
 
        /* ops */
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
index d33231f1d50b..0c6fa9bb0cb6 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_vbif.c
@@ -11,16 +11,6 @@
 #include "dpu_hw_vbif.h"
 #include "dpu_trace.h"
 
-static const char *dpu_vbif_name(enum dpu_vbif idx)
-{
-       switch (idx) {
-       case VBIF_RT:
-               return "VBIF_RT";
-       default:
-               return "??";
-       }
-}
-
 /**
  * _dpu_vbif_wait_for_xin_halt - wait for the xin to halt
  * @vbif:      Pointer to hardware vbif driver
@@ -52,12 +42,10 @@ static int _dpu_vbif_wait_for_xin_halt(struct dpu_hw_vbif 
*vbif, u32 xin_id)
 
        if (!status) {
                rc = -ETIMEDOUT;
-               DPU_ERROR("%s client %d not halting. TIMEDOUT.\n",
-                               dpu_vbif_name(vbif->idx), xin_id);
+               DPU_ERROR("VBIF client %d not halting. TIMEDOUT.\n", xin_id);
        } else {
                rc = 0;
-               DRM_DEBUG_ATOMIC("%s client %d is halted\n",
-                               dpu_vbif_name(vbif->idx), xin_id);
+               DRM_DEBUG_ATOMIC("VBIF client %d is halted\n", xin_id);
        }
 
        return rc;
@@ -97,10 +85,10 @@ static void _dpu_vbif_apply_dynamic_ot_limit(struct 
dpu_hw_vbif *vbif,
                }
        }
 
-       DRM_DEBUG_ATOMIC("%s xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n",
-                       dpu_vbif_name(vbif->idx), params->xin_id,
-                       params->width, params->height, params->frame_rate,
-                       pps, *ot_lim);
+       DRM_DEBUG_ATOMIC("VBIF xin:%d w:%d h:%d fps:%d pps:%llu ot:%u\n",
+                        params->xin_id,
+                        params->width, params->height, params->frame_rate,
+                        pps, *ot_lim);
 }
 
 /**
@@ -143,8 +131,7 @@ static u32 _dpu_vbif_get_ot_limit(struct dpu_hw_vbif *vbif,
        }
 
 exit:
-       DRM_DEBUG_ATOMIC("%s xin:%d ot_lim:%d\n",
-                       dpu_vbif_name(vbif->idx), params->xin_id, ot_lim);
+       DRM_DEBUG_ATOMIC("VBIF xin:%d ot_lim:%d\n", params->xin_id, ot_lim);
        return ot_lim;
 }
 
@@ -252,8 +239,7 @@ void dpu_vbif_clear_errors(struct dpu_kms *dpu_kms)
        if (vbif && vbif->ops.clear_errors) {
                vbif->ops.clear_errors(vbif, &pnd, &src);
                if (pnd || src) {
-                       DRM_DEBUG_KMS("%s: pnd 0x%X, src 0x%X\n",
-                                     dpu_vbif_name(vbif->idx), pnd, src);
+                       DRM_DEBUG_KMS("VBIF: pnd 0x%X, src 0x%X\n", pnd, src);
                }
        }
 }

-- 
2.47.3

Reply via email to