* [PATCH v2 1/2] drm/vkms: remove the need for the primary plane to be visible
2023-03-24 16:42 [PATCH v2 0/2] Update the handling of the primary plane Maíra Canal
@ 2023-03-24 16:42 ` Maíra Canal
2023-03-24 16:42 ` [PATCH v2 2/2] drm/vkms: allow the primary plane to be positioned Maíra Canal
2023-04-05 14:12 ` [PATCH v2 0/2] Update the handling of the primary plane Melissa Wen
2 siblings, 0 replies; 4+ messages in thread
From: Maíra Canal @ 2023-03-24 16:42 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rodrigo Siqueira, Melissa Wen,
Haneen Mohammed
Cc: Maíra Canal, dri-devel
Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where
primary plane doesn't match the CRTC"), the composition was executed on
top of the primary plane. Therefore, the primary plane needed to be
visible and full screen. After commit bc0d7fdefec6, this is no longer
necessary, as the composition is now executed on top of the CRTC.
Then, remove the conditional expression that forced the primary plane to
be visible and full screen. This allows vkms to accept non-null
framebuffers when the CRTC is disabled.
This patch was tested with the vkms IGT testlist and all tests passed
successfully. Moreover, the tests
igt@kms_universal_plane@universal-plane-pipe-a-functional and
igt@kms_universal_plane@disable-primary-vs-flip-pipe-a used to fail and
now are passing.
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
drivers/gpu/drm/vkms/vkms_plane.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index b3f8a115cc23..458d16865c97 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -153,10 +153,6 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
if (ret != 0)
return ret;
- /* for now primary plane must be visible and full screen */
- if (!new_plane_state->visible && !can_position)
- return -EINVAL;
-
return 0;
}
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v2 2/2] drm/vkms: allow the primary plane to be positioned
2023-03-24 16:42 [PATCH v2 0/2] Update the handling of the primary plane Maíra Canal
2023-03-24 16:42 ` [PATCH v2 1/2] drm/vkms: remove the need for the primary plane to be visible Maíra Canal
@ 2023-03-24 16:42 ` Maíra Canal
2023-04-05 14:12 ` [PATCH v2 0/2] Update the handling of the primary plane Melissa Wen
2 siblings, 0 replies; 4+ messages in thread
From: Maíra Canal @ 2023-03-24 16:42 UTC (permalink / raw)
To: David Airlie, Daniel Vetter, Rodrigo Siqueira, Melissa Wen,
Haneen Mohammed
Cc: Maíra Canal, dri-devel
Before commit bc0d7fdefec6 ("drm: vkms: Supports to the case where
primary plane doesn't match the CRTC"), the composition was executed
on top of the primary plane. Therefore, the primary plane needed to cover
the entire CRTC. After commit bc0d7fdefec6, this is no longer necessary,
as the composition is now executed on top of the CRTC.
Then, allow the primary plane to be positioned in such a way that it
doesn't cover the entire CRTC.
This patch was tested with the vkms IGT testlist and all tests passed
successfully. Moreover, the test
igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-A
used to fail and now is passing.
Signed-off-by: Maíra Canal <mcanal@igalia.com>
---
drivers/gpu/drm/vkms/vkms_plane.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
index 458d16865c97..c41cec7dcb70 100644
--- a/drivers/gpu/drm/vkms/vkms_plane.c
+++ b/drivers/gpu/drm/vkms/vkms_plane.c
@@ -132,7 +132,6 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state,
plane);
struct drm_crtc_state *crtc_state;
- bool can_position = false;
int ret;
if (!new_plane_state->fb || WARN_ON(!new_plane_state->crtc))
@@ -143,13 +142,10 @@ static int vkms_plane_atomic_check(struct drm_plane *plane,
if (IS_ERR(crtc_state))
return PTR_ERR(crtc_state);
- if (plane->type != DRM_PLANE_TYPE_PRIMARY)
- can_position = true;
-
ret = drm_atomic_helper_check_plane_state(new_plane_state, crtc_state,
DRM_PLANE_NO_SCALING,
DRM_PLANE_NO_SCALING,
- can_position, true);
+ true, true);
if (ret != 0)
return ret;
--
2.39.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2 0/2] Update the handling of the primary plane
2023-03-24 16:42 [PATCH v2 0/2] Update the handling of the primary plane Maíra Canal
2023-03-24 16:42 ` [PATCH v2 1/2] drm/vkms: remove the need for the primary plane to be visible Maíra Canal
2023-03-24 16:42 ` [PATCH v2 2/2] drm/vkms: allow the primary plane to be positioned Maíra Canal
@ 2023-04-05 14:12 ` Melissa Wen
2 siblings, 0 replies; 4+ messages in thread
From: Melissa Wen @ 2023-04-05 14:12 UTC (permalink / raw)
To: Maíra Canal
Cc: Haneen Mohammed, Rodrigo Siqueira, dri-devel, Melissa Wen
[-- Attachment #1: Type: text/plain, Size: 1885 bytes --]
On 03/24, Maíra Canal wrote:
> This patchset focus on the proper handling of the primary plane after the
> modifications introduced in commit bc0d7fdefec6 ("drm: vkms: Supports to the
> case where primary plane doesn't match the CRTC"). Before this commit, the
> composition was executed on top of the primary plane. Therefore, the primary
> plane needed to cover the entire CRTC and it needed to be visible. After commit
> bc0d7fdefec6, this is no longer necessary, as the composition is now executed on
> top of the CRTC. So, remove those restrictions to the primary plane.
>
> This patchset increased the vkms IGT test coverage. The following tests are now
> passing:
>
> - igt@kms_atomic_transition@plane-toggle-modeset-transition
> - igt@kms_atomic_transition@modeset-transition
> - igt@kms_atomic_transition@modeset-transition-fencing
> - igt@kms_atomic_transition@modeset-transition-nonblocking
> - igt@kms_atomic_transition@modeset-transition-nonblocking-fencing
> - igt@kms_universal_plane@disable-primary-vs-flip-pipe-a
> - igt@kms_universal_plane@universal-plane-pageflip-windowed-pipe-a
> - igt@kms_universal_plane@universal-plane-pipe-a-functional
>
> Moreover, this patchset was tested with the vkms IGT testlist and all tests
> passed successfully.
Nice catch. Thanks!
This series is:
Reviewed-by: Melissa Wen <mwen@igalia.com>
>
> Best Regards,
> - Maíra Canal
>
> v1 -> v2: https://lore.kernel.org/dri-devel/20230320195558.134768-1-mcanal@igalia.com/T/
>
> * Introduce a second patch to allow the primary plane to be positioned.
>
> ---
>
> Maíra Canal (2):
> drm/vkms: remove the need for the primary plane to be visible
> drm/vkms: allow the primary plane to be positioned
>
> drivers/gpu/drm/vkms/vkms_plane.c | 10 +---------
> 1 file changed, 1 insertion(+), 9 deletions(-)
>
> --
> 2.39.2
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread