aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-01-21 18:13:13 -0500
committerDave Airlie <airlied@redhat.com>2014-01-21 18:13:13 -0500
commitf5395ba35f2ae52eb5839f8046e4aeef6df7f357 (patch)
tree12f147678c6a3eb110d25b36e630de0faefdc0da /include
parent2b76a676f797b4bfbe6e856f5f608bed4e6e92b4 (diff)
parent095163bad59bfeed294a81e0d873fa8943e4fa01 (diff)
Merge branch 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux into drm-next
Here's the vblank timestamp pull request you wanted. I addressed the few bugs that Mario pointed out and added the r-bs. As it has been a while since I made the changes, I gave it a quick spin on a few different i915 machines. Fortunately everything still seems to be fine. * 'drm-vbl-timestamp' of git://gitorious.org/vsyrjala/linux: drm/i915: Add a kludge for DSL incrementing too late and ISR not working drm/radeon: Move the early vblank IRQ fixup to radeon_get_crtc_scanoutpos() drm: Pass 'flags' from the caller to .get_scanout_position() drm: Fix vblank timestamping constants for interlaced modes drm/i915: Fix scanoutpos calculations for interlaced modes drm: Change {pixel,line,frame}dur_ns from s64 to int drm: Use crtc_clock in drm_calc_timestamping_constants() drm/radeon: Populate crtc_clock in radeon_atom_get_tv_timings() drm: Simplify the math in drm_calc_timestamping_constants() drm: Improve drm_calc_timestamping_constants() documentation drm/i915: Call drm_calc_timestamping_constants() earlier drm/i915: Kill hwmode save/restore drm: Pass the display mode to drm_calc_vbltimestamp_from_scanoutpos() drm: Pass the display mode to drm_calc_timestamping_constants()
Diffstat (limited to 'include')
-rw-r--r--include/drm/drmP.h8
-rw-r--r--include/drm/drm_crtc.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 63eab2b72ee7..04086c5be930 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -845,6 +845,7 @@ struct drm_driver {
845 * 845 *
846 * \param dev DRM device. 846 * \param dev DRM device.
847 * \param crtc Id of the crtc to query. 847 * \param crtc Id of the crtc to query.
848 * \param flags Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0).
848 * \param *vpos Target location for current vertical scanout position. 849 * \param *vpos Target location for current vertical scanout position.
849 * \param *hpos Target location for current horizontal scanout position. 850 * \param *hpos Target location for current horizontal scanout position.
850 * \param *stime Target location for timestamp taken immediately before 851 * \param *stime Target location for timestamp taken immediately before
@@ -867,6 +868,7 @@ struct drm_driver {
867 * 868 *
868 */ 869 */
869 int (*get_scanout_position) (struct drm_device *dev, int crtc, 870 int (*get_scanout_position) (struct drm_device *dev, int crtc,
871 unsigned int flags,
870 int *vpos, int *hpos, ktime_t *stime, 872 int *vpos, int *hpos, ktime_t *stime,
871 ktime_t *etime); 873 ktime_t *etime);
872 874
@@ -1401,8 +1403,10 @@ extern int drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
1401 int crtc, int *max_error, 1403 int crtc, int *max_error,
1402 struct timeval *vblank_time, 1404 struct timeval *vblank_time,
1403 unsigned flags, 1405 unsigned flags,
1404 struct drm_crtc *refcrtc); 1406 const struct drm_crtc *refcrtc,
1405extern void drm_calc_timestamping_constants(struct drm_crtc *crtc); 1407 const struct drm_display_mode *mode);
1408extern void drm_calc_timestamping_constants(struct drm_crtc *crtc,
1409 const struct drm_display_mode *mode);
1406 1410
1407extern bool 1411extern bool
1408drm_mode_parse_command_line_for_connector(const char *mode_option, 1412drm_mode_parse_command_line_for_connector(const char *mode_option,
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index e51e8975dd6f..e963470efd39 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -449,7 +449,7 @@ struct drm_crtc {
449 uint16_t *gamma_store; 449 uint16_t *gamma_store;
450 450
451 /* Constants needed for precise vblank and swap timestamping. */ 451 /* Constants needed for precise vblank and swap timestamping. */
452 s64 framedur_ns, linedur_ns, pixeldur_ns; 452 int framedur_ns, linedur_ns, pixeldur_ns;
453 453
454 /* if you are using the helper */ 454 /* if you are using the helper */
455 void *helper_private; 455 void *helper_private;