[PATCH v8 6/8] drm/msm/dpu: Fix slice_last_group_size calculation

2023-05-10 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw

[PATCH v8 3/8] drm/msm/dsi: use DRM DSC helpers for DSC setup

2023-05-10 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm

[PATCH v8 0/8] Introduce MSM-specific DSC helpers

2023-05-10 Thread Jessica Zhang
g_setup() - *_calculate_initial_scale_value --> *_set_initial_scale_value - Picked up Fixes tags for patches 3/5 and 4/5 - Picked up Reviewed-by for patch 4/5 - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Dmitry Baryshkov (2): drm/display/dsc: add

[PATCH v8 7/8] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-05-10 Thread Jessica Zhang
Use MSM and DRM DSC helper methods to configure DSC for DSI. Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi

[PATCH v8 1/8] drm/display/dsc: Add flatness and initial scale value calculations

2023-05-10 Thread Jessica Zhang
Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Signed-off-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- include/drm/display/drm_dsc_helper.h | 11

[PATCH v8 2/8] drm/display/dsc: add helper to set semi-const parameters

2023-05-10 Thread Jessica Zhang
From: Dmitry Baryshkov Add a helper setting config values which are typically constant across operating modes (table E-4 of the standard) and mux_word_size (which is a const according to 3.5.2). Signed-off-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang

Re: [PATCH v7 2/8] drm/display/dsc: add helper to set semi-const parameters

