Commit 9f82f165 authored by Jani Nikula's avatar Jani Nikula
Browse files

drm/i915: add bool type checks in PIPE_CONF_CHECK_*

parent 00cb0227
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -4923,6 +4923,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,

#define PIPE_CONF_CHECK_X(name) do { \
	if (current_config->name != pipe_config->name) { \
		BUILD_BUG_ON_MSG(__same_type(current_config->name, bool), \
				 __stringify(name) " is bool");	\
		pipe_config_mismatch(fastset, crtc, __stringify(name), \
				     "(expected 0x%08x, found 0x%08x)", \
				     current_config->name, \
@@ -4933,6 +4935,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,

#define PIPE_CONF_CHECK_X_WITH_MASK(name, mask) do { \
	if ((current_config->name & (mask)) != (pipe_config->name & (mask))) { \
		BUILD_BUG_ON_MSG(__same_type(current_config->name, bool), \
				 __stringify(name) " is bool");	\
		pipe_config_mismatch(fastset, crtc, __stringify(name), \
				     "(expected 0x%08x, found 0x%08x)", \
				     current_config->name & (mask), \
@@ -4943,6 +4947,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,

#define PIPE_CONF_CHECK_I(name) do { \
	if (current_config->name != pipe_config->name) { \
		BUILD_BUG_ON_MSG(__same_type(current_config->name, bool), \
				 __stringify(name) " is bool");	\
		pipe_config_mismatch(fastset, crtc, __stringify(name), \
				     "(expected %i, found %i)", \
				     current_config->name, \
@@ -4953,6 +4959,8 @@ intel_pipe_config_compare(const struct intel_crtc_state *current_config,

#define PIPE_CONF_CHECK_BOOL(name) do { \
	if (current_config->name != pipe_config->name) { \
		BUILD_BUG_ON_MSG(!__same_type(current_config->name, bool), \
				 __stringify(name) " is not bool");	\
		pipe_config_mismatch(fastset, crtc,  __stringify(name), \
				     "(expected %s, found %s)", \
				     str_yes_no(current_config->name), \