intel_atomic_plane.h (2854B)
1/* SPDX-License-Identifier: MIT */ 2/* 3 * Copyright © 2019 Intel Corporation 4 */ 5 6#ifndef __INTEL_ATOMIC_PLANE_H__ 7#define __INTEL_ATOMIC_PLANE_H__ 8 9#include <linux/types.h> 10 11struct drm_plane; 12struct drm_property; 13struct drm_rect; 14struct intel_atomic_state; 15struct intel_crtc; 16struct intel_crtc_state; 17struct intel_plane; 18struct intel_plane_state; 19enum plane_id; 20 21unsigned int intel_adjusted_rate(const struct drm_rect *src, 22 const struct drm_rect *dst, 23 unsigned int rate); 24unsigned int intel_plane_pixel_rate(const struct intel_crtc_state *crtc_state, 25 const struct intel_plane_state *plane_state); 26 27unsigned int intel_plane_data_rate(const struct intel_crtc_state *crtc_state, 28 const struct intel_plane_state *plane_state, 29 int color_plane); 30void intel_plane_copy_uapi_to_hw_state(struct intel_plane_state *plane_state, 31 const struct intel_plane_state *from_plane_state, 32 struct intel_crtc *crtc); 33void intel_plane_copy_hw_state(struct intel_plane_state *plane_state, 34 const struct intel_plane_state *from_plane_state); 35void intel_plane_update_noarm(struct intel_plane *plane, 36 const struct intel_crtc_state *crtc_state, 37 const struct intel_plane_state *plane_state); 38void intel_plane_update_arm(struct intel_plane *plane, 39 const struct intel_crtc_state *crtc_state, 40 const struct intel_plane_state *plane_state); 41void intel_plane_disable_arm(struct intel_plane *plane, 42 const struct intel_crtc_state *crtc_state); 43struct intel_plane *intel_plane_alloc(void); 44void intel_plane_free(struct intel_plane *plane); 45struct drm_plane_state *intel_plane_duplicate_state(struct drm_plane *plane); 46void intel_plane_destroy_state(struct drm_plane *plane, 47 struct drm_plane_state *state); 48void intel_crtc_planes_update_noarm(struct intel_atomic_state *state, 49 struct intel_crtc *crtc); 50void intel_crtc_planes_update_arm(struct intel_atomic_state *state, 51 struct intel_crtc *crtc); 52int intel_plane_atomic_check_with_state(const struct intel_crtc_state *old_crtc_state, 53 struct intel_crtc_state *crtc_state, 54 const struct intel_plane_state *old_plane_state, 55 struct intel_plane_state *intel_state); 56int intel_plane_atomic_check(struct intel_atomic_state *state, 57 struct intel_plane *plane); 58int intel_plane_calc_min_cdclk(struct intel_atomic_state *state, 59 struct intel_plane *plane, 60 bool *need_cdclk_calc); 61int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state, 62 struct intel_crtc_state *crtc_state, 63 int min_scale, int max_scale, 64 bool can_position); 65void intel_plane_set_invisible(struct intel_crtc_state *crtc_state, 66 struct intel_plane_state *plane_state); 67void intel_plane_helper_add(struct intel_plane *plane); 68 69#endif /* __INTEL_ATOMIC_PLANE_H__ */