drm/irq: Don't disable vblank interrupts when already disabled
drm/irq: Don't disable vblank interrupts when already disabled

The .enable_vblank() operation is only called when vblank interrupts are
disabled, but no similar check exists when disabling vblank interrupts.
This leads to .disable_vblank() being called with vblank interrupts
already disabled and the device possibly runtime suspended. As the
operation is called with a spinlock held drivers can't runtime resume
the device there and thus must avoid touching device registers in that
case, requiring vblank refcounting.

As the DRM core tracks whether vblank interrupts are enabled just skip
the .disable_vblank() call when the interrupts are already disabled.

Signed-off-by: Laurent Pinchart <3ded2f39a78f0d7044839546f95841842b4d7c96@ideasonboard.com>
Reviewed-by: Michel Dänzer <242b79f0804cf52679d58f27ed754158c1323c75@amd.com>
Signed-off-by: Daniel Vetter <c1b6782c4af8f0673da8923a0702a1832e5940f4@ffwll.ch>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs