[PATCH v6 2/7] drm/msm: Add MSM-specific DSC helper methods
Dmitry Baryshkov
dmitry.baryshkov at linaro.org
Thu Apr 13 00:07:06 UTC 2023
On 13/04/2023 02:25, 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 convert to integers to fp
> - Style changes to improve readability
> - Dropped unused bpp variable in msm_dsc_get_dce_bytes_per_line()
> - Changed msm_dsc_get_slice_per_intf() to a static inline method
> - Dropped last division step of msm_dsc_get_pclk_per_line() and changed
> method name accordingly
> - Changed DSC_BPP macro to drm_dsc_get_bpp_int() helper method
> - Fixed some math issues caused by passing in incorrect types to
> drm_fixed methods in get_bytes_per_soft_slice()
>
> Changes in v3:
> - Dropped src_bpp parameter from all methods -- src_bpp can be
> calculated as dsc->bits_per_component * 3
> - Dropped intf_width parameter from get_bytes_per_soft_slice()
> - Moved dsc->bits_per_component to numerator calculation in
> get_bytes_per_soft_slice()
> - Renamed msm_dsc_get_uncompressed_pclk_per_line to
> *_get_uncompressed_pclk_per_intf()
> - Removed dsc->slice_width check from
> msm_dsc_get_uncompressed_pclk_per_intf()
> - Made get_bytes_per_soft_slice() a public method (this will 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.
>
> Changes in v4:
> - Changed msm_dsc_get_uncompressed_pclk_per_intf to
> msm_dsc_get_pclk_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
>
> Changes in v6:
> - Documented return value for all helper functions
> - Fixed dependency issue caused by drm_fixed.h being included before
> linux/kernel.h
>
> Signed-off-by: Jessica Zhang <quic_jesszhan at quicinc.com>
> ---
> 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 insertions(+)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
--
With best wishes
Dmitry
More information about the dri-devel
mailing list