On Tuesday, 10 March 2026 11:53:06 Central European Standard Time Damon Ding
wrote:
> Expand enum analogix_dp_devtype with RK3576_EDP, and add max_link_rate
> and max_lane_count configs for it.
>
> Signed-off-by: Damon Ding <[email protected]>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 1 +
> include/drm/bridge/analogix_dp.h | 3 ++-
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> index fe7158d9edde..c4e49e8186ab 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c
> @@ -1248,6 +1248,7 @@ static int analogix_dp_dt_parse_pdata(struct
> analogix_dp_device *dp)
> video_info->max_link_rate = 0x0A;
> video_info->max_lane_count = 0x04;
> break;
> + case RK3576_EDP:
> case RK3588_EDP:
> video_info->max_link_rate = 0x14;
> video_info->max_lane_count = 0x04;
> diff --git a/include/drm/bridge/analogix_dp.h
> b/include/drm/bridge/analogix_dp.h
> index 854af692229b..d1a6e6d44a2b 100644
> --- a/include/drm/bridge/analogix_dp.h
> +++ b/include/drm/bridge/analogix_dp.h
> @@ -16,12 +16,13 @@ enum analogix_dp_devtype {
> EXYNOS_DP,
> RK3288_DP,
> RK3399_EDP,
> + RK3576_EDP,
> RK3588_EDP,
> };
>
> static inline bool is_rockchip(enum analogix_dp_devtype type)
> {
> - return type == RK3288_DP || type == RK3399_EDP || type == RK3588_EDP;
> + return type == RK3288_DP || type == RK3399_EDP || type == RK3576_EDP ||
> type == RK3588_EDP;
I think we can make this easier to read with a switch statement. In
a separate patch, we may also want to rename `is_rockchip` to
`analogix_dp_is_rockchip`, as e.g. rockchip_drm_vop.c and exynos_dp.c
both include his header file as well.
Switch statement would make the function look something like:
static inline bool is_rockchip(enum analogix_dp_devtype type)
{
switch (type) {
case RK3288_DP:
case RK3399_EDP:
case RK3576_EDP:
case RK3588_EDP:
return true;
default:
return false;
}
}
Kind regards,
Nicolas Frattaroli
> }
>
> struct analogix_dp_plat_data {
>