[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [RFC,1/2] drm/i915: start moving state checker to intel_verify.c

Patchwork patchwork at emeril.freedesktop.org
Tue Apr 16 12:14:17 UTC 2019


== Series Details ==

Series: series starting with [RFC,1/2] drm/i915: start moving state checker to intel_verify.c
URL   : https://patchwork.freedesktop.org/series/59569/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
a4e2e34c9de6 drm/i915: start moving state checker to intel_verify.c
-:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

-:599: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating?
#599: 
new file mode 100644

-:757: WARNING:BLOCK_COMMENT_STYLE: Block comments use a trailing */ on a separate line
#757: FILE: drivers/gpu/drm/i915/intel_verify.c:154:
+ * internal consistency). */

-:771: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#771: FILE: drivers/gpu/drm/i915/intel_verify.c:168:
+		I915_STATE_WARN(!crtc_state,
+			 "connector enabled without attached crtc\n");

-:777: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#777: FILE: drivers/gpu/drm/i915/intel_verify.c:174:
+		I915_STATE_WARN(!crtc_state->active,
+		      "connector is active, but attached crtc isn't\n");

-:783: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#783: FILE: drivers/gpu/drm/i915/intel_verify.c:180:
+		I915_STATE_WARN(conn_state->best_encoder != &encoder->base,
+			"atomic encoder doesn't match attached encoder\n");

-:786: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#786: FILE: drivers/gpu/drm/i915/intel_verify.c:183:
+		I915_STATE_WARN(conn_state->crtc != encoder->base.crtc,
+			"attached encoder crtc differs from connector crtc\n");

-:789: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#789: FILE: drivers/gpu/drm/i915/intel_verify.c:186:
+		I915_STATE_WARN(crtc_state && crtc_state->active,
+			"attached crtc is active, but connector isn't\n");

-:791: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#791: FILE: drivers/gpu/drm/i915/intel_verify.c:188:
+		I915_STATE_WARN(!crtc_state && conn_state->best_encoder,
+			"best encoder set without crtc!\n");

-:817: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#817: FILE: drivers/gpu/drm/i915/intel_verify.c:214:
+		I915_STATE_WARN(new_conn_state->best_encoder != encoder,
+		     "connector's atomic encoder doesn't match legacy encoder\n");

-:844: CHECK:MULTIPLE_ASSIGNMENTS: multiple assignments should be avoided
#844: FILE: drivers/gpu/drm/i915/intel_verify.c:241:
+			found = enabled = true;

-:855: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#855: FILE: drivers/gpu/drm/i915/intel_verify.c:252:
+		I915_STATE_WARN(!!encoder->base.crtc != enabled,
+		     "encoder's enabled state mismatch "

-:864: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#864: FILE: drivers/gpu/drm/i915/intel_verify.c:261:
+			I915_STATE_WARN(active,
+			     "encoder detached but still enabled on pipe %c.\n",

-:899: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#899: FILE: drivers/gpu/drm/i915/intel_verify.c:296:
+	I915_STATE_WARN(new_crtc_state->active != active,
+	     "crtc active state doesn't match with hw state "

-:903: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#903: FILE: drivers/gpu/drm/i915/intel_verify.c:300:
+	I915_STATE_WARN(intel_crtc->active != new_crtc_state->active,
+	     "transitional active state does not match atomic hw state "

-:911: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#911: FILE: drivers/gpu/drm/i915/intel_verify.c:308:
+		I915_STATE_WARN(active != new_crtc_state->active,
+			"[ENCODER:%i] active %i with crtc active %i\n",

-:971: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#971: FILE: drivers/gpu/drm/i915/intel_verify.c:368:
+		I915_STATE_WARN(!pll->on && pll->active_mask,
+		     "pll in active use but not on in sw tracking\n");

-:973: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#973: FILE: drivers/gpu/drm/i915/intel_verify.c:370:
+		I915_STATE_WARN(pll->on && !pll->active_mask,
+		     "pll is on but not used by any active crtc\n");

-:975: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#975: FILE: drivers/gpu/drm/i915/intel_verify.c:372:
+		I915_STATE_WARN(pll->on != active,
+		     "pll on state mismatch (expected %i, found %i)\n",

total: 0 errors, 3 warnings, 16 checks, 1051 lines checked
73e020a244ec drm/i915: move pipe config compare to intel_verify.c
-:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one

-:679: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#679: FILE: drivers/gpu/drm/i915/intel_verify.c:163:
+#define PIPE_CONF_CHECK_X(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected 0x%08x, found 0x%08x)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:679: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#679: FILE: drivers/gpu/drm/i915/intel_verify.c:163:
+#define PIPE_CONF_CHECK_X(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected 0x%08x, found 0x%08x)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:689: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#689: FILE: drivers/gpu/drm/i915/intel_verify.c:173:
+#define PIPE_CONF_CHECK_I(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %i, found %i)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:689: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#689: FILE: drivers/gpu/drm/i915/intel_verify.c:173:
+#define PIPE_CONF_CHECK_I(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %i, found %i)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:699: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#699: FILE: drivers/gpu/drm/i915/intel_verify.c:183:
+#define PIPE_CONF_CHECK_BOOL(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %s, found %s)\n", \
+			  yesno(current_config->name), \
+			  yesno(pipe_config->name)); \
+		ret = false; \
+	} \
+} while (0)

-:699: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#699: FILE: drivers/gpu/drm/i915/intel_verify.c:183:
+#define PIPE_CONF_CHECK_BOOL(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %s, found %s)\n", \
+			  yesno(current_config->name), \
+			  yesno(pipe_config->name)); \
+		ret = false; \
+	} \
+} while (0)

