[igt-dev] [PATCH i-g-t] lib/drmtest: Don't log a warning when drm driver is not loaded
Petri Latvala
petri.latvala at intel.com
Tue Aug 2 10:35:51 UTC 2022
On Tue, Aug 02, 2022 at 12:22:57PM +0200, Zbigniew Kempczyński wrote:
> Some drivers left machine with drm driver unloaded. When IGT_DEVICE is
> set __get_card_for_nth_filter() is logging warning each call so we
> have confusing duplicates if function is called few times. Lets remove
> warning from it and migrate logging resposibility to the caller.
>
> Fixes: https://gitlab.freedesktop.org/drm/intel/-/issues/6498
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Petri Latvala <petri.latvala at intel.com>
Reviewed-by: Petri Latvala <petri.latvala at intel.com>
> ---
> v2: remove igt_warn() from __get_card_for_nth_filter()
> ---
> lib/drmtest.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/drmtest.c b/lib/drmtest.c
> index 4f9d8a11cb..16e80bdfcf 100644
> --- a/lib/drmtest.c
> +++ b/lib/drmtest.c
> @@ -365,8 +365,6 @@ static bool __get_card_for_nth_filter(int idx, struct igt_device_card *card)
> igt_debug("Filter matched %s | %s\n", card->card, card->render);
> return true;
> }
> -
> - igt_warn("No card matches the filter!\n");
> }
>
> return false;
> @@ -442,7 +440,8 @@ int __drm_open_driver_another(int idx, int chipset)
> }
>
> if (!found || !strlen(card.card))
> - igt_warn("No card matches the filter!\n");
> + igt_warn("No card matches the filter! [%s]\n",
> + igt_device_filter_get(idx));
> else if (_is_already_opened(card.card, idx))
> igt_warn("card maching filter %d is already opened\n", idx);
> else
> --
> 2.34.1
>
More information about the igt-dev
mailing list