drm/gma500: Add page flip support on psb/cdv
authorPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Wed, 6 Nov 2019 09:44:00 +0000 (10:44 +0100)
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Thu, 7 Nov 2019 09:16:31 +0000 (10:16 +0100)
commitf76c22ce8fbbd03394eb9e2cd8c490d9ad2a116c
tree68d7d42f8a51cc5d2c83b4dbd54fe1960b225411
parentb20e9afb38d0b7f407bde1f9a4f5080626666482
drm/gma500: Add page flip support on psb/cdv

Legacy (non-atomic) page flip support is added to the driver by using the
mode_set_base CRTC function, that allows configuring a new framebuffer for
display. Since the function requires the primary plane's fb to be set
already, this is done prior to calling the function in the page flip helper
and reverted if the flip fails.

The vblank interrupt handler is also refactored to support passing an event.
The PIPE_TE_STATUS bit is also considered to indicate vblank on medfield
only, as explained in psb_enable_vblank.

It was tested by running weston on both poulsbo and cedartrail.

Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106094400.445834-3-paul.kocialkowski@bootlin.com
drivers/gpu/drm/gma500/cdv_intel_display.c
drivers/gpu/drm/gma500/gma_display.c
drivers/gpu/drm/gma500/gma_display.h
drivers/gpu/drm/gma500/psb_intel_display.c
drivers/gpu/drm/gma500/psb_intel_drv.h
drivers/gpu/drm/gma500/psb_irq.c