[PATCH i-g-t 4/8] tests/kms_hdmi_inject: Test cleanup
B, Jeevan
jeevan.b at intel.com
Wed Jun 12 11:32:26 UTC 2024
LGTM.
ACK, Rb already present.
> -----Original Message-----
> From: Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Sent: Tuesday, June 11, 2024 10:24 AM
> To: igt-dev at lists.freedesktop.org
> Cc: Joshi, Kunal1 <kunal1.joshi at intel.com>; B, Jeevan <jeevan.b at intel.com>;
> Modem, Bhanuprakash <bhanuprakash.modem at intel.com>
> Subject: [PATCH i-g-t 4/8] tests/kms_hdmi_inject: Test cleanup
>
> From: Kunal Joshi <kunal1.joshi at intel.com>
>
> 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 at intel.com>
> Reviewed-by: Jeevan B <jeevan.b at intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
> tests/kms_hdmi_inject.c | 6 ++++--
> 1 file 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);
> }
> }
> --
> 2.43.2
More information about the igt-dev
mailing list