lkml.org 
[lkml]   [2017]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] drm: Widen vblank count to 64 bits. Change vblank time precision to ns
From
Date
On 06/07/17 07:10 AM, Keith Packard wrote:
> This modifies the datatypes used by the vblank code to provide both 64
> bits of vblank count and to increase the resolution of the vblank
> timestamp from microseconds to nanoseconds.
>
> The driver interfaces have also been changed to return 64-bits of
> vblank count; fortunately all of the code necessary to widen that value
> was already included to handle devices returning fewer than 32-bits.
>
> This will provide the necessary datatypes for the Vulkan API.
>
> Signed-off-by: Keith Packard <keithp@keithp.com>

[...]

> @@ -1492,9 +1515,11 @@ int drm_wait_vblank(struct drm_device *dev, void *data,
>
> switch (vblwait->request.type & _DRM_VBLANK_TYPES_MASK) {
> case _DRM_VBLANK_RELATIVE:
> - vblwait->request.sequence += seq;
> + req_seq = seq + vblwait->request.sequence;
> vblwait->request.type &= ~_DRM_VBLANK_RELATIVE;

Subtle breakage here: vblwait->request.sequence must still get updated
for _DRM_VBLANK_RELATIVE, in case we're interrupted by a signal.


> @@ -317,6 +317,9 @@ int via_driver_irq_postinstall(struct drm_device *dev)
> if (!dev_priv)
> return -EINVAL;
>
> + if (dev->driver->get_vblank_counter)
> + dev->max_vblank_count = 0xffffffff;

What's the purpose of this? All drivers providing get_vblank_counter
should already initialize max_vblank_count correctly.


--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer

\
 
 \ /
  Last update: 2017-07-06 09:46    [W:0.200 / U:1.764 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site