> Subject: RE: [PATCH v15 3/5] drm: renesas: Add RZ/G2L DU Support > > Hi Maxime Ripard, > > > -----Original Message----- > > From: Maxime Ripard <mripard@xxxxxxxxxx> > > Sent: Friday, December 15, 2023 2:18 PM > > Subject: Re: [PATCH v15 3/5] drm: renesas: Add RZ/G2L DU Support > > > > On Fri, Dec 15, 2023 at 01:52:28PM +0000, Biju Das wrote: > > > > > > > > > +static int rzg2l_du_crtc_enable_vblank(struct drm_crtc > > *crtc) { > > > > > > > > > + struct rzg2l_du_crtc *rcrtc = to_rzg2l_crtc(crtc); > > > > > > > > > + > > > > > > > > > + rcrtc->vblank_enable = true; > > > > > > > > > + > > > > > > > > > + return 0; > > > > > > > > > +} > > > > > > > > > + > > > > > > > > > +static void rzg2l_du_crtc_disable_vblank(struct > > > > > > > > > +drm_crtc > > > > > > > > > +*crtc) > > > > { > > > > > > > > > + struct rzg2l_du_crtc *rcrtc = to_rzg2l_crtc(crtc); > > > > > > > > > + > > > > > > > > > + rcrtc->vblank_enable = false; } > > > > > > > > > > > > > > > > You should enable / disable your interrupts here > > > > > > > > > > > > > > We don't have dedicated vblank IRQ for enabling/disabling > > vblank. > > > > > > > > > > > > > > vblank is handled by vspd. > > > > > > > > > > > > > > vspd is directly rendering images to display, > > > > > > > rcar_du_crtc_finish_page_flip() and drm_crtc_handle_vblank() > > > > > > > called in vspd's pageflip context. > > > > > > > > > > > > > > See rzg2l_du_vsp_complete()in rzg2l_du_vsp.c > > > > > > > > > > > > Sorry, I couldn't really get how the interrupt flow / vblank > > > > > > reporting is going to work. Could you explain it a bit more? > > > > > > > > > > We just need to handle vertical blanking in the VSP frame end > > handler. > > > > > See the code below. > > > > > > > > > > static void rzg2l_du_vsp_complete(void *private, unsigned int > > > > > status, > > > > > u32 crc) { > > > > > struct rzg2l_du_crtc *crtc = private; > > > > > > > > > > if (crtc->vblank_enable) > > > > > drm_crtc_handle_vblank(&crtc->crtc); > > > > > > > > > > if (status & VSP1_DU_STATUS_COMPLETE) > > > > > rzg2l_du_crtc_finish_page_flip(crtc); > > > > > > > > > > drm_crtc_add_crc_entry(&crtc->crtc, false, 0, &crc); } > > > > > > > > Then we're back to the same question :) > > > > > > > > Why can't you mask the frame end interrupt? > > > > > > We are masking interrupts. > > > > > > [ 70.639139] #######rzg2l_du_crtc_disable_vblank####### > > > [ 70.650243] #########rzg2l_du_vsp_disable ############ > > > [ 70.652003] ########## vsp1_wpf_stop### > > > > > > Unmask is, > > > > > > [ 176.354520] #######rzg2l_du_crtc_enable_vblank####### > > > [ 176.354922] #########rzg2l_du_vsp_atomic_flush ############ [ > > > 176.355198] ########## wpf_configure_stream### > > > > Sorry, my question was why aren't you unmasking and masking them in > > the enable/disable_vblank hooks of the CRTC. > > I have n't tried that. Will try and provide feedback. > > Currently the IRQ source belongs to VSPD in media subsystem. > So I need to export an API though vsp1_drm and test it. > > > Currently we disable IRQ in rzg2l_du_crtc_atomic_disable() context > > And enable IRQ in rzg2l_du_vsp_atomic_flush(). Typo, it is rzg2l_du_crtc_atomic_flush(). Cheers, Biju