summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4
diff options
context:
space:
mode:
authorMario Kleiner2017-06-22 03:28:11 +0200
committerEric Anholt2017-06-22 20:13:33 +0200
commit7d2818f54e38e40232c65866b58c8b627dbf5711 (patch)
tree9b69f0e6b938f896a8a111e741fed6487af90180 /drivers/gpu/drm/vc4
parentdrm: Add drm_atomic_helper_wait_for_flip_done() (diff)
downloadkernel-qcow2-linux-7d2818f54e38e40232c65866b58c8b627dbf5711.tar.gz
kernel-qcow2-linux-7d2818f54e38e40232c65866b58c8b627dbf5711.tar.xz
kernel-qcow2-linux-7d2818f54e38e40232c65866b58c8b627dbf5711.zip
drm/vc4: Allow vblank_disable_immediate on non-fw-kms. (v2)
With instantaneous high precision vblank timestamping that updates at leading edge of vblank, the emulated "hw vblank counter" from vblank timestamping which increments at leading edge of vblank, and reliable page flip execution and completion at leading edge of vblank, we should meet the requirements for fast vblank irq disable/enable. Testing against rpi-4.12-rc5 Linux kernel with timing measurement equipment indicates this works fine, so allow immediate vblank disable for power saving. For debugging in case of unexpected trouble, booting with kernel cmdline option drm.vblankoffdelay=0 would keep vblank irqs on to approximate old behavior. v2: Respin onto drm-misc-next, per Eric's suggestion. Drop !vc4->firmware_kms check, as the firmware_kms implementation does not exist in upstream. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net> Link: http://patchwork.freedesktop.org/patch/msgid/20170622012811.2139-1-mario.kleiner.de@gmail.com
Diffstat (limited to 'drivers/gpu/drm/vc4')
-rw-r--r--drivers/gpu/drm/vc4/vc4_kms.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index bc6ecdc6f104..c2c9f82b2df1 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -241,6 +241,9 @@ int vc4_kms_load(struct drm_device *dev)
sema_init(&vc4->async_modeset, 1);
+ /* Set support for vblank irq fast disable, before drm_vblank_init() */
+ dev->vblank_disable_immediate = true;
+
ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
if (ret < 0) {
dev_err(dev->dev, "failed to initialize vblank\n");