summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fbdev.c
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2013-10-18 18:48:24 -0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-10-21 10:04:03 +0200
commitde45eaf7b9530b6137d3ce370b12b199fae01419 (patch)
treed90b0f00787b77768f3b650b15e0fb8326f2e45f /drivers/gpu/drm/i915/intel_fbdev.c
parentdc39fff7229c01550cad1ee8fa0309dfafdcd2e7 (diff)
downloadblackbird-op-linux-de45eaf7b9530b6137d3ce370b12b199fae01419.tar.gz
blackbird-op-linux-de45eaf7b9530b6137d3ce370b12b199fae01419.zip
drm/i915: fix open-coded DIV_ROUND_UP
Use the nice Kernel macro, it makes the code much more readable. Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Reviewed-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fbdev.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fbdev.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index acc839569c3f..895fcb4fbd94 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -78,8 +78,8 @@ static int intelfb_create(struct drm_fb_helper *helper,
mode_cmd.width = sizes->surface_width;
mode_cmd.height = sizes->surface_height;
- mode_cmd.pitches[0] = ALIGN(mode_cmd.width * ((sizes->surface_bpp + 7) /
- 8), 64);
+ mode_cmd.pitches[0] = ALIGN(mode_cmd.width *
+ DIV_ROUND_UP(sizes->surface_bpp, 8), 64);
mode_cmd.pixel_format = drm_mode_legacy_fb_format(sizes->surface_bpp,
sizes->surface_depth);
OpenPOWER on IntegriCloud