From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Maíra Canal" <mcanal@igalia.com>
Cc: Haneen Mohammed <hamohammed.sa@gmail.com>,
Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>,
dri-devel@lists.freedesktop.org, Melissa Wen <mwen@igalia.com>,
Arthur Grillo <arthurgrillo@riseup.net>,
Igor Matheus Andrade Torrente <igormtorrente@gmail.com>
Subject: Re: [PATCH v2 6/7] drm/vkms: add reflect-y property
Date: Fri, 14 Apr 2023 17:24:35 +0300 [thread overview]
Message-ID: <ZDliI+iEgQlDMZWJ@intel.com> (raw)
In-Reply-To: <20230414135151.75975-7-mcanal@igalia.com>
On Fri, Apr 14, 2023 at 10:51:50AM -0300, Maíra Canal wrote:
> Currently, vkms only support the reflect-x property. Therefore, add the
> reflect-y property to vkms through a software implementation of the
> operation. This is possible by reverse reading the y axis during the
> blending.
>
> Now, vkms support all possible rotation values.
>
> Tested with igt@kms_rotation_crc@primary-reflect-y and
> igt@kms_rotation_crc@sprite-reflect-y [1].
>
> [1] https://patchwork.freedesktop.org/series/116025/
>
> Signed-off-by: Maíra Canal <mcanal@igalia.com>
> ---
> drivers/gpu/drm/vkms/vkms_composer.c | 7 ++++++-
> drivers/gpu/drm/vkms/vkms_plane.c | 16 ++++------------
> 2 files changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
> index b05bd008aeab..19d1078e9d34 100644
> --- a/drivers/gpu/drm/vkms/vkms_composer.c
> +++ b/drivers/gpu/drm/vkms/vkms_composer.c
> @@ -92,8 +92,13 @@ static int get_y_pos(struct vkms_frame_info *frame_info, int y)
> return -1;
> return y + frame_info->dst.x1;
> default:
> - return y;
> + break;
> }
> +
> + if (frame_info->rotation & DRM_MODE_REFLECT_Y)
> + return drm_rect_height(&frame_info->dst) - y - 1;
> +
> + return y;
> }
>
> static bool check_limit(struct vkms_frame_info *frame_info, int pos)
> diff --git a/drivers/gpu/drm/vkms/vkms_plane.c b/drivers/gpu/drm/vkms/vkms_plane.c
> index 11662afa9fe4..d08bda869a24 100644
> --- a/drivers/gpu/drm/vkms/vkms_plane.c
> +++ b/drivers/gpu/drm/vkms/vkms_plane.c
> @@ -121,12 +121,8 @@ static void vkms_plane_atomic_update(struct drm_plane *plane,
> frame_info->fb = fb;
> memcpy(&frame_info->map, &shadow_plane_state->data, sizeof(frame_info->map));
> drm_framebuffer_get(frame_info->fb);
> - frame_info->rotation = drm_rotation_simplify(new_state->rotation,
> - DRM_MODE_ROTATE_0 |
> - DRM_MODE_ROTATE_90 |
> - DRM_MODE_ROTATE_180 |
> - DRM_MODE_ROTATE_270 |
> - DRM_MODE_REFLECT_X);
> + frame_info->rotation = drm_rotation_simplify(new_state->rotation, DRM_MODE_ROTATE_MASK |
> + DRM_MODE_REFLECT_MASK);
What are you trying to achieve with that?
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-04-14 14:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 13:51 [PATCH v2 0/7] drm/vkms: introduce plane rotation property Maíra Canal
2023-04-14 13:51 ` [PATCH v2 1/7] drm/vkms: isolate pixel conversion functionality Maíra Canal
2023-04-14 19:02 ` Arthur Grillo Queiroz Cabral
2023-04-14 13:51 ` [PATCH v2 2/7] drm/vkms: add rotate-0 and rotate-180 properties Maíra Canal
2023-04-14 13:51 ` [PATCH v2 3/7] drm/vkms: add rotate-90 property Maíra Canal
2023-04-14 13:51 ` [PATCH v2 4/7] drm/vkms: add rotate-270 property Maíra Canal
2023-04-14 13:51 ` [PATCH v2 5/7] drm/vkms: add reflect-x property Maíra Canal
2023-04-14 13:51 ` [PATCH v2 6/7] drm/vkms: add reflect-y property Maíra Canal
2023-04-14 14:24 ` Ville Syrjälä [this message]
2023-04-14 14:37 ` Maíra Canal
2023-04-14 14:46 ` Ville Syrjälä
2023-04-14 17:53 ` Maíra Canal
2023-04-17 12:47 ` Ville Syrjälä
2023-04-14 13:51 ` [PATCH v2 7/7] drm/vkms: drop "Rotation" TODO Maíra Canal
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=ZDliI+iEgQlDMZWJ@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=arthurgrillo@riseup.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=hamohammed.sa@gmail.com \
--cc=igormtorrente@gmail.com \
--cc=mcanal@igalia.com \
--cc=mwen@igalia.com \
--cc=rodrigosiqueiramelo@gmail.com \
/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.