All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas De Marchi <lucas.demarchi@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
	Matt Roper <matthew.d.roper@intel.com>
Subject: [PATCH v3 1/5] drm/xe: Use _ULL for u64 division
Date: Thu, 18 Jan 2024 16:16:08 -0800	[thread overview]
Message-ID: <20240119001612.2991381-2-lucas.demarchi@intel.com> (raw)
In-Reply-To: <20240119001612.2991381-1-lucas.demarchi@intel.com>

Use DIV_ROUND_UP_ULL() so it also works on 32bit build.

Fixes: dd08ebf6c352 ("drm/xe: Introduce a new DRM driver for Intel GPUs")
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index 7a3c1c13dc34..ab417f4f7d2a 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -642,7 +642,7 @@ void xe_device_wmb(struct xe_device *xe)
 u32 xe_device_ccs_bytes(struct xe_device *xe, u64 size)
 {
 	return xe_device_has_flat_ccs(xe) ?
-		DIV_ROUND_UP(size, NUM_BYTES_PER_CCS_BYTE(xe)) : 0;
+		DIV_ROUND_UP_ULL(size, NUM_BYTES_PER_CCS_BYTE(xe)) : 0;
 }
 
 bool xe_device_mem_access_ongoing(struct xe_device *xe)
-- 
2.40.1


  reply	other threads:[~2024-01-19  0:16 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  0:16 [PATCH v3 0/5] Fix 32bit build Lucas De Marchi
2024-01-19  0:16 ` Lucas De Marchi [this message]
2024-01-19  0:16 ` [PATCH v3 2/5] drm/xe/mmio: Cast to u64 when printing Lucas De Marchi
2024-01-19  0:16 ` [PATCH v3 3/5] drm/xe/display: Avoid calling readq() Lucas De Marchi
2024-01-19  0:25   ` Matt Roper
2024-01-19  0:16 ` [PATCH v3 4/5] drm/xe: Fix cast on trace variable Lucas De Marchi
2024-01-19  0:16 ` [PATCH v3 5/5] drm/xe: Enable 32bits build Lucas De Marchi
2024-03-17 16:14   ` [v3,5/5] " Guenter Roeck
2024-03-18 13:28     ` Lucas De Marchi
2024-03-18 14:34       ` Guenter Roeck
2024-03-21 16:40       ` Guenter Roeck
2024-01-19  0:19 ` ✓ CI.Patch_applied: success for Fix 32bit build (rev2) Patchwork
2024-01-19  0:19 ` ✗ CI.checkpatch: warning " Patchwork
2024-01-19  0:20 ` ✓ CI.KUnit: success " Patchwork
2024-01-19  0:27 ` ✓ CI.Build: " Patchwork
2024-01-19  0:27 ` ✓ CI.Hooks: " Patchwork
2024-01-19  0:29 ` ✓ CI.checksparse: " Patchwork
2024-01-19  0:53 ` ✓ CI.BAT: " Patchwork

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=20240119001612.2991381-2-lucas.demarchi@intel.com \
    --to=lucas.demarchi@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.d.roper@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 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.