Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Pallavi Mishra <pallavi.mishra@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: stuart.summers@intel.com, matthew.d.roper@intel.com,
	lucas.demarchi@intel.com
Subject: [Intel-xe] [PATCH] drm/xe: Align size to PAGE_SIZE
Date: Thu, 21 Sep 2023 03:02:59 +0530	[thread overview]
Message-ID: <20230920213259.3458968-1-pallavi.mishra@intel.com> (raw)

Ensure alignment with PAGE_SIZE for the size parameter
passed to __xe_bo_create_locked()

v2: move size alignment under else condition (Lucas)

Signed-off-by: Pallavi Mishra <pallavi.mishra@intel.com>
---
 drivers/gpu/drm/xe/xe_bo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
index c5e4d04c4d58..59c57430918b 100644
--- a/drivers/gpu/drm/xe/xe_bo.c
+++ b/drivers/gpu/drm/xe/xe_bo.c
@@ -1218,6 +1218,7 @@ struct xe_bo *__xe_bo_create_locked(struct xe_device *xe, struct xe_bo *bo,
 		flags |= XE_BO_INTERNAL_64K;
 		alignment = SZ_64K >> PAGE_SHIFT;
 	} else {
+		size = ALIGN(size, PAGE_SIZE);
 		alignment = SZ_4K >> PAGE_SHIFT;
 	}
 
-- 
2.25.1


             reply	other threads:[~2023-09-20 21:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-20 21:32 Pallavi Mishra [this message]
2023-09-20 22:53 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Align size to PAGE_SIZE (rev2) Patchwork
2023-09-20 22:53 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-20 22:54 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-20 23:01 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-20 23:02 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-20 23:03 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-20 23:37 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
2023-09-21 21:08 ` [Intel-xe] ✓ CI.Patch_applied: success for drm/xe: Align size to PAGE_SIZE (rev3) Patchwork
2023-09-21 21:08 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-21 21:09 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-21 21:16 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-21 21:17 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-21 21:18 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-21 21:52 ` [Intel-xe] ✓ CI.BAT: " Patchwork
2023-09-25 16:54 ` [Intel-xe] [PATCH] drm/xe: Align size to PAGE_SIZE Lucas De Marchi
2023-09-25 16:59   ` Lucas De Marchi
  -- strict thread matches above, loose matches on Subject: below --
2023-09-20 17:54 Pallavi Mishra
2023-09-20 19:24 ` Lucas De Marchi
2023-09-20 19:30   ` Mishra, Pallavi

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=20230920213259.3458968-1-pallavi.mishra@intel.com \
    --to=pallavi.mishra@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=stuart.summers@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox