/Linux-v4.19/drivers/gpu/drm/selftests/ |
D | test-drm-helper.c | 26 static void set_src(struct drm_plane_state *plane_state, in set_src() argument 30 plane_state->src_x = src_x; in set_src() 31 plane_state->src_y = src_y; in set_src() 32 plane_state->src_w = src_w; in set_src() 33 plane_state->src_h = src_h; in set_src() 36 static bool check_src_eq(struct drm_plane_state *plane_state, in check_src_eq() argument 40 if (plane_state->src.x1 < 0) { in check_src_eq() 41 pr_err("src x coordinate %x should never be below 0.\n", plane_state->src.x1); in check_src_eq() 42 drm_rect_debug_print("src: ", &plane_state->src, true); in check_src_eq() 45 if (plane_state->src.y1 < 0) { in check_src_eq() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/core/ |
D | dc_surface.c | 38 static void construct(struct dc_context *ctx, struct dc_plane_state *plane_state) in construct() argument 40 plane_state->ctx = ctx; in construct() 42 plane_state->gamma_correction = dc_create_gamma(); in construct() 43 plane_state->gamma_correction->is_identity = true; in construct() 45 plane_state->in_transfer_func = dc_create_transfer_func(); in construct() 46 plane_state->in_transfer_func->type = TF_TYPE_BYPASS; in construct() 49 static void destruct(struct dc_plane_state *plane_state) in destruct() argument 51 if (plane_state->gamma_correction != NULL) { in destruct() 52 dc_gamma_release(&plane_state->gamma_correction); in destruct() 54 if (plane_state->in_transfer_func != NULL) { in destruct() [all …]
|
D | dc_debug.c | 67 const struct dc_plane_state *plane_state = plane_states[i]; in pre_surface_trace() local 81 plane_state->visible, in pre_surface_trace() 82 plane_state->flip_immediate, in pre_surface_trace() 83 plane_state->address.type, in pre_surface_trace() 84 plane_state->address.grph.addr.quad_part, in pre_surface_trace() 85 plane_state->address.grph.meta_addr.quad_part, in pre_surface_trace() 86 plane_state->scaling_quality.h_taps, in pre_surface_trace() 87 plane_state->scaling_quality.v_taps, in pre_surface_trace() 88 plane_state->scaling_quality.h_taps_c, in pre_surface_trace() 89 plane_state->scaling_quality.v_taps_c); in pre_surface_trace() [all …]
|
D | dc_resource.c | 479 const struct dc_plane_state *plane_state = pipe_ctx->plane_state; in calculate_viewport() local 482 struct rect surf_src = plane_state->src_rect; in calculate_viewport() 487 pipe_ctx->bottom_pipe->plane_state == pipe_ctx->plane_state; in calculate_viewport() 489 pipe_ctx->top_pipe->plane_state == pipe_ctx->plane_state; in calculate_viewport() 497 if (pipe_ctx->plane_state->rotation == ROTATION_ANGLE_90 || in calculate_viewport() 498 pipe_ctx->plane_state->rotation == ROTATION_ANGLE_270) in calculate_viewport() 504 clip.x = stream->src.x > plane_state->clip_rect.x ? in calculate_viewport() 505 stream->src.x : plane_state->clip_rect.x; in calculate_viewport() 508 plane_state->clip_rect.x + plane_state->clip_rect.width ? in calculate_viewport() 510 plane_state->clip_rect.x + plane_state->clip_rect.width - clip.x ; in calculate_viewport() [all …]
|
/Linux-v4.19/drivers/gpu/drm/ |
D | drm_plane_helper.c | 140 struct drm_plane_state plane_state = { in drm_plane_helper_check_update() local 162 ret = drm_atomic_helper_check_plane_state(&plane_state, &crtc_state, in drm_plane_helper_check_update() 169 *src = plane_state.src; in drm_plane_helper_check_update() 170 *dst = plane_state.dst; in drm_plane_helper_check_update() 171 *visible = plane_state.visible; in drm_plane_helper_check_update() 340 struct drm_plane_state *plane_state, in drm_plane_helper_commit() argument 354 crtc[1] = crtc[0] != plane_state->crtc ? plane_state->crtc : NULL; in drm_plane_helper_commit() 360 ret = plane_funcs->atomic_check(plane, plane_state); in drm_plane_helper_commit() 365 if (plane_funcs->prepare_fb && plane_state->fb != old_fb) { in drm_plane_helper_commit() 367 plane_state); in drm_plane_helper_commit() [all …]
|
D | drm_atomic_helper.c | 69 struct drm_plane_state *plane_state, in drm_atomic_helper_plane_changed() argument 84 if (plane_state->crtc) { in drm_atomic_helper_plane_changed() 85 crtc_state = drm_atomic_get_new_crtc_state(state, plane_state->crtc); in drm_atomic_helper_plane_changed() 720 int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, in drm_atomic_helper_check_plane_state() argument 727 struct drm_framebuffer *fb = plane_state->fb; in drm_atomic_helper_check_plane_state() 728 struct drm_rect *src = &plane_state->src; in drm_atomic_helper_check_plane_state() 729 struct drm_rect *dst = &plane_state->dst; in drm_atomic_helper_check_plane_state() 730 unsigned int rotation = plane_state->rotation; in drm_atomic_helper_check_plane_state() 734 WARN_ON(plane_state->crtc && plane_state->crtc != crtc_state->crtc); in drm_atomic_helper_check_plane_state() 736 *src = drm_plane_state_src(plane_state); in drm_atomic_helper_check_plane_state() [all …]
|
D | drm_atomic.c | 801 struct drm_plane_state *plane_state; in drm_atomic_get_plane_state() local 810 plane_state = drm_atomic_get_existing_plane_state(state, plane); in drm_atomic_get_plane_state() 811 if (plane_state) in drm_atomic_get_plane_state() 812 return plane_state; in drm_atomic_get_plane_state() 818 plane_state = plane->funcs->atomic_duplicate_state(plane); in drm_atomic_get_plane_state() 819 if (!plane_state) in drm_atomic_get_plane_state() 822 state->planes[index].state = plane_state; in drm_atomic_get_plane_state() 825 state->planes[index].new_state = plane_state; in drm_atomic_get_plane_state() 826 plane_state->state = state; in drm_atomic_get_plane_state() 829 plane->base.id, plane->name, plane_state, state); in drm_atomic_get_plane_state() [all …]
|
D | drm_crtc_helper.c | 1072 struct drm_plane_state *plane_state; in drm_helper_crtc_mode_set_base() local 1076 plane_state = plane->funcs->atomic_duplicate_state(plane); in drm_helper_crtc_mode_set_base() 1081 plane_state = drm_atomic_helper_plane_duplicate_state(plane); in drm_helper_crtc_mode_set_base() 1083 if (!plane_state) in drm_helper_crtc_mode_set_base() 1085 plane_state->plane = plane; in drm_helper_crtc_mode_set_base() 1087 plane_state->crtc = crtc; in drm_helper_crtc_mode_set_base() 1088 drm_atomic_set_fb_for_plane(plane_state, crtc->primary->fb); in drm_helper_crtc_mode_set_base() 1089 plane_state->crtc_x = 0; in drm_helper_crtc_mode_set_base() 1090 plane_state->crtc_y = 0; in drm_helper_crtc_mode_set_base() 1091 plane_state->crtc_h = crtc->mode.vdisplay; in drm_helper_crtc_mode_set_base() [all …]
|
D | drm_blend.c | 374 struct drm_plane_state *plane_state = in drm_atomic_helper_crtc_normalize_zpos() local 376 if (IS_ERR(plane_state)) { in drm_atomic_helper_crtc_normalize_zpos() 377 ret = PTR_ERR(plane_state); in drm_atomic_helper_crtc_normalize_zpos() 380 states[n++] = plane_state; in drm_atomic_helper_crtc_normalize_zpos() 383 plane_state->zpos); in drm_atomic_helper_crtc_normalize_zpos()
|
D | drm_simple_kms_helper.c | 131 struct drm_plane_state *plane_state) in drm_simple_kms_plane_atomic_check() argument 138 crtc_state = drm_atomic_get_new_crtc_state(plane_state->state, in drm_simple_kms_plane_atomic_check() 141 ret = drm_atomic_helper_check_plane_state(plane_state, crtc_state, in drm_simple_kms_plane_atomic_check() 148 if (!plane_state->visible) in drm_simple_kms_plane_atomic_check() 154 return pipe->funcs->check(pipe, plane_state, crtc_state); in drm_simple_kms_plane_atomic_check()
|
/Linux-v4.19/drivers/gpu/drm/i915/ |
D | intel_sprite.c | 234 const struct intel_plane_state *plane_state) in skl_update_plane() argument 237 const struct drm_framebuffer *fb = plane_state->base.fb; in skl_update_plane() 240 u32 plane_ctl = plane_state->ctl; in skl_update_plane() 241 const struct drm_intel_sprite_colorkey *key = &plane_state->ckey; in skl_update_plane() 242 u32 surf_addr = plane_state->main.offset; in skl_update_plane() 243 unsigned int rotation = plane_state->base.rotation; in skl_update_plane() 246 int crtc_x = plane_state->base.dst.x1; in skl_update_plane() 247 int crtc_y = plane_state->base.dst.y1; in skl_update_plane() 248 uint32_t crtc_w = drm_rect_width(&plane_state->base.dst); in skl_update_plane() 249 uint32_t crtc_h = drm_rect_height(&plane_state->base.dst); in skl_update_plane() [all …]
|
D | intel_fbc.c | 416 struct intel_plane_state *plane_state) in multiple_pipes_ok() argument 426 if (plane_state->base.visible) in multiple_pipes_ok() 650 struct intel_plane_state *plane_state) in intel_fbc_update_state_cache() argument 655 struct drm_framebuffer *fb = plane_state->base.fb; in intel_fbc_update_state_cache() 664 cache->plane.rotation = plane_state->base.rotation; in intel_fbc_update_state_cache() 670 cache->plane.src_w = drm_rect_width(&plane_state->base.src) >> 16; in intel_fbc_update_state_cache() 671 cache->plane.src_h = drm_rect_height(&plane_state->base.src) >> 16; in intel_fbc_update_state_cache() 672 cache->plane.visible = plane_state->base.visible; in intel_fbc_update_state_cache() 673 cache->plane.adjusted_x = plane_state->main.x; in intel_fbc_update_state_cache() 674 cache->plane.adjusted_y = plane_state->main.y; in intel_fbc_update_state_cache() [all …]
|
D | intel_display.c | 2072 static bool intel_plane_uses_fence(const struct intel_plane_state *plane_state) in intel_plane_uses_fence() argument 2074 struct intel_plane *plane = to_intel_plane(plane_state->base.plane); in intel_plane_uses_fence() 2750 struct intel_plane_state *plane_state, in intel_set_plane_visible() argument 2753 struct intel_plane *plane = to_intel_plane(plane_state->base.plane); in intel_set_plane_visible() 2755 plane_state->base.visible = visible; in intel_set_plane_visible() 2776 struct intel_plane_state *plane_state = in intel_plane_disable_noatomic() local 2779 intel_set_plane_visible(crtc_state, plane_state, false); in intel_plane_disable_noatomic() 2797 struct drm_plane_state *plane_state = primary->state; in intel_find_initial_plane_obj() local 2801 to_intel_plane_state(plane_state); in intel_find_initial_plane_obj() 2869 plane_state->src_x = 0; in intel_find_initial_plane_obj() [all …]
|
D | intel_atomic.c | 229 struct intel_plane_state *plane_state = NULL; in intel_atomic_setup_scalers() local 311 plane_state = intel_atomic_get_new_plane_state(intel_state, in intel_atomic_setup_scalers() 313 scaler_id = &plane_state->scaler_id; in intel_atomic_setup_scalers() 336 plane_state && plane_state->base.fb && in intel_atomic_setup_scalers() 337 plane_state->base.fb->format->format == in intel_atomic_setup_scalers()
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dcn10/ |
D | dcn10_hw_sequencer.c | 933 pipe_ctx->plane_state = NULL; in plane_atomic_disable() 1129 struct dc_plane_state *plane_state = pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() local 1131 pipe_ctx->top_pipe->plane_state == pipe_ctx->plane_state; in patch_address_for_sbs_tb_stereo() 1132 if (sec_split && plane_state->address.type == PLN_ADDR_TYPE_GRPH_STEREO && in patch_address_for_sbs_tb_stereo() 1137 *addr = plane_state->address.grph_stereo.left_addr; in patch_address_for_sbs_tb_stereo() 1138 plane_state->address.grph_stereo.left_addr = in patch_address_for_sbs_tb_stereo() 1139 plane_state->address.grph_stereo.right_addr; in patch_address_for_sbs_tb_stereo() 1143 plane_state->address.type != PLN_ADDR_TYPE_GRPH_STEREO) { in patch_address_for_sbs_tb_stereo() 1144 plane_state->address.type = PLN_ADDR_TYPE_GRPH_STEREO; in patch_address_for_sbs_tb_stereo() 1145 plane_state->address.grph_stereo.right_addr = in patch_address_for_sbs_tb_stereo() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/dce110/ |
D | dce110_hw_sequencer.c | 240 const struct dc_plane_state *plane_state) in build_prescale_params() argument 244 switch (plane_state->format) { in build_prescale_params() 265 const struct dc_plane_state *plane_state) in dce110_set_input_transfer_func() argument 275 if (plane_state->in_transfer_func) in dce110_set_input_transfer_func() 276 tf = plane_state->in_transfer_func; in dce110_set_input_transfer_func() 278 build_prescale_params(&prescale_params, plane_state); in dce110_set_input_transfer_func() 281 if (plane_state->gamma_correction && in dce110_set_input_transfer_func() 282 !plane_state->gamma_correction->is_identity && in dce110_set_input_transfer_func() 283 dce_use_lut(plane_state->format)) in dce110_set_input_transfer_func() 284 ipp->funcs->ipp_program_input_lut(ipp, plane_state->gamma_correction); in dce110_set_input_transfer_func() [all …]
|
/Linux-v4.19/include/drm/ |
D | drm_simple_kms_helper.h | 68 struct drm_plane_state *plane_state); 96 struct drm_plane_state *plane_state, 124 struct drm_plane_state *plane_state); 134 struct drm_plane_state *plane_state);
|
D | drm_atomic_helper.h | 41 int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state, 119 struct drm_plane_state *plane_state); 232 #define drm_atomic_crtc_state_for_each_plane_state(plane, plane_state, crtc_state) \ argument 234 for_each_if ((plane_state = \
|
/Linux-v4.19/drivers/gpu/drm/mediatek/ |
D | mtk_drm_crtc.c | 292 struct mtk_plane_state *plane_state; in mtk_crtc_ddp_hw_init() local 294 plane_state = to_mtk_plane_state(plane->state); in mtk_crtc_ddp_hw_init() 296 plane_state); in mtk_crtc_ddp_hw_init() 357 struct mtk_plane_state *plane_state; in mtk_crtc_ddp_config() local 359 plane_state = to_mtk_plane_state(plane->state); in mtk_crtc_ddp_config() 361 if (plane_state->pending.config) { in mtk_crtc_ddp_config() 362 mtk_ddp_comp_layer_config(comp, i, plane_state); in mtk_crtc_ddp_config() 363 plane_state->pending.config = false; in mtk_crtc_ddp_config() 409 struct mtk_plane_state *plane_state; in mtk_drm_crtc_atomic_disable() local 411 plane_state = to_mtk_plane_state(plane->state); in mtk_drm_crtc_atomic_disable() [all …]
|
/Linux-v4.19/drivers/gpu/drm/zte/ |
D | zx_plane.c | 53 struct drm_plane_state *plane_state) in zx_vl_plane_atomic_check() argument 55 struct drm_framebuffer *fb = plane_state->fb; in zx_vl_plane_atomic_check() 56 struct drm_crtc *crtc = plane_state->crtc; in zx_vl_plane_atomic_check() 64 crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state, in zx_vl_plane_atomic_check() 74 if (!plane_state->crtc) in zx_vl_plane_atomic_check() 77 return drm_atomic_helper_check_plane_state(plane_state, crtc_state, in zx_vl_plane_atomic_check() 284 struct drm_plane_state *plane_state) in zx_gl_plane_atomic_check() argument 286 struct drm_framebuffer *fb = plane_state->fb; in zx_gl_plane_atomic_check() 287 struct drm_crtc *crtc = plane_state->crtc; in zx_gl_plane_atomic_check() 293 crtc_state = drm_atomic_get_existing_crtc_state(plane_state->state, in zx_gl_plane_atomic_check() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm.c | 1908 struct dc_plane_state *plane_state) in fill_rects_from_plane_state() argument 1910 plane_state->src_rect.x = state->src_x >> 16; in fill_rects_from_plane_state() 1911 plane_state->src_rect.y = state->src_y >> 16; in fill_rects_from_plane_state() 1913 plane_state->src_rect.width = state->src_w >> 16; in fill_rects_from_plane_state() 1915 if (plane_state->src_rect.width == 0) in fill_rects_from_plane_state() 1918 plane_state->src_rect.height = state->src_h >> 16; in fill_rects_from_plane_state() 1919 if (plane_state->src_rect.height == 0) in fill_rects_from_plane_state() 1922 plane_state->dst_rect.x = state->crtc_x; in fill_rects_from_plane_state() 1923 plane_state->dst_rect.y = state->crtc_y; in fill_rects_from_plane_state() 1928 plane_state->dst_rect.width = state->crtc_w; in fill_rects_from_plane_state() [all …]
|
/Linux-v4.19/drivers/gpu/drm/imx/ |
D | ipuv3-plane.c | 730 struct drm_plane_state *plane_state; in ipu_planes_assign_pre() local 752 for_each_new_plane_in_state(state, plane, plane_state, i) { in ipu_planes_assign_pre() 753 ipu_state = to_ipu_plane_state(plane_state); in ipu_planes_assign_pre() 756 if (!plane_state->fb) { in ipu_planes_assign_pre() 761 if (!(plane_state->fb->flags & DRM_MODE_FB_MODIFIERS) || in ipu_planes_assign_pre() 762 plane_state->fb->modifier == DRM_FORMAT_MOD_LINEAR) in ipu_planes_assign_pre() 769 plane_state->fb->format->format, in ipu_planes_assign_pre() 770 plane_state->fb->modifier)) in ipu_planes_assign_pre() 777 for_each_new_plane_in_state(state, plane, plane_state, i) { in ipu_planes_assign_pre() 778 ipu_state = to_ipu_plane_state(plane_state); in ipu_planes_assign_pre() [all …]
|
/Linux-v4.19/drivers/gpu/drm/armada/ |
D | armada_overlay.c | 258 struct drm_plane_state *plane_state; in armada_overlay_plane_update() local 270 plane_state = drm_atomic_get_plane_state(state, plane); in armada_overlay_plane_update() 271 if (IS_ERR(plane_state)) { in armada_overlay_plane_update() 272 ret = PTR_ERR(plane_state); in armada_overlay_plane_update() 276 ret = drm_atomic_set_crtc_for_plane(plane_state, crtc); in armada_overlay_plane_update() 280 drm_atomic_set_fb_for_plane(plane_state, fb); in armada_overlay_plane_update() 281 plane_state->crtc_x = crtc_x; in armada_overlay_plane_update() 282 plane_state->crtc_y = crtc_y; in armada_overlay_plane_update() 283 plane_state->crtc_h = crtc_h; in armada_overlay_plane_update() 284 plane_state->crtc_w = crtc_w; in armada_overlay_plane_update() [all …]
|
/Linux-v4.19/drivers/gpu/drm/amd/display/dc/calcs/ |
D | dcn_calcs.c | 248 if (pipe->top_pipe != NULL && pipe->top_pipe->plane_state == pipe->plane_state) in pipe_ctx_to_e2e_pipe_params() 250 else if (pipe->bottom_pipe != NULL && pipe->bottom_pipe->plane_state == pipe->plane_state) in pipe_ctx_to_e2e_pipe_params() 258 input->src.dcc = pipe->plane_state->dcc.enable ? 1 : 0; in pipe_ctx_to_e2e_pipe_params() 269 dcc_support_pixel_format(pipe->plane_state->format, &bpe) ? 1 : 0; in pipe_ctx_to_e2e_pipe_params() 272 input->src.meta_pitch = pipe->plane_state->dcc.grph.meta_pitch; in pipe_ctx_to_e2e_pipe_params() 274 input->src.sw_mode = pipe->plane_state->tiling_info.gfx9.swizzle; in pipe_ctx_to_e2e_pipe_params() 283 switch (pipe->plane_state->tiling_info.gfx9.swizzle) { in pipe_ctx_to_e2e_pipe_params() 331 switch (pipe->plane_state->rotation) { in pipe_ctx_to_e2e_pipe_params() 346 switch (pipe->plane_state->format) { in pipe_ctx_to_e2e_pipe_params() 492 pipe->plane_state->flip_immediate); in dcn_bw_calc_rq_dlg_ttu() [all …]
|
/Linux-v4.19/drivers/gpu/drm/xen/ |
D | xen_drm_front_kms.c | 112 struct drm_plane_state *plane_state) in display_enable() argument 117 struct drm_framebuffer *fb = plane_state->fb; in display_enable() 185 struct drm_plane_state *plane_state = in display_send_page_flip() local 197 if (old_plane_state->fb && plane_state->fb) { in display_send_page_flip() 208 xen_drm_front_fb_to_cookie(plane_state->fb)); in display_send_page_flip()
|