summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMika Kahola <mika.kahola@intel.com>2019-04-23 15:45:27 +0300
committerMika Kahola <mika.kahola@intel.com>2019-04-24 12:46:10 +0300
commitc48dba1d65bbe7047b616c13eb4f99c3bdc323a9 (patch)
treefef98880dc077544677cb1a4b90031208fa9d339
parent7d46f6e4c94bbf8c30c0910880503571f272898c (diff)
tests/kms_plane_scaling: Update list of supported pixel formats for rotation
Update the list of pixel formats that cannot be rotated by 90/270 degrees. With this patch, the kernel and IGT are aligned for i915 driver. References: https://bugs.freedesktop.org/show_bug.cgi?id=109052 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110369 Signed-off-by: Mika Kahola <mika.kahola@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
-rw-r--r--tests/kms_plane_scaling.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
index 079d2700..3d247130 100644
--- a/tests/kms_plane_scaling.c
+++ b/tests/kms_plane_scaling.c
@@ -174,14 +174,29 @@ static const igt_rotation_t rotations[] = {
static bool can_rotate(data_t *d, unsigned format, uint64_t tiling,
igt_rotation_t rot)
{
- if (format == DRM_FORMAT_C8 ||
- (intel_gen(d->devid) < 11 && format == DRM_FORMAT_RGB565))
- return false;
- // Y-tiled 90/270 rotation isn't supported for fp16 on Intel
- if (is_i915_device(d->drm_fd) && igt_format_is_fp16(format) &&
- (rot == IGT_ROTATION_90 || rot == IGT_ROTATION_270))
+ if (!is_i915_device(d->drm_fd))
+ return true;
+
+ switch (format) {
+ case DRM_FORMAT_RGB565:
+ if (intel_gen(d->devid) >= 11)
+ break;
+ /* fall through */
+ case DRM_FORMAT_C8:
+ case DRM_FORMAT_XRGB16161616F:
+ case DRM_FORMAT_XBGR16161616F:
+ case DRM_FORMAT_ARGB16161616F:
+ case DRM_FORMAT_ABGR16161616F:
+ case DRM_FORMAT_Y210:
+ case DRM_FORMAT_Y212:
+ case DRM_FORMAT_Y216:
+ case DRM_FORMAT_XVYU12_16161616:
+ case DRM_FORMAT_XVYU16161616:
return false;
+ default:
+ break;
+ }
return true;
}