diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-07-01 14:39:41 -0400 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2014-07-02 06:31:32 -0400 |
commit | 1267a26b22be45a09584ff016f33609e026a804c (patch) | |
tree | e1824d8b9b93d82718a935665c5a72fa235c0c6c | |
parent | 0d68b25e9ceb344fe2f93373b1c0311d33814265 (diff) |
drm/i915: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
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>
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_fbdev.c | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index f4eb752a1174..48d37586832c 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -6209,8 +6209,8 @@ static void i9xx_get_plane_config(struct intel_crtc *crtc, | |||
6209 | aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, | 6209 | aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, |
6210 | plane_config->tiled); | 6210 | plane_config->tiled); |
6211 | 6211 | ||
6212 | plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * | 6212 | plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] * |
6213 | aligned_height, PAGE_SIZE); | 6213 | aligned_height); |
6214 | 6214 | ||
6215 | DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", | 6215 | DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", |
6216 | pipe, plane, crtc->base.primary->fb->width, | 6216 | pipe, plane, crtc->base.primary->fb->width, |
@@ -7229,8 +7229,8 @@ static void ironlake_get_plane_config(struct intel_crtc *crtc, | |||
7229 | aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, | 7229 | aligned_height = intel_align_height(dev, crtc->base.primary->fb->height, |
7230 | plane_config->tiled); | 7230 | plane_config->tiled); |
7231 | 7231 | ||
7232 | plane_config->size = ALIGN(crtc->base.primary->fb->pitches[0] * | 7232 | plane_config->size = PAGE_ALIGN(crtc->base.primary->fb->pitches[0] * |
7233 | aligned_height, PAGE_SIZE); | 7233 | aligned_height); |
7234 | 7234 | ||
7235 | DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", | 7235 | DRM_DEBUG_KMS("pipe/plane %d/%d with fb: size=%dx%d@%d, offset=%x, pitch %d, size 0x%x\n", |
7236 | pipe, plane, crtc->base.primary->fb->width, | 7236 | pipe, plane, crtc->base.primary->fb->width, |
@@ -8318,7 +8318,7 @@ static u32 | |||
8318 | intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp) | 8318 | intel_framebuffer_size_for_mode(struct drm_display_mode *mode, int bpp) |
8319 | { | 8319 | { |
8320 | u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp); | 8320 | u32 pitch = intel_framebuffer_pitch_for_width(mode->hdisplay, bpp); |
8321 | return ALIGN(pitch * mode->vdisplay, PAGE_SIZE); | 8321 | return PAGE_ALIGN(pitch * mode->vdisplay); |
8322 | } | 8322 | } |
8323 | 8323 | ||
8324 | static struct drm_framebuffer * | 8324 | static struct drm_framebuffer * |
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 226fbc7d9464..b8eac8c4dae6 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c | |||
@@ -107,7 +107,7 @@ static int intelfb_alloc(struct drm_fb_helper *helper, | |||
107 | sizes->surface_depth); | 107 | sizes->surface_depth); |
108 | 108 | ||
109 | size = mode_cmd.pitches[0] * mode_cmd.height; | 109 | size = mode_cmd.pitches[0] * mode_cmd.height; |
110 | size = ALIGN(size, PAGE_SIZE); | 110 | size = PAGE_ALIGN(size); |
111 | obj = i915_gem_object_create_stolen(dev, size); | 111 | obj = i915_gem_object_create_stolen(dev, size); |
112 | if (obj == NULL) | 112 | if (obj == NULL) |
113 | obj = i915_gem_alloc_object(dev, size); | 113 | obj = i915_gem_alloc_object(dev, size); |