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>
This commit is contained in:
committed by
Daniel Vetter
parent
dc39fff722
commit
de45eaf7b9
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user