drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c- Extension
.c- Size
- 19334 bytes
- Lines
- 724
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dce110_transform_v.hdm_services.hdc.hdce/dce_11_0_d.hdce/dce_11_0_sh_mask.h
Detected Declarations
struct sclv_ratios_initsfunction calculate_viewportfunction program_viewportfunction setup_scaling_configurationfunction program_overscanfunction set_coeff_update_completefunction program_multi_taps_filterfunction calculate_initsfunction program_scl_ratios_initsfunction dce110_xfmv_power_up_line_bufferfunction dce110_xfmv_set_scalerfunction dce110_xfmv_resetfunction dce110_xfmv_set_gamut_remapfunction dce110_xfmv_set_pixel_storage_depthfunction dce110_transform_v_construct
Annotated Snippet
struct sclv_ratios_inits {
uint32_t h_int_scale_ratio_luma;
uint32_t h_int_scale_ratio_chroma;
uint32_t v_int_scale_ratio_luma;
uint32_t v_int_scale_ratio_chroma;
struct init_int_and_frac h_init_luma;
struct init_int_and_frac h_init_chroma;
struct init_int_and_frac v_init_luma;
struct init_int_and_frac v_init_chroma;
};
static void calculate_viewport(
const struct scaler_data *scl_data,
struct rect *luma_viewport,
struct rect *chroma_viewport)
{
/*Do not set chroma vp for rgb444 pixel format*/
luma_viewport->x = scl_data->viewport.x - scl_data->viewport.x % 2;
luma_viewport->y = scl_data->viewport.y - scl_data->viewport.y % 2;
luma_viewport->width =
scl_data->viewport.width - scl_data->viewport.width % 2;
luma_viewport->height =
scl_data->viewport.height - scl_data->viewport.height % 2;
chroma_viewport->x = luma_viewport->x;
chroma_viewport->y = luma_viewport->y;
chroma_viewport->height = luma_viewport->height;
chroma_viewport->width = luma_viewport->width;
if (scl_data->format == PIXEL_FORMAT_420BPP8) {
luma_viewport->height += luma_viewport->height % 2;
luma_viewport->width += luma_viewport->width % 2;
/*for 420 video chroma is 1/4 the area of luma, scaled
*vertically and horizontally
*/
chroma_viewport->x = luma_viewport->x / 2;
chroma_viewport->y = luma_viewport->y / 2;
chroma_viewport->height = luma_viewport->height / 2;
chroma_viewport->width = luma_viewport->width / 2;
}
}
static void program_viewport(
struct dce_transform *xfm_dce,
struct rect *luma_view_port,
struct rect *chroma_view_port)
{
struct dc_context *ctx = xfm_dce->base.ctx;
uint32_t value = 0;
uint32_t addr = 0;
if (luma_view_port->width != 0 && luma_view_port->height != 0) {
addr = mmSCLV_VIEWPORT_START;
value = 0;
set_reg_field_value(
value,
luma_view_port->x,
SCLV_VIEWPORT_START,
VIEWPORT_X_START);
set_reg_field_value(
value,
luma_view_port->y,
SCLV_VIEWPORT_START,
VIEWPORT_Y_START);
dm_write_reg(ctx, addr, value);
addr = mmSCLV_VIEWPORT_SIZE;
value = 0;
set_reg_field_value(
value,
luma_view_port->height,
SCLV_VIEWPORT_SIZE,
VIEWPORT_HEIGHT);
set_reg_field_value(
value,
luma_view_port->width,
SCLV_VIEWPORT_SIZE,
VIEWPORT_WIDTH);
dm_write_reg(ctx, addr, value);
}
if (chroma_view_port->width != 0 && chroma_view_port->height != 0) {
addr = mmSCLV_VIEWPORT_START_C;
value = 0;
set_reg_field_value(
value,
chroma_view_port->x,
SCLV_VIEWPORT_START_C,
VIEWPORT_X_START_C);
set_reg_field_value(
value,
Annotation
- Immediate include surface: `dce110_transform_v.h`, `dm_services.h`, `dc.h`, `dce/dce_11_0_d.h`, `dce/dce_11_0_sh_mask.h`.
- Detected declarations: `struct sclv_ratios_inits`, `function calculate_viewport`, `function program_viewport`, `function setup_scaling_configuration`, `function program_overscan`, `function set_coeff_update_complete`, `function program_multi_taps_filter`, `function calculate_inits`, `function program_scl_ratios_inits`, `function dce110_xfmv_power_up_line_buffer`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.