Lines Matching refs:plane

99 			       struct drm_plane *plane,
753 struct drm_plane *plane; in dm_resume() local
820 for_each_new_plane_in_state(dm->cached_state, plane, new_plane_state, i) { in dm_resume()
1508 struct amdgpu_plane *plane; in initialize_plane() local
1512 plane = kzalloc(sizeof(struct amdgpu_plane), GFP_KERNEL); in initialize_plane()
1513 mode_info->planes[plane_id] = plane; in initialize_plane()
1515 if (!plane) { in initialize_plane()
1519 plane->base.type = mode_info->plane_type[plane_id]; in initialize_plane()
3157 static void dm_drm_plane_reset(struct drm_plane *plane) in dm_drm_plane_reset() argument
3161 if (plane->state) in dm_drm_plane_reset()
3162 plane->funcs->atomic_destroy_state(plane, plane->state); in dm_drm_plane_reset()
3168 plane->state = &amdgpu_state->base; in dm_drm_plane_reset()
3169 plane->state->plane = plane; in dm_drm_plane_reset()
3170 plane->state->rotation = DRM_MODE_ROTATE_0; in dm_drm_plane_reset()
3175 dm_drm_plane_duplicate_state(struct drm_plane *plane) in dm_drm_plane_duplicate_state() argument
3179 old_dm_plane_state = to_dm_plane_state(plane->state); in dm_drm_plane_duplicate_state()
3184 __drm_atomic_helper_plane_duplicate_state(plane, &dm_plane_state->base); in dm_drm_plane_duplicate_state()
3195 void dm_drm_plane_destroy_state(struct drm_plane *plane, in dm_drm_plane_destroy_state() argument
3203 drm_atomic_helper_plane_destroy_state(plane, state); in dm_drm_plane_destroy_state()
3215 static int dm_plane_helper_prepare_fb(struct drm_plane *plane, in dm_plane_helper_prepare_fb() argument
3228 dm_plane_state_old = to_dm_plane_state(plane->state); in dm_plane_helper_prepare_fb()
3244 if (plane->type != DRM_PLANE_TYPE_CURSOR) in dm_plane_helper_prepare_fb()
3295 static void dm_plane_helper_cleanup_fb(struct drm_plane *plane, in dm_plane_helper_cleanup_fb() argument
3316 static int dm_plane_atomic_check(struct drm_plane *plane, in dm_plane_atomic_check() argument
3319 struct amdgpu_device *adev = plane->dev->dev_private; in dm_plane_atomic_check()
3417 struct drm_plane *plane, in amdgpu_dm_crtc_init() argument
3439 plane, in amdgpu_dm_crtc_init()
3966 static int get_cursor_position(struct drm_plane *plane, struct drm_crtc *crtc, in get_cursor_position() argument
3973 if (!crtc || !plane->state->fb) { in get_cursor_position()
3980 if ((plane->state->crtc_w > amdgpu_crtc->max_cursor_width) || in get_cursor_position()
3981 (plane->state->crtc_h > amdgpu_crtc->max_cursor_height)) { in get_cursor_position()
3984 plane->state->crtc_w, in get_cursor_position()
3985 plane->state->crtc_h); in get_cursor_position()
3989 x = plane->state->crtc_x; in get_cursor_position()
3990 y = plane->state->crtc_y; in get_cursor_position()
4011 static void handle_cursor_update(struct drm_plane *plane, in handle_cursor_update() argument
4014 struct amdgpu_framebuffer *afb = to_amdgpu_framebuffer(plane->state->fb); in handle_cursor_update()
4015 struct drm_crtc *crtc = afb ? plane->state->crtc : old_plane_state->crtc; in handle_cursor_update()
4023 if (!plane->state->fb && !old_plane_state->fb) in handle_cursor_update()
4029 plane->state->crtc_w, in handle_cursor_update()
4030 plane->state->crtc_h); in handle_cursor_update()
4032 ret = get_cursor_position(plane, crtc, &position); in handle_cursor_update()
4044 amdgpu_crtc->cursor_width = plane->state->crtc_w; in handle_cursor_update()
4045 amdgpu_crtc->cursor_height = plane->state->crtc_h; in handle_cursor_update()
4050 attributes.width = plane->state->crtc_w; in handle_cursor_update()
4051 attributes.height = plane->state->crtc_h; in handle_cursor_update()
4276 struct drm_plane *plane; in amdgpu_dm_commit_planes() local
4291 for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) { in amdgpu_dm_commit_planes()
4298 if (plane->type == DRM_PLANE_TYPE_CURSOR) { in amdgpu_dm_commit_planes()
4299 handle_cursor_update(plane, old_plane_state); in amdgpu_dm_commit_planes()
4322 if (!pflip_needed || plane->type == DRM_PLANE_TYPE_OVERLAY) { in amdgpu_dm_commit_planes()
4340 if (plane->type == DRM_PLANE_TYPE_PRIMARY) in amdgpu_dm_commit_planes()
4728 struct drm_plane *plane = disconnected_acrtc->base.primary; in dm_force_atomic_commit() local
4760 plane_state = drm_atomic_get_plane_state(state, plane); in dm_force_atomic_commit()
5065 struct drm_plane *plane; in dm_update_planes_state() local
5077 for_each_oldnew_plane_in_state_reverse(state, plane, old_plane_state, new_plane_state, i) { in dm_update_planes_state()
5084 if (plane->type == DRM_PLANE_TYPE_CURSOR) in dm_update_planes_state()
5090 plane->type != DRM_PLANE_TYPE_OVERLAY) in dm_update_planes_state()
5104 plane->base.id, old_plane_crtc->base.id); in dm_update_planes_state()
5125 if (drm_atomic_plane_disabling(plane->state, new_plane_state)) in dm_update_planes_state()
5138 plane->type != DRM_PLANE_TYPE_OVERLAY) in dm_update_planes_state()
5148 plane->base.id, new_plane_crtc->base.id); in dm_update_planes_state()