Skip to content

Commit cace3ac

Browse files
fltorobclark
authored andcommitted
drm/msm/dpu: don't use INTF_INPUT_CTRL feature on sdm845
The INTF_INPUT_CTRL feature is not available on sdm845, so don't set it. This also adds separate feature bits for INTF (based on downstream) instead of using CTL feature bit for it, and removes the unnecessary NULL check in the added bind_pingpong_blk function. Fixes: 73bfb79 ("msm:disp:dpu1: setup display datapath for SC7180 target") Signed-off-by: Jonathan Marek <[email protected]> Signed-off-by: Rob Clark <[email protected]>
1 parent 7e9d4cd commit cace3ac

File tree

3 files changed

+27
-15
lines changed

3 files changed

+27
-15
lines changed

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@
4343

4444
#define DSPP_SC7180_MASK BIT(DPU_DSPP_PCC)
4545

46+
#define INTF_SDM845_MASK (0)
47+
48+
#define INTF_SC7180_MASK BIT(DPU_INTF_INPUT_CTRL) | BIT(DPU_INTF_TE)
49+
4650
#define DEFAULT_PIXEL_RAM_SIZE (50 * 1024)
4751
#define DEFAULT_DPU_LINE_WIDTH 2048
4852
#define DEFAULT_DPU_OUTPUT_LINE_WIDTH 2560
@@ -398,26 +402,26 @@ static struct dpu_pingpong_cfg sc7180_pp[] = {
398402
/*************************************************************
399403
* INTF sub blocks config
400404
*************************************************************/
401-
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id) \
405+
#define INTF_BLK(_name, _id, _base, _type, _ctrl_id, _features) \
402406
{\
403407
.name = _name, .id = _id, \
404408
.base = _base, .len = 0x280, \
405-
.features = BIT(DPU_CTL_ACTIVE_CFG), \
409+
.features = _features, \
406410
.type = _type, \
407411
.controller_id = _ctrl_id, \
408412
.prog_fetch_lines_worst_case = 24 \
409413
}
410414

411415
static const struct dpu_intf_cfg sdm845_intf[] = {
412-
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0),
413-
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0),
414-
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1),
415-
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1),
416+
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, INTF_SDM845_MASK),
417+
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SDM845_MASK),
418+
INTF_BLK("intf_2", INTF_2, 0x6B000, INTF_DSI, 1, INTF_SDM845_MASK),
419+
INTF_BLK("intf_3", INTF_3, 0x6B800, INTF_DP, 1, INTF_SDM845_MASK),
416420
};
417421

418422
static const struct dpu_intf_cfg sc7180_intf[] = {
419-
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0),
420-
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0),
423+
INTF_BLK("intf_0", INTF_0, 0x6A000, INTF_DP, 0, INTF_SC7180_MASK),
424+
INTF_BLK("intf_1", INTF_1, 0x6A800, INTF_DSI, 0, INTF_SC7180_MASK),
421425
};
422426

423427
/*************************************************************

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,19 @@ enum {
186186
DPU_CTL_MAX
187187
};
188188

189+
/**
190+
* INTF sub-blocks
191+
* @DPU_INTF_INPUT_CTRL Supports the setting of pp block from which
192+
* pixel data arrives to this INTF
193+
* @DPU_INTF_TE INTF block has TE configuration support
194+
* @DPU_INTF_MAX
195+
*/
196+
enum {
197+
DPU_INTF_INPUT_CTRL = 0x1,
198+
DPU_INTF_TE,
199+
DPU_INTF_MAX
200+
};
201+
189202
/**
190203
* VBIF sub-blocks and features
191204
* @DPU_VBIF_QOS_OTLIM VBIF supports OT Limit

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,14 +225,9 @@ static void dpu_hw_intf_bind_pingpong_blk(
225225
bool enable,
226226
const enum dpu_pingpong pp)
227227
{
228-
struct dpu_hw_blk_reg_map *c;
228+
struct dpu_hw_blk_reg_map *c = &intf->hw;
229229
u32 mux_cfg;
230230

231-
if (!intf)
232-
return;
233-
234-
c = &intf->hw;
235-
236231
mux_cfg = DPU_REG_READ(c, INTF_MUX);
237232
mux_cfg &= ~0xf;
238233

@@ -280,7 +275,7 @@ static void _setup_intf_ops(struct dpu_hw_intf_ops *ops,
280275
ops->get_status = dpu_hw_intf_get_status;
281276
ops->enable_timing = dpu_hw_intf_enable_timing_engine;
282277
ops->get_line_count = dpu_hw_intf_get_line_count;
283-
if (cap & BIT(DPU_CTL_ACTIVE_CFG))
278+
if (cap & BIT(DPU_INTF_INPUT_CTRL))
284279
ops->bind_pingpong_blk = dpu_hw_intf_bind_pingpong_blk;
285280
}
286281

0 commit comments

Comments
 (0)