]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/msm/dsi: implement opp table based check for dsi_mgr_bridge_mode_valid()
authorAbhinav Kumar <quic_abhinavk@quicinc.com>
Thu, 12 Jan 2023 00:16:00 +0000 (16:16 -0800)
committerDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Sun, 22 Jan 2023 20:42:57 +0000 (22:42 +0200)
commit8328041b8c82c073c2c5c43afe57b2952fc9a872
tree5056f3cdd68d2649190879a044a07c404a3c7a53
parent03f7b78242e5fac9fefea9a7bd5484510d5916bb
drm/msm/dsi: implement opp table based check for dsi_mgr_bridge_mode_valid()

Currently there is no protection against a user trying to set
an unsupported mode on DSI. Implement a check based on the opp
table whether the byte clock for the mode can be supported by
validating whether an opp table entry exists.

For devices which have not added opp table support yet, skip
this check otherwise it will break bootup on those devices.

changes in v3:
- make the comment shorter
- handle all errors except ENODEV

Closes: https://gitlab.freedesktop.org/drm/msm/-/issues/15
Reported-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/518008/
Link: https://lore.kernel.org/r/20230112001600.12791-2-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
drivers/gpu/drm/msm/dsi/dsi_manager.c