Commit b8db2611 authored by Jani Nikula's avatar Jani Nikula

drm/i915/fb: move intel_fb_align_height() to intel_fb.c

Split out fb related stuff from intel_display.c to intel_fb.c.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/7c97d29eeff676b510eafd242e2a6d7c8ed4a3a6.1629721467.git.jani.nikula@intel.com
parent d3616883
...@@ -879,15 +879,6 @@ intel_format_info_is_yuv_semiplanar(const struct drm_format_info *info, ...@@ -879,15 +879,6 @@ intel_format_info_is_yuv_semiplanar(const struct drm_format_info *info,
info->num_planes == (is_ccs_modifier(modifier) ? 4 : 2); info->num_planes == (is_ccs_modifier(modifier) ? 4 : 2);
} }
unsigned int
intel_fb_align_height(const struct drm_framebuffer *fb,
int color_plane, unsigned int height)
{
unsigned int tile_height = intel_tile_height(fb, color_plane);
return ALIGN(height, tile_height);
}
unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info) unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info)
{ {
unsigned int size = 0; unsigned int size = 0;
......
...@@ -548,8 +548,6 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv); ...@@ -548,8 +548,6 @@ void intel_init_display_hooks(struct drm_i915_private *dev_priv);
unsigned int intel_fb_xy_to_linear(int x, int y, unsigned int intel_fb_xy_to_linear(int x, int y,
const struct intel_plane_state *state, const struct intel_plane_state *state,
int plane); int plane);
unsigned int intel_fb_align_height(const struct drm_framebuffer *fb,
int color_plane, unsigned int height);
void intel_add_fb_offsets(int *x, int *y, void intel_add_fb_offsets(int *x, int *y,
const struct intel_plane_state *state, int plane); const struct intel_plane_state *state, int plane);
unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info); unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info);
......
...@@ -163,6 +163,15 @@ unsigned int intel_tile_row_size(const struct drm_framebuffer *fb, int color_pla ...@@ -163,6 +163,15 @@ unsigned int intel_tile_row_size(const struct drm_framebuffer *fb, int color_pla
return fb->pitches[color_plane] * tile_height; return fb->pitches[color_plane] * tile_height;
} }
unsigned int
intel_fb_align_height(const struct drm_framebuffer *fb,
int color_plane, unsigned int height)
{
unsigned int tile_height = intel_tile_height(fb, color_plane);
return ALIGN(height, tile_height);
}
unsigned int intel_cursor_alignment(const struct drm_i915_private *i915) unsigned int intel_cursor_alignment(const struct drm_i915_private *i915)
{ {
if (IS_I830(i915)) if (IS_I830(i915))
......
...@@ -31,7 +31,8 @@ unsigned int intel_tile_size(const struct drm_i915_private *i915); ...@@ -31,7 +31,8 @@ unsigned int intel_tile_size(const struct drm_i915_private *i915);
unsigned int intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane); unsigned int intel_tile_width_bytes(const struct drm_framebuffer *fb, int color_plane);
unsigned int intel_tile_height(const struct drm_framebuffer *fb, int color_plane); 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_tile_row_size(const struct drm_framebuffer *fb, int color_plane);
unsigned int intel_fb_align_height(const struct drm_framebuffer *fb,
int color_plane, unsigned int height);
unsigned int intel_cursor_alignment(const struct drm_i915_private *i915); unsigned int intel_cursor_alignment(const struct drm_i915_private *i915);
void intel_fb_plane_get_subsampling(int *hsub, int *vsub, void intel_fb_plane_get_subsampling(int *hsub, int *vsub,
......
...@@ -45,6 +45,7 @@ ...@@ -45,6 +45,7 @@
#include "i915_drv.h" #include "i915_drv.h"
#include "intel_display_types.h" #include "intel_display_types.h"
#include "intel_fb.h"
#include "intel_fbdev.h" #include "intel_fbdev.h"
#include "intel_frontbuffer.h" #include "intel_frontbuffer.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment