drm/msm/dpu: hw_blk: make dpu_hw_blk empty opaque structure
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sat, 15 May 2021 19:09:09 +0000 (22:09 +0300)
committerRob Clark <robdclark@chromium.org>
Wed, 23 Jun 2021 14:33:54 +0000 (07:33 -0700)
The code does not really use dpu_hw_blk fields, so drop them, making
dpu_hw_blk empty structure.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20210515190909.1809050-5-dmitry.baryshkov@linaro.org
Reviewed-by: Abhinav Kumar <abhinavk@codeaurora.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Rob Clark <robdclark@chromium.org>
12 files changed:
drivers/gpu/drm/msm/Makefile
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c [deleted file]
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.h
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dspp.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_lm.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_merge3d.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_pingpong.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c
drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

index 65d86ce..2c00aa7 100644 (file)
@@ -58,7 +58,6 @@ msm-y := \
        disp/dpu1/dpu_encoder_phys_cmd.o \
        disp/dpu1/dpu_encoder_phys_vid.o \
        disp/dpu1/dpu_formats.o \
-       disp/dpu1/dpu_hw_blk.o \
        disp/dpu1/dpu_hw_catalog.o \
        disp/dpu1/dpu_hw_ctl.o \
        disp/dpu1/dpu_hw_interrupts.o \
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_blk.c
deleted file mode 100644 (file)
index 1f2b74b..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0-only
-/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
- */
-
-#define pr_fmt(fmt)    "[drm:%s:%d] " fmt, __func__, __LINE__
-
-#include <linux/mutex.h>
-#include <linux/errno.h>
-#include <linux/slab.h>
-
-#include "dpu_hw_mdss.h"
-#include "dpu_hw_blk.h"
-
-/**
- * dpu_hw_blk_init - initialize hw block object
- * @hw_blk: pointer to hw block object
- * @type: hw block type - enum dpu_hw_blk_type
- * @id: instance id of the hw block
- */
-void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id)
-{
-       hw_blk->type = type;
-       hw_blk->id = id;
-}
index 7768694..52e92f3 100644 (file)
@@ -19,9 +19,7 @@ struct dpu_hw_blk;
  * @refcount: reference/usage count
  */
 struct dpu_hw_blk {
-       u32 type;
-       int id;
+       /* opaque */
 };
 
-void dpu_hw_blk_init(struct dpu_hw_blk *hw_blk, u32 type, int id);
 #endif /*_DPU_HW_BLK_H */
index 441f66a..f8a74f6 100644 (file)
@@ -613,8 +613,6 @@ struct dpu_hw_ctl *dpu_hw_ctl_init(enum dpu_ctl idx,
        c->mixer_count = m->mixer_count;
        c->mixer_hw_caps = m->mixer;
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_CTL, idx);
-
        return c;
 }
 
index 977b259..a98e964 100644 (file)
@@ -110,8 +110,6 @@ struct dpu_hw_dspp *dpu_hw_dspp_init(enum dpu_dspp idx,
        c->cap = cfg;
        _setup_dspp_ops(c, c->cap->features);
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_DSPP, idx);
-
        return c;
 }
 
index 1722455..116e2b5 100644 (file)
@@ -325,8 +325,6 @@ struct dpu_hw_intf *dpu_hw_intf_init(enum dpu_intf idx,
        c->mdss = m;
        _setup_intf_ops(&c->ops, c->cap->features);
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_INTF, idx);
-
        return c;
 }
 
index 76f8b8f..cb6bb7a 100644 (file)
@@ -182,8 +182,6 @@ struct dpu_hw_mixer *dpu_hw_lm_init(enum dpu_lm idx,
        c->cap = cfg;
        _setup_mixer_ops(m, &c->ops, c->cap->features);
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_LM, idx);
-
        return c;
 }
 
index 406ba95..c06d595 100644 (file)
@@ -79,8 +79,6 @@ struct dpu_hw_merge_3d *dpu_hw_merge_3d_init(enum dpu_merge_3d idx,
        c->caps = cfg;
        _setup_merge_3d_ops(c, c->caps->features);
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_MERGE_3D, idx);
-
        return c;
 }
 
index 92cd724..55766c9 100644 (file)
@@ -282,8 +282,6 @@ struct dpu_hw_pingpong *dpu_hw_pingpong_init(enum dpu_pingpong idx,
        c->caps = cfg;
        _setup_pingpong_ops(c, c->caps->features);
 
-       dpu_hw_blk_init(&c->base, DPU_HW_BLK_PINGPONG, idx);
-
        return c;
 }
 
index 8734a47..69eed79 100644 (file)
@@ -733,8 +733,6 @@ struct dpu_hw_pipe *dpu_hw_sspp_init(enum dpu_sspp idx,
        hw_pipe->cap = cfg;
        _setup_layer_ops(hw_pipe, hw_pipe->cap->features);
 
-       dpu_hw_blk_init(&hw_pipe->base, DPU_HW_BLK_SSPP, idx);
-
        return hw_pipe;
 }
 
index dae77d9..282e3c6 100644 (file)
@@ -322,8 +322,6 @@ struct dpu_hw_mdp *dpu_hw_mdptop_init(enum dpu_mdp idx,
        mdp->caps = cfg;
        _setup_mdp_ops(&mdp->ops, mdp->caps->features);
 
-       dpu_hw_blk_init(&mdp->base, DPU_HW_BLK_TOP, idx);
-
        return mdp;
 }
 
index c0eec12..f9c83d6 100644 (file)
@@ -428,7 +428,7 @@ static int _dpu_rm_reserve_ctls(
                features = ctl->caps->features;
                has_split_display = BIT(DPU_CTL_SPLIT_DISPLAY) & features;
 
-               DPU_DEBUG("ctl %d caps 0x%lX\n", rm->ctl_blks[j]->id, features);
+               DPU_DEBUG("ctl %d caps 0x%lX\n", j + CTL_0, features);
 
                if (needs_split_display != has_split_display)
                        continue;