-:714: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#714: FILE: drivers/gpu/drm/i915/intel_verify.c:198:
+#define PIPE_CONF_CHECK_BOOL_INCOMPLETE(name) do { \
+	if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
+		PIPE_CONF_CHECK_BOOL(name); \
+	} else { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)\n", \
+			  yesno(current_config->name), \
+			  yesno(pipe_config->name)); \
+		ret = false; \
+	} \
+} while (0)

-:714: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#714: FILE: drivers/gpu/drm/i915/intel_verify.c:198:
+#define PIPE_CONF_CHECK_BOOL_INCOMPLETE(name) do { \
+	if (!fixup_inherited || (!current_config->name && !pipe_config->name)) { \
+		PIPE_CONF_CHECK_BOOL(name); \
+	} else { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)\n", \
+			  yesno(current_config->name), \
+			  yesno(pipe_config->name)); \
+		ret = false; \
+	} \
+} while (0)

-:719: WARNING:LONG_LINE: line over 100 characters
#719: FILE: drivers/gpu/drm/i915/intel_verify.c:203:
+			  "unable to verify whether state matches exactly, forcing modeset (expected %s, found %s)\n", \

-:726: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#726: FILE: drivers/gpu/drm/i915/intel_verify.c:210:
+#define PIPE_CONF_CHECK_P(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %p, found %p)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:726: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#726: FILE: drivers/gpu/drm/i915/intel_verify.c:210:
+#define PIPE_CONF_CHECK_P(name) do { \
+	if (current_config->name != pipe_config->name) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %p, found %p)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:736: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#736: FILE: drivers/gpu/drm/i915/intel_verify.c:220:
+#define PIPE_CONF_CHECK_M_N(name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name,\
+				    adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:736: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#736: FILE: drivers/gpu/drm/i915/intel_verify.c:220:
+#define PIPE_CONF_CHECK_M_N(name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name,\
+				    adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:762: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#762: FILE: drivers/gpu/drm/i915/intel_verify.c:246:
+#define PIPE_CONF_CHECK_M_N_ALT(name, alt_name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name, adjust) && \
+	    !intel_compare_link_m_n(&current_config->alt_name, \
+				    &pipe_config->name, adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "or tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  current_config->alt_name.tu, \
+			  current_config->alt_name.gmch_m, \
+			  current_config->alt_name.gmch_n, \
+			  current_config->alt_name.link_m, \
+			  current_config->alt_name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:762: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#762: FILE: drivers/gpu/drm/i915/intel_verify.c:246:
+#define PIPE_CONF_CHECK_M_N_ALT(name, alt_name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name, adjust) && \
+	    !intel_compare_link_m_n(&current_config->alt_name, \
+				    &pipe_config->name, adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "or tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  current_config->alt_name.tu, \
+			  current_config->alt_name.gmch_m, \
+			  current_config->alt_name.gmch_n, \
+			  current_config->alt_name.link_m, \
+			  current_config->alt_name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:762: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'alt_name' - possible side-effects?
#762: FILE: drivers/gpu/drm/i915/intel_verify.c:246:
+#define PIPE_CONF_CHECK_M_N_ALT(name, alt_name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name, adjust) && \
+	    !intel_compare_link_m_n(&current_config->alt_name, \
+				    &pipe_config->name, adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "or tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  current_config->alt_name.tu, \
+			  current_config->alt_name.gmch_m, \
+			  current_config->alt_name.gmch_n, \
+			  current_config->alt_name.link_m, \
+			  current_config->alt_name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:762: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'alt_name' may be better as '(alt_name)' to avoid precedence issues
#762: FILE: drivers/gpu/drm/i915/intel_verify.c:246:
+#define PIPE_CONF_CHECK_M_N_ALT(name, alt_name) do { \
+	if (!intel_compare_link_m_n(&current_config->name, \
+				    &pipe_config->name, adjust) && \
+	    !intel_compare_link_m_n(&current_config->alt_name, \
+				    &pipe_config->name, adjust)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected tu %i gmch %i/%i link %i/%i, " \
+			  "or tu %i gmch %i/%i link %i/%i, " \
+			  "found tu %i, gmch %i/%i link %i/%i)\n", \
+			  current_config->name.tu, \
+			  current_config->name.gmch_m, \
+			  current_config->name.gmch_n, \
+			  current_config->name.link_m, \
+			  current_config->name.link_n, \
+			  current_config->alt_name.tu, \
+			  current_config->alt_name.gmch_m, \
+			  current_config->alt_name.gmch_n, \
+			  current_config->alt_name.link_m, \
+			  current_config->alt_name.link_n, \
+			  pipe_config->name.tu, \
+			  pipe_config->name.gmch_m, \
+			  pipe_config->name.gmch_n, \
+			  pipe_config->name.link_m, \
+			  pipe_config->name.link_n); \
+		ret = false; \
+	} \
+} while (0)

-:790: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#790: FILE: drivers/gpu/drm/i915/intel_verify.c:274:
+#define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
+	if ((current_config->name ^ pipe_config->name) & (mask)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(%x) (expected %i, found %i)\n", \
+			  (mask), \
+			  current_config->name & (mask), \
+			  pipe_config->name & (mask)); \
+		ret = false; \
+	} \
+} while (0)

-:790: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#790: FILE: drivers/gpu/drm/i915/intel_verify.c:274:
+#define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
+	if ((current_config->name ^ pipe_config->name) & (mask)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(%x) (expected %i, found %i)\n", \
+			  (mask), \
+			  current_config->name & (mask), \
+			  pipe_config->name & (mask)); \
+		ret = false; \
+	} \
+} while (0)

-:790: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'mask' - possible side-effects?
#790: FILE: drivers/gpu/drm/i915/intel_verify.c:274:
+#define PIPE_CONF_CHECK_FLAGS(name, mask) do { \
+	if ((current_config->name ^ pipe_config->name) & (mask)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(%x) (expected %i, found %i)\n", \
+			  (mask), \
+			  current_config->name & (mask), \
+			  pipe_config->name & (mask)); \
+		ret = false; \
+	} \
+} while (0)

-:801: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#801: FILE: drivers/gpu/drm/i915/intel_verify.c:285:
+#define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
+	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %i, found %i)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:801: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#801: FILE: drivers/gpu/drm/i915/intel_verify.c:285:
+#define PIPE_CONF_CHECK_CLOCK_FUZZY(name) do { \
+	if (!intel_fuzzy_clock_check(current_config->name, pipe_config->name)) { \
+		pipe_config_err(adjust, __stringify(name), \
+			  "(expected %i, found %i)\n", \
+			  current_config->name, \
+			  pipe_config->name); \
+		ret = false; \
+	} \
+} while (0)

-:811: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#811: FILE: drivers/gpu/drm/i915/intel_verify.c:295:
+#define PIPE_CONF_CHECK_INFOFRAME(name) do { \
+	if (!intel_compare_infoframe(&current_config->infoframes.name, \
+				     &pipe_config->infoframes.name)) { \
+		pipe_config_infoframe_err(dev_priv, adjust, __stringify(name), \
+					  &current_config->infoframes.name, \
+					  &pipe_config->infoframes.name); \
+		ret = false; \
+	} \
+} while (0)

-:833: CHECK:BRACES: braces {} should be used on all arms of this statement
#833: FILE: drivers/gpu/drm/i915/intel_verify.c:317:
+	if (INTEL_GEN(dev_priv) < 8) {
[...]
+	} else
[...]

-:838: CHECK:BRACES: Unbalanced braces around else statement
#838: FILE: drivers/gpu/drm/i915/intel_verify.c:322:
+	} else

-:980: WARNING:LONG_LINE: line over 100 characters
#980: FILE: drivers/gpu/drm/i915/intel_verify.c:464:
+		int fdi_dotclock = intel_dotclock_calculate(intel_fdi_link_freq(dev_priv, pipe_config),

total: 0 errors, 3 warnings, 24 checks, 988 lines checked



More information about the Intel-gfx mailing list