On Wed, 26 Feb 2025 at 20:36, Jessica Zhang <quic_jesszhan@xxxxxxxxxxx> wrote: > > > > On 2/26/2025 3:55 AM, Dmitry Baryshkov wrote: > > On Thu, Jan 23, 2025 at 02:43:36PM +0200, Dmitry Baryshkov wrote: > >> The MSM driver uses drm_atomic_helper_check() which mandates that none > >> of the atomic_check() callbacks toggles crtc_state->mode_changed. > >> Perform corresponding check before calling the drm_atomic_helper_check() > >> function. > >> > >> Fixes: 8b45a26f2ba9 ("drm/msm/dpu: reserve cdm blocks for writeback in case of YUV output") > >> Reported-by: Simona Vetter <simona.vetter@xxxxxxxx> > >> Closes: https://lore.kernel.org/dri-devel/ZtW_S0j5AEr4g0QW@phenom.ffwll.local/ > >> Reviewed-by: Abhinav Kumar <quic_abhinavk@xxxxxxxxxxx> > >> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxx> > >> --- > >> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 32 +++++++++++++++++++++++++---- > >> drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 4 ++++ > >> drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 26 +++++++++++++++++++++++ > >> drivers/gpu/drm/msm/msm_atomic.c | 13 +++++++++++- > >> drivers/gpu/drm/msm/msm_kms.h | 7 +++++++ > >> 5 files changed, 77 insertions(+), 5 deletions(-) > >> > > > > JFI, this patch generates following warnings, deferred now: > > > > 10:49:07.279: [ 235.096198] WARNING: CPU: 1 PID: 515 at drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c:459 dpu_kms_check_mode_changed+0xb0/0xbc > > 10:49:07.279: [ 235.107375] Modules linked in: > > 10:49:07.279: [ 235.110532] CPU: 1 UID: 0 PID: 515 Comm: kms_atomic_tran Tainted: G W 6.14.0-rc4-gd229bc98da6b #1 > > 10:49:07.279: [ 235.121069] Tainted: [W]=WARN > > 10:49:07.279: [ 235.124130] Hardware name: Google Lazor Limozeen without Touchscreen (rev5 - rev8) (DT) > > 10:49:07.279: [ 235.132356] pstate: 20400009 (nzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--) > > 10:49:07.279: [ 235.139513] pc : dpu_kms_check_mode_changed+0xb0/0xbc > > 10:49:07.279: [ 235.144712] lr : msm_atomic_check+0xc0/0xe0 > > 10:49:07.279: [ 235.149023] sp : ffff8000843f3960 > > 10:49:07.279: [ 235.150686] usb 1-1.1: new high-speed USB device number 100 using xhci-hcd > > 10:49:07.279: [ 235.152439] x29: ffff8000843f3960 x28: ffff65a18386d080 x27: ffff65a184826a80 > > 10:49:07.279: [ 235.166848] x26: 0000000000000038 x25: 0000000000000008 x24: ffff65a1866fd580 > > 10:49:07.279: [ 235.174188] x23: 0000000000000028 x22: 0000000000000028 x21: 0000000000000038 > > 10:49:07.279: [ 235.181527] x20: ffff65a184826a80 x19: 0000000000000000 x18: 0000000000000000 > > 10:49:07.279: [ 235.188866] x17: 0000000000000000 x16: 0000000000000000 x15: 0000aaab013dfeb8 > > 10:49:07.279: [ 235.196215] x14: 00000000000c0000 x13: 0040a00000400800 x12: 0000000000000000 > > 10:49:07.279: [ 235.203553] x11: 0000000000000050 x10: 0000000000000000 x9 : ffffbdf7fc448530 > > 10:49:07.279: [ 235.210892] x8 : 00000000ffffffff x7 : ffff65a182610400 x6 : 0000000000000038 > > 10:49:07.279: [ 235.218231] x5 : ffff65a18314b000 x4 : 0000000000000000 x3 : 0000000000000001 > > 10:49:07.279: [ 235.225570] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff65a18ca7a600 > > 10:49:07.279: [ 235.232910] Call trace: > > 10:49:07.279: [ 235.235440] dpu_kms_check_mode_changed+0xb0/0xbc (P) > > 10:49:07.279: [ 235.240641] msm_atomic_check+0xc0/0xe0 > > 10:49:07.279: [ 235.244594] drm_atomic_check_only+0x498/0x934 > > 10:49:07.279: [ 235.249169] drm_atomic_commit+0x48/0xc4 > > 10:49:07.279: [ 235.253209] drm_mode_atomic_ioctl+0xa98/0xd00 > > 10:49:07.279: [ 235.257791] drm_ioctl_kernel+0xbc/0x12c > > 10:49:07.280: [ 235.261832] drm_ioctl+0x228/0x4e4 > > 10:49:07.280: [ 235.265339] __arm64_sys_ioctl+0xb4/0xec > > 10:49:07.280: [ 235.269381] invoke_syscall+0x48/0x110 > > 10:49:07.280: [ 235.273248] el0_svc_common.constprop.0+0x40/0xe0 > > 10:49:07.280: [ 235.278090] do_el0_svc+0x1c/0x28 > > 10:49:07.280: [ 235.281512] el0_svc+0x48/0x110 > > 10:49:07.280: [ 235.284753] el0t_64_sync_handler+0x10c/0x138 > > 10:49:07.280: [ 235.289234] el0t_64_sync+0x198/0x19c > > Hey Dmitry, > > This warning is eventually dropped in the CRTC RM refactor (specifically > [1]). > > Applying in this order might fix the warning: > > 1. CRTC RM refactor > 2. This mode_changed() series > 3. The rest of the CWB series > > This will cause some merge conflicts with the CRTC RM refactor though > and you'll need to move the dpu_kms changes in [1] to this patch. > > What do you think? I think I will make our life easier and just pick it up as a part of the CWB series. As the warning is going to be removed by your patch I can drop it while applying. > > Thanks, > > Jessica Zhang > > [1] https://patchwork.freedesktop.org/patch/637487/?series=144912&rev=1 > > > > > > > -- > > With best wishes > > Dmitry > -- With best wishes Dmitry