projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b27cc7b
)
drm: Shift wrap bug in create_in_format_blob()
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 9 Aug 2017 11:19:06 +0000
(14:19 +0300)
committer
Sean Paul
<seanpaul@chromium.org>
Wed, 9 Aug 2017 14:15:52 +0000
(10:15 -0400)
"plane->format_count" can go up to 64. (It's capped in
drm_universal_plane_init().) So we should be using ULL type instead of
int here to prevent shift wrapping.
Fixes:
db1689aa61bd
("drm: Create a format/modifier blob")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link:
https://patchwork.freedesktop.org/patch/msgid/20170809111906.4rv3hzritctfktv3@mwanda
drivers/gpu/drm/drm_plane.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/drm_plane.c
b/drivers/gpu/drm/drm_plane.c
index 5c14beee52fffd3b1da490afeee003936b9972b6..85ab1eec73e572e4a1ce220bb4d73afb929e8e81 100644
(file)
--- a/
drivers/gpu/drm/drm_plane.c
+++ b/
drivers/gpu/drm/drm_plane.c
@@
-126,7
+126,7
@@
static int create_in_format_blob(struct drm_device *dev, struct drm_plane *plane
plane->format_types[j],
plane->modifiers[i])) {
- mod->formats |= 1 << j;
+ mod->formats |= 1
ULL
<< j;
}
}