[PATCH 1/2] drm: Stop using drm_vblank_count() as the hw frame counter

Vincent ABRIOU vincent.abriou at st.com
Thu Oct 1 02:10:43 PDT 2015



On 09/30/2015 04:14 PM, Ville Syrjälä wrote:
> On Wed, Sep 30, 2015 at 04:08:02PM +0200, Daniel Vetter wrote:
>> On Wed, Sep 30, 2015 at 04:46:48PM +0300, ville.syrjala at linux.intel.com wrote:
>>> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>>
>>> 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.
>>
>> Shouldn't we instead just make the get_vblank_counter hook optional?
>
> Perhaps. But maybe this way would encourage people to go look for a
> hw frame counter in their hardware?
>
>> -Daniel
>>
>>>
>>> Cc: Vincent Abriou <vincent.abriou at st.com>
>>> Cc: Thierry Reding <treding at nvidia.com>
>>> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
>>> ---
>>>   drivers/gpu/drm/armada/armada_drv.c          |  2 +-
>>>   drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |  2 +-
>>>   drivers/gpu/drm/drm_irq.c                    | 17 +++++++++++++++++
>>>   drivers/gpu/drm/exynos/exynos_drm_drv.c      |  2 +-
>>>   drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_drv.c    |  2 +-

The 2 patches have been successfully tested on next-20151001. The 
warning message is gone and hw vblank counter stucks to 0.

Tested-by: Vincent Abriou <vincent.abriou at st.com>

Thanks for the patches

Vincent


More information about the dri-devel mailing list