Loading...
Note: File does not exist in v4.6.
1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2020-2021 Intel Corporation
4 */
5
6#ifndef __INTEL_FB_H__
7#define __INTEL_FB_H__
8
9#include <linux/types.h>
10
11struct drm_framebuffer;
12
13struct drm_i915_private;
14
15struct intel_fb_view;
16struct intel_framebuffer;
17struct intel_plane_state;
18
19bool is_ccs_plane(const struct drm_framebuffer *fb, int plane);
20bool is_gen12_ccs_plane(const struct drm_framebuffer *fb, int plane);
21bool is_gen12_ccs_cc_plane(const struct drm_framebuffer *fb, int plane);
22bool is_semiplanar_uv_plane(const struct drm_framebuffer *fb, int color_plane);
23
24bool is_surface_linear(const struct drm_framebuffer *fb, int color_plane);
25
26int main_to_ccs_plane(const struct drm_framebuffer *fb, int main_plane);
27int skl_ccs_to_main_plane(const struct drm_framebuffer *fb, int ccs_plane);
28int skl_main_to_aux_plane(const struct drm_framebuffer *fb, int main_plane);
29
30unsigned int intel_tile_size(const struct drm_i915_private *i915);
31unsigned int intel_tile_height(const struct drm_framebuffer *fb, int color_plane);
32unsigned int intel_tile_row_size(const struct drm_framebuffer *fb, int color_plane);
33
34unsigned int intel_cursor_alignment(const struct drm_i915_private *i915);
35
36void intel_fb_plane_get_subsampling(int *hsub, int *vsub,
37 const struct drm_framebuffer *fb,
38 int color_plane);
39
40u32 intel_plane_adjust_aligned_offset(int *x, int *y,
41 const struct intel_plane_state *state,
42 int color_plane,
43 u32 old_offset, u32 new_offset);
44u32 intel_plane_compute_aligned_offset(int *x, int *y,
45 const struct intel_plane_state *state,
46 int color_plane);
47
48bool intel_fb_needs_pot_stride_remap(const struct intel_framebuffer *fb);
49bool intel_fb_supports_90_270_rotation(const struct intel_framebuffer *fb);
50
51int intel_fill_fb_info(struct drm_i915_private *i915, struct intel_framebuffer *fb);
52void intel_fb_fill_view(const struct intel_framebuffer *fb, unsigned int rotation,
53 struct intel_fb_view *view);
54int intel_plane_compute_gtt(struct intel_plane_state *plane_state);
55
56#endif /* __INTEL_FB_H__ */