[Intel-gfx] [PATCH 05/11] drm/vblank: Switch drm_driver->get_vblank_timestamp to return a bool

Neil Armstrong narmstrong at baylibre.com
Tue Apr 4 15:00:02 UTC 2017


On 04/04/2017 11:52 AM, Daniel Vetter wrote:
> There's really no reason for anything more:
> - Calling this while the crtc vblank stuff isn't set up is a driver
>   bug. Those places arlready DRM_ERROR.
s/arlready/already/
> - Calling this when the crtc is off is either a driver bug (callin
s/callin/calling/
>   drm_crtc_handle_vblank at the wrong time) or a core bug (for
>   anything else). Again, we DRM_ERROR.
> - EINVAL is checked at higher levels already, and if we'd use struct
>   drm_crtc * instead of (dev, pipe) it would be real obvious that
>   those are again core bugs.
> 
> The only valid failure mode is crap hardware that couldn't sample a
> useful timestamp, to ask the core to just grab a not-so-accurate
> timestampe. Bool is perfectly fine for that.
s/timestampe/timestamp/
> 
> v2: Also fix up the one caller, I lost that in the shuffling (Jani).
> 
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Cc: Mario Kleiner <mario.kleiner at tuebingen.mpg.de>
> Cc: Eric Anholt <eric at anholt.net>
> Cc: Rob Clark <robdclark at gmail.com>
> Cc: linux-arm-msm at vger.kernel.org
> Cc: freedreno at lists.freedesktop.org
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Ben Skeggs <bskeggs at redhat.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu.h       |  8 ++---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c   | 14 ++++-----
>  drivers/gpu/drm/drm_irq.c                 | 49 ++++++++++++-------------------
>  drivers/gpu/drm/i915/i915_irq.c           |  8 ++---
>  drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c   | 12 ++++----
>  drivers/gpu/drm/nouveau/nouveau_display.c |  4 +--
>  drivers/gpu/drm/nouveau/nouveau_display.h |  4 +--
>  drivers/gpu/drm/radeon/radeon_drv.c       |  8 ++---
>  drivers/gpu/drm/radeon/radeon_kms.c       | 14 ++++-----
>  drivers/gpu/drm/vc4/vc4_crtc.c            |  2 +-
>  drivers/gpu/drm/vc4/vc4_drv.h             |  2 +-
>  include/drm/drmP.h                        |  1 -
>  include/drm/drm_drv.h                     |  7 ++---
>  include/drm/drm_irq.h                     | 10 +++----
>  14 files changed, 64 insertions(+), 79 deletions(-)
> 
[...]

With the commit log typo fixes,
Reviewed-by: Neil Armstrong <narmstrong at baylibre.com>


More information about the Intel-gfx mailing list