[PATCH v2 19/20] drm/msm/dp: Serialize video test state changes
Dmitry Baryshkov
dmitry.baryshkov at oss.qualcomm.com
Mon Oct 12 14:52:43 PDT 2026
On Fri, Oct 09, 2026 at 11:16:11AM +0800, Xilin Wu wrote:
> The debugfs test control writes video_test directly, racing HPD handling
> and mode programming. Reading the test flag and its requested depth in
> separate calls also allows those values to change between the reads.
>
Fixes?
> Route test state access through the display and use plugged_lock for both
> HPD and debugfs updates. Hold the same lock while selecting the test depth
> and installing the mode. Pass the display instance to debugfs for access
> to its connector and the serialized test controls.
>
> Preserve the existing SDR test behavior. The shared setter provides the
> entry point for rejecting incompatible tests when HDR is added.
>
> Assisted-by: LLM
> Signed-off-by: Xilin Wu <sophon at radxa.com>
> ---
> drivers/gpu/drm/msm/dp/dp_debug.c | 27 ++++++++++++++-------------
> drivers/gpu/drm/msm/dp/dp_debug.h | 8 +++++---
> drivers/gpu/drm/msm/dp/dp_display.c | 34 ++++++++++++++++++++++------------
> drivers/gpu/drm/msm/dp/dp_display.h | 2 +-
> 4 files changed, 42 insertions(+), 29 deletions(-)
>
> diff --git a/drivers/gpu/drm/msm/dp/dp_debug.c b/drivers/gpu/drm/msm/dp/dp_debug.c
> index 00fb1a7ba40e..c26b356f998a 100644
> --- a/drivers/gpu/drm/msm/dp/dp_debug.c
> +++ b/drivers/gpu/drm/msm/dp/dp_debug.c
> @@ -21,7 +21,7 @@
> struct msm_dp_debug_private {
> struct msm_dp_link *link;
> struct msm_dp_panel *panel;
> - struct drm_connector *connector;
> + struct msm_dp *dp;
> };
>
> static int msm_dp_debug_show(struct seq_file *seq, void *p)
> @@ -89,7 +89,7 @@ DEFINE_SHOW_ATTRIBUTE(msm_dp_debug);
> static int msm_dp_test_data_show(struct seq_file *m, void *data)
> {
> const struct msm_dp_debug_private *debug = m->private;
> - const struct drm_connector *connector = debug->connector;
> + const struct drm_connector *connector = debug->dp->connector;
I really don't like this approach. My (eventual) goal is to remove the
stored connector.
> u32 bpc;
>
> if (connector->status == connector_status_connected) {
--
With best wishes
Dmitry
More information about the linux-arm-kernel
mailing list