== Series Details == Series: drm/i915: adding state checker for gamma lut values (rev9) URL : https://patchwork.freedesktop.org/series/58039/ State : warning == Summary == $ dim checkpatch origin/drm-tip cb7a05f563c1 drm/i915: Introduce vfunc read_luts() to create hw lut c687e9d64838 drm/i915: Enable intel_color_get_config() a13dd89268a2 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] -:85: ERROR:CODE_INDENT: code indent should use tabs where possible #85: FILE: drivers/gpu/drm/i915/intel_color.c:1304: +^I struct drm_color_lut *hw_lut, u32 err)$ -:85: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #85: FILE: drivers/gpu/drm/i915/intel_color.c:1304: +static inline bool err_check(struct drm_color_lut *sw_lut, + struct drm_color_lut *hw_lut, u32 err) -:87: WARNING:TABSTOP: Statements should start on a tabstop #87: FILE: drivers/gpu/drm/i915/intel_color.c:1306: + return ((abs((long)hw_lut->red - sw_lut->red)) <= err) && -:88: ERROR:CODE_INDENT: code indent should use tabs where possible #88: FILE: drivers/gpu/drm/i915/intel_color.c:1307: +^I ((abs((long)hw_lut->blue - sw_lut->blue)) <= err) &&$ -:89: ERROR:CODE_INDENT: code indent should use tabs where possible #89: FILE: drivers/gpu/drm/i915/intel_color.c:1308: +^I ((abs((long)hw_lut->green - sw_lut->green)) <= err);$ -:120: WARNING:SUSPECT_CODE_INDENT: suspect code indent for conditional statements (8, 17) #120: FILE: drivers/gpu/drm/i915/intel_color.c:1339: + for (i = 0; i < sw_lut_size; i++) { + if (!err_check(&hw_lut[i], &sw_lut[i], err)) -:121: WARNING:TABSTOP: Statements should start on a tabstop #121: FILE: drivers/gpu/drm/i915/intel_color.c:1340: + if (!err_check(&hw_lut[i], &sw_lut[i], err)) -:167: WARNING:LONG_LINE: line over 100 characters #167: FILE: drivers/gpu/drm/i915/intel_display.c:11608: + pipe_config->cgm_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:167: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #167: FILE: drivers/gpu/drm/i915/intel_display.c:11608: + 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, -:171: WARNING:LONG_LINE: line over 100 characters #171: FILE: drivers/gpu/drm/i915/intel_display.c:11612: + pipe_config->csc_mode, pipe_config->gamma_mode, pipe_config->gamma_enable, -:171: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #171: FILE: drivers/gpu/drm/i915/intel_display.c:11612: + 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, -:189: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'name' - possible side-effects? #189: FILE: drivers/gpu/drm/i915/intel_display.c:12144: +#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) -:189: CHECK:MACRO_ARG_PRECEDENCE: Macro argument 'name' may be better as '(name)' to avoid precedence issues #189: FILE: drivers/gpu/drm/i915/intel_display.c:12144: +#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: 3 errors, 6 warnings, 5 checks, 173 lines checked 92f0143b746e 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:1384: + 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:1385: + 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:1386: + 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:1394: + crtc_state->base.gamma_lut = i9xx_read_lut_8(crtc_state);$ total: 0 errors, 5 warnings, 0 checks, 72 lines checked aed86d8c5e91 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:1417: + 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:1418: + 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:1421: + 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:1434: + +} total: 0 errors, 4 warnings, 1 checks, 61 lines checked 7e433388b2bb 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:1458: + 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:1459: + 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:1460: + 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:1460: + 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 109f2d52ff4d drm/i915: Extract icl_read_luts() -:42: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #42: FILE: drivers/gpu/drm/i915/intel_color.c:1476: +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:1500: + 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:1501: + 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:1502: + 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:1560: + 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 f371c0809856 drm/i915: Extract glk_read_luts() 13e33d98fba6 drm/i915: Extract bdw_read_luts() 8aadfb2b3ffe 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:1539: +^I u32 prec_index)$ -:27: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #27: FILE: drivers/gpu/drm/i915/intel_color.c:1539: +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:1561: + 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:1562: + 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:1563: + 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:1576: + 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:1580: + +} total: 1 errors, 4 warnings, 2 checks, 63 lines checked d821530ccc4c drm/i915: Extract ilk_read_luts() -:60: WARNING:LONG_LINE: line over 100 characters #60: FILE: drivers/gpu/drm/i915/intel_color.c:1603: + 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:1604: + 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:1605: + 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 3c319ee505b6 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:1306: + 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