]> git.baikalelectronics.ru Git - kernel.git/commitdiff
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 65d86cecb5713e53af4fd94d376c313d28654487..2c00aa70b70849619173018d0be064a118b1908a 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 7768694b558a15536186814d3058cead9f8c18ab..52e92f37eda416c34ed4c5152177281bb23c7b91 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 441f66a4fb37edf973cc76a9b5abd2b136221253..f8a74f6cdc4cb9514d382570207a72ea3395fad9 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 977b25968f341b8a301e83fecf190a71841bca23..a98e964c3b6fa6941691dbf0ed81fa52378b5713 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 17224556d5a83253bec305b45a8e048a02348352..116e2b5b1a90f396658f65acde9dcbfa3a92db33 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 76f8b8f75b823b6c67ef71ccf8c4c3c76b2fa645..cb6bb7a22c159463ab25f002d5c829948d766267 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 406ba950a066c191019a5b51d343e7cfa04e302d..c06d595d5df0f8ed6394d1ea03628f5b50262a97 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 92cd724263ce528cfb32f2f6be88a88c07c5cedc..55766c97c4c884a0e17b453751ef1b922afa4280 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 8734a47040aa520b18684940310c6a829e0193b4..69eed79324865e5a9e9c6e199f0293dde5b0a835 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 dae77d9c2c74522775995f745dc41c49f70c4694..282e3c6c6d48da094e6f83ac684739e9a2d08bdc 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 c0eec12498e7571295bc70ad9647e63b7f8ba904..f9c83d6e427adebbb6d36badaf4e57d6e5de1509 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;