Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>,
	<igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_lease: Set Aspect ratio client cap in case of legacy commit
Date: Mon, 27 Feb 2023 12:13:20 +0530	[thread overview]
Message-ID: <bee1a161-44cb-d189-29a1-b45c35ba00a0@intel.com> (raw)
In-Reply-To: <20230227055409.136175-1-ankit.k.nautiyal@intel.com>

Hi Ankit,

On Mon-27-02-2023 11:24 am, Ankit Nautiyal wrote:
> For clients setting DRM_CLIENT_CAP_ATOMIC, the support for aspect ratio
> bits in mode flags is enabled by default. For legacy commit, clients need
> to set the aspect ratio cap explicitly, if they want to set aspect ratio
> bits in the mode flags.
> Currently in case of setcrtc_implicit_plane, the client using the lease
> does not set the aspect-ratio property before using setcrtc ioctl. This
> creates a problem, when there are aspect-ratio bits present in the mode
> flags. In such a case the setcrtc ioctl fails, as driver expects the
> aspect ratio bits unset.
> 
> So set DRM_CLIENT_CAP_ASPECT_RATIO, if the mode flags do have aspect
> ratio bits set, before calling the setcrtc ioctl.
> 
> v2: Set the aspect ratio client cap only for lesse.
-----------------------------------------------^
Nit: typo s/lesse/lease/

> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> ---
>   tests/kms_lease.c | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 67e8d3bec700..61e1f7dccde7 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -345,6 +345,14 @@ static void setcrtc_implicit_plane(data_t *data)
>   	do_or_die(create_lease(data->master.fd, &mcl));
>   	drmSetClientCap(data->master.fd, DRM_CLIENT_CAP_UNIVERSAL_PLANES, 1);
>   
> +	/*
> +	 * For Legacy commit, If userspace wants to send modes with aspect-ratio bits
> +	 * then the client cap for aspect-ratio bits must be set.
> +	 */
> +	if (mode->flags & DRM_MODE_FLAG_PIC_AR_MASK) {
> +		drmSetClientCap(mcl.fd, DRM_CLIENT_CAP_ASPECT_RATIO, 1);
> +	}

As drm_mode_setcrtc loctl checks for the lease access before checking 
the aspect-ratio bits, similar change is not required at [1].

[1]: 
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/blob/master/tests/kms_lease.c#L364

Reviewed-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>

- Bhanu

> +
>   	/* Set a mode on the leased output */
>   	igt_assert_eq(0, prepare_crtc(&data->master, data));
>   

  reply	other threads:[~2023-02-27  6:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-27  5:54 [igt-dev] [PATCH i-g-t] tests/kms_lease: Set Aspect ratio client cap in case of legacy commit Ankit Nautiyal
2023-02-27  6:43 ` Modem, Bhanuprakash [this message]
2023-03-09  5:26   ` Thasleem, Mohammed
2023-02-27  6:50 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_lease: Set Aspect ratio client cap in case of legacy commit (rev2) Patchwork
2023-03-08 18:24 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_lease: Set Aspect ratio client cap in case of legacy commit (rev3) Patchwork
2023-03-10  6:35 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-02-03 16:04 [igt-dev] [PATCH i-g-t] tests/kms_lease: Set Aspect ratio client cap in case of legacy commit Ankit Nautiyal

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=bee1a161-44cb-d189-29a1-b45c35ba00a0@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox