✗ Fi.CI.CHECKPATCH: warning for drm/i915: adding state checker for gamma lut values (rev7)

Patchwork
2019-05-04T17:26:17Z

== Series Details ==

Series: drm/i915: adding state checker for gamma lut values (rev7)
URL : https://patchwork.freedesktop.org/series/58039/
State : warning

== Summary ==

$ dim checkpatch origin/drm-tip
1e8ed6586232 drm/i915: Introduce vfunc read_luts() to create hw lut
b2195f303ff1 drm/i915: Enable intel_color_read_luts()
8780c2e9fe65 drm/i915: Extract i9xx_read_luts()
-:13: WARNING:TYPO_SPELLING: 'withing' may be misspelled - perhaps 'within'?
#13:
v5: -Returned blob instead of assigning it internally withing the

-:79: WARNING:LONG_LINE: line over 100 characters
#79: FILE: drivers/gpu/drm/i915/intel_color.c:1291:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(LGC_PALETTE_RED_MASK, val), 8);

-:80: WARNING:LONG_LINE: line over 100 characters
#80: FILE: drivers/gpu/drm/i915/intel_color.c:1292:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(LGC_PALETTE_GREEN_MASK, val), 8);

-:81: WARNING:LONG_LINE: line over 100 characters
#81: FILE: drivers/gpu/drm/i915/intel_color.c:1293:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(LGC_PALETTE_BLUE_MASK, val), 8);

-:89: WARNING:LEADING_SPACE: please, no spaces at the start of a line
#89: FILE: drivers/gpu/drm/i915/intel_color.c:1301:
+ crtc_state->base.gamma_lut = i9xx_read_lut_8(crtc_state);$

total: 0 errors, 5 warnings, 0 checks, 72 lines checked
899ad49ad748 drm/i915: Extract chv_read_luts()
-:15: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#15:
-Renamed cherryview_get_gamma_config() to chv_read_cgm_gamma_lut() [Ville]

-:65: WARNING:LONG_LINE: line over 100 characters
#65: FILE: drivers/gpu/drm/i915/intel_color.c:1324:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_DEGAMMA_GREEN_MASK, val), 14);

-:66: WARNING:LONG_LINE: line over 100 characters
#66: FILE: drivers/gpu/drm/i915/intel_color.c:1325:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_DEGAMMA_BLUE_MASK, val), 14);

-:69: WARNING:LONG_LINE: line over 100 characters
#69: FILE: drivers/gpu/drm/i915/intel_color.c:1328:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_DEGAMMA_RED_MASK, val), 14);

-:95: WARNING:LONG_LINE: line over 100 characters
#95: FILE: drivers/gpu/drm/i915/intel_color.c:1354:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_GREEN_MASK, val), 10);

-:96: WARNING:LONG_LINE: line over 100 characters
#96: FILE: drivers/gpu/drm/i915/intel_color.c:1355:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_BLUE_MASK, val), 10);

-:99: WARNING:LONG_LINE: line over 100 characters
#99: FILE: drivers/gpu/drm/i915/intel_color.c:1358:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_RED_MASK, val), 10);

total: 0 errors, 7 warnings, 0 checks, 95 lines checked
fa572fdd813a drm/i915: Extract i965_read_luts()
-:14: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#14:
-Renamed i965_get_gamma_config_10p6() to i965_read_gamma_lut_10p6() [Ville]

-:62: WARNING:LONG_LINE: line over 100 characters
#62: FILE: drivers/gpu/drm/i915/intel_color.c:1396:
+ blob_data[i].red = REG_FIELD_GET(PALETTE_RED_MASK, val1) << 8 | REG_FIELD_GET(PALETTE_RED_MASK, val2);

-:63: WARNING:LONG_LINE: line over 100 characters
#63: FILE: drivers/gpu/drm/i915/intel_color.c:1397:
+ blob_data[i].green = REG_FIELD_GET(PALETTE_GREEN_MASK, val1) << 8 | REG_FIELD_GET(PALETTE_GREEN_MASK, val2);

