Commit 862314bc authored by AngeloGioacchino Del Regno's avatar AngeloGioacchino Del Regno Committed by Rob Clark

drm/msm/dpu: Allow specifying features and sblk in DSPP_BLK macro

The DSPP_BLK macro was ad-hoc made for SC7180, but this is wrong
because not all of the DPU DSPP versions can use the same DSPP block
configuration, and not all of them have got the same features.

For this reason, add two more params to the DSPP_BLK macro, so that
it is possible to specify the feature mask and the sblk config for
each DSPP.

Fixes: 4259ff7a ("drm/msm/dpu: add support for pcc color block in dpu driver")
Signed-off-by: default avatarAngeloGioacchino Del Regno <angelogioacchino.delregno@somainline.org>
Signed-off-by: default avatarRob Clark <robdclark@chromium.org>
parent 731806da
...@@ -532,23 +532,28 @@ static const struct dpu_dspp_sub_blks sm8150_dspp_sblk = { ...@@ -532,23 +532,28 @@ static const struct dpu_dspp_sub_blks sm8150_dspp_sblk = {
.len = 0x90, .version = 0x40000}, .len = 0x90, .version = 0x40000},
}; };
#define DSPP_BLK(_name, _id, _base, _sblk) \ #define DSPP_BLK(_name, _id, _base, _mask, _sblk) \
{\ {\
.name = _name, .id = _id, \ .name = _name, .id = _id, \
.base = _base, .len = 0x1800, \ .base = _base, .len = 0x1800, \
.features = DSPP_SC7180_MASK, \ .features = _mask, \
.sblk = _sblk \ .sblk = _sblk \
} }
static const struct dpu_dspp_cfg sc7180_dspp[] = { static const struct dpu_dspp_cfg sc7180_dspp[] = {
DSPP_BLK("dspp_0", DSPP_0, 0x54000, &sc7180_dspp_sblk), DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
&sc7180_dspp_sblk),
}; };
static const struct dpu_dspp_cfg sm8150_dspp[] = { static const struct dpu_dspp_cfg sm8150_dspp[] = {
DSPP_BLK("dspp_0", DSPP_0, 0x54000, &sm8150_dspp_sblk), DSPP_BLK("dspp_0", DSPP_0, 0x54000, DSPP_SC7180_MASK,
DSPP_BLK("dspp_1", DSPP_1, 0x56000, &sm8150_dspp_sblk), &sm8150_dspp_sblk),
DSPP_BLK("dspp_2", DSPP_2, 0x58000, &sm8150_dspp_sblk), DSPP_BLK("dspp_1", DSPP_1, 0x56000, DSPP_SC7180_MASK,
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, &sm8150_dspp_sblk), &sm8150_dspp_sblk),
DSPP_BLK("dspp_2", DSPP_2, 0x58000, DSPP_SC7180_MASK,
&sm8150_dspp_sblk),
DSPP_BLK("dspp_3", DSPP_3, 0x5a000, DSPP_SC7180_MASK,
&sm8150_dspp_sblk),
}; };
/************************************************************* /*************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment