| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/core/ |
| H A D | amdgpu_dc_surface.c | 45 static void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_state) in dc_plane_construct() argument 47 plane_state->ctx = ctx; in dc_plane_construct() 49 plane_state->gamma_correction = dc_create_gamma(); in dc_plane_construct() 50 if (plane_state->gamma_correction != NULL) in dc_plane_construct() 51 plane_state->gamma_correction->is_identity = true; in dc_plane_construct() 53 plane_state->in_transfer_func = dc_create_transfer_func(); in dc_plane_construct() 54 if (plane_state->in_transfer_func != NULL) { in dc_plane_construct() 55 plane_state->in_transfer_func->type = TF_TYPE_BYPASS; in dc_plane_construct() 56 plane_state->in_transfer_func->ctx = ctx; in dc_plane_construct() 58 plane_state->in_shaper_func = dc_create_transfer_func(); in dc_plane_construct() [all …]
|
| H A D | amdgpu_dc_debug.c | 71 const struct dc_plane_state *plane_state = plane_states[i]; in pre_surface_trace() local 85 plane_state->visible, in pre_surface_trace() 86 plane_state->flip_immediate, in pre_surface_trace() 87 plane_state->address.type, in pre_surface_trace() 88 plane_state->address.grph.addr.quad_part, in pre_surface_trace() 89 plane_state->address.grph.meta_addr.quad_part, in pre_surface_trace() 90 plane_state->scaling_quality.h_taps, in pre_surface_trace() 91 plane_state->scaling_quality.v_taps, in pre_surface_trace() 92 plane_state->scaling_quality.h_taps_c, in pre_surface_trace() 93 plane_state->scaling_quality.v_taps_c); in pre_surface_trace() [all …]
|
| H A D | amdgpu_dc_resource.c | 542 const struct dc_plane_state *plane_state = pipe_ctx->plane_state; in calculate_viewport() local 545 struct rect surf_src = plane_state->src_rect; in calculate_viewport() 550 pipe_ctx->bottom_pipe->plane_state == pipe_ctx->plane_state; in calculate_viewport() 552 pipe_ctx->top_pipe->plane_state == pipe_ctx->plane_state; in calculate_viewport() 564 dest = plane_state->dst_rect; in calculate_viewport() 565 clip.x = stream->src.x > plane_state->clip_rect.x ? in calculate_viewport() 566 stream->src.x : plane_state->clip_rect.x; in calculate_viewport() 569 plane_state->clip_rect.x + plane_state->clip_rect.width ? in calculate_viewport() 571 plane_state->clip_rect.x + plane_state->clip_rect.width - clip.x ; in calculate_viewport() 573 clip.y = stream->src.y > plane_state->clip_rect.y ? in calculate_viewport() [all …]
|
| H A D | amdgpu_dc.c | 815 if (!pipe->plane_state) in wait_for_no_pipes_pending() 821 pipe->plane_state->status.is_flip_pending = false; in wait_for_no_pipes_pending() 823 if (!pipe->plane_state->status.is_flip_pending) in wait_for_no_pipes_pending() 828 ASSERT(!pipe->plane_state->status.is_flip_pending); in wait_for_no_pipes_pending() 989 if (pipe_set[j]->plane_state) { in program_timing_sync() 1012 if (pipe_set[j]->plane_state) { in program_timing_sync() 1344 context->res_ctx.pipe_ctx[i].plane_state == NULL) { in dc_post_update_surfaces_to_stream() 1481 const struct dc_plane_state *plane_state) in is_surface_in_context() argument 1488 if (plane_state == pipe_ctx->plane_state) { in is_surface_in_context() 2202 struct dc_plane_state *plane_state = srf_updates[i].surface; in commit_planes_for_stream() local [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/i915/display/ |
| H A D | intel_sprite.c | 225 int intel_plane_check_stride(const struct intel_plane_state *plane_state) in intel_plane_check_stride() argument 227 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_check_stride() 228 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_check_stride() 229 unsigned int rotation = plane_state->hw.rotation; in intel_plane_check_stride() 238 if (intel_plane_can_remap(plane_state) && in intel_plane_check_stride() 239 !plane_state->uapi.visible) in intel_plane_check_stride() 243 stride = plane_state->color_plane[0].stride; in intel_plane_check_stride() 257 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state) in intel_plane_check_src_coordinates() argument 259 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_check_src_coordinates() 260 struct drm_rect *src = &plane_state->uapi.src; in intel_plane_check_src_coordinates() [all …]
|
| H A D | intel_atomic_plane.c | 49 static void intel_plane_state_reset(struct intel_plane_state *plane_state, in intel_plane_state_reset() argument 52 memset(plane_state, 0, sizeof(*plane_state)); in intel_plane_state_reset() 54 __drm_atomic_helper_plane_state_reset(&plane_state->uapi, &plane->base); in intel_plane_state_reset() 56 plane_state->scaler_id = -1; in intel_plane_state_reset() 61 struct intel_plane_state *plane_state; in intel_plane_alloc() local 68 plane_state = kzalloc(sizeof(*plane_state), GFP_KERNEL); in intel_plane_alloc() 69 if (!plane_state) { in intel_plane_alloc() 74 intel_plane_state_reset(plane_state, plane); in intel_plane_alloc() 76 plane->base.state = &plane_state->uapi; in intel_plane_alloc() 131 struct intel_plane_state *plane_state = to_intel_plane_state(state); in intel_plane_destroy_state() local [all …]
|
| H A D | intel_sprite.h | 30 int intel_plane_check_stride(const struct intel_plane_state *plane_state); 31 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state); 32 int chv_plane_check_rotation(const struct intel_plane_state *plane_state); 55 const struct intel_plane_state *plane_state); 57 const struct intel_plane_state *plane_state); 59 const struct intel_plane_state *plane_state);
|
| H A D | intel_display.c | 2199 static bool intel_plane_uses_fence(const struct intel_plane_state *plane_state) in intel_plane_uses_fence() argument 2201 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_uses_fence() 2206 plane_state->view.type == I915_GGTT_VIEW_NORMAL); in intel_plane_uses_fence() 2795 bool intel_plane_can_remap(const struct intel_plane_state *plane_state) in intel_plane_can_remap() argument 2797 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_can_remap() 2799 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_can_remap() 2835 static bool intel_plane_needs_remap(const struct intel_plane_state *plane_state) in intel_plane_needs_remap() argument 2837 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_needs_remap() 2838 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_needs_remap() 2839 unsigned int rotation = plane_state->hw.rotation; in intel_plane_needs_remap() [all …]
|
| H A D | intel_fbc.c | 641 const struct intel_plane_state *plane_state) in intel_fbc_update_state_cache() argument 646 struct drm_framebuffer *fb = plane_state->hw.fb; in intel_fbc_update_state_cache() 648 cache->plane.visible = plane_state->uapi.visible; in intel_fbc_update_state_cache() 656 cache->plane.rotation = plane_state->hw.rotation; in intel_fbc_update_state_cache() 662 cache->plane.src_w = drm_rect_width(&plane_state->uapi.src) >> 16; in intel_fbc_update_state_cache() 663 cache->plane.src_h = drm_rect_height(&plane_state->uapi.src) >> 16; in intel_fbc_update_state_cache() 664 cache->plane.adjusted_x = plane_state->color_plane[0].x; in intel_fbc_update_state_cache() 665 cache->plane.adjusted_y = plane_state->color_plane[0].y; in intel_fbc_update_state_cache() 666 cache->plane.y = plane_state->uapi.src.y1 >> 16; in intel_fbc_update_state_cache() 668 cache->plane.pixel_blend_mode = plane_state->hw.pixel_blend_mode; in intel_fbc_update_state_cache() [all …]
|
| H A D | intel_atomic.c | 303 struct intel_plane_state *plane_state, in intel_atomic_setup_scaler() argument 326 if (plane_state && plane_state->hw.fb && in intel_atomic_setup_scaler() 327 plane_state->hw.fb->format->is_yuv && in intel_atomic_setup_scaler() 328 plane_state->hw.fb->format->num_planes > 1) { in intel_atomic_setup_scaler() 329 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_atomic_setup_scaler() 342 plane_state->planar_linked_plane; in intel_atomic_setup_scaler() 393 struct intel_plane_state *plane_state = NULL; in intel_atomic_setup_scalers() local 476 plane_state = intel_atomic_get_new_plane_state(intel_state, in intel_atomic_setup_scalers() 478 scaler_id = &plane_state->scaler_id; in intel_atomic_setup_scalers() 483 plane_state, scaler_id); in intel_atomic_setup_scalers()
|
| H A D | intel_atomic_plane.h | 24 const struct intel_plane_state *plane_state); 25 void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state, 29 const struct intel_plane_state *plane_state); 50 struct intel_plane_state *plane_state);
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/basics/ |
| H A D | amdgpu_dc_common.c | 59 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_lower_pipe_tree_visible() 68 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_upper_pipe_tree_visible() 77 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_pipe_tree_visible() 87 const struct dc_plane_state *plane_state) in build_prescale_params() argument 89 if (plane_state->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN in build_prescale_params() 90 && plane_state->format != SURFACE_PIXEL_FORMAT_INVALID in build_prescale_params() 91 && plane_state->input_csc_color_matrix.enable_adjustment in build_prescale_params() 92 && plane_state->coeff_reduction_factor.value != 0) { in build_prescale_params() 94 dc_fixpt_mul(plane_state->coeff_reduction_factor, in build_prescale_params()
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn20/ |
| H A D | amdgpu_dcn20_hwseq.c | 590 pipe_ctx->plane_state = NULL; in dcn20_plane_atomic_disable() 780 struct pipe_ctx *pipe_ctx, const struct dc_plane_state *plane_state) in dcn20_set_blend_lut() argument 786 if (plane_state->blend_tf) { in dcn20_set_blend_lut() 787 if (plane_state->blend_tf->type == TF_TYPE_HWPWL) in dcn20_set_blend_lut() 788 blend_lut = &plane_state->blend_tf->pwl; in dcn20_set_blend_lut() 789 else if (plane_state->blend_tf->type == TF_TYPE_DISTRIBUTED_POINTS) { in dcn20_set_blend_lut() 791 plane_state->blend_tf, in dcn20_set_blend_lut() 802 struct pipe_ctx *pipe_ctx, const struct dc_plane_state *plane_state) in dcn20_set_shaper_3dlut() argument 808 if (plane_state->in_shaper_func) { in dcn20_set_shaper_3dlut() 809 if (plane_state->in_shaper_func->type == TF_TYPE_HWPWL) in dcn20_set_shaper_3dlut() [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dcn10/ |
| H A D | amdgpu_dcn10_hw_sequencer.c | 106 !pipe_ctx->stream || !pipe_ctx->plane_state || in dcn10_lock_all_pipes() 1113 pipe_ctx->plane_state = NULL; in dcn10_plane_atomic_disable() 1406 struct dc_plane_state *plane_state = pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() local 1408 pipe_ctx->top_pipe->plane_state == pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() 1409 if (sec_split && plane_state->address.type == PLN_ADDR_TYPE_GRPH_STEREO && in patch_address_for_sbs_tb_stereo() 1414 *addr = plane_state->address.grph_stereo.left_addr; in patch_address_for_sbs_tb_stereo() 1415 plane_state->address.grph_stereo.left_addr = in patch_address_for_sbs_tb_stereo() 1416 plane_state->address.grph_stereo.right_addr; in patch_address_for_sbs_tb_stereo() 1420 plane_state->address.type != PLN_ADDR_TYPE_GRPH_STEREO) { in patch_address_for_sbs_tb_stereo() 1421 plane_state->address.type = PLN_ADDR_TYPE_GRPH_STEREO; in patch_address_for_sbs_tb_stereo() [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/ |
| H A D | drm_atomic_helper.c | 81 struct drm_plane_state *plane_state, in drm_atomic_helper_plane_changed() argument 96 if (plane_state->crtc) { in drm_atomic_helper_plane_changed() 97 crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc); in drm_atomic_helper_plane_changed() 767 int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, in drm_atomic_helper_check_plane_state() argument 774 struct drm_framebuffer *fb = plane_state->fb; in drm_atomic_helper_check_plane_state() 775 struct drm_rect *src = &plane_state->src; in drm_atomic_helper_check_plane_state() 776 struct drm_rect *dst = &plane_state->dst; in drm_atomic_helper_check_plane_state() 777 unsigned int rotation = plane_state->rotation; in drm_atomic_helper_check_plane_state() 781 WARN_ON(plane_state->crtc && plane_state->crtc != crtc_state->crtc); in drm_atomic_helper_check_plane_state() 783 *src = drm_plane_state_src(plane_state); in drm_atomic_helper_check_plane_state() [all …]
|
| H A D | drm_damage_helper.c | 126 struct drm_plane_state *plane_state) in drm_atomic_helper_check_plane_damage() argument 130 if (plane_state->crtc) { in drm_atomic_helper_check_plane_damage() 132 plane_state->crtc); in drm_atomic_helper_check_plane_damage() 138 drm_property_blob_put(plane_state->fb_damage_clips); in drm_atomic_helper_check_plane_damage() 139 plane_state->fb_damage_clips = NULL; in drm_atomic_helper_check_plane_damage() 218 struct drm_plane_state *plane_state; in drm_atomic_helper_dirtyfb() local 229 plane_state = drm_atomic_get_plane_state(state, plane); in drm_atomic_helper_dirtyfb() 230 if (IS_ERR(plane_state)) { in drm_atomic_helper_dirtyfb() 231 ret = PTR_ERR(plane_state); in drm_atomic_helper_dirtyfb() 235 drm_property_replace_blob(&plane_state->fb_damage_clips, in drm_atomic_helper_dirtyfb()
|
| H A D | drm_atomic.c | 478 struct drm_plane_state *plane_state; in drm_atomic_get_plane_state() local 487 plane_state = drm_atomic_get_existing_plane_state(state, plane); in drm_atomic_get_plane_state() 488 if (plane_state) in drm_atomic_get_plane_state() 489 return plane_state; in drm_atomic_get_plane_state() 495 plane_state = plane->funcs->atomic_duplicate_state(plane); in drm_atomic_get_plane_state() 496 if (!plane_state) in drm_atomic_get_plane_state() 499 state->planes[index].state = plane_state; in drm_atomic_get_plane_state() 502 state->planes[index].new_state = plane_state; in drm_atomic_get_plane_state() 503 plane_state->state = state; in drm_atomic_get_plane_state() 506 plane->base.id, plane->name, plane_state, state); in drm_atomic_get_plane_state() [all …]
|
| H A D | drm_atomic_state_helper.c | 243 void __drm_atomic_helper_plane_state_reset(struct drm_plane_state *plane_state, in __drm_atomic_helper_plane_state_reset() argument 246 plane_state->plane = plane; in __drm_atomic_helper_plane_state_reset() 247 plane_state->rotation = DRM_MODE_ROTATE_0; in __drm_atomic_helper_plane_state_reset() 249 plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE; in __drm_atomic_helper_plane_state_reset() 250 plane_state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI; in __drm_atomic_helper_plane_state_reset() 267 struct drm_plane_state *plane_state) in __drm_atomic_helper_plane_reset() argument 269 if (plane_state) in __drm_atomic_helper_plane_reset() 270 __drm_atomic_helper_plane_state_reset(plane_state, plane); in __drm_atomic_helper_plane_reset() 272 plane->state = plane_state; in __drm_atomic_helper_plane_reset()
|
| H A D | drm_atomic_uapi.c | 182 drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, in drm_atomic_set_crtc_for_plane() argument 185 struct drm_plane *plane = plane_state->plane; in drm_atomic_set_crtc_for_plane() 188 if (plane_state->crtc == crtc) in drm_atomic_set_crtc_for_plane() 190 if (plane_state->crtc) { in drm_atomic_set_crtc_for_plane() 191 crtc_state = drm_atomic_get_crtc_state(plane_state->state, in drm_atomic_set_crtc_for_plane() 192 plane_state->crtc); in drm_atomic_set_crtc_for_plane() 199 plane_state->crtc = crtc; in drm_atomic_set_crtc_for_plane() 202 crtc_state = drm_atomic_get_crtc_state(plane_state->state, in drm_atomic_set_crtc_for_plane() 211 plane->base.id, plane->name, plane_state, in drm_atomic_set_crtc_for_plane() 215 plane->base.id, plane->name, plane_state); in drm_atomic_set_crtc_for_plane() [all …]
|
| H A D | drm_plane_helper.c | 116 struct drm_plane_state plane_state = { in drm_plane_helper_check_update() local 138 ret = drm_atomic_helper_check_plane_state(&plane_state, &crtc_state, in drm_plane_helper_check_update() 145 *src = plane_state.src; in drm_plane_helper_check_update() 146 *dst = plane_state.dst; in drm_plane_helper_check_update() 147 *visible = plane_state.visible; in drm_plane_helper_check_update()
|
| H A D | drm_blend.c | 455 struct drm_plane_state *plane_state = in drm_atomic_helper_crtc_normalize_zpos() local 457 if (IS_ERR(plane_state)) { in drm_atomic_helper_crtc_normalize_zpos() 458 ret = PTR_ERR(plane_state); in drm_atomic_helper_crtc_normalize_zpos() 461 states[n++] = plane_state; in drm_atomic_helper_crtc_normalize_zpos() 464 plane_state->zpos); in drm_atomic_helper_crtc_normalize_zpos()
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/dce110/ |
| H A D | amdgpu_dce110_hw_sequencer.c | 251 const struct dc_plane_state *plane_state) in build_prescale_params() argument 255 switch (plane_state->format) { in build_prescale_params() 279 const struct dc_plane_state *plane_state) in dce110_set_input_transfer_func() argument 289 if (plane_state->in_transfer_func) in dce110_set_input_transfer_func() 290 tf = plane_state->in_transfer_func; in dce110_set_input_transfer_func() 292 build_prescale_params(&prescale_params, plane_state); in dce110_set_input_transfer_func() 295 if (plane_state->gamma_correction && in dce110_set_input_transfer_func() 296 !plane_state->gamma_correction->is_identity && in dce110_set_input_transfer_func() 297 dce_use_lut(plane_state->format)) in dce110_set_input_transfer_func() 298 ipp->funcs->ipp_program_input_lut(ipp, plane_state->gamma_correction); in dce110_set_input_transfer_func() [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/i915/ |
| H A D | intel_pm.c | 814 const struct intel_plane_state *plane_state) in intel_wm_plane_visible() argument 816 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_wm_plane_visible() 831 return plane_state->hw.fb != NULL; in intel_wm_plane_visible() 833 return plane_state->uapi.visible; in intel_wm_plane_visible() 1122 const struct intel_plane_state *plane_state, in g4x_compute_wm() argument 1125 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in g4x_compute_wm() 1135 if (!intel_wm_plane_visible(crtc_state, plane_state)) in g4x_compute_wm() 1138 cpp = plane_state->hw.fb->format->cpp[0]; in g4x_compute_wm() 1158 width = drm_rect_width(&plane_state->uapi.dst); in g4x_compute_wm() 1218 const struct intel_plane_state *plane_state, [all …]
|
| /netbsd-src/sys/external/bsd/drm2/dist/include/drm/ |
| H A D | drm_atomic_uapi.h | 52 drm_atomic_set_crtc_for_plane(struct drm_plane_state *plane_state, 54 void drm_atomic_set_fb_for_plane(struct drm_plane_state *plane_state, 56 void drm_atomic_set_fence_for_plane(struct drm_plane_state *plane_state,
|
| /netbsd-src/sys/external/bsd/drm2/dist/drm/amd/display/dc/calcs/ |
| H A D | amdgpu_dcn_calcs.c | 310 if (pipe->top_pipe != NULL && pipe->top_pipe->plane_state == pipe->plane_state) in pipe_ctx_to_e2e_pipe_params() 312 else if (pipe->bottom_pipe != NULL && pipe->bottom_pipe->plane_state == pipe->plane_state) in pipe_ctx_to_e2e_pipe_params() 320 input->src.dcc = pipe->plane_state->dcc.enable ? 1 : 0; in pipe_ctx_to_e2e_pipe_params() 331 dcc_support_pixel_format(pipe->plane_state->format, &bpe) ? 1 : 0; in pipe_ctx_to_e2e_pipe_params() 334 input->src.meta_pitch = pipe->plane_state->dcc.meta_pitch; in pipe_ctx_to_e2e_pipe_params() 336 input->src.sw_mode = pipe->plane_state->tiling_info.gfx9.swizzle; in pipe_ctx_to_e2e_pipe_params() 345 …input->src.macro_tile_size = swizzle_mode_to_macro_tile_size(pipe->plane_state->tiling_info.gfx9.s… in pipe_ctx_to_e2e_pipe_params() 347 switch (pipe->plane_state->rotation) { in pipe_ctx_to_e2e_pipe_params() 362 switch (pipe->plane_state->format) { in pipe_ctx_to_e2e_pipe_params() 508 pipe->plane_state->flip_immediate); in dcn_bw_calc_rq_dlg_ttu() [all …]
|