drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c

Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c

File Facts

System
Linux kernel
Corpus path
drivers/gpu/drm/amd/display/dc/basics/dce_calcs.c
Extension
.c
Size
214238 bytes
Lines
3621
Domain
Driver Families
Bucket
drivers/gpu
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (data->underlay_surface_type) {
		case bw_def_420:
			data->enable[0] = 1;
			data->enable[1] = 1;
			break;
		default:
			data->enable[0] = 1;
			data->enable[1] = 0;
			break;
		}
	}
	else {
		data->enable[0] = 0;
		data->enable[1] = 0;
	}
	if (d1_underlay_enable) {
		switch (data->underlay_surface_type) {
		case bw_def_420:
			data->enable[2] = 1;
			data->enable[3] = 1;
			break;
		default:
			data->enable[2] = 1;
			data->enable[3] = 0;
			break;
		}
	}
	else {
		data->enable[2] = 0;
		data->enable[3] = 0;
	}
	data->use_alpha[0] = 0;
	data->use_alpha[1] = 0;
	data->use_alpha[2] = 0;
	data->use_alpha[3] = 0;
	data->scatter_gather_enable_for_pipe[0] = vbios->scatter_gather_enable;
	data->scatter_gather_enable_for_pipe[1] = vbios->scatter_gather_enable;
	data->scatter_gather_enable_for_pipe[2] = vbios->scatter_gather_enable;
	data->scatter_gather_enable_for_pipe[3] = vbios->scatter_gather_enable;
	/*underlay0 same and graphics display pipe0*/
	data->interlace_mode[0] = data->interlace_mode[4];
	data->interlace_mode[1] = data->interlace_mode[4];
	/*underlay1 same and graphics display pipe1*/
	data->interlace_mode[2] = data->interlace_mode[5];
	data->interlace_mode[3] = data->interlace_mode[5];
	/*underlay0 same and graphics display pipe0*/
	data->h_total[0] = data->h_total[4];
	data->v_total[0] = data->v_total[4];
	data->h_total[1] = data->h_total[4];
	data->v_total[1] = data->v_total[4];
	/*underlay1 same and graphics display pipe1*/
	data->h_total[2] = data->h_total[5];
	data->v_total[2] = data->v_total[5];
	data->h_total[3] = data->h_total[5];
	data->v_total[3] = data->v_total[5];
	/*underlay0 same and graphics display pipe0*/
	data->pixel_rate[0] = data->pixel_rate[4];
	data->pixel_rate[1] = data->pixel_rate[4];
	/*underlay1 same and graphics display pipe1*/
	data->pixel_rate[2] = data->pixel_rate[5];
	data->pixel_rate[3] = data->pixel_rate[5];
	if ((data->underlay_tiling_mode == bw_def_array_linear_general || data->underlay_tiling_mode == bw_def_array_linear_aligned)) {
		tiling_mode[0] = bw_def_linear;
		tiling_mode[1] = bw_def_linear;
		tiling_mode[2] = bw_def_linear;
		tiling_mode[3] = bw_def_linear;
	}
	else {
		tiling_mode[0] = bw_def_landscape;
		tiling_mode[1] = bw_def_landscape;
		tiling_mode[2] = bw_def_landscape;
		tiling_mode[3] = bw_def_landscape;
	}
	data->lb_bpc[0] = data->underlay_lb_bpc;
	data->lb_bpc[1] = data->underlay_lb_bpc;
	data->lb_bpc[2] = data->underlay_lb_bpc;
	data->lb_bpc[3] = data->underlay_lb_bpc;
	data->compression_rate[0] = bw_int_to_fixed(1);
	data->compression_rate[1] = bw_int_to_fixed(1);
	data->compression_rate[2] = bw_int_to_fixed(1);
	data->compression_rate[3] = bw_int_to_fixed(1);
	data->access_one_channel_only[0] = 0;
	data->access_one_channel_only[1] = 0;
	data->access_one_channel_only[2] = 0;
	data->access_one_channel_only[3] = 0;
	data->cursor_width_pixels[0] = bw_int_to_fixed(0);
	data->cursor_width_pixels[1] = bw_int_to_fixed(0);
	data->cursor_width_pixels[2] = bw_int_to_fixed(0);
	data->cursor_width_pixels[3] = bw_int_to_fixed(0);
	/* graphics surface parameters from spreadsheet*/

Annotation

Implementation Notes