2023-05-10 Thread Jessica Zhang
On 5/9/2023 11:29 PM, Marijn Suijten wrote: On 2023-05-09 15:06:48, Jessica Zhang wrote: From: Dmitry Baryshkov Add a helper setting config values which are typically constant across operating modes (table E-4 of the standard) and mux_word_size (which is a const according to 3.5.2

Re: [PATCH v7 4/8] drm/msm: Add MSM-specific DSC helper methods

2023-05-10 Thread Jessica Zhang
On 5/9/2023 11:33 PM, Marijn Suijten wrote: On 2023-05-09 15:06:50, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile

[PATCH v7 8/8] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-05-09 Thread Jessica Zhang
hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_hos

[PATCH v7 2/8] drm/display/dsc: add helper to set semi-const parameters

2023-05-09 Thread Jessica Zhang
From: Dmitry Baryshkov Add a helper setting config values which are typically constant across operating modes (table E-4 of the standard) and mux_word_size (which is a const according to 3.5.2). Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/display

[PATCH v7 5/8] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-05-09 Thread Jessica Zhang
eviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_d

[PATCH v7 7/8] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-05-09 Thread Jessica Zhang
Use MSM and DRM DSC helper methods to configure DSC for DSI. Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm

[PATCH v7 6/8] drm/msm/dpu: Fix slice_last_group_size calculation

2023-05-09 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Reviewed-by: Dmitry Baryshkov Reviewed-by: Marijn Suijten Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw

[PATCH v7 0/8] Introduce MSM-specific DSC helpers

2023-05-09 Thread Jessica Zhang
in dsi_timing_setup() - *_calculate_initial_scale_value --> *_set_initial_scale_value - Picked up Fixes tags for patches 3/5 and 4/5 - Picked up Reviewed-by for patch 4/5 - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Dmitry Baryshkov (

[PATCH v7 1/8] drm/display/dsc: Add flatness and initial scale value calculations

2023-05-09 Thread Jessica Zhang
Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- include/drm/display/drm_dsc_helper.h | 11 +++ 1 file changed, 11 insertions(+) diff --git a

[PATCH v7 3/8] drm/msm/dsi: use DRM DSC helpers for DSC setup

2023-05-09 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Reviewed-by: Abhinav Kumar Signed-off-by: Jessica Zhang --- drivers/gpu/drm

[PATCH v7 4/8] drm/msm: Add MSM-specific DSC helper methods

2023-05-09 Thread Jessica Zhang
Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Reviewed-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/msm_dsc_helper.c | 26 ++ drivers/gpu/drm/msm

Re: [Freedreno] [PATCH 2/4] drm/msm/dsi: Fix compressed word count calculation

2023-05-09 Thread Jessica Zhang
, Dmitry Baryshkov wrote: On 03/05/2023 04:19, Jessica Zhang wrote: Currently, word count is calculated using slice_count. This is incorrect as downstream uses slice per packet, which is different from slice_count. Slice count represents the number of soft slices per interface, and its value will

Re: [PATCH v6 6/7] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-05-08 Thread Jessica Zhang
On 5/7/2023 11:34 AM, Marijn Suijten wrote: On 2023-05-07 17:27:33, Marijn Suijten wrote: On 2023-05-04 15:05:15, Abhinav Kumar wrote: On 5/4/2023 2:56 PM, Marijn Suijten wrote: On 2023-04-12 16:25:20, Jessica Zhang wrote: hdisplay for compressed images should be calculated as

Re: [PATCH v6 6/7] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-05-08 Thread Jessica Zhang
On 5/8/2023 2:46 PM, Marijn Suijten wrote: On 2023-04-12 16:25:20, Jessica Zhang wrote: hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. T

Re: [Freedreno] [PATCH v2 4/4] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-08 Thread Jessica Zhang
On 5/8/2023 4:17 PM, Jessica Zhang wrote: On 5/7/2023 9:06 AM, Marijn Suijten wrote: On 2023-05-05 14:23:51, Jessica Zhang wrote: Add a DPU INTF op to set DATA_COMPRESS register for command mode panels if the DPU_INTF_DATA_COMPRESS feature flag is set. This flag needs to be enabled in

Re: [PATCH v2 4/4] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-08 Thread Jessica Zhang
On 5/7/2023 9:06 AM, Marijn Suijten wrote: On 2023-05-05 14:23:51, Jessica Zhang wrote: Add a DPU INTF op to set DATA_COMPRESS register for command mode panels if the DPU_INTF_DATA_COMPRESS feature flag is set. This flag needs to be enabled in order for DSC v1.2 to work. Note: These changes

Re: [PATCH v2 3/4] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-08 Thread Jessica Zhang
On 5/7/2023 9:00 AM, Marijn Suijten wrote: On 2023-05-05 14:23:50, Jessica Zhang wrote: Add DATA_COMPRESS feature flag to DPU INTF block. In DPU 7.x and later, DSC/DCE enablement registers have been moved from PINGPONG to INTF. As core_rev (and related macros) was removed from the dpu_kms

Re: [PATCH v5 7/8] drm/display/dsc: include the rest of pre-SCR parameters

2023-05-08 Thread Jessica Zhang
art of DSC model 20161212. Signed-off-by: Dmitry Baryshkov I checked these pre-SCR values against DSC model 20161212 and they look good to me. Reviewed-by: Jessica Zhang --- drivers/gpu/drm/display/drm_dsc_helper.c | 72 1 file changed, 72 insertions(+) di

Re: [PATCH v2 1/4] drm/msm/dsi: Adjust pclk rate for compression

2023-05-05 Thread Jessica Zhang
On 5/5/2023 2:23 PM, Jessica Zhang wrote: Adjust the pclk rate to divide hdisplay by the compression ratio when DSC is enabled. Changes in v2: - Adjusted pclk_rate math to divide only the hdisplay value by compression ratio Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi

[PATCH v2 1/4] drm/msm/dsi: Adjust pclk rate for compression

2023-05-05 Thread Jessica Zhang
Adjust the pclk rate to divide hdisplay by the compression ratio when DSC is enabled. Changes in v2: - Adjusted pclk_rate math to divide only the hdisplay value by compression ratio Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 17 + 1 file changed, 13

[PATCH v2 4/4] drm/msm/dpu: Set DATA_COMPRESS for command mode

2023-05-05 Thread Jessica Zhang
for DP. Changes in v2: - Fixed whitespace issue in macro definition - Read INTF_CONFIG2 before writing to DATA_COMPRESS bit - Only set dpu_hw_intf_ops.data_compress if DATA_COMPRESS feature is set - Removed `inline` from dpu_hw_intf_enable_compression declaration Signed-off-by: Jessica Zhang

[PATCH v2 2/4] drm/msm/dsi: Fix compressed word count calculation

2023-05-05 Thread Jessica Zhang
e" in TODO comment Fixes: bc6b6ff8135c ("drm/msm/dsi: Use DSC slice(s) packet size to compute word count") Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_

[PATCH v2 0/4] Add DSC v1.2 Support for DSI

2023-05-05 Thread Jessica Zhang
es/116789/ [2] https://patchwork.freedesktop.org/series/115833/ Signed-off-by: Jessica Zhang --- Changes in v2: - Changed pclk math to only divide hdisplay by compression ratio - Reworded word count TODO comment - Make DATA_COMPRESS an INTF flag - Read INTF_CFG2 before setting DATA_COMRPESS regist

[PATCH v2 3/4] drm/msm/dpu: Add DPU_INTF_DATA_COMPRESS feature flag

2023-05-05 Thread Jessica Zhang
have a feature flag. Changes in v2: - Changed has_data_compress dpu_cap to a DATA_COMPRESS INTF feature flag Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 +- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion

Re: [PATCH 1/4] drm/msm/dsi: Adjust pclk rate for compression

2023-05-05 Thread Jessica Zhang
On 5/4/2023 2:17 PM, Marijn Suijten wrote: On 2023-05-04 22:33:17, Marijn Suijten wrote: Title suggestion: use the wording "reduce pclk rate" :) (Eventually "when DSC is enabled", instead of "for compression") On 2023-05-02 18:19:12, Jessica Zhang wrote

Re: [PATCH v6 6/7] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-05-04 Thread Jessica Zhang
On 5/4/2023 2:56 PM, Marijn Suijten wrote: On 2023-04-12 16:25:20, Jessica Zhang wrote: hdisplay for compressed images should be calculated as bytes_per_slice * slice_count. Thus, use MSM DSC helper to calculate hdisplay for dsi_timing_setup instead of directly using mode->hdisplay. Chan

Re: [PATCH v5 3/7] drm/msm/dpu: add DPU_PINGPONG_DSC bits into PP_BLK and PP_BLK_TE marcos

2023-05-04 Thread Jessica Zhang
list of series -- I'm planning to post the r66451 panel driver + dts changes next week after I post the v2 of DSI for DSC v1.2. Thanks, Jessica Zhang In other words, let's take it slow and do things properly this time. And who knows, perhaps the rest of these patches are mo

Re: [PATCH 4/4] drm/msm/dpu: Enable compression for command mode

2023-05-03 Thread Jessica Zhang
On 5/3/2023 4:00 PM, Marijn Suijten wrote: Hi Jessica, On 2023-05-03 12:04:59, Jessica Zhang wrote: On 5/3/2023 12:28 AM, Marijn Suijten wrote: On 2023-05-02 18:19:15, Jessica Zhang wrote: Add a dpu_hw_intf op to enable data compression. Signed-off-by: Jessica Zhang --- drivers/gpu

Re: [PATCH 3/4] drm/msm/dpu: Add has_data_compress to dpu_caps

2023-05-03 Thread Jessica Zhang
On 5/3/2023 4:03 PM, Marijn Suijten wrote: Hi Jessica, On 2023-05-03 12:03:40, Jessica Zhang wrote: On 5/3/2023 12:07 AM, Marijn Suijten wrote: On 2023-05-02 18:19:14, Jessica Zhang wrote: Add data_compress feature to DPU HW catalog. In DPU 7.x and later, there is a DATA_COMPRESS

Re: [PATCH 4/4] drm/msm/dpu: Enable compression for command mode

2023-05-03 Thread Jessica Zhang
On 5/3/2023 12:51 PM, Dmitry Baryshkov wrote: On 03/05/2023 22:04, Jessica Zhang wrote: On 5/3/2023 12:28 AM, Marijn Suijten wrote: On 2023-05-02 18:19:15, Jessica Zhang wrote: Add a dpu_hw_intf op to enable data compression. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/disp

Re: [PATCH 4/4] drm/msm/dpu: Enable compression for command mode

2023-05-03 Thread Jessica Zhang
On 5/3/2023 12:28 AM, Marijn Suijten wrote: On 2023-05-02 18:19:15, Jessica Zhang wrote: Add a dpu_hw_intf op to enable data compression. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c

Re: [PATCH 3/4] drm/msm/dpu: Add has_data_compress to dpu_caps

2023-05-03 Thread Jessica Zhang
On 5/3/2023 12:07 AM, Marijn Suijten wrote: On 2023-05-02 18:19:14, Jessica Zhang wrote: Add data_compress feature to DPU HW catalog. In DPU 7.x and later, there is a DATA_COMPRESS register that must be set within the DPU INTF block for DSC to work. As core_rev (and related macros) was

Re: [PATCH 2/4] drm/msm/dsi: Fix compressed word count calculation

2023-05-03 Thread Jessica Zhang
On 5/3/2023 1:26 AM, Dmitry Baryshkov wrote: On 03/05/2023 04:19, Jessica Zhang wrote: Currently, word count is calculated using slice_count. This is incorrect as downstream uses slice per packet, which is different from slice_count. Slice count represents the number of soft slices per

Re: [PATCH 1/4] drm/msm/dsi: Adjust pclk rate for compression

2023-05-03 Thread Jessica Zhang
On 5/3/2023 1:33 AM, Dmitry Baryshkov wrote: On 03/05/2023 04:19, Jessica Zhang wrote: Divide the pclk rate by the compression ratio when DSC is enabled Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 14 ++   1 file changed, 10 insertions(+), 4 deletions

[PATCH 2/4] drm/msm/dsi: Fix compressed word count calculation

2023-05-02 Thread Jessica Zhang
ze to compute word count") Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 35c69dbe5f6f..b0d448ffb078 100644 --- a/drive

[PATCH 0/4] Add DSC v1.2 Support for DSI

2023-05-02 Thread Jessica Zhang
below), DSC v1.2 should work over DSI. Depends-on: "add DSC 1.2 dpu supports" [1] [1] https://patchwork.freedesktop.org/series/116789/ Signed-off-by: Jessica Zhang --- Jessica Zhang (4): drm/msm/dsi: Adjust pclk rate for compression drm/msm/dsi: Fix compressed word count c

