]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/msm/dp: fix the max supported bpp logic
authorAbhinav Kumar <quic_abhinavk@quicinc.com>
Mon, 5 Aug 2024 20:20:08 +0000 (13:20 -0700)
committerAbhinav Kumar <quic_abhinavk@quicinc.com>
Mon, 5 Aug 2024 20:52:13 +0000 (13:52 -0700)
commitd19d5b8d8f6dab942ce5ddbcf34bf7275e778250
tree0945766d68c5dfa51fe2173c8cf9791e7ac4bf6b
parentdf24373435f5899a2a98b7d377479c8d4376613b
drm/msm/dp: fix the max supported bpp logic

Fix the dp_panel_get_supported_bpp() API to return the minimum
supported bpp correctly for relevant cases and use this API
to correct the behavior of DP driver which hard-codes the max supported
bpp to 30.

This is incorrect because the number of lanes and max data rate
supported by the lanes need to be taken into account.

Replace the hardcoded limit with the appropriate math which accounts
for the accurate number of lanes and max data rate.

changes in v2:
- Fix the dp_panel_get_supported_bpp() and use it
- Drop the max_t usage as dp_panel_get_supported_bpp() already
  returns the min_bpp correctly now

changes in v3:
- replace min_t with just min as all params are u32

Fixes: c943b4948b58 ("drm/msm/dp: add displayPort driver support")
Reported-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/43
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # SM8350-HDK
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/607073/
Link: https://lore.kernel.org/r/20240805202009.1120981-1-quic_abhinavk@quicinc.com
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
drivers/gpu/drm/msm/dp/dp_panel.c