[igt-dev] [PATCH i-g-t 01/16] lib/kms: Add igt_rotation_90_or_270()

Karthik B S karthik.b.s at intel.com
Mon Jul 19 04:44:30 UTC 2021


On 7/16/2021 8:14 PM, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Add a helper to simplify the 90/270 vs. 0/180 rotation checks.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Reviewed-by: Karthik B S <karthik.b.s at intel.com>
> ---
>   lib/igt_kms.h | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index 8cde24b7911f..45d21e42503e 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -329,6 +329,11 @@ typedef enum {
>   #define IGT_ROTATION_MASK \
>   	(IGT_ROTATION_0 | IGT_ROTATION_90 | IGT_ROTATION_180 | IGT_ROTATION_270)
>   
> +static inline bool igt_rotation_90_or_270(igt_rotation_t rotation)
> +{
> +	return rotation & (IGT_ROTATION_90 | IGT_ROTATION_270);
> +}
> +
>   typedef struct igt_plane {
>   	/*< private >*/
>   	igt_pipe_t *pipe;




More information about the igt-dev mailing list