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@xxxxxxxxxx> > Suggested-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> > Signed-off-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> > --- > drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> Tested-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> # SM8350-HDK Thanks a lot! -- With best wishes Dmitry