drm/msm/dpu: fix DSC 1.2 block lengths
PATCH v2 1/2 drm/msm/dpu: fix DSC 1.2 block lengths
All DSC_BLK_1_2 declarations incorrectly pass 0x29c as the block length. This includes the common block itself, enc subblocks and some empty space around. Change that to pass 0x4 instead, the length of common register block itself.
---
Changes since v1:
- Rebased on top of the catalog changes
--- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 12 ++++++------ .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +4 -4
@@ -283,22 +283,22 @@ static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = {static const struct dpu_dsc_cfg sm8350_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1 -1
@@ -163,7 +163,7 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {static const struct dpu_dsc_cfg sc7280_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_0, },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +6 -6
@@ -286,32 +286,32 @@ static const struct dpu_merge_3d_cfg sc8280xp_merge_3d[] = {static const struct dpu_dsc_cfg sc8280xp_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .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 , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_2_1" , .id =DSC_5 , - .base =0x82000 , .len =0x29c , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +4 -4
@@ -305,22 +305,22 @@ static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = {static const struct dpu_dsc_cfg sm8450_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },
drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +4 -4
@@ -320,22 +320,22 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {static const struct dpu_dsc_cfg sm8550_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },
Signature · 1 line
2.39.2
PATCH v2 2/2 drm/msm/dpu: fix DSC 1.2 enc subblock length
Both struct dpu_dsc_sub_blks instances declare enc subblock length to be 0x100, while the actual length is 0x9c (last register having offset 0x98). Reduce subblock length to remove the empty register space from being dumped.
---
Changes since v1:
- Rebased on top of the catalog changes
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +2 -2
@@ -456,12 +456,12 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {* DSC sub blocks config *************************************************************/ static const struct dpu_dsc_sub_blks dsc_sblk_0 = { - .enc = {.name ="enc" , .base =0x100 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x100 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF00 , .len =0x10 }, };static const struct dpu_dsc_sub_blks dsc_sblk_1 = { - .enc = {.name ="enc" , .base =0x200 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x200 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF80 , .len =0x10 }, };
Signature · 1 line
2.39.2
Marijn Suijten
reviewerRe: [PATCH v2 2/2] drm/msm/dpu: fix DSC 1.2 enc subblock length
Quoted 24 lines · Dmitry Baryshkov
Both struct
dpu_dsc_sub_blksinstances declare enc subblock length to be0x100, while the actual length is0x9c(last register having offset0x98). Reduce subblock length to remove the empty register space from being dumped.Fixes 0d1b10c63346 ("drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets")Reviewed-by Abhinav Kumar <[email protected]>Reviewed-by Marijn Suijten <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>---
Changes since v1:
- Rebased on top of the catalog changes---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0
-0
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = { · line 460
Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1
-1@@ -456,12 +456,12 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {* DSC sub blocks config *************************************************************/ static const struct dpu_dsc_sub_blks dsc_sblk_0 = { - .enc = {.name ="enc" , .base =0x100 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x100 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF00 , .len =0x10 },
For the time being only ctl register 0x00 and 0x04 is touched, DATA_IN_SWAP and CLK_CTRL at 0x08 and 0x0c are defined but not used, though it might still be useful to see their current value in the dump.
- Marijn
Quoted 11 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1
-1};static const struct dpu_dsc_sub_blks dsc_sblk_1 = { - .enc = {.name ="enc" , .base =0x200 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x200 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF80 , .len =0x10 }, };Signature · 1 line
2.39.2
Re: [PATCH v2 2/2] drm/msm/dpu: fix DSC 1.2 enc subblock length
Quoted 36 lines · Marijn Suijten
Quoted 24 lines · Dmitry Baryshkov
Both struct
dpu_dsc_sub_blksinstances declare enc subblock length to be0x100, while the actual length is0x9c(last register having offset0x98). Reduce subblock length to remove the empty register space from being dumped.Fixes 0d1b10c63346 ("drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets")Reviewed-by Abhinav Kumar <[email protected]>Reviewed-by Marijn Suijten <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>---
Changes since v1:
- Rebased on top of the catalog changes---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +0
-0drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = { · line 460
Quoted 6 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1
-1@@ -456,12 +456,12 @@ static const struct dpu_pingpong_sub_blks sc7280_pp_sblk = {* DSC sub blocks config *************************************************************/ static const struct dpu_dsc_sub_blks dsc_sblk_0 = { - .enc = {.name ="enc" , .base =0x100 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x100 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF00 , .len =0x10 },For the time being only ctl register
0x00and0x04is touched,DATA_IN_SWAPandCLK_CTRLat0x08and0x0care defined but not used, though it might still be useful to see their current value in the dump.
Quoted 2 lines
- Marijn
Yes, we should keep them.
Quoted 11 lines
Quoted 11 lines
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +1
-1};static const struct dpu_dsc_sub_blks dsc_sblk_1 = { - .enc = {.name ="enc" , .base =0x200 , .len =0x100 }, + .enc = {.name ="enc" , .base =0x200 , .len =0x9c }, .ctl = {.name ="ctl" , .base =0xF80 , .len =0x10 }, };Signature · 1 line
2.39.2
Quoted 11 lines · Dmitry Baryshkov
All
DSC_BLK_1_2declarations incorrectly pass0x29cas the block length. This includes the common block itself, enc subblocks and some empty space around. Change that to pass0x4instead, the length of common register block itself.Fixes 0d1b10c63346 ("drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets")Reported-by Ryan McCann <[email protected]>Reviewed-by Abhinav Kumar <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>---
Of course, it should have been v3, with the v2 having been sent on July 8th. Confusion is the price of sending a series with no cover letter. Please excuse me.
Quoted 164 lines
Changes since v1:
- Rebased on top of the catalog changes--- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 12 ++++++------ .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-)drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +4
-4@@ -283,22 +283,22 @@ static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = {static const struct dpu_dsc_cfg sm8350_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1
-1@@ -163,7 +163,7 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {static const struct dpu_dsc_cfg sc7280_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_0, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +6
-6@@ -286,32 +286,32 @@ static const struct dpu_merge_3d_cfg sc8280xp_merge_3d[] = {static const struct dpu_dsc_cfg sc8280xp_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .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 , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_2_1" , .id =DSC_5 , - .base =0x82000 , .len =0x29c , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +4
-4@@ -305,22 +305,22 @@ static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = {static const struct dpu_dsc_cfg sm8450_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +4
-5@@ -320,22 +320,22 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {static const struct dpu_dsc_cfg sm8550_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, }, --2.39.2
Signature · 2 lines
With best wishes Dmitry
Quoted 9 lines · Dmitry Baryshkov
All
DSC_BLK_1_2declarations incorrectly pass0x29cas the block length. This includes the common block itself, enc subblocks and some empty space around. Change that to pass0x4instead, the length of common register block itself.Fixes 0d1b10c63346 ("drm/msm/dpu: add DSC 1.2 hw blocks for relevant chipsets")Reported-by Ryan McCann <[email protected]>Reviewed-by Abhinav Kumar <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>
Quoted 165 lines
---
Changes since v1:
- Rebased on top of the catalog changes--- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 12 ++++++------ .../gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h | 8 ++++---- .../gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h | 8 ++++---- 5 files changed, 19 insertions(+), 19 deletions(-)drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h +4
-4@@ -283,22 +283,22 @@ static const struct dpu_merge_3d_cfg sm8350_merge_3d[] = {static const struct dpu_dsc_cfg sm8350_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h +1
-1@@ -163,7 +163,7 @@ static const struct dpu_pingpong_cfg sc7280_pp[] = {static const struct dpu_dsc_cfg sc7280_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_0, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h +6
-6@@ -286,32 +286,32 @@ static const struct dpu_merge_3d_cfg sc8280xp_merge_3d[] = {static const struct dpu_dsc_cfg sc8280xp_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .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 , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_2_1" , .id =DSC_5 , - .base =0x82000 , .len =0x29c , + .base =0x82000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_1_sm8450.h +4
-4@@ -305,22 +305,22 @@ static const struct dpu_merge_3d_cfg sm8450_merge_3d[] = {static const struct dpu_dsc_cfg sm8450_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_9_0_sm8550.h +4
-4@@ -320,22 +320,22 @@ static const struct dpu_merge_3d_cfg sm8550_merge_3d[] = {static const struct dpu_dsc_cfg sm8550_dsc[] = { { .name ="dce_0_0" , .id =DSC_0 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_0, }, { .name ="dce_0_1" , .id =DSC_1 , - .base =0x80000 , .len =0x29c , + .base =0x80000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ), .sblk = &dsc_sblk_1, }, { .name ="dce_1_0" , .id =DSC_2 , - .base =0x81000 , .len =0x29c , + .base =0x81000 , .len =0x4 , .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 , + .base =0x81000 , .len =0x4 , .features =BIT (DPU_DSC_HW_REV_1_2 ) |BIT (DPU_DSC_NATIVE_42x_EN), .sblk = &dsc_sblk_1, },Signature · 1 line
2.39.2
Dmitry Baryshkov
AppliedQuoted 6 lines · Dmitry Baryshkov
All
DSC_BLK_1_2declarations incorrectly pass0x29cas the block length. This includes the common block itself, enc subblocks and some empty space around. Change that to pass0x4instead, the length of common register block itself.
Applied, thanks!
[1/2] drm/msm/dpu: fix DSC 1.2 block lengths
https://gitlab.freedesktop.org/lumag/msm/-/commit/e550ad0e5c3d [2/2] drm/msm/dpu: fix DSC 1.2 enc subblock length https://gitlab.freedesktop.org/lumag/msm/-/commit/57a1ca6cf73b
Best regards,
Signature · 1 line
Dmitry Baryshkov <[email protected]>