[igt-dev] [PATCH i-g-t v3] tests/kms_hdr: Fix bpc-switch tests on AMD hardware
Shankar, Uma
uma.shankar at intel.com
Wed Mar 10 16:38:30 UTC 2021
> -----Original Message-----
> From: Jeremy Cline <jcline at redhat.com>
> Sent: Wednesday, March 10, 2021 10:05 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Latvala, Petri <petri.latvala at intel.com>; Shankar, Uma
> <uma.shankar at intel.com>; Sharma, Swati2 <swati2.sharma at intel.com>;
> maarten.lankhorst at linux.intel.com; nicholas.kazlauskas at amd.com; Jeremy Cline
> <jcline at redhat.com>
> Subject: [PATCH i-g-t v3] tests/kms_hdr: Fix bpc-switch tests on AMD hardware
>
> Kernel commit b836a274b797 ("drm/amdgpu/dc: Require primary plane to be
> enabled whenever the CRTC is") causes the bpc-switch tests to fail since the primary
> plane fb is being removed, which leads to the next atomic commit failing with -
> EINVAL.
>
> Fix this by leaving the primary plane in place for amdgpu devices.
>
> Signed-off-by: Jeremy Cline <jcline at redhat.com>
> ---
> Changes from v2:
> - Instead of skipping on pre-Kaby Lake, only remove the primary
> plane for AMD devices (thanks for the feedback Petri, Swati,
> and Uma!)
Looks good.
Reviewed-by: Uma Shankar <uma.shankar at intel.com>
> tests/kms_hdr.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c index e9dd7f27..5b8529c8 100644
> --- a/tests/kms_hdr.c
> +++ b/tests/kms_hdr.c
> @@ -223,7 +223,14 @@ static void test_bpc_switch_on_output(data_t *data,
> igt_output_t *output,
> data->h = afb.height;
> }
>
> - igt_plane_set_fb(data->primary, NULL);
> + /*
> + * amdgpu requires a primary plane when the CRTC is enabled.
> + * However, some older Intel hardware (hsw) have scaling
> + * requirements that are not met by the plane, so remove it
> + * for non-AMD devices.
> + */
> + if (!is_amdgpu_device(data->fd))
> + igt_plane_set_fb(data->primary, NULL);
>
> /*
> * i915 driver doesn't expose max bpc as debugfs entry,
> --
> 2.30.1
More information about the igt-dev
mailing list