From: "Modem, Bhanuprakash" <bhanuprakash.modem@intel.com>
To: Mohammed Thasleem <mohammed.thasleem@intel.com>,
<igt-dev@lists.freedesktop.org>,
Kamil Konieczny <kamil.konieczny@linux.intel.com>,
Petri Latvala <adrinael@adrinael.net>
Subject: Re: [igt-dev] [PATCH i-g-t v4] tests/kms_atomic_transition: Lower drm log level to avoid exceeding disk usage limit
Date: Fri, 18 Aug 2023 09:35:42 +0530 [thread overview]
Message-ID: <db6fff95-82dd-e10e-9cc1-e2e98be69294@intel.com> (raw)
In-Reply-To: <20230817165432.12942-1-mohammed.thasleem@intel.com>
Hi Thasleem,
On Thu-17-08-2023 10:24 pm, Mohammed Thasleem wrote:
> Set drm debug log level for DP messages and DRIVER messages to fix
> exceeding disk usage limit in modeset-transition test cases.
I think, it is not recommended to play with logs, because if something
happen with this test, it'll effect all upcoming tests in that run.
Instead, you can try to optimize the test, like limit the execution to
few pipes/connectors or reduce the number of iterations etc..
@petri/@kmail any thoughts?
- Bhanu
>
> v2: -Rename DEBUG_LEVEL to DRM_DEBUG_LEVEL.
> -Declared log level globally.
> -Added check for checking default log level before update.
> v3: -Close sysfs_fd.
> v4: -Close sysfs_fd with close() call.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> ---
> tests/kms_atomic_transition.c | 16 +++++++++++++++-
> 1 file changed, 15 insertions(+), 1 deletion(-)
>
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index a470eb88c..a83449e5c 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -27,9 +27,11 @@
> */
> #include "igt.h"
> #include "igt_rand.h"
> +#include "igt_sysfs.h"
> #include "drmtest.h"
> #include "sw_sync.h"
> #include <errno.h>
> +#include <fcntl.h>
> #include <pthread.h>
> #include <stdbool.h>
> #include <stdio.h>
> @@ -44,13 +46,17 @@
> #define DRM_CAP_CURSOR_HEIGHT 0x9
> #endif
>
> +#define DRM_DEBUG_LEVEL "/sys/module/drm/parameters/"
> +#define LOG_LEVEL 0xa
> +
> struct plane_parms {
> struct igt_fb *fb;
> uint32_t width, height, mask;
> };
>
> typedef struct {
> - int drm_fd;
> + int drm_fd, sysfs_fd;
> + uint32_t old_drm_log_level;
> struct igt_fb fbs[2], argb_fb, sprite_fb;
> igt_display_t display;
> bool extended;
> @@ -1065,6 +1071,9 @@ static void run_modeset_transition(data_t *data, int requested_outputs, bool non
> int num_outputs = 0;
> enum pipe pipe;
>
> + if (data->old_drm_log_level > LOG_LEVEL)
> + igt_sysfs_set_u32(data->sysfs_fd, "debug", LOG_LEVEL);
> +
> for_each_pipe(&data->display, pipe) {
> igt_output_t *output;
>
> @@ -1207,6 +1216,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>
> igt_display_require_output(&data.display);
>
> + igt_require((data.sysfs_fd = open(DRM_DEBUG_LEVEL, O_RDONLY)) >= 0);
> + data.old_drm_log_level = igt_sysfs_get_u32(data.sysfs_fd, "debug");
> +
> for_each_connected_output(&data.display, output)
> count++;
> }
> @@ -1281,7 +1293,9 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
> }
>
> igt_fixture {
> + igt_sysfs_set_u32(data.sysfs_fd, "debug", data.old_drm_log_level);
> igt_display_fini(&data.display);
> drm_close_driver(data.drm_fd);
> + close(data.sysfs_fd);
> }
> }
next prev parent reply other threads:[~2023-08-18 4:06 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-18 21:59 [igt-dev] [PATCH i-g-t] tests/kms_atomic_transition: Lower drm log level to avoid exceeding disk usage limit Thasleem, Mohammed
2023-07-18 22:16 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-07-18 22:36 ` [igt-dev] ○ CI.xeBAT: info " Patchwork
2023-07-18 22:50 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-07-25 16:20 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2023-08-17 15:38 ` [igt-dev] [PATCH i-g-t v2] " Mohammed Thasleem
2023-08-17 15:47 ` Mohammed Thasleem
2023-08-17 16:06 ` [igt-dev] [PATCH i-g-t v3] " Mohammed Thasleem
2023-08-17 16:54 ` [igt-dev] [PATCH i-g-t v4] " Mohammed Thasleem
2023-08-17 17:47 ` Kamil Konieczny
2023-08-17 17:59 ` Modem, Bhanuprakash
2023-08-18 4:05 ` Modem, Bhanuprakash [this message]
2023-08-17 18:41 ` [igt-dev] ○ CI.xeBAT: info for tests/kms_atomic_transition: Lower drm log level to avoid exceeding disk usage limit (rev5) Patchwork
2023-08-17 18:43 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2023-08-18 12:21 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db6fff95-82dd-e10e-9cc1-e2e98be69294@intel.com \
--to=bhanuprakash.modem@intel.com \
--cc=adrinael@adrinael.net \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=mohammed.thasleem@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox