On 15.10.2015 04:26, Alex Deucher wrote: > From: Michel Dänzer <michel.daenzer@xxxxxxx> > > This fixes flickering issues caused by prematurely firing pflip > interrupts. > > v2 (chk): add commit message, fix DCE V10/V11 and DM as well > v3: Re-enable pflip interrupt wherever we re-enable a CRTC > v4: Enable pflip interrupt in DAL as well > v5: drop DAL changes for upstream > v6: (agd): only enable interrupts on crtcs that exist > > Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx> > Signed-off-by: Christian König <christian.koenig@xxxxxxx> > Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> Cc: stable ? > diff --git a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c > index fcd2ed5..5727471 100644 > --- a/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c > +++ b/drivers/gpu/drm/amd/amdgpu/dce_v11_0.c > @@ -233,6 +233,24 @@ static u32 dce_v11_0_vblank_get_counter(struct amdgpu_device *adev, int crtc) > return RREG32(mmCRTC_STATUS_FRAME_COUNT + crtc_offsets[crtc]); > } > > +static void dce_v11_0_pageflip_interrupt_init(struct amdgpu_device *adev) > +{ > + unsigned i; > + > + /* Enable pflip interrupts */ > + for (i = AMDGPU_PAGEFLIP_IRQ_D1; i < adev->mode_info.num_crtc; i++) > + amdgpu_irq_get(adev, &adev->pageflip_irq, i); > +} > + > +static void dce_v11_0_pageflip_interrupt_fini(struct amdgpu_device *adev) > +{ > + unsigned i; > + > + /* Disable pflip interrupts */ > + for (i = AMDGPU_PAGEFLIP_IRQ_D1; i < adev->mode_info.num_crtc; i++) > + amdgpu_irq_put(adev, &adev->pageflip_irq, i); > +} It might be less confusing to use 0 instead of AMDGPU_PAGEFLIP_IRQ_D1 now as well, but I'm fine either way. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel