== Series Details == Series: drm/i915: adding state checker for gamma lut values (rev10) URL : https://patchwork.freedesktop.org/series/58039/ State : warning == Summary == $ dim checkpatch origin/drm-tip d7ec7acfa25a drm/i915: Introduce vfunc read_luts() to create hw lut 729d4500e37f drm/i915: Enable intel_color_get_config() 118f9a116296 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] -:37: ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent #37: FILE: drivers/gpu/drm/i915/intel_color.c:1259: + switch (crtc_state->gamma_mode) { + case GAMMA_MODE_MODE_8BIT: [...] + case GAMMA_MODE_MODE_10BIT: [...] + default: -:64: ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent #64: FILE: drivers/gpu/drm/i915/intel_color.c:1286: + switch (crtc_state->gamma_mode) { + case GAMMA_MODE_MODE_8BIT: [...] + case GAMMA_MODE_MODE_10BIT: [...] + default: -:83: ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent #83: FILE: drivers/gpu/drm/i915/intel_color.c:1305: + switch (crtc_state->gamma_mode) { + case GAMMA_MODE_MODE_8BIT: [...] + case GAMMA_MODE_MODE_SPLIT: + case GAMMA_MODE_MODE_10BIT: [...] + default: -:103: ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent #103: FILE: drivers/gpu/drm/i915/intel_color.c:1325: + switch (crtc_state->gamma_mode) { + case GAMMA_MODE_MODE_8BIT: [...] + case GAMMA_MODE_MODE_10BIT: [...] + default: -:119: ERROR:SWITCH_CASE_INDENT_LEVEL: switch and case should be at the same indent #119: FILE: drivers/gpu/drm/i915/intel_color.c:1341: + switch (crtc_state->gamma_mode & GAMMA_MODE_MODE_MASK) { + case GAMMA_MODE_MODE_8BIT: [...] + case GAMMA_MODE_MODE_10BIT: [...] + default: -:155: ERROR:CODE_INDENT: code indent should use tabs where possible #155: FILE: drivers/gpu/drm/i915/intel_color.c:1377: +^I struct drm_color_lut *hw_lut, u32 err)$ -:155: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #155: FILE: drivers/gpu/drm/i915/intel_color.c:1377: +static inline bool err_check(struct drm_color_lut *sw_lut, + struct drm_color_lut *hw_lut, u32 err) -:157: WARNING:TABSTOP: Statements should start on a tabstop #157: FILE: drivers/gpu/drm/i915/intel_color.c:1379: + return ((abs((long)hw_lut->red - sw_lut->red)) <= err) && -:158: ERROR:CODE_INDENT: code indent should use tabs where possible #158: FILE: drivers/gpu/drm/i915/intel_color.c:1380: +^I ((abs((long)hw_lut->blue - sw_lut->blue)) <= err) &&$ -:159: ERROR:CODE_INDENT: code indent should use tabs where possible #159: FILE: drivers/gpu/drm/i915/intel_color.c:1381: +^I ((abs((long)hw_lut->green - sw_lut->green)) <= err);$ -:190: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 17) #190: FILE: drivers/gpu/drm/i915/intel_color.c:1412: + for (i = 0; i < sw_lut_size; i++) { + if (!err_check(&hw_lut[i], &sw_lut[i], err)) -:191: WARNING:TABSTOP: Statements should start on a tabstop #191: FILE: drivers/gpu/drm/i915/intel_color.c:1413: + if (!err_check(&hw_lut[i], &sw_lut[i], err)) -:237: WARNING:LONG_LINE: line over 100 characters #237: FILE: drivers/gpu/drm/i915/intel_display.c:11895: + pipe_config->cgm_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:237: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #237: FILE: drivers/gpu/drm/i915/intel_display.c:11895: + DRM_DEBUG_KMS("cgm_mode:%d gamma_mode:%d gamma_enable:%d csc_enable:%d\n", + pipe_config->cgm_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:241: WARNING:LONG_LINE: line over 100 characters #241: FILE: drivers/gpu/drm/i915/intel_display.c:11899: + pipe_config->csc_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:241: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #241: FILE: drivers/gpu/drm/i915/intel_display.c:11899: + DRM_DEBUG_KMS("csc_mode:%d gamma_mode:%d gamma_enable:%d csc_enable:%d\n", + pipe_config->csc_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:259: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects? #259: FILE: drivers/gpu/drm/i915/intel_display.c:12431: +#define PIPE_CONF_CHECK_COLOR_LUT(name, bit_precision) do { \ + if (!intel_color_lut_equal(current_config->name, \ + pipe_config->name, bit_precision)) { \ + pipe_config_err(adjust, __stringify(name), \ + "hw_state doesn't match sw_state\n"); \ + ret = false; \ + } \ +} while (0) -:259: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues #259: FILE: drivers/gpu/drm/i915/intel_display.c:12431: +#define PIPE_CONF_CHECK_COLOR_LUT(name, bit_precision) do { \ + if (!intel_color_lut_equal(current_config->name, \ + pipe_config->name, bit_precision)) { \ + pipe_config_err(adjust, __stringify(name), \ + "hw_state doesn't match sw_state\n"); \ + ret = false; \ + } \ +} while (0) total: 8 errors, 6 warnings, 5 checks, 247 lines checked 383d2598835a 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:1457: + 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:1458: + 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:1459: + 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:1467: + crtc_state->base.gamma_lut = i9xx_read_lut_8(crtc_state);$ total: 0 errors, 5 warnings, 0 checks, 72 lines checked bf2b1d9e58da 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] -:61: WARNING:LONG_LINE: line over 100 characters #61: FILE: drivers/gpu/drm/i915/intel_color.c:1490: + blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_GREEN_MASK, val), 10); -:62: WARNING:LONG_LINE: line over 100 characters #62: FILE: drivers/gpu/drm/i915/intel_color.c:1491: + blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_BLUE_MASK, val), 10); -:65: WARNING:LONG_LINE: line over 100 characters #65: FILE: drivers/gpu/drm/i915/intel_color.c:1494: + blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(CGM_PIPE_GAMMA_RED_MASK, val), 10); -:78: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #78: FILE: drivers/gpu/drm/i915/intel_color.c:1507: + +} total: 0 errors, 4 warnings, 1 checks, 61 lines checked 5fc9737ac9e0 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:1531: + 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:1532: + 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:1533: + 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:1533: + 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 8d64f5ac9f48 drm/i915: Extract icl_read_luts() -:42: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #42: FILE: drivers/gpu/drm/i915/intel_color.c:1549: +bdw_read_lut_10(struct intel_crtc_state *crtc_state, + u32 prec_index) -:66: WARNING:LONG_LINE: line over 100 characters #66: 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); -:67: WARNING:LONG_LINE: line over 100 characters #67: 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); -:68: WARNING:LONG_LINE: line over 100 characters #68: 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); -:93: CHECK:BRACES: braces {} should be used on all arms of this statement #93: FILE: drivers/gpu/drm/i915/intel_color.c:1633: + if (INTEL_GEN(dev_priv) >= 11) { [...] else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) [...] total: 0 errors, 3 warnings, 2 checks, 71 lines checked 02d08e6b269c drm/i915: Extract glk_read_luts() cff18dde61e5 drm/i915: Extract bdw_read_luts() 94bf4f217515 drm/i915: Extract ivb_read_luts() -:27: ERROR:CODE_INDENT: code indent should use tabs where possible #27: FILE: drivers/gpu/drm/i915/intel_color.c:1612: +^I u32 prec_index)$ -:27: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #27: FILE: drivers/gpu/drm/i915/intel_color.c:1612: +ivb_read_lut_10(struct intel_crtc_state *crtc_state, + u32 prec_index) -:49: WARNING:LONG_LINE: line over 100 characters #49: FILE: drivers/gpu/drm/i915/intel_color.c:1634: + blob_data[i].red = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_RED_MASK, val), 10); -:50: WARNING:LONG_LINE: line over 100 characters #50: FILE: drivers/gpu/drm/i915/intel_color.c:1635: + blob_data[i].green = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_GREEN_MASK, val), 10); -:51: WARNING:LONG_LINE: line over 100 characters #51: FILE: drivers/gpu/drm/i915/intel_color.c:1636: + blob_data[i].blue = intel_color_lut_pack(REG_FIELD_GET(PREC_PAL_DATA_BLUE_MASK, val), 10); -:64: WARNING:LONG_LINE: line over 100 characters #64: FILE: drivers/gpu/drm/i915/intel_color.c:1649: + crtc_state->base.gamma_lut = ivb_read_lut_10(crtc_state, PAL_PREC_SPLIT_MODE | PAL_PREC_INDEX_VALUE(512)); -:68: CHECK:BRACES: Blank lines aren't necessary before a close brace '}' #68: FILE: drivers/gpu/drm/i915/intel_color.c:1653: + +} total: 1 errors, 4 warnings, 2 checks, 63 lines checked affb0e1188e9 drm/i915: Extract ilk_read_luts() -:60: WARNING:LONG_LINE: line over 100 characters #60: FILE: drivers/gpu/drm/i915/intel_color.c:1676: + 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:1677: + 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:1678: + 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 d106ea46c080 FOR_TESTING_ONLY: Print rgb values of hw and sw blobs -:7: WARNING:COMMIT_MESSAGE: Missing commit description - Add an appropriate one -:16: WARNING:LONG_LINE: line over 100 characters #16: FILE: drivers/gpu/drm/i915/intel_color.c:1379: + DRM_DEBUG_KMS("hw_lut->red=0x%x sw_lut->red=0x%x hw_lut->blue=0x%x sw_lut->blue=0x%x hw_lut->green=0x%x sw_lut->green=0x%x", hw_lut->red, sw_lut->red, hw_lut->blue, sw_lut->blue, hw_lut->green, sw_lut->green); total: 0 errors, 2 warnings, 0 checks, 8 lines checked _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx