* [PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()
@ 2018-07-24 13:32 Boris Brezillon
2018-07-25 19:18 ` Boris Brezillon
0 siblings, 1 reply; 2+ messages in thread
From: Boris Brezillon @ 2018-07-24 13:32 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, dri-devel
Cc: Gustavo Padovan, Sean Paul, Eric Anholt, Boris Brezillon, stable
Async plane update is supposed to work only when updating the FB or FB
position of an already enabled plane. That does not apply to requests
where the plane was previously disabled or assigned to a different
CTRC.
Check old_plane_state->crtc value to make sure async plane update is
allowed.
Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
---
Changes in v2:
- Cc stable
- Add Eric's R-b
---
drivers/gpu/drm/drm_atomic_helper.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 866a2cc72ef6..f7ccfebd3ca8 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1555,7 +1555,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
if (n_planes != 1)
return -EINVAL;
- if (!new_plane_state->crtc)
+ if (!new_plane_state->crtc ||
+ old_plane_state->crtc != new_plane_state->crtc)
return -EINVAL;
funcs = plane->helper_private;
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()
2018-07-24 13:32 [PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check() Boris Brezillon
@ 2018-07-25 19:18 ` Boris Brezillon
0 siblings, 0 replies; 2+ messages in thread
From: Boris Brezillon @ 2018-07-25 19:18 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, dri-devel
Cc: Gustavo Padovan, Sean Paul, Eric Anholt, stable
On Tue, 24 Jul 2018 15:32:15 +0200
Boris Brezillon <boris.brezillon@bootlin.com> wrote:
> Async plane update is supposed to work only when updating the FB or FB
> position of an already enabled plane. That does not apply to requests
> where the plane was previously disabled or assigned to a different
> CTRC.
>
> Check old_plane_state->crtc value to make sure async plane update is
> allowed.
>
> Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
> Reviewed-by: Eric Anholt <eric@anholt.net>
Applied to drm-misc-fixes.
> ---
> Changes in v2:
> - Cc stable
> - Add Eric's R-b
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 866a2cc72ef6..f7ccfebd3ca8 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1555,7 +1555,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
> if (n_planes != 1)
> return -EINVAL;
>
> - if (!new_plane_state->crtc)
> + if (!new_plane_state->crtc ||
> + old_plane_state->crtc != new_plane_state->crtc)
> return -EINVAL;
>
> funcs = plane->helper_private;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-25 20:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-24 13:32 [PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check() Boris Brezillon
2018-07-25 19:18 ` Boris Brezillon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).