[PATCH 4/4] drm/msm/dpu: Enable compression for command mode

2023-05-02 Thread Jessica Zhang
Add a dpu_hw_intf op to enable data compression. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder_phys_cmd.c | 4 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.c | 7 +++ drivers/gpu/drm/msm/disp/dpu1/dpu_hw_intf.h | 2 ++ 3 files changed, 13

[PATCH 3/4] drm/msm/dpu: Add has_data_compress to dpu_caps

2023-05-02 Thread Jessica Zhang
register would be to have a flag in dpu_caps. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_0_sm8350.h | 1 + drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_7_2_sc7280.h | 1 + drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_8_0_sc8280xp.h | 1 + drivers/gpu/drm/msm/disp/dpu1

[PATCH 1/4] drm/msm/dsi: Adjust pclk rate for compression

2023-05-02 Thread Jessica Zhang
Divide the pclk rate by the compression ratio when DSC is enabled Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c

[PATCH v6 6/7] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-12 Thread Jessica Zhang
at the beginning of dsi_timing_setup as to not break dual DSI calculations Changes in v4: - Moved pclk_per_intf calculations to DSC hdisplay adjustments Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v6 0/7] Introduce MSM-specific DSC helpers

2023-04-12 Thread Jessica Zhang
it eol_byte_num and pkt_per_line calculation into a separate patch - Moved pclk_per_line calculation into `if (dsc)` block in dsi_timing_setup() - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Dmitry Baryshkov (1): drm/msm/dsi: use new helpers fo

