All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 1/4] drm/i915: dump display parameters captured in error state, not current
Date: Thu, 5 Sep 2024 12:43:32 -0400	[thread overview]
Message-ID: <ZtnftJDrZjj8e3dB@intel.com> (raw)
In-Reply-To: <6f6b56d5a68dc4541d5fa57aa3787f8cade743d1.1725372032.git.jani.nikula@intel.com>

On Tue, Sep 03, 2024 at 05:02:57PM +0300, Jani Nikula wrote:
> intel_display_params_dump() prints the current display parameters, not
> the ones captured during error capture. It's not likely the params get
> changed in between, but make it pedantically correct anyway. Pass in the
> parameters and driver name to intel_display_params_dump().
> 
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_display_params.c | 8 +++++---
>  drivers/gpu/drm/i915/display/intel_display_params.h | 5 ++---
>  drivers/gpu/drm/i915/i915_debugfs.c                 | 2 +-
>  drivers/gpu/drm/i915/i915_gpu_error.c               | 2 +-
>  4 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_params.c b/drivers/gpu/drm/i915/display/intel_display_params.c
> index 1a45d300b6f0..024de8abcb1a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_params.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_params.c
> @@ -173,14 +173,16 @@ static void _param_print_charp(struct drm_printer *p, const char *driver_name,
>  
>  /**
>   * intel_display_params_dump - dump intel display modparams
> - * @display: display device
> + * @params: display params
> + * @driver_name: driver name to use for printing
>   * @p: the &drm_printer
>   *
>   * Pretty printer for i915 modparams.
>   */
> -void intel_display_params_dump(struct intel_display *display, struct drm_printer *p)
> +void intel_display_params_dump(const struct intel_display_params *params,
> +			       const char *driver_name, struct drm_printer *p)
>  {
> -#define PRINT(T, x, ...) _param_print(p, display->drm->driver->name, #x, display->params.x);
> +#define PRINT(T, x, ...) _param_print(p, driver_name, #x, params->x);
>  	INTEL_DISPLAY_PARAMS_FOR_EACH(PRINT);
>  #undef PRINT
>  }
> diff --git a/drivers/gpu/drm/i915/display/intel_display_params.h b/drivers/gpu/drm/i915/display/intel_display_params.h
> index da8dc943234b..dcb6face936a 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_params.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_params.h
> @@ -9,7 +9,6 @@
>  #include <linux/types.h>
>  
>  struct drm_printer;
> -struct intel_display;
>  
>  /*
>   * Invoke param, a function-like macro, for each intel display param, with
> @@ -56,8 +55,8 @@ struct intel_display_params {
>  };
>  #undef MEMBER
>  
> -void intel_display_params_dump(struct intel_display *display,
> -			       struct drm_printer *p);
> +void intel_display_params_dump(const struct intel_display_params *params,
> +			       const char *driver_name, struct drm_printer *p);
>  void intel_display_params_copy(struct intel_display_params *dest);
>  void intel_display_params_free(struct intel_display_params *params);
>  
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index f969f585d07b..246fece628d6 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -78,7 +78,7 @@ static int i915_capabilities(struct seq_file *m, void *data)
>  
>  	kernel_param_lock(THIS_MODULE);
>  	i915_params_dump(&i915->params, &p);
> -	intel_display_params_dump(display, &p);
> +	intel_display_params_dump(&display->params, display->drm->driver->name, &p);
>  	kernel_param_unlock(THIS_MODULE);
>  
>  	return 0;
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index 6469b9bcf2ec..f23769ccf050 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -663,7 +663,7 @@ static void err_print_params(struct drm_i915_error_state_buf *m,
>  	struct intel_display *display = &m->i915->display;
>  
>  	i915_params_dump(params, &p);
> -	intel_display_params_dump(display, &p);
> +	intel_display_params_dump(&display->params, display->drm->driver->name, &p);
>  }
>  
>  static void err_print_pciid(struct drm_i915_error_state_buf *m,
> -- 
> 2.39.2
> 

  reply	other threads:[~2024-09-05 16:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 14:02 [PATCH 0/4] drm/i915/display: add snapshot capture/print infra Jani Nikula
2024-09-03 14:02 ` [PATCH 1/4] drm/i915: dump display parameters captured in error state, not current Jani Nikula
2024-09-05 16:43   ` Rodrigo Vivi [this message]
2024-09-03 14:02 ` [PATCH 2/4] drm/i915/display: add intel_display_snapshot abstraction Jani Nikula
2024-09-04 12:23   ` kernel test robot
2024-09-04 13:04   ` kernel test robot
2024-09-04 14:19   ` [PATCH v2] " Jani Nikula
2024-09-05 16:55     ` Rodrigo Vivi
2024-09-03 14:02 ` [PATCH 3/4] drm/i915/display: move device info and params handling to snapshot Jani Nikula
2024-09-05 16:56   ` Rodrigo Vivi
2024-09-03 14:03 ` [PATCH 4/4] drm/i915/display: move dmc snapshotting to new display snapshot Jani Nikula
2024-09-05 16:59   ` Rodrigo Vivi
2024-09-03 18:28 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/display: add snapshot capture/print infra Patchwork
2024-09-03 18:28 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-09-03 18:36 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-03 19:22 ` ✓ CI.Patch_applied: " Patchwork
2024-09-03 19:22 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-03 19:24 ` ✓ CI.KUnit: success " Patchwork
2024-09-03 19:36 ` ✓ CI.Build: " Patchwork
2024-09-03 19:38 ` ✓ CI.Hooks: " Patchwork
2024-09-03 19:39 ` ✗ CI.checksparse: warning " Patchwork
2024-09-03 19:58 ` ✓ CI.BAT: success " Patchwork
2024-09-03 22:34 ` ✗ CI.FULL: failure " Patchwork
2024-09-04 14:25 ` ✓ CI.Patch_applied: success for drm/i915/display: add snapshot capture/print infra (rev2) Patchwork
2024-09-04 14:25 ` ✗ CI.checkpatch: warning " Patchwork
2024-09-04 14:26 ` ✓ CI.KUnit: success " Patchwork
2024-09-04 14:38 ` ✓ CI.Build: " Patchwork
2024-09-04 14:40 ` ✓ CI.Hooks: " Patchwork
2024-09-04 14:42 ` ✗ CI.checksparse: warning " Patchwork
2024-09-04 15:18 ` ✗ CI.BAT: failure " Patchwork
2024-09-04 15:35 ` ✓ Fi.CI.BAT: success " Patchwork
2024-09-04 17:28 ` ✓ Fi.CI.IGT: success for drm/i915/display: add snapshot capture/print infra Patchwork
2024-09-05 13:25 ` ✗ Fi.CI.IGT: failure for drm/i915/display: add snapshot capture/print infra (rev2) Patchwork
2024-09-05 17:01 ` [PATCH 0/4] drm/i915/display: add snapshot capture/print infra Rodrigo Vivi
2024-09-06 13:43 ` ✓ CI.FULL: success for drm/i915/display: add snapshot capture/print infra (rev2) 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=ZtnftJDrZjj8e3dB@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.