intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Generate i915_params {} using a macro
@ 2017-02-01 16:50 Chris Wilson
  2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Chris Wilson @ 2017-02-01 16:50 UTC (permalink / raw)
  To: intel-gfx

I want to print the struct from the error state and so would like to use
the existing struct definition as the template ala DEV_INFO*

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_params.h | 81 ++++++++++++++++++++------------------
 1 file changed, 43 insertions(+), 38 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h
index 8e433de04679..46eb31ae0982 100644
--- a/drivers/gpu/drm/i915/i915_params.h
+++ b/drivers/gpu/drm/i915/i915_params.h
@@ -27,46 +27,51 @@
 
 #include <linux/cache.h> /* for __read_mostly */
 
+#define I915_PARAMS_FOR_EACH(func) \
+	func(int, modeset); \
+	func(int, panel_ignore_lid); \
+	func(int, semaphores); \
+	func(int, lvds_channel_mode); \
+	func(int, panel_use_ssc); \
+	func(int, vbt_sdvo_panel_type); \
+	func(int, enable_rc6); \
+	func(int, enable_dc); \
+	func(int, enable_fbc); \
+	func(int, enable_ppgtt); \
+	func(int, enable_execlists); \
+	func(int, enable_psr); \
+	func(unsigned int, alpha_support); \
+	func(int, disable_power_well); \
+	func(int, enable_ips); \
+	func(int, invert_brightness); \
+	func(int, enable_guc_loading); \
+	func(int, enable_guc_submission); \
+	func(int, guc_log_level); \
+	func(int, use_mmio_flip); \
+	func(int, mmio_debug); \
+	func(int, edp_vswing); \
+	func(unsigned int, inject_load_failure); \
+	/* leave bools at the end to not create holes */ \
+	func(bool, enable_cmd_parser); \
+	func(bool, enable_hangcheck); \
+	func(bool, fastboot); \
+	func(bool, prefault_disable); \
+	func(bool, load_detect_test); \
+	func(bool, force_reset_modeset_test); \
+	func(bool, reset); \
+	func(bool, error_capture); \
+	func(bool, disable_display); \
+	func(bool, verbose_state_checks); \
+	func(bool, nuclear_pageflip); \
+	func(bool, enable_dp_mst); \
+	func(bool, enable_dpcd_backlight); \
+	func(bool, enable_gvt)
+
+#define p(T, member) T member
 struct i915_params {
-	int modeset;
-	int panel_ignore_lid;
-	int semaphores;
-	int lvds_channel_mode;
-	int panel_use_ssc;
-	int vbt_sdvo_panel_type;
-	int enable_rc6;
-	int enable_dc;
-	int enable_fbc;
-	int enable_ppgtt;
-	int enable_execlists;
-	int enable_psr;
-	unsigned int alpha_support;
-	int disable_power_well;
-	int enable_ips;
-	int invert_brightness;
-	int enable_guc_loading;
-	int enable_guc_submission;
-	int guc_log_level;
-	int use_mmio_flip;
-	int mmio_debug;
-	int edp_vswing;
-	unsigned int inject_load_failure;
-	/* leave bools at the end to not create holes */
-	bool enable_cmd_parser;
-	bool enable_hangcheck;
-	bool fastboot;
-	bool prefault_disable;
-	bool load_detect_test;
-	bool force_reset_modeset_test;
-	bool reset;
-	bool error_capture;
-	bool disable_display;
-	bool verbose_state_checks;
-	bool nuclear_pageflip;
-	bool enable_dp_mst;
-	bool enable_dpcd_backlight;
-	bool enable_gvt;
+	I915_PARAMS_FOR_EACH(p);
 };
+#undef p
 
 extern struct i915_params i915 __read_mostly;
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state
  2017-02-01 16:50 [PATCH 1/2] drm/i915: Generate i915_params {} using a macro Chris Wilson
@ 2017-02-01 16:50 ` Chris Wilson
  2017-02-01 16:52   ` Chris Wilson
  2017-02-02  7:35   ` Joonas Lahtinen
  2017-02-01 17:24 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Generate i915_params {} using a macro Patchwork
  2017-02-02  7:37 ` [PATCH 1/2] " Joonas Lahtinen
  2 siblings, 2 replies; 7+ messages in thread
From: Chris Wilson @ 2017-02-01 16:50 UTC (permalink / raw)
  To: intel-gfx

They include useful material such as what mode the VM address space is
running in, what submission mode, extra quirks, etc.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_drv.h       |  1 +
 drivers/gpu/drm/i915/i915_gpu_error.c | 27 ++++++++++++++++++++-------
 2 files changed, 21 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 15b6c75ebade..5bcde9395126 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -904,6 +904,7 @@ struct drm_i915_error_state {
 	u32 reset_count;
 	u32 suspend_count;
 	struct intel_device_info device_info;
+	struct i915_params params;
 
 	/* Generic register state */
 	u32 eir;
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index 5283fe815a4d..c01771c1f06f 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -546,6 +546,14 @@ static void err_print_capabilities(struct drm_i915_error_state_buf *m,
 #undef PRINT_FLAG
 }
 
+static void err_print_params(struct drm_i915_error_state_buf *m,
+			     const struct i915_params *p)
+{
+#define PRINT(T, x) err_printf(m, #x ": %d\n", p->x);
+	I915_PARAMS_FOR_EACH(PRINT);
+#undef PRINT_PARAM
+}
+
 int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 			    const struct i915_error_state_file_priv *error_priv)
 {
@@ -568,7 +576,6 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 		   error->boottime.tv_sec, error->boottime.tv_usec);
 	err_printf(m, "Uptime: %ld s %ld us\n",
 		   error->uptime.tv_sec, error->uptime.tv_usec);
