mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-01 08:21:04 -04:00
drm/msm/dpu: inline DSC_BLK and DSC_BLK_1_2 macros
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten <marijn.suijten@somainline.org> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/545370/ Link: https://lore.kernel.org/r/20230704022136.130522-14-dmitry.baryshkov@linaro.org
This commit is contained in:
@@ -200,8 +200,13 @@ static const struct dpu_pingpong_cfg msm8998_pp[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg msm8998_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, 0),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, 0),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
}, {
|
||||
.name = "dsc_1", .id = DSC_1,
|
||||
.base = 0x80400, .len = 0x140,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_dspp_cfg msm8998_dspp[] = {
|
||||
|
||||
@@ -224,10 +224,19 @@ static const struct dpu_pingpong_cfg sdm845_pp[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sdm845_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, 0),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, 0),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, 0),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, 0),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
}, {
|
||||
.name = "dsc_1", .id = DSC_1,
|
||||
.base = 0x80400, .len = 0x140,
|
||||
}, {
|
||||
.name = "dsc_2", .id = DSC_2,
|
||||
.base = 0x80800, .len = 0x140,
|
||||
}, {
|
||||
.name = "dsc_3", .id = DSC_3,
|
||||
.base = 0x80c00, .len = 0x140,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sdm845_intf[] = {
|
||||
|
||||
@@ -245,10 +245,23 @@ static const struct dpu_merge_3d_cfg sm8150_merge_3d[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm8150_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_1", .id = DSC_1,
|
||||
.base = 0x80400, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_2", .id = DSC_2,
|
||||
.base = 0x80800, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_3", .id = DSC_3,
|
||||
.base = 0x80c00, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8150_intf[] = {
|
||||
|
||||
@@ -244,12 +244,31 @@ static const struct dpu_merge_3d_cfg sc8180x_merge_3d[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sc8180x_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_4", DSC_4, 0x81000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_5", DSC_5, 0x81400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_1", .id = DSC_1,
|
||||
.base = 0x80400, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_2", .id = DSC_2,
|
||||
.base = 0x80800, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_3", .id = DSC_3,
|
||||
.base = 0x80c00, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_4", .id = DSC_4,
|
||||
.base = 0x81000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_5", .id = DSC_5,
|
||||
.base = 0x81400, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sc8180x_intf[] = {
|
||||
|
||||
@@ -245,10 +245,23 @@ static const struct dpu_merge_3d_cfg sm8250_merge_3d[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm8250_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_1", DSC_1, 0x80400, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_2", DSC_2, 0x80800, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
DSC_BLK("dsc_3", DSC_3, 0x80c00, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_1", .id = DSC_1,
|
||||
.base = 0x80400, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_2", .id = DSC_2,
|
||||
.base = 0x80800, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
}, {
|
||||
.name = "dsc_3", .id = DSC_3,
|
||||
.base = 0x80c00, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8250_intf[] = {
|
||||
|
||||
@@ -136,7 +136,11 @@ static struct dpu_pingpong_cfg sm6350_pp[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm6350_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm6350_intf[] = {
|
||||
|
||||
@@ -90,7 +90,11 @@ static const struct dpu_pingpong_cfg sm6375_pp[] = {
|
||||
};
|
||||
|
||||
static const struct dpu_dsc_cfg sm6375_dsc[] = {
|
||||
DSC_BLK("dsc_0", DSC_0, 0x80000, BIT(DPU_DSC_OUTPUT_CTRL)),
|
||||
{
|
||||
.name = "dsc_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x140,
|
||||
.features = BIT(DPU_DSC_OUTPUT_CTRL),
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm6375_intf[] = {
|
||||
|
||||
@@ -248,10 +248,27 @@ static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = {
|
||||
* its own different sub block address.
|
||||
*/
|
||||
static const struct dpu_dsc_cfg sm8350_dsc[] = {
|
||||
DSC_BLK_1_2("dce_0_0", DSC_0, 0x80000, 0x29c, 0, dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_0_1", DSC_1, 0x80000, 0x29c, 0, dsc_sblk_1),
|
||||
DSC_BLK_1_2("dce_1_0", DSC_2, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_1_1", DSC_3, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_1),
|
||||
{
|
||||
.name = "dce_0_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_0_1", .id = DSC_1,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_1,
|
||||
}, {
|
||||
.name = "dce_1_0", .id = DSC_2,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_1_1", .id = DSC_3,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8350_intf[] = {
|
||||
|
||||
@@ -146,7 +146,12 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {
|
||||
|
||||
/* NOTE: sc7280 only has one DSC hard slice encoder */
|
||||
static const struct dpu_dsc_cfg sc7280_dsc[] = {
|
||||
DSC_BLK_1_2("dce_0_0", DSC_0, 0x80000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_0),
|
||||
{
|
||||
.name = "dce_0_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_0,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_wb_cfg sc7280_wb[] = {
|
||||
|
||||
@@ -246,12 +246,37 @@ static const struct dpu_merge_3d_cfg sc8280xp_merge_3d[] = {
|
||||
* its own different sub block address.
|
||||
*/
|
||||
static const struct dpu_dsc_cfg sc8280xp_dsc[] = {
|
||||
DSC_BLK_1_2("dce_0_0", DSC_0, 0x80000, 0x29c, 0, dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_0_1", DSC_1, 0x80000, 0x29c, 0, dsc_sblk_1),
|
||||
DSC_BLK_1_2("dce_1_0", DSC_2, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_1_1", DSC_3, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_1),
|
||||
DSC_BLK_1_2("dce_2_0", DSC_4, 0x82000, 0x29c, 0, dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_2_1", DSC_5, 0x82000, 0x29c, 0, dsc_sblk_1),
|
||||
{
|
||||
.name = "dce_0_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_0_1", .id = DSC_1,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_1,
|
||||
}, {
|
||||
.name = "dce_1_0", .id = DSC_2,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_1_1", .id = DSC_3,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_1,
|
||||
}, {
|
||||
.name = "dce_2_0", .id = DSC_4,
|
||||
.base = 0x82000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_2_1", .id = DSC_5,
|
||||
.base = 0x82000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_1,
|
||||
},
|
||||
};
|
||||
|
||||
/* TODO: INTF 3, 8 and 7 are used for MST, marked as INTF_NONE for now */
|
||||
|
||||
@@ -259,10 +259,27 @@ static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = {
|
||||
* its own different sub block address.
|
||||
*/
|
||||
static const struct dpu_dsc_cfg sm8450_dsc[] = {
|
||||
DSC_BLK_1_2("dce_0_0", DSC_0, 0x80000, 0x29c, 0, dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_0_1", DSC_1, 0x80000, 0x29c, 0, dsc_sblk_1),
|
||||
DSC_BLK_1_2("dce_1_0", DSC_2, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_1_1", DSC_3, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_1),
|
||||
{
|
||||
.name = "dce_0_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_0_1", .id = DSC_1,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_1,
|
||||
}, {
|
||||
.name = "dce_1_0", .id = DSC_2,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_1_1", .id = DSC_3,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8450_intf[] = {
|
||||
|
||||
@@ -273,10 +273,27 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {
|
||||
* its own different sub block address.
|
||||
*/
|
||||
static const struct dpu_dsc_cfg sm8550_dsc[] = {
|
||||
DSC_BLK_1_2("dce_0_0", DSC_0, 0x80000, 0x29c, 0, dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_0_1", DSC_1, 0x80000, 0x29c, 0, dsc_sblk_1),
|
||||
DSC_BLK_1_2("dce_1_0", DSC_2, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_0),
|
||||
DSC_BLK_1_2("dce_1_1", DSC_3, 0x81000, 0x29c, BIT(DPU_DSC_NATIVE_42x_EN), dsc_sblk_1),
|
||||
{
|
||||
.name = "dce_0_0", .id = DSC_0,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_0_1", .id = DSC_1,
|
||||
.base = 0x80000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2),
|
||||
.sblk = &dsc_sblk_1,
|
||||
}, {
|
||||
.name = "dce_1_0", .id = DSC_2,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_0,
|
||||
}, {
|
||||
.name = "dce_1_1", .id = DSC_3,
|
||||
.base = 0x81000, .len = 0x29c,
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | BIT(DPU_DSC_NATIVE_42x_EN),
|
||||
.sblk = &dsc_sblk_1,
|
||||
},
|
||||
};
|
||||
|
||||
static const struct dpu_intf_cfg sm8550_intf[] = {
|
||||
|
||||
@@ -495,21 +495,6 @@ static const struct dpu_dsc_sub_blks dsc_sblk_1 = {
|
||||
.ctl = {.base = 0xF80, .len = 0x10},
|
||||
};
|
||||
|
||||
#define DSC_BLK(_name, _id, _base, _features) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = 0x140, \
|
||||
.features = _features, \
|
||||
}
|
||||
|
||||
#define DSC_BLK_1_2(_name, _id, _base, _len, _features, _sblk) \
|
||||
{\
|
||||
.name = _name, .id = _id, \
|
||||
.base = _base, .len = _len, \
|
||||
.features = BIT(DPU_DSC_HW_REV_1_2) | _features, \
|
||||
.sblk = &_sblk, \
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* INTF sub blocks config
|
||||
*************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user