[PATCH i-g-t 2/3] tests/intel/kms_dirtyfb: Prepare check_support for additional tests
Jouni Högander
jouni.hogander at intel.com
Mon Mar 25 16:53:48 UTC 2024
Currently check_support is only checking if feature is generally supported
by source/sink. It doesn't take into account if there is some limitation in
feature usage. This patch prepares adding additional tests for feature
support.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
tests/intel/kms_dirtyfb.c | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/tests/intel/kms_dirtyfb.c b/tests/intel/kms_dirtyfb.c
index e1b854a22..a39f78757 100644
--- a/tests/intel/kms_dirtyfb.c
+++ b/tests/intel/kms_dirtyfb.c
@@ -98,25 +98,31 @@ static const char *feature_str(int feature)
static bool check_support(data_t *data)
{
+ bool supported = false;
+
switch (data->feature) {
case FEATURE_NONE:
- return true;
+ case FEATURE_DEFAULT:
+ supported = true;
+ break;
case FEATURE_FBC:
- return intel_fbc_supported_on_chipset(data->drm_fd, data->pipe);
+ supported = intel_fbc_supported_on_chipset(data->drm_fd, data->pipe);
+ break;
case FEATURE_PSR:
- if (data->output->config.connector->connector_type !=
+ if (data->output->config.connector->connector_type ==
DRM_MODE_CONNECTOR_eDP)
- return false;
- return psr_sink_support(data->drm_fd, data->debugfs_fd,
+ supported = psr_sink_support(data->drm_fd, data->debugfs_fd,
PSR_MODE_1, NULL);
+ break;
case FEATURE_DRRS:
- return intel_is_drrs_supported(data->drm_fd, data->pipe) &&
+ supported = intel_is_drrs_supported(data->drm_fd, data->pipe) &&
intel_output_has_drrs(data->drm_fd, data->output);
- case FEATURE_DEFAULT:
- return true;
+ break;
default:
igt_assert(false);
}
+
+ return supported;
}
static void enable_feature(data_t *data)
--
2.34.1
More information about the Intel-gfx-trybot
mailing list