Link: https://lore.kernel.org/r/20260217200002.683975158@linuxfoundation.org Tested-by: Florian Fainelli <florian.fainelli@broadcom.com> Tested-by: Takeshi Ogasawara <takeshi.ogasawara@futuring-girl.com> Tested-by: Peter Schneider <pschneider1968@googlemail.com> Tested-by: Jon Hunter <jonathanh@nvidia.com> Tested-by: Salvatore Bonaccorso <carnil@debian.org> Tested-by: Brett A C Sheffield <bacs@librecast.net> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Luna Jernberg <droidbittin@gmail.com> Tested-by: Ronald Warsow <rwarsow@gmx.de> Tested-by: Justin M. Forbes <jforbes@fedoraproject.org> Tested-by: Ron Economos <re@w6rz.net> Tested-by: Miguel Ojeda <ojeda@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
28 lines
862 B
C
28 lines
862 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved
|
|
*
|
|
* Helper methods for MSM-specific DSC calculations that are common between timing engine,
|
|
* DSI, and DP.
|
|
*/
|
|
|
|
#ifndef MSM_DSC_HELPER_H_
|
|
#define MSM_DSC_HELPER_H_
|
|
|
|
#include <linux/math.h>
|
|
#include <drm/display/drm_dsc_helper.h>
|
|
|
|
/**
|
|
* msm_dsc_get_bytes_per_line() - calculate bytes per line
|
|
* @dsc: Pointer to drm dsc config struct
|
|
* Returns: Integer value representing bytes per line. DSI and DP need
|
|
* to perform further calculations to turn this into pclk_per_intf,
|
|
* such as dividing by different values depending on if widebus is enabled.
|
|
*/
|
|
static inline u32 msm_dsc_get_bytes_per_line(const struct drm_dsc_config *dsc)
|
|
{
|
|
return dsc->slice_count * dsc->slice_chunk_size;
|
|
}
|
|
|
|
#endif /* MSM_DSC_HELPER_H_ */
|