drm/i915: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
authorFabian Frederick <fabf@skynet.be>
Tue, 1 Jul 2014 18:39:41 +0000 (20:39 +0200)
committerJani Nikula <jani.nikula@intel.com>
Wed, 2 Jul 2014 10:31:32 +0000 (13:31 +0300)
use mm.h definition

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fbdev.c

index f4eb752a11745f4eadc56e29da2ff9da8aa19230..48d37586832c194d6fa1141f37575ea73410fe8c 100644 (file)
@@ -6209,8 +6209,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc,
        aligned_height = intel_align_height(dev, crtc->base.primary->fb->height,
                                            plane_config->tiled);
 
-       plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] *
-                                  aligned_height, PAGE_SIZE);
+       plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] *
+                                       aligned_height);
 
        DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
                      pipe, plane, crtc->base.primary->fb->width,
@@ -7229,8 +7229,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc,
        aligned_height = intel_align_height(dev, crtc->base.primary->fb->height,
                                            plane_config->tiled);
 
-       plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] *
-                                  aligned_height, PAGE_SIZE);
+       plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] *
+                                       aligned_height);
 
        DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n",
                      pipe, plane, crtc->base.primary->fb->width,
@@ -8318,7 +8318,7 @@ static u32
 intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp)
 {
        u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp);
-       return ALIGN(pitch * mode->vdisplay, PAGE_SIZE);
+       return PAGE_ALIGN(pitch * mode->vdisplay);
 }
 
 static struct drm_framebuffer *
index 226fbc7d9464666cd3931d32f5907ed51621a19e..b8eac8c4dae6cb8c434ca516f85ef7a44672f7b5 100644 (file)
@@ -107,7 +107,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper,
                                                          sizes->surface_depth);
 
        size = mode_cmd.pitches[0] * mode_cmd.height;
-       size = ALIGN(size, PAGE_SIZE);
+       size = PAGE_ALIGN(size);
        obj = i915_gem_object_create_stolen(dev, size);
        if (obj == NULL)
                obj = i915_gem_alloc_object(dev, size);