* [PATCH 1/1] drm: fix drm_update_vblank_count for software vblank counter
@ 2015-09-30 12:29 Vincent Abriou
2015-09-30 14:11 ` Ville Syrjälä
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Abriou @ 2015-09-30 12:29 UTC (permalink / raw)
To: dri-devel; +Cc: Fabien Dessenne, Benjamin Gaignard
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 1323 bytes --]
Drivers with software vblank counter relies on the on drm core to update
vblank counter and they should not be concern about the warning that
check hardware counter coherency.
Further, the generic message that tracks the current and last counter
values must be counter type (hardware or software) agnostic.
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
---
drivers/gpu/drm/drm_irq.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
index 88fbee4..88041b4 100644
--- a/drivers/gpu/drm/drm_irq.c
+++ b/drivers/gpu/drm/drm_irq.c
@@ -219,11 +219,12 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
} else {
/* some kind of default for drivers w/o accurate vbl timestamping */
diff = (flags & DRM_CALLED_FROM_VBLIRQ) != 0;
+ if (diff == 0)
+ return;
}
- DRM_DEBUG("updating vblank count on crtc %u:"
- " current=%u, diff=%u, hw=%u hw_last=%u\n",
- pipe, vblank->count, diff, cur_vblank, vblank->last);
+ DRM_DEBUG("updating vblank count on crtc %u: diff=%u cur=%u last=%u\n",
+ pipe, diff, cur_vblank, vblank->last);
if (diff == 0) {
WARN_ON_ONCE(cur_vblank != vblank->last);
--
1.9.1
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH 1/1] drm: fix drm_update_vblank_count for software vblank counter
2015-09-30 12:29 [PATCH 1/1] drm: fix drm_update_vblank_count for software vblank counter Vincent Abriou
@ 2015-09-30 14:11 ` Ville Syrjälä
0 siblings, 0 replies; 2+ messages in thread
From: Ville Syrjälä @ 2015-09-30 14:11 UTC (permalink / raw)
To: Vincent Abriou; +Cc: Benjamin Gaignard, dri-devel, Fabien Dessenne
On Wed, Sep 30, 2015 at 02:29:49PM +0200, Vincent Abriou wrote:
> Drivers with software vblank counter relies on the on drm core to update
> vblank counter and they should not be concern about the warning that
> check hardware counter coherency.
>
> Further, the generic message that tracks the current and last counter
> values must be counter type (hardware or software) agnostic.
>
> Cc: Ville Syrj?l? <ville.syrjala@linux.intel.com>
> Signed-off-by: Vincent Abriou <vincent.abriou@st.com>
I sent a patch to get rid of the drm_vblank_count() abuse in all
drivers. That will get rid of the WARN too.
> ---
> drivers/gpu/drm/drm_irq.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_irq.c b/drivers/gpu/drm/drm_irq.c
> index 88fbee4..88041b4 100644
> --- a/drivers/gpu/drm/drm_irq.c
> +++ b/drivers/gpu/drm/drm_irq.c
> @@ -219,11 +219,12 @@ static void drm_update_vblank_count(struct drm_device *dev, unsigned int pipe,
> } else {
> /* some kind of default for drivers w/o accurate vbl timestamping */
> diff = (flags & DRM_CALLED_FROM_VBLIRQ) != 0;
> + if (diff == 0)
> + return;
> }
>
> - DRM_DEBUG("updating vblank count on crtc %u:"
> - " current=%u, diff=%u, hw=%u hw_last=%u\n",
> - pipe, vblank->count, diff, cur_vblank, vblank->last);
> + DRM_DEBUG("updating vblank count on crtc %u: diff=%u cur=%u last=%u\n",
> + pipe, diff, cur_vblank, vblank->last);
>
> if (diff == 0) {
> WARN_ON_ONCE(cur_vblank != vblank->last);
> --
> 1.9.1
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-09-30 14:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-30 12:29 [PATCH 1/1] drm: fix drm_update_vblank_count for software vblank counter Vincent Abriou
2015-09-30 14:11 ` Ville Syrjälä
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.