Skip to content

Commit a546362

Browse files
Jessica Zhanglumag
authored andcommitted
drm/msm/dpu: Add RM support for allocating CWB
Add support for allocating the concurrent writeback mux as part of the WB allocation Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Jessica Zhang <[email protected]> Signed-off-by: Dmitry Baryshkov <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/629238/ Link: https://lore.kernel.org/r/[email protected]
1 parent a31a610 commit a546362

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/*
33
* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
4-
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4+
* Copyright (c) 2023-2024 Qualcomm Innovation Center, Inc. All rights reserved.
55
*/
66

77
#define pr_fmt(fmt) "[drm:%s] " fmt, __func__
88
#include "dpu_kms.h"
99
#include "dpu_hw_lm.h"
1010
#include "dpu_hw_ctl.h"
1111
#include "dpu_hw_cdm.h"
12+
#include "dpu_hw_cwb.h"
1213
#include "dpu_hw_pingpong.h"
1314
#include "dpu_hw_sspp.h"
1415
#include "dpu_hw_intf.h"
@@ -122,6 +123,19 @@ int dpu_rm_init(struct drm_device *dev,
122123
rm->hw_wb[wb->id - WB_0] = hw;
123124
}
124125

126+
for (i = 0; i < cat->cwb_count; i++) {
127+
struct dpu_hw_cwb *hw;
128+
const struct dpu_cwb_cfg *cwb = &cat->cwb[i];
129+
130+
hw = dpu_hw_cwb_init(dev, cwb, mmio);
131+
if (IS_ERR(hw)) {
132+
rc = PTR_ERR(hw);
133+
DPU_ERROR("failed cwb object creation: err %d\n", rc);
134+
goto fail;
135+
}
136+
rm->cwb_blks[cwb->id - CWB_0] = &hw->base;
137+
}
138+
125139
for (i = 0; i < cat->ctl_count; i++) {
126140
struct dpu_hw_ctl *hw;
127141
const struct dpu_ctl_cfg *ctl = &cat->ctl[i];

drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ struct dpu_global_state;
2020
* @ctl_blks: array of ctl hardware resources
2121
* @hw_intf: array of intf hardware resources
2222
* @hw_wb: array of wb hardware resources
23+
* @hw_cwb: array of cwb hardware resources
2324
* @dspp_blks: array of dspp hardware resources
2425
* @hw_sspp: array of sspp hardware resources
2526
* @cdm_blk: cdm hardware resource
@@ -30,6 +31,7 @@ struct dpu_rm {
3031
struct dpu_hw_blk *ctl_blks[CTL_MAX - CTL_0];
3132
struct dpu_hw_intf *hw_intf[INTF_MAX - INTF_0];
3233
struct dpu_hw_wb *hw_wb[WB_MAX - WB_0];
34+
struct dpu_hw_blk *cwb_blks[CWB_MAX - CWB_0];
3335
struct dpu_hw_blk *dspp_blks[DSPP_MAX - DSPP_0];
3436
struct dpu_hw_blk *merge_3d_blks[MERGE_3D_MAX - MERGE_3D_0];
3537
struct dpu_hw_blk *dsc_blks[DSC_MAX - DSC_0];

0 commit comments

Comments
 (0)