| /Linux-v5.15/drivers/gpu/drm/selftests/ |
| D | test-drm_plane_helper.c | 14 static void set_src(struct drm_plane_state *plane_state, in set_src() argument 18 plane_state->src_x = src_x; in set_src() 19 plane_state->src_y = src_y; in set_src() 20 plane_state->src_w = src_w; in set_src() 21 plane_state->src_h = src_h; in set_src() 24 static bool check_src_eq(struct drm_plane_state *plane_state, in check_src_eq() argument 28 if (plane_state->src.x1 < 0) { in check_src_eq() 29 pr_err("src x coordinate %x should never be below 0.\n", plane_state->src.x1); in check_src_eq() 30 drm_rect_debug_print("src: ", &plane_state->src, true); in check_src_eq() 33 if (plane_state->src.y1 < 0) { in check_src_eq() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/core/ |
| D | dc_surface.c | 40 static void dc_plane_construct(struct dc_context *ctx, struct dc_plane_state *plane_state) in dc_plane_construct() argument 42 plane_state->ctx = ctx; in dc_plane_construct() 44 plane_state->gamma_correction = dc_create_gamma(); in dc_plane_construct() 45 if (plane_state->gamma_correction != NULL) in dc_plane_construct() 46 plane_state->gamma_correction->is_identity = true; in dc_plane_construct() 48 plane_state->in_transfer_func = dc_create_transfer_func(); in dc_plane_construct() 49 if (plane_state->in_transfer_func != NULL) { in dc_plane_construct() 50 plane_state->in_transfer_func->type = TF_TYPE_BYPASS; in dc_plane_construct() 52 plane_state->in_shaper_func = dc_create_transfer_func(); in dc_plane_construct() 53 if (plane_state->in_shaper_func != NULL) { in dc_plane_construct() [all …]
|
| D | dc_debug.c | 66 const struct dc_plane_state *plane_state = plane_states[i]; in pre_surface_trace() local 80 plane_state->visible, in pre_surface_trace() 81 plane_state->flip_immediate, in pre_surface_trace() 82 plane_state->address.type, in pre_surface_trace() 83 plane_state->address.grph.addr.quad_part, in pre_surface_trace() 84 plane_state->address.grph.meta_addr.quad_part, in pre_surface_trace() 85 plane_state->scaling_quality.h_taps, in pre_surface_trace() 86 plane_state->scaling_quality.v_taps, in pre_surface_trace() 87 plane_state->scaling_quality.h_taps_c, in pre_surface_trace() 88 plane_state->scaling_quality.v_taps_c); in pre_surface_trace() [all …]
|
| D | dc_resource.c | 662 while (other_pipe && other_pipe->plane_state == pipe->plane_state) { in get_num_mpc_splits() 667 while (other_pipe && other_pipe->plane_state == pipe->plane_state) { in get_num_mpc_splits() 700 while (split_pipe && split_pipe->plane_state == pipe_ctx->plane_state) { in calculate_split_count_and_index() 727 if (pipe_ctx->plane_state->rotation == ROTATION_ANGLE_90 || in calculate_viewport_size() 728 pipe_ctx->plane_state->rotation == ROTATION_ANGLE_270) { in calculate_viewport_size() 736 const struct dc_plane_state *plane_state = pipe_ctx->plane_state; in calculate_recout() local 739 struct rect surf_clip = plane_state->clip_rect; in calculate_recout() 810 const struct dc_plane_state *plane_state = pipe_ctx->plane_state; in calculate_scaling_ratios() local 812 struct rect surf_src = plane_state->src_rect; in calculate_scaling_ratios() 819 if (pipe_ctx->plane_state->rotation == ROTATION_ANGLE_90 || in calculate_scaling_ratios() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/i915/display/ |
| D | intel_cursor.c | 36 static u32 intel_cursor_base(const struct intel_plane_state *plane_state) in intel_cursor_base() argument 39 to_i915(plane_state->uapi.plane->dev); in intel_cursor_base() 40 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_cursor_base() 47 base = intel_plane_ggtt_offset(plane_state); in intel_cursor_base() 49 return base + plane_state->view.color_plane[0].offset; in intel_cursor_base() 52 static u32 intel_cursor_position(const struct intel_plane_state *plane_state) in intel_cursor_position() argument 54 int x = plane_state->uapi.dst.x1; in intel_cursor_position() 55 int y = plane_state->uapi.dst.y1; in intel_cursor_position() 73 static bool intel_cursor_size_ok(const struct intel_plane_state *plane_state) in intel_cursor_size_ok() argument 76 &plane_state->uapi.plane->dev->mode_config; in intel_cursor_size_ok() [all …]
|
| D | intel_atomic_plane.c | 45 static void intel_plane_state_reset(struct intel_plane_state *plane_state, in intel_plane_state_reset() argument 48 memset(plane_state, 0, sizeof(*plane_state)); in intel_plane_state_reset() 50 __drm_atomic_helper_plane_state_reset(&plane_state->uapi, &plane->base); in intel_plane_state_reset() 52 plane_state->scaler_id = -1; in intel_plane_state_reset() 57 struct intel_plane_state *plane_state; in intel_plane_alloc() local 64 plane_state = kzalloc(sizeof(*plane_state), GFP_KERNEL); in intel_plane_alloc() 65 if (!plane_state) { in intel_plane_alloc() 70 intel_plane_state_reset(plane_state, plane); in intel_plane_alloc() 72 plane->base.state = &plane_state->uapi; in intel_plane_alloc() 128 struct intel_plane_state *plane_state = to_intel_plane_state(state); in intel_plane_destroy_state() local [all …]
|
| D | intel_sprite.c | 53 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state) in intel_plane_check_src_coordinates() argument 55 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_check_src_coordinates() 56 struct drm_rect *src = &plane_state->uapi.src; in intel_plane_check_src_coordinates() 58 bool rotated = drm_rotation_90_or_270(plane_state->hw.rotation); in intel_plane_check_src_coordinates() 121 chv_update_csc(const struct intel_plane_state *plane_state) in chv_update_csc() argument 123 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in chv_update_csc() 125 const struct drm_framebuffer *fb = plane_state->hw.fb; in chv_update_csc() 151 const s16 *csc = csc_matrix[plane_state->hw.color_encoding]; in chv_update_csc() 193 vlv_update_clrc(const struct intel_plane_state *plane_state) in vlv_update_clrc() argument 195 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in vlv_update_clrc() [all …]
|
| D | skl_universal_plane.c | 298 const struct intel_plane_state *plane_state) in icl_plane_min_cdclk() argument 300 unsigned int pixel_rate = intel_plane_pixel_rate(crtc_state, plane_state); in icl_plane_min_cdclk() 307 glk_plane_ratio(const struct intel_plane_state *plane_state, in glk_plane_ratio() argument 310 const struct drm_framebuffer *fb = plane_state->hw.fb; in glk_plane_ratio() 322 const struct intel_plane_state *plane_state) in glk_plane_min_cdclk() argument 324 unsigned int pixel_rate = intel_plane_pixel_rate(crtc_state, plane_state); in glk_plane_min_cdclk() 327 glk_plane_ratio(plane_state, &num, &den); in glk_plane_min_cdclk() 334 skl_plane_ratio(const struct intel_plane_state *plane_state, in skl_plane_ratio() argument 337 const struct drm_framebuffer *fb = plane_state->hw.fb; in skl_plane_ratio() 349 const struct intel_plane_state *plane_state) in skl_plane_min_cdclk() argument [all …]
|
| D | i9xx_plane.c | 156 const struct intel_plane_state *plane_state) in i9xx_plane_ctl() argument 159 to_i915(plane_state->uapi.plane->dev); in i9xx_plane_ctl() 160 const struct drm_framebuffer *fb = plane_state->hw.fb; in i9xx_plane_ctl() 161 unsigned int rotation = plane_state->hw.rotation; in i9xx_plane_ctl() 228 int i9xx_check_plane_surface(struct intel_plane_state *plane_state) in i9xx_check_plane_surface() argument 231 to_i915(plane_state->uapi.plane->dev); in i9xx_check_plane_surface() 232 const struct drm_framebuffer *fb = plane_state->hw.fb; in i9xx_check_plane_surface() 237 ret = intel_plane_compute_gtt(plane_state); in i9xx_check_plane_surface() 241 if (!plane_state->uapi.visible) in i9xx_check_plane_surface() 244 src_w = drm_rect_width(&plane_state->uapi.src) >> 16; in i9xx_check_plane_surface() [all …]
|
| D | intel_atomic_plane.h | 24 const struct intel_plane_state *plane_state); 27 const struct intel_plane_state *plane_state); 28 void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state, 31 void intel_plane_copy_hw_state(struct intel_plane_state *plane_state, 35 const struct intel_plane_state *plane_state); 56 struct intel_plane_state *plane_state); 60 int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state, 65 struct intel_plane_state *plane_state);
|
| D | skl_scaler.c | 214 struct intel_plane_state *plane_state) in skl_update_scaler_plane() argument 217 to_intel_plane(plane_state->uapi.plane); in skl_update_scaler_plane() 219 struct drm_framebuffer *fb = plane_state->hw.fb; in skl_update_scaler_plane() 221 bool force_detach = !fb || !plane_state->uapi.visible; in skl_update_scaler_plane() 231 &plane_state->scaler_id, in skl_update_scaler_plane() 232 drm_rect_width(&plane_state->uapi.src) >> 16, in skl_update_scaler_plane() 233 drm_rect_height(&plane_state->uapi.src) >> 16, in skl_update_scaler_plane() 234 drm_rect_width(&plane_state->uapi.dst), in skl_update_scaler_plane() 235 drm_rect_height(&plane_state->uapi.dst), in skl_update_scaler_plane() 240 if (ret || plane_state->scaler_id < 0) in skl_update_scaler_plane() [all …]
|
| D | intel_fb.c | 450 static bool intel_plane_can_remap(const struct intel_plane_state *plane_state) in intel_plane_can_remap() argument 452 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_can_remap() 454 const struct drm_framebuffer *fb = plane_state->hw.fb; in intel_plane_can_remap() 508 static bool intel_plane_needs_remap(const struct intel_plane_state *plane_state) in intel_plane_needs_remap() argument 510 struct intel_plane *plane = to_intel_plane(plane_state->uapi.plane); in intel_plane_needs_remap() 511 const struct intel_framebuffer *fb = to_intel_framebuffer(plane_state->hw.fb); in intel_plane_needs_remap() 512 unsigned int rotation = plane_state->hw.rotation; in intel_plane_needs_remap() 519 if (!plane_state->uapi.visible) in intel_plane_needs_remap() 522 if (!intel_plane_can_remap(plane_state)) in intel_plane_needs_remap() 847 static void intel_plane_remap_gtt(struct intel_plane_state *plane_state) in intel_plane_remap_gtt() argument [all …]
|
| D | intel_sprite.h | 38 int intel_plane_check_src_coordinates(struct intel_plane_state *plane_state); 39 int chv_plane_check_rotation(const struct intel_plane_state *plane_state); 48 const struct intel_plane_state *plane_state); 50 const struct intel_plane_state *plane_state); 52 const struct intel_plane_state *plane_state);
|
| D | intel_fbc.c | 691 const struct intel_plane_state *plane_state) in intel_fbc_update_state_cache() argument 696 struct drm_framebuffer *fb = plane_state->hw.fb; in intel_fbc_update_state_cache() 698 cache->plane.visible = plane_state->uapi.visible; in intel_fbc_update_state_cache() 706 cache->plane.rotation = plane_state->hw.rotation; in intel_fbc_update_state_cache() 712 cache->plane.src_w = drm_rect_width(&plane_state->uapi.src) >> 16; in intel_fbc_update_state_cache() 713 cache->plane.src_h = drm_rect_height(&plane_state->uapi.src) >> 16; in intel_fbc_update_state_cache() 714 cache->plane.adjusted_x = plane_state->view.color_plane[0].x; in intel_fbc_update_state_cache() 715 cache->plane.adjusted_y = plane_state->view.color_plane[0].y; in intel_fbc_update_state_cache() 717 cache->plane.pixel_blend_mode = plane_state->hw.pixel_blend_mode; in intel_fbc_update_state_cache() 723 cache->fb.stride = plane_state->view.color_plane[0].stride; in intel_fbc_update_state_cache() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/ |
| D | drm_gem_atomic_helper.c | 175 struct drm_plane_state *plane_state) in drm_gem_simple_display_pipe_prepare_fb() argument 177 return drm_gem_plane_helper_prepare_fb(&pipe->plane, plane_state); in drm_gem_simple_display_pipe_prepare_fb() 226 struct drm_plane_state *plane_state = plane->state; in drm_gem_duplicate_shadow_plane_state() local 229 if (!plane_state) in drm_gem_duplicate_shadow_plane_state() 264 struct drm_plane_state *plane_state) in drm_gem_destroy_shadow_plane_state() argument 267 to_drm_shadow_plane_state(plane_state); in drm_gem_destroy_shadow_plane_state() 329 int drm_gem_prepare_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state) in drm_gem_prepare_shadow_fb() argument 331 struct drm_shadow_plane_state *shadow_plane_state = to_drm_shadow_plane_state(plane_state); in drm_gem_prepare_shadow_fb() 332 struct drm_framebuffer *fb = plane_state->fb; in drm_gem_prepare_shadow_fb() 338 ret = drm_gem_plane_helper_prepare_fb(plane, plane_state); in drm_gem_prepare_shadow_fb() [all …]
|
| D | drm_damage_helper.c | 67 struct drm_plane_state *plane_state) in drm_atomic_helper_check_plane_damage() argument 71 if (plane_state->crtc) { in drm_atomic_helper_check_plane_damage() 73 plane_state->crtc); in drm_atomic_helper_check_plane_damage() 79 drm_property_blob_put(plane_state->fb_damage_clips); in drm_atomic_helper_check_plane_damage() 80 plane_state->fb_damage_clips = NULL; in drm_atomic_helper_check_plane_damage() 159 struct drm_plane_state *plane_state; in drm_atomic_helper_dirtyfb() local 170 plane_state = drm_atomic_get_plane_state(state, plane); in drm_atomic_helper_dirtyfb() 171 if (IS_ERR(plane_state)) { in drm_atomic_helper_dirtyfb() 172 ret = PTR_ERR(plane_state); in drm_atomic_helper_dirtyfb() 176 drm_property_replace_blob(&plane_state->fb_damage_clips, in drm_atomic_helper_dirtyfb()
|
| D | drm_atomic_helper.c | 78 struct drm_plane_state *plane_state, in drm_atomic_helper_plane_changed() argument 93 if (plane_state->crtc) { in drm_atomic_helper_plane_changed() 94 crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc); in drm_atomic_helper_plane_changed() 790 int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, in drm_atomic_helper_check_plane_state() argument 797 struct drm_framebuffer *fb = plane_state->fb; in drm_atomic_helper_check_plane_state() 798 struct drm_rect *src = &plane_state->src; in drm_atomic_helper_check_plane_state() 799 struct drm_rect *dst = &plane_state->dst; in drm_atomic_helper_check_plane_state() 800 unsigned int rotation = plane_state->rotation; in drm_atomic_helper_check_plane_state() 804 WARN_ON(plane_state->crtc && plane_state->crtc != crtc_state->crtc); in drm_atomic_helper_check_plane_state() 806 *src = drm_plane_state_src(plane_state); in drm_atomic_helper_check_plane_state() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/dce60/ |
| D | dce60_hw_sequencer.c | 101 if (!pipe_ctx->plane_state) in dce60_should_enable_fbc() 105 if (pipe_ctx->plane_state->tiling_info.gfx8.array_mode == DC_ARRAY_LINEAR_GENERAL) in dce60_should_enable_fbc() 148 default_adjust.in_color_space = pipe_ctx->plane_state->color_space; in dce60_set_default_colors() 188 if (!pipe_ctx->plane_state->visible) in dce60_program_surface_visibility() 274 struct dc_plane_state *plane_state = pipe_ctx->plane_state; in dce60_program_front_end_for_pipe() local 318 plane_state->format, in dce60_program_front_end_for_pipe() 319 &plane_state->tiling_info, in dce60_program_front_end_for_pipe() 320 &plane_state->plane_size, in dce60_program_front_end_for_pipe() 321 plane_state->rotation, in dce60_program_front_end_for_pipe() 325 mi->funcs->set_blank(mi, pipe_ctx->plane_state->visible); in dce60_program_front_end_for_pipe() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/basics/ |
| D | dc_common.c | 54 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_lower_pipe_tree_visible() 63 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_upper_pipe_tree_visible() 72 if (pipe_ctx->plane_state && pipe_ctx->plane_state->visible) in is_pipe_tree_visible() 82 const struct dc_plane_state *plane_state) in build_prescale_params() argument 84 if (plane_state->format >= SURFACE_PIXEL_FORMAT_VIDEO_BEGIN in build_prescale_params() 85 && plane_state->format != SURFACE_PIXEL_FORMAT_INVALID in build_prescale_params() 86 && plane_state->input_csc_color_matrix.enable_adjustment in build_prescale_params() 87 && plane_state->coeff_reduction_factor.value != 0) { in build_prescale_params() 89 dc_fixpt_mul(plane_state->coeff_reduction_factor, in build_prescale_params()
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/dcn20/ |
| D | dcn20_hwseq.c | 598 pipe_ctx->plane_state = NULL; in dcn20_plane_atomic_disable() 833 struct pipe_ctx *pipe_ctx, const struct dc_plane_state *plane_state) in dcn20_set_blend_lut() argument 839 if (plane_state->blend_tf) { in dcn20_set_blend_lut() 840 if (plane_state->blend_tf->type == TF_TYPE_HWPWL) in dcn20_set_blend_lut() 841 blend_lut = &plane_state->blend_tf->pwl; in dcn20_set_blend_lut() 842 else if (plane_state->blend_tf->type == TF_TYPE_DISTRIBUTED_POINTS) { in dcn20_set_blend_lut() 844 plane_state->blend_tf, in dcn20_set_blend_lut() 855 struct pipe_ctx *pipe_ctx, const struct dc_plane_state *plane_state) in dcn20_set_shaper_3dlut() argument 861 if (plane_state->in_shaper_func) { in dcn20_set_shaper_3dlut() 862 if (plane_state->in_shaper_func->type == TF_TYPE_HWPWL) in dcn20_set_shaper_3dlut() [all …]
|
| /Linux-v5.15/include/drm/ |
| D | drm_gem_atomic_helper.h | 19 struct drm_plane_state *plane_state); 74 struct drm_plane_state *plane_state); 88 int drm_gem_prepare_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state); 89 void drm_gem_cleanup_shadow_fb(struct drm_plane *plane, struct drm_plane_state *plane_state); 104 struct drm_plane_state *plane_state); 106 struct drm_plane_state *plane_state); 111 struct drm_plane_state *plane_state);
|
| D | drm_simple_kms_helper.h | 64 struct drm_plane_state *plane_state); 92 struct drm_plane_state *plane_state, 126 struct drm_plane_state *plane_state); 136 struct drm_plane_state *plane_state); 208 struct drm_plane_state *plane_state);
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/dcn10/ |
| D | dcn10_hw_sequencer.c | 110 !pipe_ctx->stream || !pipe_ctx->plane_state || in dcn10_lock_all_pipes() 1175 pipe_ctx->plane_state = NULL; in dcn10_plane_atomic_disable() 1579 struct dc_plane_state *plane_state = pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() local 1581 pipe_ctx->top_pipe->plane_state == pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() 1582 if (sec_split && plane_state->address.type == PLN_ADDR_TYPE_GRPH_STEREO && in patch_address_for_sbs_tb_stereo() 1587 *addr = plane_state->address.grph_stereo.left_addr; in patch_address_for_sbs_tb_stereo() 1588 plane_state->address.grph_stereo.left_addr = in patch_address_for_sbs_tb_stereo() 1589 plane_state->address.grph_stereo.right_addr; in patch_address_for_sbs_tb_stereo() 1593 plane_state->address.type != PLN_ADDR_TYPE_GRPH_STEREO) { in patch_address_for_sbs_tb_stereo() 1594 plane_state->address.type = PLN_ADDR_TYPE_GRPH_STEREO; in patch_address_for_sbs_tb_stereo() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/mediatek/ |
| D | mtk_drm_crtc.c | 304 struct mtk_plane_state *plane_state; in mtk_crtc_ddp_hw_init() local 308 plane_state = to_mtk_plane_state(plane->state); in mtk_crtc_ddp_hw_init() 312 plane_state, NULL); in mtk_crtc_ddp_hw_init() 387 struct mtk_plane_state *plane_state; in mtk_crtc_ddp_config() local 389 plane_state = to_mtk_plane_state(plane->state); in mtk_crtc_ddp_config() 391 if (!plane_state->pending.config) in mtk_crtc_ddp_config() 399 plane_state, in mtk_crtc_ddp_config() 401 plane_state->pending.config = false; in mtk_crtc_ddp_config() 409 struct mtk_plane_state *plane_state; in mtk_crtc_ddp_config() local 411 plane_state = to_mtk_plane_state(plane->state); in mtk_crtc_ddp_config() [all …]
|
| /Linux-v5.15/drivers/gpu/drm/amd/display/dc/dce110/ |
| D | dce110_hw_sequencer.c | 254 const struct dc_plane_state *plane_state) in build_prescale_params() argument 258 switch (plane_state->format) { in build_prescale_params() 283 const struct dc_plane_state *plane_state) in dce110_set_input_transfer_func() argument 293 if (plane_state->in_transfer_func) in dce110_set_input_transfer_func() 294 tf = plane_state->in_transfer_func; in dce110_set_input_transfer_func() 296 build_prescale_params(&prescale_params, plane_state); in dce110_set_input_transfer_func() 299 if (plane_state->gamma_correction && in dce110_set_input_transfer_func() 300 !plane_state->gamma_correction->is_identity && in dce110_set_input_transfer_func() 301 dce_use_lut(plane_state->format)) in dce110_set_input_transfer_func() 302 ipp->funcs->ipp_program_input_lut(ipp, plane_state->gamma_correction); in dce110_set_input_transfer_func() [all …]
|