linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC 0/4] drm: add raw monotonic timestamp support
       [not found] <1349444222-22274-1-git-send-email-imre.deak@intel.com>
@ 2012-10-11 10:29 ` Laurent Pinchart
  2012-10-11 11:21   ` Imre Deak
  0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2012-10-11 10:29 UTC (permalink / raw)
  To: dri-devel
  Cc: Imre Deak, Daniel Vetter, Chris Wilson, Kristian Høgsberg,
	intel-gfx, linux-media, Mario Kleiner

(CC'ing linux-media)

On Friday 05 October 2012 16:36:58 Imre Deak wrote:
> This is needed to make applications depending on vblank/page flip
> timestamps independent of time ajdustments.

We're in the process to switching to CLOCK_MONOTONIC timestamps in V4L2. The 
reason why we're using CLOCK_MONOTONIC and not CLOCK_MONOTONIC_RAW is that 
ALSA uses the former. It would make sense in my opinion to unify timestamps 
across our media APIs.

> I've tested these with an updated intel-gpu-test/flip_test and will send
> the update for that once there's no objection about this patchset.
> 
> The patchset is based on danvet's dinq branch with the following
> additional patches from the intel-gfx ML applied:
>     drm/i915: paper over a pipe-enable vs pageflip race
>     drm/i915: don't frob the vblank ts in finish_page_flip
>     drm/i915: call drm_handle_vblank before finish_page_flip
> 
> Imre Deak (4):
>   time: export getnstime_raw_and_real for DRM
>   drm: make memset/calloc for _vblank_time more robust
>   drm: use raw time in drm_calc_vbltimestamp_from_scanoutpos
>   drm: add support for raw monotonic vblank timestamps
> 
>  drivers/gpu/drm/drm_crtc.c                |    2 +
>  drivers/gpu/drm/drm_ioctl.c               |    3 ++
>  drivers/gpu/drm/drm_irq.c                 |   83 ++++++++++++++------------
>  drivers/gpu/drm/i915/i915_irq.c           |    2 +-
>  drivers/gpu/drm/i915/intel_display.c      |   12 ++---
>  drivers/gpu/drm/radeon/radeon_display.c   |   10 ++--
>  drivers/gpu/drm/radeon/radeon_drv.c       |    2 +-
>  drivers/gpu/drm/radeon/radeon_kms.c       |    2 +-
>  drivers/gpu/drm/shmobile/shmob_drm_crtc.c |    9 ++--
>  include/drm/drm.h                         |    5 +-
>  include/drm/drmP.h                        |   38 +++++++++++--
>  include/drm/drm_mode.h                    |    4 +-
>  kernel/time/timekeeping.c                 |    2 +-
>  13 files changed, 113 insertions(+), 61 deletions(-)

-- 
Regards,

Laurent Pinchart


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC 0/4] drm: add raw monotonic timestamp support
  2012-10-11 10:29 ` [RFC 0/4] drm: add raw monotonic timestamp support Laurent Pinchart
@ 2012-10-11 11:21   ` Imre Deak
  0 siblings, 0 replies; 2+ messages in thread
From: Imre Deak @ 2012-10-11 11:21 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: dri-devel, Daniel Vetter, Chris Wilson, Kristian Høgsberg,
	intel-gfx, linux-media, Mario Kleiner

Hi,

On Thu, 2012-10-11 at 12:29 +0200, Laurent Pinchart wrote:
> (CC'ing linux-media)
> 
> On Friday 05 October 2012 16:36:58 Imre Deak wrote:
> > This is needed to make applications depending on vblank/page flip
> > timestamps independent of time ajdustments.
> 
> We're in the process to switching to CLOCK_MONOTONIC timestamps in V4L2. The 
> reason why we're using CLOCK_MONOTONIC and not CLOCK_MONOTONIC_RAW is that 
> ALSA uses the former. It would make sense in my opinion to unify timestamps 
> across our media APIs.

yes, thanks for pointing this out.

Since I posted the RFC we made the decision to use CLOCK_MONOTONIC too.
CLOCK_MONOTONIC_RAW is not adjusted against HW clock frequency
variations, so it's not ideal for us. CLOCK_MONOTONIC doesn't have this
problem, neither does it jump so it seems to be the ideal choice.

--Imre

> > I've tested these with an updated intel-gpu-test/flip_test and will send
> > the update for that once there's no objection about this patchset.
> > 
> > The patchset is based on danvet's dinq branch with the following
> > additional patches from the intel-gfx ML applied:
> >     drm/i915: paper over a pipe-enable vs pageflip race
> >     drm/i915: don't frob the vblank ts in finish_page_flip
> >     drm/i915: call drm_handle_vblank before finish_page_flip
> > 
> > Imre Deak (4):
> >   time: export getnstime_raw_and_real for DRM
> >   drm: make memset/calloc for _vblank_time more robust
> >   drm: use raw time in drm_calc_vbltimestamp_from_scanoutpos
> >   drm: add support for raw monotonic vblank timestamps
> > 
> >  drivers/gpu/drm/drm_crtc.c                |    2 +
> >  drivers/gpu/drm/drm_ioctl.c               |    3 ++
> >  drivers/gpu/drm/drm_irq.c                 |   83 ++++++++++++++------------
> >  drivers/gpu/drm/i915/i915_irq.c           |    2 +-
> >  drivers/gpu/drm/i915/intel_display.c      |   12 ++---
> >  drivers/gpu/drm/radeon/radeon_display.c   |   10 ++--
> >  drivers/gpu/drm/radeon/radeon_drv.c       |    2 +-
> >  drivers/gpu/drm/radeon/radeon_kms.c       |    2 +-
> >  drivers/gpu/drm/shmobile/shmob_drm_crtc.c |    9 ++--
> >  include/drm/drm.h                         |    5 +-
> >  include/drm/drmP.h                        |   38 +++++++++++--
> >  include/drm/drm_mode.h                    |    4 +-
> >  kernel/time/timekeeping.c                 |    2 +-
> >  13 files changed, 113 insertions(+), 61 deletions(-)
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-11 11:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1349444222-22274-1-git-send-email-imre.deak@intel.com>
2012-10-11 10:29 ` [RFC 0/4] drm: add raw monotonic timestamp support Laurent Pinchart
2012-10-11 11:21   ` Imre Deak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).