diff options
author | Kunal Joshi <kunal1.joshi@intel.com> | 2024-06-11 10:23:44 +0530 |
---|---|---|
committer | Bhanuprakash Modem <bhanuprakash.modem@intel.com> | 2024-06-18 16:34:48 +0530 |
commit | 7aabe531f6fa7ac77438a126fb2ed5e837d49413 (patch) | |
tree | 805098c9e3cd3ec19368fb41c9035fb26fa6d69b /tests | |
parent | 2e7b8f0c5b41c47813c1da201964b7be2878e093 (diff) |
tests/kms_hdmi_inject: Test cleanup
Make sure the below points in IGT cleanup:
- Sanitize the state before starting the subtest.
- Clear the states before exiting the subtest.
- Update existing libdrm APIs with IGT kms APIs.
- Other misc (Ex: update deprecated APIs/macros/enums, FB leaks etc..)
v2: (Bhanu)
- Rebase
- Initialize pointers with NULL
- Update connector type HDMI checks
Signed-off-by: Kunal Joshi <kunal1.joshi@intel.com>
Reviewed-by: Jeevan B <jeevan.b@intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/kms_hdmi_inject.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/kms_hdmi_inject.c b/tests/kms_hdmi_inject.c index dce74fac0..d28be38e4 100644 --- a/tests/kms_hdmi_inject.c +++ b/tests/kms_hdmi_inject.c @@ -80,14 +80,15 @@ static drmModeConnector * get_connector(int drm_fd, drmModeRes *res) { int i; - drmModeConnector *connector; + drmModeConnector *connector = NULL; for (i = 0; i < res->count_connectors; i++) { connector = drmModeGetConnectorCurrent(drm_fd, res->connectors[i]); - if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA) + if (connector->connector_type == DRM_MODE_CONNECTOR_HDMIA || + connector->connector_type == DRM_MODE_CONNECTOR_HDMIB) break; drmModeFreeConnector(connector); @@ -243,6 +244,7 @@ igt_main igt_fixture { drmModeFreeConnector(connector); + drmModeFreeResources(res); drm_close_driver(drm_fd); } } |