Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/display: Add basic kernel doc to CRC code under DC

Reviewed-by: Harry Wentland <Harry.Wentland@amd.com>
Acked-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Rodrigo Siqueira and committed by
Alex Deucher
fdf17f10 60c93531

+46 -14
+10 -7
drivers/gpu/drm/amd/display/dc/core/dc.c
··· 638 638 639 639 /** 640 640 * dc_stream_get_crc() - Get CRC values for the given stream. 641 - * @dc: DC object 641 + * 642 + * @dc: DC object. 642 643 * @stream: The DC stream state of the stream to get CRCs from. 643 - * @r_cr: CRC value for the first of the 3 channels stored here. 644 - * @g_y: CRC value for the second of the 3 channels stored here. 645 - * @b_cb: CRC value for the third of the 3 channels stored here. 644 + * @r_cr: CRC value for the red component. 645 + * @g_y: CRC value for the green component. 646 + * @b_cb: CRC value for the blue component. 646 647 * 647 648 * dc_stream_configure_crc needs to be called beforehand to enable CRCs. 648 - * Return false if stream is not found, or if CRCs are not enabled. 649 + * 650 + * Return: 651 + * false if stream is not found, or if CRCs are not enabled. 649 652 */ 650 653 bool dc_stream_get_crc(struct dc *dc, struct dc_stream_state *stream, 651 654 uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb) ··· 4278 4275 /* 4279 4276 ***************************************************************************** 4280 4277 * Function: dc_is_dmub_outbox_supported - 4281 - * 4282 - * @brief 4278 + * 4279 + * @brief 4283 4280 * Checks whether DMUB FW supports outbox notifications, if supported 4284 4281 * DM should register outbox interrupt prior to actually enabling interrupts 4285 4282 * via dc_enable_dmub_outbox
+21 -4
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_optc.c
··· 1498 1498 return true; 1499 1499 } 1500 1500 1501 + /** 1502 + * optc1_get_crc - Capture CRC result per component 1503 + * 1504 + * @optc: timing_generator instance. 1505 + * @r_cr: 16-bit primary CRC signature for red data. 1506 + * @g_y: 16-bit primary CRC signature for green data. 1507 + * @b_cb: 16-bit primary CRC signature for blue data. 1508 + * 1509 + * This function reads the CRC signature from the OPTC registers. Notice that 1510 + * we have three registers to keep the CRC result per color component (RGB). 1511 + * 1512 + * Returns: 1513 + * If CRC is disabled, return false; otherwise, return true, and the CRC 1514 + * results in the parameters. 1515 + */ 1501 1516 bool optc1_get_crc(struct timing_generator *optc, 1502 - uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb) 1517 + uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb) 1503 1518 { 1504 1519 uint32_t field = 0; 1505 1520 struct optc *optc1 = DCN10TG_FROM_TG(optc); ··· 1525 1510 if (!field) 1526 1511 return false; 1527 1512 1513 + /* OTG_CRC0_DATA_RG has the CRC16 results for the red and green component */ 1528 1514 REG_GET_2(OTG_CRC0_DATA_RG, 1529 - CRC0_R_CR, r_cr, 1530 - CRC0_G_Y, g_y); 1515 + CRC0_R_CR, r_cr, 1516 + CRC0_G_Y, g_y); 1531 1517 1518 + /* OTG_CRC0_DATA_B has the CRC16 results for the blue component */ 1532 1519 REG_GET(OTG_CRC0_DATA_B, 1533 - CRC0_B_CB, b_cb); 1520 + CRC0_B_CB, b_cb); 1534 1521 1535 1522 return true; 1536 1523 }
+4
drivers/gpu/drm/amd/display/dc/inc/core_types.h
··· 399 399 struct dc_stream_state *stream; 400 400 401 401 struct plane_resource plane_res; 402 + 403 + /** 404 + * @stream_res: Reference to DCN resource components such OPP and DSC. 405 + */ 402 406 struct stream_resource stream_res; 403 407 struct link_resource link_res; 404 408
+11 -3
drivers/gpu/drm/amd/display/dc/inc/hw/timing_generator.h
··· 137 137 bool enable; 138 138 }; 139 139 140 + /** 141 + * struct timing_generator - Entry point to Output Timing Generator feature. 142 + */ 140 143 struct timing_generator { 144 + /** 145 + * @funcs: Timing generator control functions 146 + */ 141 147 const struct timing_generator_funcs *funcs; 142 148 struct dc_bios *bp; 143 149 struct dc_context *ctx; ··· 154 148 155 149 struct drr_params; 156 150 157 - 151 + /** 152 + * struct timing_generator_funcs - Control timing generator on a given device. 153 + */ 158 154 struct timing_generator_funcs { 159 155 bool (*validate_timing)(struct timing_generator *tg, 160 156 const struct dc_crtc_timing *timing); ··· 281 273 const struct crc_params *params); 282 274 283 275 /** 284 - * Get CRCs for the given timing generator. Return false if CRCs are 285 - * not enabled (via configure_crc). 276 + * @get_crc: Get CRCs for the given timing generator. Return false if 277 + * CRCs are not enabled (via configure_crc). 286 278 */ 287 279 bool (*get_crc)(struct timing_generator *tg, 288 280 uint32_t *r_cr, uint32_t *g_y, uint32_t *b_cb);