[PATCH v6 4/7] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-12 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang

[PATCH v6 2/7] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
caused by drm_fixed.h being included before linux/kernel.h Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/msm_dsc_helper.c | 26 drivers/gpu/drm/msm/msm_dsc_helper.h | 81 3 files changed, 108 i

[PATCH v6 7/7] drm/msm/dsi: Fix calculation for pkt_per_line

2023-04-12 Thread Jessica Zhang
specifies one slice per packet. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH v6 5/7] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-12 Thread Jessica Zhang
of dsi_update_dsc_timing() Changes in v3: - Split pclk_per_intf calculation into a separate patch - Added slice_width check to dsi_timing_setup - Used MSM DSC helper to calculate total_bytes_per_intf Changes in v5: - Split slice_width check into a separate patch Signed-off-by: Jessica Zhang Reviewed

[PATCH v6 3/7] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-12 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

[PATCH v6 1/7] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61

Re: [PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
On 4/12/2023 12:16 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp

Re: [Freedreno] [PATCH v5 1/8] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
On 4/12/2023 12:10 PM, Dmitry Baryshkov wrote: On 12/04/2023 22:09, Jessica Zhang wrote: From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by

[PATCH v5 8/8] drm/msm/dsi: Fix calculation for pkt_per_line

2023-04-12 Thread Jessica Zhang
specifies one slice per packet. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH v5 7/8] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-12 Thread Jessica Zhang
at the beginning of dsi_timing_setup as to not break dual DSI calculations Changes in v4: - Moved pclk_per_intf calculations to DSC hdisplay adjustments Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v5 5/8] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-12 Thread Jessica Zhang
of dsi_update_dsc_timing() Changes in v3: - Split pclk_per_intf calculation into a separate patch - Added slice_width check to dsi_timing_setup - Used MSM DSC helper to calculate total_bytes_per_intf Changes in v5: - Split slice_width check into a separate patch Signed-off-by: Jessica Zhang --- drivers/

[PATCH v5 1/8] drm/msm/dsi: use new helpers for DSC setup

2023-04-12 Thread Jessica Zhang
From: Dmitry Baryshkov Use new DRM DSC helpers to setup DSI DSC configuration. The initial_scale_value needs to be adjusted according to the standard, but this is a separate change. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 61 +---

[PATCH v5 3/8] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-12 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

[PATCH v5 6/8] drm/msm/dsi: Add check for slice_width in dsi_timing_setup

2023-04-12 Thread Jessica Zhang
Add a check for valid dsc->slice_width value in dsi_timing_setup. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 508577c59

[PATCH v5 4/8] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-12 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang

[PATCH v5 2/8] drm/msm: Add MSM-specific DSC helper methods

2023-04-12 Thread Jessica Zhang
_per_intf Changes in v5: - Added extra line at end of msm_dsc_helper.h - Simplified msm_dsc_get_bytes_per_soft_slice() math - Simplified and inlined msm_dsc_get_pclk_per_intf() math - Removed unused headers Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gp

[PATCH v5 0/8] Introduce MSM-specific DSC helpers

2023-04-12 Thread Jessica Zhang
v1-0-f3e479f59...@quicinc.com --- Dmitry Baryshkov (1): drm/msm/dsi: use new helpers for DSC setup Jessica Zhang (7): drm/msm: Add MSM-specific DSC helper methods drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness drm/msm/dpu: Fix slice_last_group_size calculation