-	err_print_capabilities(m, &error->device_info);
 
 	for (i = 0; i < ARRAY_SIZE(error->engine); i++) {
 		if (error->engine[i].hangcheck_stalled &&
@@ -588,6 +595,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 	err_printf(m, "PCI Subsystem: %04x:%04x\n",
 		   pdev->subsystem_vendor,
 		   pdev->subsystem_device);
+
 	err_printf(m, "IOMMU enabled?: %d\n", error->iommu);
 
 	if (HAS_CSR(dev_priv)) {
@@ -730,6 +738,9 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
 	if (error->display)
 		intel_display_print_error_state(m, dev_priv, error->display);
 
+	err_print_capabilities(m, &error->device_info);
+	err_print_params(m, &error->params);
+
 out:
 	if (m->bytes == 0 && m->err)
 		return m->err;
@@ -1587,6 +1598,14 @@ static int capture(void *data)
 {
 	struct drm_i915_error_state *error = data;
 
+	do_gettimeofday(&error->time);
+	error->boottime = ktime_to_timeval(ktime_get_boottime());
+	error->uptime =
+		ktime_to_timeval(ktime_sub(ktime_get(),
+					   error->i915->gt.last_init_time));
+
+	error->params = i915;
+
 	i915_capture_gen_state(error->i915, error);
 	i915_capture_reg_state(error->i915, error);
 	i915_gem_record_fences(error->i915, error);
@@ -1595,12 +1614,6 @@ static int capture(void *data)
 	i915_capture_pinned_buffers(error->i915, error);
 	i915_gem_capture_guc_log_buffer(error->i915, error);
 
-	do_gettimeofday(&error->time);
-	error->boottime = ktime_to_timeval(ktime_get_boottime());
-	error->uptime =
-		ktime_to_timeval(ktime_sub(ktime_get(),
-					   error->i915->gt.last_init_time));
-
 	error->overlay = intel_overlay_capture_error_state(error->i915);
 	error->display = intel_display_capture_error_state(error->i915);
 
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state
  2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
@ 2017-02-01 16:52   ` Chris Wilson
  2017-02-02  7:35   ` Joonas Lahtinen
  1 sibling, 0 replies; 7+ messages in thread
From: Chris Wilson @ 2017-02-01 16:52 UTC (permalink / raw)
  To: intel-gfx

On Wed, Feb 01, 2017 at 04:50:06PM +0000, Chris Wilson wrote:
> They include useful material such as what mode the VM address space is
s/The module parameters/
> running in, what submission mode, extra quirks, etc.

and so are invaluable when analysing errors.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Generate i915_params {} using a macro
  2017-02-01 16:50 [PATCH 1/2] drm/i915: Generate i915_params {} using a macro Chris Wilson
  2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
@ 2017-02-01 17:24 ` Patchwork
  2017-02-02  7:37 ` [PATCH 1/2] " Joonas Lahtinen
  2 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2017-02-01 17:24 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: series starting with [1/2] drm/i915: Generate i915_params {} using a macro
URL   : https://patchwork.freedesktop.org/series/18937/
State : warning

== Summary ==

Series 18937v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/18937/revisions/1/mbox/

Test kms_flip:
        Subgroup basic-flip-vs-wf_vblank:
                pass       -> DMESG-WARN (fi-snb-2520m)
Test kms_force_connector_basic:
        Subgroup force-edid:
                pass       -> DMESG-WARN (fi-snb-2520m)

fi-bdw-5557u     total:247  pass:233  dwarn:0   dfail:0   fail:0   skip:14 
fi-bsw-n3050     total:247  pass:208  dwarn:0   dfail:0   fail:0   skip:39 
fi-bxt-j4205     total:247  pass:225  dwarn:0   dfail:0   fail:0   skip:22 
fi-bxt-t5700     total:78   pass:65   dwarn:0   dfail:0   fail:0   skip:12 
fi-byt-j1900     total:247  pass:220  dwarn:0   dfail:0   fail:0   skip:27 
fi-byt-n2820     total:247  pass:216  dwarn:0   dfail:0   fail:0   skip:31 
fi-hsw-4770      total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-hsw-4770r     total:247  pass:228  dwarn:0   dfail:0   fail:0   skip:19 
fi-ivb-3520m     total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-ivb-3770      total:247  pass:226  dwarn:0   dfail:0   fail:0   skip:21 
fi-kbl-7500u     total:247  pass:224  dwarn:0   dfail:0   fail:2   skip:21 
fi-skl-6260u     total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-skl-6700hq    total:247  pass:227  dwarn:0   dfail:0   fail:0   skip:20 
fi-skl-6700k     total:247  pass:222  dwarn:4   dfail:0   fail:0   skip:21 
fi-skl-6770hq    total:247  pass:234  dwarn:0   dfail:0   fail:0   skip:13 
fi-snb-2520m     total:247  pass:214  dwarn:2   dfail:0   fail:0   skip:31 
fi-snb-2600      total:247  pass:215  dwarn:0   dfail:0   fail:0   skip:32 

8126864ab4eab95a09af5677535e8ccae3b6b73a drm-tip: 2017y-02m-01d-15h-25m-23s UTC integration manifest
e75210f drm/i915: Capture module parameters for the GPU error state
cb56c4f drm/i915: Generate i915_params {} using a macro

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3668/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state
  2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
  2017-02-01 16:52   ` Chris Wilson
@ 2017-02-02  7:35   ` Joonas Lahtinen
  2017-02-02 13:14     ` Mika Kuoppala
  1 sibling, 1 reply; 7+ messages in thread
From: Joonas Lahtinen @ 2017-02-02  7:35 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On ke, 2017-02-01 at 16:50 +0000, Chris Wilson wrote:
> They include useful material such as what mode the VM address space is
> running in, what submission mode, extra quirks, etc.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>
 
> +static void err_print_params(struct drm_i915_error_state_buf *m,
> +			     const struct i915_params *p)
> +{
> +#define PRINT(T, x) err_printf(m, #x ": %d\n", p->x);
> +	I915_PARAMS_FOR_EACH(PRINT);
> +#undef PRINT_PARAM

#undef PRINT

That fixed;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Needs some Acks before merging, though.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] drm/i915: Generate i915_params {} using a macro
  2017-02-01 16:50 [PATCH 1/2] drm/i915: Generate i915_params {} using a macro Chris Wilson
  2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
  2017-02-01 17:24 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Generate i915_params {} using a macro Patchwork
@ 2017-02-02  7:37 ` Joonas Lahtinen
  2 siblings, 0 replies; 7+ messages in thread
From: Joonas Lahtinen @ 2017-02-02  7:37 UTC (permalink / raw)
  To: Chris Wilson, intel-gfx

On ke, 2017-02-01 at 16:50 +0000, Chris Wilson wrote:
> I want to print the struct from the error state and so would like to use
> the existing struct definition as the template ala DEV_INFO*
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

<SNIP>

> +#define p(T, member) T member

Choice of macro name not so great. Maybe MEMBER or so.

With more reasonable name;

Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>

Needs some Acked-by's.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state
  2017-02-02  7:35   ` Joonas Lahtinen
@ 2017-02-02 13:14     ` Mika Kuoppala
  0 siblings, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2017-02-02 13:14 UTC (permalink / raw)
  To: Joonas Lahtinen, Chris Wilson, intel-gfx

Joonas Lahtinen <joonas.lahtinen@linux.intel.com> writes:

> On ke, 2017-02-01 at 16:50 +0000, Chris Wilson wrote:
>> They include useful material such as what mode the VM address space is
>> running in, what submission mode, extra quirks, etc.
>> 
>> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> <SNIP>
>  
>> +static void err_print_params(struct drm_i915_error_state_buf *m,
>> +			     const struct i915_params *p)
>> +{
>> +#define PRINT(T, x) err_printf(m, #x ": %d\n", p->x);
>> +	I915_PARAMS_FOR_EACH(PRINT);
>> +#undef PRINT_PARAM
>
> #undef PRINT
>
> That fixed;
>
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>
> Needs some Acks before merging, though.

Acked-by: Mika Kuoppala <mika.kuoppala@intel.com>
>
> Regards, Joonas
> -- 
> Joonas Lahtinen
> Open Source Technology Center
> Intel Corporation
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-02-02 13:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-01 16:50 [PATCH 1/2] drm/i915: Generate i915_params {} using a macro Chris Wilson
2017-02-01 16:50 ` [PATCH 2/2] drm/i915: Capture module parameters for the GPU error state Chris Wilson
2017-02-01 16:52   ` Chris Wilson
2017-02-02  7:35   ` Joonas Lahtinen
2017-02-02 13:14     ` Mika Kuoppala
2017-02-01 17:24 ` ✗ Fi.CI.BAT: warning for series starting with [1/2] drm/i915: Generate i915_params {} using a macro Patchwork
2017-02-02  7:37 ` [PATCH 1/2] " Joonas Lahtinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).