diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-12 21:08:33 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2016-01-13 18:46:29 +0200 |
commit | 832be82f87c2bf711d8d7aaeb59da925b4573f6c (patch) | |
tree | 1a3c63f5b4e205a5e2948518e0182e618fb41513 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | 7b49f94839660a82f1f40ee95cfe70245b4444d7 (diff) | |
download | op-kernel-dev-832be82f87c2bf711d8d7aaeb59da925b4573f6c.zip op-kernel-dev-832be82f87c2bf711d8d7aaeb59da925b4573f6c.tar.gz |
drm/i915: Redo intel_tile_height() as intel_tile_size() / intel_tile_width()
I find more usual to think about tile widths than heights, so changing
the intel_tile_height() to calculate the tile height as
tile_size/tile_width is easier than the opposite to the poor brain.
v2: Reorder arguments for consistency
Constify dev_priv arguments
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1452625717-9713-4-git-send-email-ville.syrjala@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_sprite.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c index 766c33a..64083d7 100644 --- a/drivers/gpu/drm/i915/intel_sprite.c +++ b/drivers/gpu/drm/i915/intel_sprite.c @@ -239,9 +239,10 @@ skl_update_plane(struct drm_plane *drm_plane, surf_addr = intel_plane_obj_offset(intel_plane, obj, 0); if (intel_rotation_90_or_270(rotation)) { + int cpp = drm_format_plane_cpp(fb->pixel_format, 0); + /* stride: Surface height in tiles */ - tile_height = intel_tile_height(dev, fb->pixel_format, - fb->modifier[0], 0); + tile_height = intel_tile_height(dev_priv, fb->modifier[0], cpp); stride = DIV_ROUND_UP(fb->height, tile_height); plane_size = (src_w << 16) | src_h; x_offset = stride * tile_height - y - (src_h + 1); |