All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/6] drm/i915: Generate i915_params {} using a macro
@ 2017-02-06  9:51 Chris Wilson
  2017-02-06  9:51 ` [PATCH v3 2/6] drm/i915: Use bool i915_param.alpha_support Chris Wilson
                   ` (5 more replies)
  0 siblings, 6 replies; 23+ messages in thread
From: Chris Wilson @ 2017-02-06  9:51 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*

v2: Use MEMBER() rather than p().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 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..9a8c60342a82 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 MEMBER(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(MEMBER);
 };
+#undef MEMBER
 
 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] 23+ messages in thread

end of thread, other threads:[~2017-02-22 10:37 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-06  9:51 [PATCH v3 1/6] drm/i915: Generate i915_params {} using a macro Chris Wilson
2017-02-06  9:51 ` [PATCH v3 2/6] drm/i915: Use bool i915_param.alpha_support Chris Wilson
2017-02-06  9:51 ` [PATCH v3 3/6] drm/i915: Capture module parameters for the GPU error state Chris Wilson
2017-02-06 11:13   ` Joonas Lahtinen
2017-02-06 11:24   ` Chris Wilson
2017-02-06 11:29     ` Chris Wilson
2017-02-06  9:51 ` [PATCH v3 4/6] drm/i915: Show the current i915_params in debugfs/i915_capabilites Chris Wilson
2017-02-06 11:21   ` Joonas Lahtinen
2017-02-06  9:51 ` [PATCH v3 5/6] drm/i915: Add i915_param charp macro magic Chris Wilson
2017-02-06 12:32   ` Joonas Lahtinen
2017-02-06 13:06     ` Chris Wilson
2017-02-07  9:12     ` Chris Wilson
2017-02-21 16:10       ` Jani Nikula
2017-02-21 16:26         ` [PATCH] " Chris Wilson
2017-02-22 10:06           ` Jani Nikula
2017-02-22 10:11             ` Chris Wilson
2017-02-22 10:29               ` Joonas Lahtinen
2017-02-22 10:33                 ` Chris Wilson
2017-02-22 10:30               ` Jani Nikula
2017-02-22 10:37                 ` Chris Wilson
2017-02-06  9:51 ` [PATCH v3 6/6] drm/i915: The return of i915_gpu_info to debugfs Chris Wilson
2017-02-07  9:09   ` Chris Wilson
2017-02-06 13:25 ` ✗ Fi.CI.BAT: failure for series starting with [v3,1/6] drm/i915: Generate i915_params {} using a macro Patchwork

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.