drm: Stop using drm_vblank_count() as the hw frame counter
drm_vblank_count() returns the software counter. We should not pretend it's the hw counter since we use the hw counter to figuere out what the software counter value should be. So instead provide a new function drm_vblank_no_hw_counter() for drivers that don't have a real hw counter. The new function simply returns 0, which is about the only thing it can do. Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thierry Reding <treding@nvidia.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Vincent Abriou <vincent.abriou@st.com> [danvet: s/int pipe/unsigned int pipe/ to follow Thierry's interface change.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:

committed by
Daniel Vetter

parent
88e72717c2
commit
b44f84081b
@@ -1798,3 +1798,20 @@ bool drm_crtc_handle_vblank(struct drm_crtc *crtc)
|
||||
return drm_handle_vblank(crtc->dev, drm_crtc_index(crtc));
|
||||
}
|
||||
EXPORT_SYMBOL(drm_crtc_handle_vblank);
|
||||
|
||||
/**
|
||||
* drm_vblank_no_hw_counter - "No hw counter" implementation of .get_vblank_counter()
|
||||
* @dev: DRM device
|
||||
* @pipe: CRTC for which to read the counter
|
||||
*
|
||||
* Drivers can plug this into the .get_vblank_counter() function if
|
||||
* there is no useable hardware frame counter available.
|
||||
*
|
||||
* Returns:
|
||||
* 0
|
||||
*/
|
||||
u32 drm_vblank_no_hw_counter(struct drm_device *dev, unsigned int pipe)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(drm_vblank_no_hw_counter);
|
||||
|
Reference in New Issue
Block a user