From: Jani Nikula <jani.nikula@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/i915: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
Date: Wed, 02 Jul 2014 14:12:58 +0300 [thread overview]
Message-ID: <871tu4f1z9.fsf@intel.com> (raw)
In-Reply-To: <1404239981-14638-1-git-send-email-fabf@skynet.be>
On Tue, 01 Jul 2014, Fabian Frederick <fabf@skynet.be> wrote:
> 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>
Pushed to drm-intel-next-queued, thanks for the patch.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
> 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 5f285fb..f07cb83 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6116,8 +6116,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,
> @@ -7136,8 +7136,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,
> @@ -8233,7 +8233,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 *
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index 088fe93..182fbc2 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -81,7 +81,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);
> --
> 1.9.1
>
--
Jani Nikula, Intel Open Source Technology Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Fabian Frederick <fabf@skynet.be>, linux-kernel@vger.kernel.org
Cc: Fabian Frederick <fabf@skynet.be>,
Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/1] drm/i915: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN
Date: Wed, 02 Jul 2014 14:12:58 +0300 [thread overview]
Message-ID: <871tu4f1z9.fsf@intel.com> (raw)
In-Reply-To: <1404239981-14638-1-git-send-email-fabf@skynet.be>
On Tue, 01 Jul 2014, Fabian Frederick <fabf@skynet.be> wrote:
> 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>
Pushed to drm-intel-next-queued, thanks for the patch.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_display.c | 10 +++++-----
> 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 5f285fb..f07cb83 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6116,8 +6116,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,
> @@ -7136,8 +7136,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,
> @@ -8233,7 +8233,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 *
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index 088fe93..182fbc2 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -81,7 +81,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);
> --
> 1.9.1
>
--
Jani Nikula, Intel Open Source Technology Center
next prev parent reply other threads:[~2014-07-02 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-01 18:39 [PATCH 1/1] drm/i915: replace ALIGN(PAGE_SIZE) by PAGE_ALIGN Fabian Frederick
2014-07-02 11:12 ` Jani Nikula [this message]
2014-07-02 11:12 ` Jani Nikula
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tu4f1z9.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=fabf@skynet.be \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.