summaryrefslogtreecommitdiff
path: root/tests/kms_hdr.c
diff options
context:
space:
mode:
authorJeremy Cline <jcline@redhat.com>2021-03-10 11:34:34 -0500
committerPetri Latvala <petri.latvala@intel.com>2021-03-11 10:55:52 +0200
commite11e4bfb91fec9af71c3909996c66e5666270e07 (patch)
tree7f031a0c48bef3c85e4624024d51c5710bc058f6 /tests/kms_hdr.c
parent509e6d25186e81034a23b81be2e98f332a1f1f90 (diff)
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@redhat.com> Reviewed-by: Uma Shankar <uma.shankar@intel.com>
Diffstat (limited to 'tests/kms_hdr.c')
-rw-r--r--tests/kms_hdr.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/kms_hdr.c b/tests/kms_hdr.c
index e9dd7f273..5b8529c8c 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,