Message ID | 20170621014457.26587-2-mario.kleiner.de@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Mario Kleiner <mario.kleiner.de@gmail.com> writes: > 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. > > Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> > Cc: Eric Anholt <eric@anholt.net> If you can spin this against drm-misc-next instead of the downstream tree, I can get it applied.
Hi Mario, [auto build test ERROR on drm/drm-next] [also build test ERROR on v4.12-rc6 next-20170621] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mario-Kleiner/drm-vc4-Allow-vblank_disable_immediate-on-non-fw-kms/20170622-013723 base: git://people.freedesktop.org/~airlied/linux.git drm-next config: x86_64-allyesconfig (attached as .config) compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All errors (new ones prefixed by >>): drivers/gpu//drm/vc4/vc4_kms.c: In function 'vc4_kms_load': >> drivers/gpu//drm/vc4/vc4_kms.c:220:10: error: 'struct vc4_dev' has no member named 'firmware_kms' if (!vc4->firmware_kms) ^~ vim +220 drivers/gpu//drm/vc4/vc4_kms.c 214 struct vc4_dev *vc4 = to_vc4_dev(dev); 215 int ret; 216 217 sema_init(&vc4->async_modeset, 1); 218 219 /* Set support for vblank irq fast disable, before drm_vblank_init() */ > 220 if (!vc4->firmware_kms) 221 dev->vblank_disable_immediate = true; 222 223 ret = drm_vblank_init(dev, dev->mode_config.num_crtc); --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
On 06/21/2017 06:19 PM, Eric Anholt wrote: > Mario Kleiner <mario.kleiner.de@gmail.com> writes: > >> 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. >> >> Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> >> Cc: Eric Anholt <eric@anholt.net> > > If you can spin this against drm-misc-next instead of the downstream > tree, I can get it applied. > Done, thanks! -mario
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 928d191..70c4e17 100644 --- a/drivers/gpu/drm/vc4/vc4_kms.c +++ b/drivers/gpu/drm/vc4/vc4_kms.c @@ -216,6 +216,10 @@ 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() */ + if (!vc4->firmware_kms) + 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");
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. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Cc: Eric Anholt <eric@anholt.net> --- drivers/gpu/drm/vc4/vc4_kms.c | 4 ++++ 1 file changed, 4 insertions(+)