From: Daniel Vetter <daniel@ffwll.ch>
To: John Keeping <john@metanate.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 1/3] drm/atomic-helper: Export framebuffer_changed()
Date: Tue, 19 Jan 2016 12:03:34 +0100 [thread overview]
Message-ID: <20160119110334.GA19130@phenom.ffwll.local> (raw)
In-Reply-To: <f89bf1d5b69d52656f7125b7c240ddd525f27930.1453200263.git.john@metanate.com>
On Tue, Jan 19, 2016 at 10:46:58AM +0000, John Keeping wrote:
> The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks()
> because it has hardware counters for neither vblanks nor scanlines.
>
> In order to simplify re-implementing the functionality for this driver,
> export the framebuffer_changed() helper so it can be reused.
>
> Signed-off-by: John Keeping <john@metanate.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Also ack for merging through rockchip git trees. I discussed this with
Dave Airlie, he's ok with that.
-Daniel
> ---
> Unchanged since v1.
>
> drivers/gpu/drm/drm_atomic_helper.c | 24 ++++++++++++++++++++----
> include/drm/drm_atomic_helper.h | 4 ++++
> 2 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 268d37f..7449293 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -948,9 +948,23 @@ static void wait_for_fences(struct drm_device *dev,
> }
> }
>
> -static bool framebuffer_changed(struct drm_device *dev,
> - struct drm_atomic_state *old_state,
> - struct drm_crtc *crtc)
> +/**
> + * drm_atomic_helper_framebuffer_changed - check if framebuffer has changed
> + * @dev: DRM device
> + * @old_state: atomic state object with old state structures
> + * @crtc: DRM crtc
> + *
> + * Checks whether the framebuffer used for this CRTC changes as a result of
> + * the atomic update. This is useful for drivers which cannot use
> + * drm_atomic_helper_wait_for_vblanks() and need to reimplement its
> + * functionality.
> + *
> + * Returns:
> + * true if the framebuffer changed.
> + */
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc)
> {
> struct drm_plane *plane;
> struct drm_plane_state *old_plane_state;
> @@ -967,6 +981,7 @@ static bool framebuffer_changed(struct drm_device *dev,
>
> return false;
> }
> +EXPORT_SYMBOL(drm_atomic_helper_framebuffer_changed);
>
> /**
> * drm_atomic_helper_wait_for_vblanks - wait for vblank on crtcs
> @@ -1001,7 +1016,8 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> if (old_state->legacy_cursor_update)
> continue;
>
> - if (!framebuffer_changed(dev, old_state, crtc))
> + if (!drm_atomic_helper_framebuffer_changed(dev,
> + old_state, crtc))
> continue;
>
> ret = drm_crtc_vblank_get(crtc);
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index a286cce..74fce78 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -42,6 +42,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
> struct drm_atomic_state *state,
> bool async);
>
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc);
> +
> void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> struct drm_atomic_state *old_state);
>
> --
> 2.7.0.226.gfe986fe
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: daniel@ffwll.ch (Daniel Vetter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/3] drm/atomic-helper: Export framebuffer_changed()
Date: Tue, 19 Jan 2016 12:03:34 +0100 [thread overview]
Message-ID: <20160119110334.GA19130@phenom.ffwll.local> (raw)
In-Reply-To: <f89bf1d5b69d52656f7125b7c240ddd525f27930.1453200263.git.john@metanate.com>
On Tue, Jan 19, 2016 at 10:46:58AM +0000, John Keeping wrote:
> The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks()
> because it has hardware counters for neither vblanks nor scanlines.
>
> In order to simplify re-implementing the functionality for this driver,
> export the framebuffer_changed() helper so it can be reused.
>
> Signed-off-by: John Keeping <john@metanate.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Also ack for merging through rockchip git trees. I discussed this with
Dave Airlie, he's ok with that.
-Daniel
> ---
> Unchanged since v1.
>
> drivers/gpu/drm/drm_atomic_helper.c | 24 ++++++++++++++++++++----
> include/drm/drm_atomic_helper.h | 4 ++++
> 2 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 268d37f..7449293 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -948,9 +948,23 @@ static void wait_for_fences(struct drm_device *dev,
> }
> }
>
> -static bool framebuffer_changed(struct drm_device *dev,
> - struct drm_atomic_state *old_state,
> - struct drm_crtc *crtc)
> +/**
> + * drm_atomic_helper_framebuffer_changed - check if framebuffer has changed
> + * @dev: DRM device
> + * @old_state: atomic state object with old state structures
> + * @crtc: DRM crtc
> + *
> + * Checks whether the framebuffer used for this CRTC changes as a result of
> + * the atomic update. This is useful for drivers which cannot use
> + * drm_atomic_helper_wait_for_vblanks() and need to reimplement its
> + * functionality.
> + *
> + * Returns:
> + * true if the framebuffer changed.
> + */
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc)
> {
> struct drm_plane *plane;
> struct drm_plane_state *old_plane_state;
> @@ -967,6 +981,7 @@ static bool framebuffer_changed(struct drm_device *dev,
>
> return false;
> }
> +EXPORT_SYMBOL(drm_atomic_helper_framebuffer_changed);
>
> /**
> * drm_atomic_helper_wait_for_vblanks - wait for vblank on crtcs
> @@ -1001,7 +1016,8 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> if (old_state->legacy_cursor_update)
> continue;
>
> - if (!framebuffer_changed(dev, old_state, crtc))
> + if (!drm_atomic_helper_framebuffer_changed(dev,
> + old_state, crtc))
> continue;
>
> ret = drm_crtc_vblank_get(crtc);
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index a286cce..74fce78 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -42,6 +42,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
> struct drm_atomic_state *state,
> bool async);
>
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc);
> +
> void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> struct drm_atomic_state *old_state);
>
> --
> 2.7.0.226.gfe986fe
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: John Keeping <john@metanate.com>
Cc: Mark yao <mark.yao@rock-chips.com>,
Daniel Vetter <daniel@ffwll.ch>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
dri-devel <dri-devel@lists.freedesktop.org>,
"open list:ARM/Rockchip SoC..."
<linux-rockchip@lists.infradead.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Thierry Reding <thierry.reding@gmail.com>
Subject: Re: [PATCH v2 1/3] drm/atomic-helper: Export framebuffer_changed()
Date: Tue, 19 Jan 2016 12:03:34 +0100 [thread overview]
Message-ID: <20160119110334.GA19130@phenom.ffwll.local> (raw)
In-Reply-To: <f89bf1d5b69d52656f7125b7c240ddd525f27930.1453200263.git.john@metanate.com>
On Tue, Jan 19, 2016 at 10:46:58AM +0000, John Keeping wrote:
> The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks()
> because it has hardware counters for neither vblanks nor scanlines.
>
> In order to simplify re-implementing the functionality for this driver,
> export the framebuffer_changed() helper so it can be reused.
>
> Signed-off-by: John Keeping <john@metanate.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Also ack for merging through rockchip git trees. I discussed this with
Dave Airlie, he's ok with that.
-Daniel
> ---
> Unchanged since v1.
>
> drivers/gpu/drm/drm_atomic_helper.c | 24 ++++++++++++++++++++----
> include/drm/drm_atomic_helper.h | 4 ++++
> 2 files changed, 24 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 268d37f..7449293 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -948,9 +948,23 @@ static void wait_for_fences(struct drm_device *dev,
> }
> }
>
> -static bool framebuffer_changed(struct drm_device *dev,
> - struct drm_atomic_state *old_state,
> - struct drm_crtc *crtc)
> +/**
> + * drm_atomic_helper_framebuffer_changed - check if framebuffer has changed
> + * @dev: DRM device
> + * @old_state: atomic state object with old state structures
> + * @crtc: DRM crtc
> + *
> + * Checks whether the framebuffer used for this CRTC changes as a result of
> + * the atomic update. This is useful for drivers which cannot use
> + * drm_atomic_helper_wait_for_vblanks() and need to reimplement its
> + * functionality.
> + *
> + * Returns:
> + * true if the framebuffer changed.
> + */
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc)
> {
> struct drm_plane *plane;
> struct drm_plane_state *old_plane_state;
> @@ -967,6 +981,7 @@ static bool framebuffer_changed(struct drm_device *dev,
>
> return false;
> }
> +EXPORT_SYMBOL(drm_atomic_helper_framebuffer_changed);
>
> /**
> * drm_atomic_helper_wait_for_vblanks - wait for vblank on crtcs
> @@ -1001,7 +1016,8 @@ drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> if (old_state->legacy_cursor_update)
> continue;
>
> - if (!framebuffer_changed(dev, old_state, crtc))
> + if (!drm_atomic_helper_framebuffer_changed(dev,
> + old_state, crtc))
> continue;
>
> ret = drm_crtc_vblank_get(crtc);
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index a286cce..74fce78 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -42,6 +42,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
> struct drm_atomic_state *state,
> bool async);
>
> +bool drm_atomic_helper_framebuffer_changed(struct drm_device *dev,
> + struct drm_atomic_state *old_state,
> + struct drm_crtc *crtc);
> +
> void drm_atomic_helper_wait_for_vblanks(struct drm_device *dev,
> struct drm_atomic_state *old_state);
>
> --
> 2.7.0.226.gfe986fe
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2016-01-19 11:03 UTC|newest]
Thread overview: 83+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-13 12:53 [RFC/PATCH] drm/rockchip: don't wait for vblank if fb hasn't changed John Keeping
2016-01-13 12:53 ` John Keeping
2016-01-13 12:53 ` John Keeping
2016-01-13 14:23 ` Daniel Vetter
2016-01-13 14:23 ` Daniel Vetter
2016-01-13 14:23 ` Daniel Vetter
2016-01-13 14:34 ` John Keeping
2016-01-13 14:34 ` John Keeping
2016-01-13 14:34 ` John Keeping
2016-01-13 15:40 ` Daniel Vetter
2016-01-13 15:40 ` Daniel Vetter
2016-01-13 15:40 ` Daniel Vetter
2016-01-13 15:55 ` John Keeping
2016-01-13 15:55 ` John Keeping
2016-01-13 15:55 ` John Keeping
2016-01-13 16:21 ` Daniel Vetter
2016-01-13 16:21 ` Daniel Vetter
2016-01-13 16:21 ` Daniel Vetter
2016-01-13 16:40 ` John Keeping
2016-01-13 16:40 ` John Keeping
2016-01-13 16:40 ` John Keeping
2016-01-13 17:19 ` Daniel Vetter
2016-01-13 17:19 ` Daniel Vetter
2016-01-13 17:19 ` Daniel Vetter
2016-01-13 17:39 ` John Keeping
2016-01-13 17:39 ` John Keeping
2016-01-13 17:39 ` John Keeping
2016-01-14 1:16 ` Mark yao
2016-01-14 1:16 ` Mark yao
2016-01-14 1:16 ` Mark yao
2016-01-14 8:32 ` Daniel Vetter
2016-01-14 8:32 ` Daniel Vetter
2016-01-14 8:32 ` Daniel Vetter
2016-01-14 8:46 ` Mark yao
2016-01-14 8:46 ` Mark yao
2016-01-14 8:46 ` Mark yao
2016-01-14 14:20 ` Daniel Vetter
2016-01-14 14:20 ` Daniel Vetter
2016-01-14 14:20 ` Daniel Vetter
2016-01-14 14:39 ` [PATCH 0/3] drm/rockchip: fix cursor performance with atomic John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:39 ` [PATCH 1/3] drm/atomic-helper: Export framebuffer_changed() John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:56 ` Daniel Vetter
2016-01-14 14:56 ` Daniel Vetter
2016-01-14 14:56 ` Daniel Vetter
2016-01-14 14:39 ` [PATCH 2/3] drm/rockchip: don't wait for vblank if fb hasn't changed John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:39 ` [PATCH 3/3] drm/rockchip: explain why we can't wait_for_vblanks John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:39 ` John Keeping
2016-01-14 14:57 ` Thierry Reding
2016-01-14 14:57 ` Thierry Reding
2016-01-14 14:57 ` Thierry Reding
2016-01-14 16:26 ` John Keeping
2016-01-14 16:26 ` John Keeping
2016-01-14 16:26 ` John Keeping
2016-01-18 1:40 ` Mark yao
2016-01-18 1:40 ` Mark yao
2016-01-18 1:40 ` Mark yao
2016-01-19 10:46 ` [PATCH v2 0/3] drm/rockchip: fix cursor performance with atomic John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 10:46 ` [PATCH v2 1/3] drm/atomic-helper: Export framebuffer_changed() John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 11:03 ` Daniel Vetter [this message]
2016-01-19 11:03 ` Daniel Vetter
2016-01-19 11:03 ` Daniel Vetter
2016-01-19 10:46 ` [PATCH v2 2/3] drm/rockchip: don't wait for vblank if fb hasn't changed John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 10:46 ` John Keeping
2016-01-19 10:47 ` [PATCH v2 3/3] drm/rockchip: explain why we can't wait_for_vblanks John Keeping
2016-01-19 10:47 ` John Keeping
2016-01-19 10:47 ` John Keeping
2016-01-21 0:51 ` [PATCH v2 0/3] drm/rockchip: fix cursor performance with atomic Mark yao
2016-01-21 0:51 ` Mark yao
2016-01-21 0:51 ` Mark yao
2016-01-17 15:21 ` [RFC/PATCH] drm/rockchip: don't wait for vblank if fb hasn't changed Heiko Stuebner
2016-01-17 15:21 ` Heiko Stuebner
2016-01-17 15:21 ` Heiko Stuebner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160119110334.GA19130@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=john@metanate.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.