diff options
author | Imre Deak <imre.deak@intel.com> | 2021-03-25 23:47:53 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2021-03-29 22:54:50 +0300 |
commit | 3cee6269385cf91a588fdb531293cdf8a8b4ac53 (patch) | |
tree | 0d203a656f80c4a82100ea5a13f97935c13eed7b /drivers/gpu/drm/i915/display/intel_fb.h | |
parent | d7bdd1c8a97ccc5230c2b44a258c6ecfb25eeca2 (diff) | |
download | linux-3cee6269385cf91a588fdb531293cdf8a8b4ac53.tar.bz2 |
drm/i915/intel_fb: Pull FB plane functions from intel_display.c
Move the FB plane specific functions from intel_display.c to intel_fb.c.
There's more functions like this, but I leave moving those as well for a
follow up, and for now moving only the ones needed by the end of this
patchset (adding support for padding tile-rows in an FB GGTT view).
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210325214808.2071517-11-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_fb.h')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_fb.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_fb.h b/drivers/gpu/drm/i915/display/intel_fb.h index 8c15f4c9561b..59f8715e0bda 100644 --- a/drivers/gpu/drm/i915/display/intel_fb.h +++ b/drivers/gpu/drm/i915/display/intel_fb.h @@ -10,11 +10,17 @@ struct drm_framebuffer; +struct drm_i915_private; + +struct i915_ggtt_view; + struct intel_plane_state; bool is_ccs_plane(const struct drm_framebuffer *fb, int plane); bool is_gen12_ccs_plane(const struct drm_framebuffer *fb, int plane); bool is_gen12_ccs_cc_plane(const struct drm_framebuffer *fb, int plane); +bool is_aux_plane(const struct drm_framebuffer *fb, int plane); +bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_plane); bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane); @@ -24,4 +30,29 @@ int skl_main_to_aux_plane(const struct drm_framebuffer *fb, int main_plane); int intel_plane_check_stride(const struct intel_plane_state *plane_state); +unsigned int intel_tile_size(const struct drm_i915_private *dev_priv); +unsigned int intel_tile_height(const struct drm_framebuffer *fb, int color_plane); +unsigned int intel_tile_row_size(const struct drm_framebuffer *fb, int color_plane); + +unsigned int intel_cursor_alignment(const struct drm_i915_private *dev_priv); + +void intel_fb_plane_get_subsampling(int *hsub, int *vsub, + const struct drm_framebuffer *fb, + int color_plane); + +u32 intel_plane_adjust_aligned_offset(int *x, int *y, + const struct intel_plane_state *state, + int color_plane, + u32 old_offset, u32 new_offset); +u32 intel_plane_compute_aligned_offset(int *x, int *y, + const struct intel_plane_state *state, + int color_plane); + +int intel_fb_pitch(const struct drm_framebuffer *fb, int color_plane, unsigned int rotation); + +int intel_fill_fb_info(struct drm_i915_private *dev_priv, struct drm_framebuffer *fb); +void intel_fill_fb_ggtt_view(struct i915_ggtt_view *view, const struct drm_framebuffer *fb, + unsigned int rotation); +int intel_plane_compute_gtt(struct intel_plane_state *plane_state); + #endif /* __INTEL_FB_H__ */ |