From: Louis Chauvet <louis.chauvet@bootlin.com>
To: Arthur Grillo <arthurgrillo@riseup.net>
Cc: igt-dev@lists.freedesktop.org, miquel.raynal@bootlin.com,
jeremie.dautheribes@bootlin.com, thomas.petazzoni@bootlin.com
Subject: Re: [PATCH i-g-t v2 1/4] lib/igt_kms: Add reflection name and mask
Date: Fri, 15 Mar 2024 17:11:29 +0100 [thread overview]
Message-ID: <ZfRzMf8Nr90BreIa@localhost.localdomain> (raw)
In-Reply-To: <f4805e54-8a34-42ce-9721-aa3502d57a05@riseup.net>
Le 13/03/24 - 17:00, Arthur Grillo a écrit :
>
>
> On 13/03/24 14:09, Louis Chauvet wrote:
> > As for IGT_ROTATION_MASK and igt_plane_rotation_name, create the mask
> > IGT_REFLECT_MASK and the function igt_plane_reflect_name.
> >
> > Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
> > ---
> > lib/igt_kms.c | 23 +++++++++++++++++++++++
> > lib/igt_kms.h | 3 +++
> > 2 files changed, 26 insertions(+)
> >
> > diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> > index e18f6fe59882..85d278f3cae3 100644
> > --- a/lib/igt_kms.c
> > +++ b/lib/igt_kms.c
> > @@ -5142,6 +5142,29 @@ const char *igt_plane_rotation_name(igt_rotation_t rotation)
> > }
> > }
> >
> > +
> > +/**
> > + * igt_plane_reflect_name:
> > + * @reflect: Plane reflection value (x, y)
> > + *
> > + * Returns: Plane reflection value as a string
> > + */
> > +const char *igt_plane_reflect_name(igt_rotation_t reflect)
> > +{
> > + switch (reflect & IGT_REFLECT_MASK) {
> > + case 0:
> > + return "none";
> > + case IGT_REFLECT_X:
> > + return "X";
> > + case IGT_REFLECT_Y:
> > + return "Y";
> > + case IGT_REFLECT_X | IGT_REFLECT_Y:
> > + return "XY";
> > + default:
> > + igt_assert(0);
> > + }
> > +}
>
> I think it would be good to call this on igt_plane_set_rotation(), like
> igt_plane_rotation_name() is, for debug purposes.
Hi Arthur,
I will add a separate patch for this. Thanks for the suggestion.
Kind regards,
Louis Chauvet
> Best Regards,
> ~Arthur Grillo
>
> > +
> > /**
> > * igt_plane_set_rotation:
> > * @plane: Plane pointer for which rotation is to be set
> > diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> > index b3882808b42f..4760394428f3 100644
> > --- a/lib/igt_kms.h
> > +++ b/lib/igt_kms.h
> > @@ -371,6 +371,8 @@ typedef enum {
> >
> > #define IGT_ROTATION_MASK \
> > (IGT_ROTATION_0 | IGT_ROTATION_90 | IGT_ROTATION_180 | IGT_ROTATION_270)
> > +#define IGT_REFLECT_MASK \
> > + (IGT_REFLECT_X | IGT_REFLECT_Y)
> >
> > /**
> > * igt_rotation_90_or_270:
> > @@ -562,6 +564,7 @@ static inline bool igt_plane_has_rotation(igt_plane_t *plane, igt_rotation_t rot
> > return (plane->rotations & rotation) == rotation;
> > }
> > const char *igt_plane_rotation_name(igt_rotation_t rotation);
> > +const char *igt_plane_reflect_name(igt_rotation_t reflect);
> >
> > void igt_wait_for_vblank(int drm_fd, int crtc_offset);
> > void igt_wait_for_vblank_count(int drm_fd, int crtc_offset, int count);
> >
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2024-03-15 16:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-13 17:09 [PATCH i-g-t v2 0/4] New rotation test Louis Chauvet
2024-03-13 17:09 ` [PATCH i-g-t v2 1/4] lib/igt_kms: Add reflection name and mask Louis Chauvet
2024-03-13 20:00 ` Arthur Grillo
2024-03-15 16:11 ` Louis Chauvet [this message]
2024-03-13 17:09 ` [PATCH i-g-t v2 2/4] lib/igt_fb: Expose lookup_drm_format to access format properties in tests Louis Chauvet
2024-03-13 17:09 ` [PATCH i-g-t v2 3/4] tests/kms_rotation: Add extensive rotation test Louis Chauvet
2024-03-14 17:06 ` Kamil Konieczny
2024-03-15 16:11 ` Louis Chauvet
2024-03-14 17:42 ` Arthur Grillo
2024-03-15 16:11 ` Louis Chauvet
2024-03-16 12:28 ` Arthur Grillo
2024-03-14 18:44 ` Kamil Konieczny
2024-03-13 17:09 ` [PATCH i-g-t v2 4/4] tests/kms_rotation: Add command line option to reduce the number of tests Louis Chauvet
2024-03-13 17:49 ` ✓ CI.xeBAT: success for New rotation test (rev2) Patchwork
2024-03-13 18:05 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-14 0:31 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-03-18 8:26 ` [PATCH i-g-t v2 0/4] New rotation test Modem, Bhanuprakash
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=ZfRzMf8Nr90BreIa@localhost.localdomain \
--to=louis.chauvet@bootlin.com \
--cc=arthurgrillo@riseup.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=jeremie.dautheribes@bootlin.com \
--cc=miquel.raynal@bootlin.com \
--cc=thomas.petazzoni@bootlin.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.