projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
67008df
)
nouveau/mme: Fix is_int18 for negative numbers
author
Faith Ekstrand
<faith.ekstrand@collabora.com>
Tue, 31 Jan 2023 02:12:06 +0000
(20:12 -0600)
committer
Marge Bot
<emma+marge@anholt.net>
Fri, 4 Aug 2023 21:32:03 +0000
(21:32 +0000)
util_mask_sign_extend returns a uint64_t which we need to cast to
uint32_t in order to get the right comparison. Otherwise, we risk
having ~0 in the top 32 bits and the comparison failing.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
src/nouveau/mme/mme_fermi_builder.c
patch
|
blob
|
history
diff --git
a/src/nouveau/mme/mme_fermi_builder.c
b/src/nouveau/mme/mme_fermi_builder.c
index
2a0a77e
..
5d58ca5
100644
(file)
--- a/
src/nouveau/mme/mme_fermi_builder.c
+++ b/
src/nouveau/mme/mme_fermi_builder.c
@@
-200,7
+200,7
@@
mme_fermi_reg(uint32_t reg)
static bool
is_int18(uint32_t i)
{
- return i == util_mask_sign_extend(i, 18);
+ return i ==
(uint32_t)
util_mask_sign_extend(i, 18);
}
static inline void