summaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2017-05-09 16:03:26 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-05-10 10:21:17 +0200
commit3fcdcb270936ae69a069bab4c52ebd9fde594669 (patch)
treea827669d62e21004a280fe63050430715dc58597 /include/drm
parentd673c02c4bdbcbe3076a2680f9c954be26b525c8 (diff)
drm/vblank: Switch to bool in_vblank_irq in get_vblank_timestamp
It's overkill to have a flag parameter which is essentially used just as a boolean. This takes care of core + adjusting drivers. Adjusting the scanout position callback is a bit harder, since radeon also supplies it's own driver-private flags in there. v2: Fixup misplaced hunks (Neil). v3: kbuild says v1 was better ... Cc: Mario Kleiner <mario.kleiner@tuebingen.mpg.de> Cc: Eric Anholt <eric@anholt.net> Cc: Rob Clark <robdclark@gmail.com> Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Neil Armstrong <narmstrong@baylibre.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170509140329.24114-2-daniel.vetter@ffwll.ch
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drm_drv.h17
-rw-r--r--include/drm/drm_irq.h2
2 files changed, 10 insertions, 9 deletions
diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h
index da78e248d9d8..a97dbc1eeccd 100644
--- a/include/drm/drm_drv.h
+++ b/include/drm/drm_drv.h
@@ -241,8 +241,10 @@ struct drm_driver {
* DRM device.
* pipe:
* Id of the crtc to query.
- * flags:
- * Flags from the caller (DRM_CALLED_FROM_VBLIRQ or 0).
+ * in_vblank_irq:
+ * True when called from drm_crtc_handle_vblank(). Some drivers
+ * need to apply some workarounds for gpu-specific vblank irq quirks
+ * if flag is set.
* vpos:
* Target location for current vertical scanout position.
* hpos:
@@ -308,11 +310,10 @@ struct drm_driver {
* Returns true upper bound on error for timestamp.
* vblank_time:
* Target location for returned vblank timestamp.
- * flags:
- * 0 = Defaults, no special treatment needed.
- * DRM_CALLED_FROM_VBLIRQ = Function is called from vblank
- * irq handler. Some drivers need to apply some workarounds
- * for gpu-specific vblank irq quirks if flag is set.
+ * in_vblank_irq:
+ * True when called from drm_crtc_handle_vblank(). Some drivers
+ * need to apply some workarounds for gpu-specific vblank irq quirks
+ * if flag is set.
*
* Returns:
*
@@ -322,7 +323,7 @@ struct drm_driver {
bool (*get_vblank_timestamp) (struct drm_device *dev, unsigned int pipe,
int *max_error,
struct timeval *vblank_time,
- unsigned flags);
+ bool in_vblank_irq);
/* these have to be filled in */
diff --git a/include/drm/drm_irq.h b/include/drm/drm_irq.h
index f0d5ccf9b282..445406efb8dc 100644
--- a/include/drm/drm_irq.h
+++ b/include/drm/drm_irq.h
@@ -156,7 +156,7 @@ u32 drm_accurate_vblank_count(struct drm_crtc *crtc);
bool drm_calc_vbltimestamp_from_scanoutpos(struct drm_device *dev,
unsigned int pipe, int *max_error,
struct timeval *vblank_time,
- unsigned flags,
+ bool in_vblank_irq,
const struct drm_display_mode *mode);
void drm_calc_timestamping_constants(struct drm_crtc *crtc,
const struct drm_display_mode *mode);