[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <tdmzxhdd2hml4zrecawelmw5p2wrqqhzqoxip4wlbzmb2dvfpe@tmoinnmcpxsf>
Date: Fri, 2 Aug 2024 02:26:46 +0300
From: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
To: Abhinav Kumar <quic_abhinavk@...cinc.com>
Cc: Rob Clark <robdclark@...il.com>, Sean Paul <sean@...rly.run>,
Marijn Suijten <marijn.suijten@...ainline.org>, David Airlie <airlied@...il.com>,
Daniel Vetter <daniel@...ll.ch>, Chandan Uddaraju <chandanu@...eaurora.org>,
Rajesh Yadav <ryadav@...eaurora.org>, Jeykumar Sankaran <jsanka@...eaurora.org>,
Sravanthi Kollukuduru <skolluku@...eaurora.org>, Archit Taneja <architt@...eaurora.org>,
linux-arm-msm@...r.kernel.org, dri-devel@...ts.freedesktop.org, freedreno@...ts.freedesktop.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/msm/dpu: move dpu_encoder's connector assignment to
atomic_enable()
On Wed, Jul 31, 2024 at 12:17:22PM GMT, Abhinav Kumar wrote:
> For cases where the crtc's connectors_changed was set without enable/active
> getting toggled , there is an atomic_enable() call followed by an
> atomic_disable() but without an atomic_mode_set().
>
> This results in a NULL ptr access for the dpu_encoder_get_drm_fmt() call in
> the atomic_enable() as the dpu_encoder's connector was cleared in the
> atomic_disable() but not re-assigned as there was no atomic_mode_set() call.
>
> Fix the NULL ptr access by moving the assignment for atomic_enable() and also
> use drm_atomic_get_new_connector_for_encoder() to get the connector from
> the atomic_state.
>
> Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support")
> Reported-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
> Signed-off-by: Abhinav Kumar <quic_abhinavk@...cinc.com>
> ---
> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@...aro.org> # SM8350-HDK
Thanks a lot!
--
With best wishes
Dmitry
Powered by blists - more mailing lists