Re: [Freedreno] [PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-05 Thread Jessica Zhang
On 4/5/2023 12:26 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to

Re: [PATCH v4 4/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-05 Thread Jessica Zhang
On 4/5/2023 12:27 PM, Dmitry Baryshkov wrote: On 05/04/2023 03:41, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in V2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separ

[PATCH v4 5/6] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-04 Thread Jessica Zhang
at the beginning of dsi_timing_setup as to not break dual DSI calculations Changes in v4: - Moved pclk_per_intf calculations to DSC hdisplay adjustments Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driv

[PATCH v4 0/6] Introduce MSM-specific DSC helpers

2023-04-04 Thread Jessica Zhang
culation into `if (dsc)` block in dsi_timing_setup() - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Jessica Zhang (6): drm/msm: Add MSM-specific DSC helper methods drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness drm/m

[PATCH v4 2/6] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-04 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

[PATCH v4 4/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-04 Thread Jessica Zhang
of dsi_update_dsc_timing() Changes in v3: - Split pclk_per_intf calculation into a separate patch - Added slice_width check to dsi_timing_setup - Used MSM DSC helper to calculate total_bytes_per_intf Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 13 ++--- 1 file changed,

[PATCH v4 6/6] drm/msm/dsi: Fix calculations pkt_per_line

2023-04-04 Thread Jessica Zhang
specifies one slice per packet. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH v4 3/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-04 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang ---

[PATCH v4 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-04 Thread Jessica Zhang
_per_intf Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/msm_dsc_helper.c | 47 drivers/gpu/drm/msm/msm_dsc_helper.h | 70 3 files changed, 118 insertions(+) diff --git a/drivers/gpu/drm/msm

[PATCH v3 5/6] drm/msm/dsi: update hdisplay calculation for dsi_timing_setup

2023-04-04 Thread Jessica Zhang
at the beginning of dsi_timing_setup as to not break dual DSI calculations Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 6a6218a96

[PATCH v3 6/6] drm/msm/dsi: Fix calculations pkt_per_line

2023-04-04 Thread Jessica Zhang
specifies one slice per packet. Fixes: 08802f515c3c ("drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/d

[PATCH v3 3/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-04 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Changes in v3: - Reworded slice_last_group_size calculation to `(dsc->slice_width + 2) % 3` Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang ---

[PATCH v3 1/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-04 Thread Jessica Zhang
be called later to help calculate DP pclk params) - Added documentation in comments - Moved extra_eol_bytes math out of msm_dsc_get_eol_byte_num() and renamed msm_dsc_get_eol_byte_num to *_get_bytes_per_intf. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gp

[PATCH v3 4/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-04 Thread Jessica Zhang
of dsi_update_dsc_timing() Changes in v3: - Split pclk_per_intf calculation into a separate patch - Added slice_width check to dsi_timing_setup - Used MSM DSC helper to calculate total_bytes_per_intf Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 13 ++--- 1 file changed,

[PATCH v3 0/6] Introduce MSM-specific DSC helpers

2023-04-04 Thread Jessica Zhang
pclk_per_line calculation into `if (dsc)` block in dsi_timing_setup() - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Jessica Zhang (6): drm/msm: Add MSM-specific DSC helper methods drm/msm/dpu: Use DRM DSC helper for det_thresh_f

[PATCH v3 2/6] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-04-04 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm

Re: [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-04 Thread Jessica Zhang
On 4/3/2023 5:33 PM, Dmitry Baryshkov wrote: On 04/04/2023 00:38, Jessica Zhang wrote: On 4/2/2023 4:21 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2

Re: [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-04 Thread Jessica Zhang
On 4/3/2023 5:33 PM, Dmitry Baryshkov wrote: On 04/04/2023 00:38, Jessica Zhang wrote: On 4/2/2023 4:21 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2

Re: [Freedreno] [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-03 Thread Jessica Zhang
On 4/3/2023 2:51 PM, Dmitry Baryshkov wrote: On 04/04/2023 00:45, Jessica Zhang wrote: On 4/2/2023 4:27 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e

Re: [PATCH RFC v2 5/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:29 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Use MSM and DRM DSC helper methods to configure DSC for DSI. Changes in V2: - *_calculate_initial_scale_value --> *_set_initial_scale_value - Split pkt_per_line and eol_byte_num changes to a separ

Re: [PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:27 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-

Re: [PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-04-03 Thread Jessica Zhang
On 4/2/2023 4:21 AM, Dmitry Baryshkov wrote: On 31/03/2023 21:49, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Changes in v2: - Moved files up to msm/ directory - Dropped get_comp_ratio() helper - Used drm_int2fixp() to

[PATCH RFC v2 6/6] drm/msm/dsi: Fix calculations for eol_byte_num and pkt_per_line

2023-03-31 Thread Jessica Zhang
t;drm/msm/dsi: Add support for DSC configuration") Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index b7ab81737473..61

[PATCH RFC v2 5/6] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-03-31 Thread Jessica Zhang
of dsi_update_dsc_timing() Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/dsi/dsi_host.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c index 74d38f90398a..b7ab81737473 100644 --- a/drivers/gpu/

[PATCH RFC v2 2/6] drm/msm: Add MSM-specific DSC helper methods

2023-03-31 Thread Jessica Zhang
passing in incorrect types to drm_fixed methods in get_bytes_per_soft_slice() Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/Makefile | 1 + drivers/gpu/drm/msm/msm_dsc_helper.c | 53 drivers/gpu/drm/msm/msm_dsc_helper.h | 42

[PATCH RFC v2 3/6] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-03-31 Thread Jessica Zhang
Use the DRM DSC helper for det_thresh_flatness to match downstream implementation and the DSC spec. Changes in V2: - Added a Fixes tag Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 ++

[PATCH RFC v2 0/6] Introduce MSM-specific DSC helpers

2023-03-31 Thread Jessica Zhang
e patch - Moved pclk_per_line calculation into `if (dsc)` block in dsi_timing_setup() - Link to v1: https://lore.kernel.org/r/20230329-rfc-msm-dsc-helper-v1-0-f3e479f59...@quicinc.com --- Jessica Zhang (6): drm/display/dsc: Add flatness and initial scale value calculations drm/msm: Add M

[PATCH RFC v2 4/6] drm/msm/dpu: Fix slice_last_group_size calculation

2023-03-31 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Fixes: c110cfd1753e ("drm/msm/disp/dpu1: Add support for DSC") Signed-off-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 6 +- 1 file

[PATCH RFC v2 1/6] drm/display/dsc: Add flatness and initial scale value calculations

2023-03-31 Thread Jessica Zhang
Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Changes in v2: - Renamed det_thresh_flatness to flatness_det_thresh - Set initial_scale_value directly in helper Signed-off-by: Jessica Zhang --- include/drm/display

Re: [PATCH RFC 5/5] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-03-30 Thread Jessica Zhang
On 3/30/2023 5:16 PM, Dmitry Baryshkov wrote: On Fri, 31 Mar 2023 at 03:07, Jessica Zhang wrote: On 3/30/2023 4:14 PM, Dmitry Baryshkov wrote: On 31/03/2023 01:49, Jessica Zhang wrote: On 3/29/2023 4:48 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Use MSM

Re: [PATCH RFC 5/5] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-03-30 Thread Jessica Zhang
On 3/30/2023 4:14 PM, Dmitry Baryshkov wrote: On 31/03/2023 01:49, Jessica Zhang wrote: On 3/29/2023 4:48 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Use MSM and DRM DSC helper methods. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 18

Re: [Freedreno] [PATCH RFC 2/5] drm/msm: Add MSM-specific DSC helper methods

2023-03-30 Thread Jessica Zhang
On 3/29/2023 5:40 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Introduce MSM-specific DSC helper methods, as some calculations are common between DP and DSC. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/Makefile  |  1 +   drivers/gpu/drm/msm

Re: [PATCH RFC 5/5] drm/msm/dsi: Use MSM and DRM DSC helper methods

2023-03-30 Thread Jessica Zhang
On 3/29/2023 4:48 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Use MSM and DRM DSC helper methods. Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/dsi/dsi_host.c | 18 --   1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers

Re: [PATCH RFC 1/5] drm/display/dsc: Add flatness and initial scale value calculations

2023-03-29 Thread Jessica Zhang
On 3/29/2023 4:25 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Add helpers to calculate det_thresh_flatness and initial_scale_value as these calculations are defined within the DSC spec. Signed-off-by: Jessica Zhang ---   include/drm/display/drm_dsc_helper.h | 10

Re: [PATCH RFC 3/5] drm/msm/dpu: Use DRM DSC helper for det_thresh_flatness

2023-03-29 Thread Jessica Zhang
On 3/29/2023 4:31 PM, Dmitry Baryshkov wrote: On 30/03/2023 02:18, Jessica Zhang wrote: Signed-off-by: Jessica Zhang ---   drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 4 +++-   1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers

[PATCH RFC 4/5] drm/msm/dpu: Fix slice_last_group_size calculation

2023-03-29 Thread Jessica Zhang
Correct the math for slice_last_group_size so that it matches the calculations downstream. Signed-off-by: Jessica Zhang --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_dsc.c b/drivers

<    1   2   3   4   5   6   7   8   >