-:64: WARNING:LONG_LINE: line over 100 characters
#64: FILE: drivers/gpu/drm/i915/intel_color.c:1398:
+ blob_data[i].blue = REG_FIELD_GET(PALETTE_BLUE_MASK, val1) << 8 | REG_FIELD_GET(PALETTE_BLUE_MASK, val2) ;

-:64: WARNING:SPACING: space prohibited before semicolon
#64: FILE: drivers/gpu/drm/i915/intel_color.c:1398:
+ blob_data[i].blue = REG_FIELD_GET(PALETTE_BLUE_MASK, val1) << 8 | REG_FIELD_GET(PALETTE_BLUE_MASK, val2) ;

total: 0 errors, 5 warnings, 0 checks, 60 lines checked
584eb0d383dc drm/i915: Extract icl_read_luts()
-:83: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#83: FILE: drivers/gpu/drm/i915/intel_color.c:1446:
+bdw_read_lut_10(struct intel_crtc_state *crtc_state,
+ u32 prec_index)

-:107: WARNING:LONG_LINE: line over 100 characters
#107: FILE: drivers/gpu/drm/i915/intel_color.c:1470:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_RED_MASK, val), 10);

-:108: WARNING:LONG_LINE: line over 100 characters
#108: FILE: drivers/gpu/drm/i915/intel_color.c:1471:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_GREEN_MASK, val), 10);

-:109: WARNING:LONG_LINE: line over 100 characters
#109: FILE: drivers/gpu/drm/i915/intel_color.c:1472:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_BLUE_MASK, val), 10);

-:136: CHECK:BRACES: braces {} should be used on all arms of this statement
#136: FILE: drivers/gpu/drm/i915/intel_color.c:1532:
+ if (INTEL_GEN(dev_priv) >= 11) {
[...]
else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv))
[...]

total: 0 errors, 3 warnings, 2 checks, 112 lines checked
d0c8af000d4b drm/i915: Extract glk_read_luts()
f9abafe9edf4 drm/i915: Extract bdw_read_luts()
-:31: WARNING:LONG_LINE: line over 100 characters
#31: FILE: drivers/gpu/drm/i915/intel_color.c:1541:
+ crtc_state->base.degamma_lut = bdw_read_lut_10(crtc_state, PAL_PREC_SPLIT_MODE | PAL_PREC_INDEX_VALUE(0));

total: 0 errors, 1 warnings, 0 checks, 31 lines checked
7349486b0eb6 drm/i915: Extract ivb_read_luts()
-:28: ERROR:CODE_INDENT: code indent should use tabs where possible
#28: FILE: drivers/gpu/drm/i915/intel_color.c:1551:
+^I u32 prec_index)$

-:28: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#28: FILE: drivers/gpu/drm/i915/intel_color.c:1551:
+ivb_read_lut_10(struct intel_crtc_state *crtc_state,
+ u32 prec_index)

-:50: WARNING:LONG_LINE: line over 100 characters
#50: FILE: drivers/gpu/drm/i915/intel_color.c:1573:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_RED_MASK, val), 10);

-:51: WARNING:LONG_LINE: line over 100 characters
#51: FILE: drivers/gpu/drm/i915/intel_color.c:1574:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_GREEN_MASK, val), 10);

-:52: WARNING:LONG_LINE: line over 100 characters
#52: FILE: drivers/gpu/drm/i915/intel_color.c:1575:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_BLUE_MASK, val), 10);

-:65: WARNING:LONG_LINE: line over 100 characters
#65: FILE: drivers/gpu/drm/i915/intel_color.c:1588:
+ crtc_state->base.degamma_lut = ivb_read_lut_10(crtc_state, PAL_PREC_SPLIT_MODE | PAL_PREC_INDEX_VALUE(0));

-:66: WARNING:LONG_LINE: line over 100 characters
#66: FILE: drivers/gpu/drm/i915/intel_color.c:1589:
+ crtc_state->base.gamma_lut = ivb_read_lut_10(crtc_state, PAL_PREC_SPLIT_MODE | PAL_PREC_INDEX_VALUE(512));

total: 1 errors, 5 warnings, 1 checks, 65 lines checked
8a0aa7fcdd4c drm/i915: Extract ilk_read_luts()
-:60: WARNING:LONG_LINE: line over 100 characters
#60: FILE: drivers/gpu/drm/i915/intel_color.c:1617:
+ blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(PREC_PALETTE_RED_MASK, val), 10);

-:61: WARNING:LONG_LINE: line over 100 characters
#61: FILE: drivers/gpu/drm/i915/intel_color.c:1618:
+ blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(PREC_PALETTE_GREEN_MASK, val), 10);

-:62: WARNING:LONG_LINE: line over 100 characters
#62: FILE: drivers/gpu/drm/i915/intel_color.c:1619:
+ blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(PREC_PALETTE_BLUE_MASK, val), 10);

total: 0 errors, 3 warnings, 0 checks, 64 lines checked
a1d9c399c22a drm/i915: Add intel_color_lut_equal() to compare hw and sw gamma/degamma lut values
-:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#10:
-Corrected smatch warn "variable dereferenced before check" [Dan Carpenter]

-:33: WARNING:TABSTOP: Statements should start on a tabstop
#33: FILE: drivers/gpu/drm/i915/intel_color.c:1635:
+ return ((abs((long)hw_lut->red - sw_lut->red)) <= err) &&

-:34: ERROR:CODE_INDENT: code indent should use tabs where possible
#34: FILE: drivers/gpu/drm/i915/intel_color.c:1636:
+^I ((abs((long)hw_lut->blue - sw_lut->blue)) <= err) &&$

-:35: ERROR:CODE_INDENT: code indent should use tabs where possible
#35: FILE: drivers/gpu/drm/i915/intel_color.c:1637:
+^I ((abs((long)hw_lut->green - sw_lut->green)) <= err);$

-:58: ERROR:SPACING: space required before the open parenthesis '('
#58: FILE: drivers/gpu/drm/i915/intel_color.c:1660:
+ switch(gamma_mode) {

-:77: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 17)
#77: FILE: drivers/gpu/drm/i915/intel_color.c:1679:
+ for (i = 0; i < sw_lut_size; i++) {
+ if (!err_check(&hw_lut[i], &sw_lut[i], err))

-:78: WARNING:TABSTOP: Statements should start on a tabstop
#78: FILE: drivers/gpu/drm/i915/intel_color.c:1680:
+ if (!err_check(&hw_lut[i], &sw_lut[i], err))

-:108: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#108: FILE: drivers/gpu/drm/i915/intel_color.h:21:
+bool intel_color_lut_equal(struct drm_property_blob *blob1,
+ struct drm_property_blob *blob2,

-:120: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects?
#120: FILE: drivers/gpu/drm/i915/intel_display.c:12316:
+#define PIPE_CONF_CHECK_COLOR_LUT(name, gamma_mode) do { \
+ if (!intel_color_lut_equal(current_config->name, pipe_config->name, gamma_mode)) { \
+ pipe_config_err(adjust, __stringify(name), \
+ "hw_state doesn't match sw_state\n"); \
+ ret = false; \
+ } \
+} while (0)

-:120: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues
#120: FILE: drivers/gpu/drm/i915/intel_display.c:12316:
+#define PIPE_CONF_CHECK_COLOR_LUT(name, gamma_mode) do { \
+ if (!intel_color_lut_equal(current_config->name, pipe_config->name, gamma_mode)) { \
+ pipe_config_err(adjust, __stringify(name), \
+ "hw_state doesn't match sw_state\n"); \
+ ret = false; \
+ } \
+} while (0)

total: 3 errors, 4 warnings, 3 checks, 109 lines checked