Files
linux/drivers/gpu/drm/msm/dp/dp_utils.h
Dmitry Baryshkov fb7d509b17 drm/msm/dp: prefix all symbols with msm_dp_
For historical reasons a lot of symbols in the MSM DisplayPort driver
used the generic dp_ prefix. Perform a mass-rename of those symbols to
use msm_dp prefix.

Basically this is a result of the following script:

sed drivers/gpu/drm/msm/dp/* -i -e 's/\<dp_/msm_dp_/g'
sed drivers/gpu/drm/msm/dp/* -i -e 's/"msm_dp_/"dp_/g'
sed drivers/gpu/drm/msm/dp/* -i -e 's/msm_\(dp_sdp_header\|dp_sdp\)\>/\1/g'

Yes, this also results in renaming of several struct fields in addition
to renaming the structs and functions, but I think the simple solution
is better than the more complex one.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202410250305.UHKDhtxy-lkp@intel.com/
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/622211/
Link: https://lore.kernel.org/r/20241029-msm-dp-rename-v2-1-13c5c03fad44@linaro.org
2024-10-31 21:08:01 +02:00

37 lines
1.0 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2024, The Linux Foundation. All rights reserved.
*/
#ifndef _DP_UTILS_H_
#define _DP_UTILS_H_
#include <linux/bitfield.h>
#include <linux/bits.h>
#include <drm/display/drm_dp_helper.h>
#define HEADER_BYTE_0_BIT 0
#define PARITY_BYTE_0_BIT 8
#define HEADER_BYTE_1_BIT 16
#define PARITY_BYTE_1_BIT 24
#define HEADER_BYTE_2_BIT 0
#define PARITY_BYTE_2_BIT 8
#define HEADER_BYTE_3_BIT 16
#define PARITY_BYTE_3_BIT 24
#define HEADER_0_MASK GENMASK(7, 0)
#define PARITY_0_MASK GENMASK(15, 8)
#define HEADER_1_MASK GENMASK(23, 16)
#define PARITY_1_MASK GENMASK(31, 24)
#define HEADER_2_MASK GENMASK(7, 0)
#define PARITY_2_MASK GENMASK(15, 8)
#define HEADER_3_MASK GENMASK(23, 16)
#define PARITY_3_MASK GENMASK(31, 24)
u8 msm_dp_utils_get_g0_value(u8 data);
u8 msm_dp_utils_get_g1_value(u8 data);
u8 msm_dp_utils_calculate_parity(u32 data);
ssize_t msm_dp_utils_pack_sdp_header(struct dp_sdp_header *sdp_header, u32 *header_buff);
#endif /* _DP_UTILS_H_ */