mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-22 07:27:12 +08:00
drm/i915: dump display parameters captured in error state, not current
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(). Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/b437a5db768f0cb34377a9e4669c2b37fc7c7c29.1726151571.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user