projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf303a4
)
drm/i915/query: fix subslice length
author
Daniele Ceraolo Spurio
<
[email protected]
>
Fri, 9 Nov 2018 00:40:13 +0000
(16:40 -0800)
committer
Daniele Ceraolo Spurio
<
[email protected]
>
Fri, 9 Nov 2018 19:42:00 +0000
(11:42 -0800)
We dump the info as an array of u8, so we want to know the length
in number of bytes. Current code is still safe because the
variable we use BITS_PER_TYPE on is a u8.
Cc: Lionel Landwerlin <
[email protected]
>
Cc: Tvrtko Ursulin <
[email protected]
>
Signed-off-by: Daniele Ceraolo Spurio <
[email protected]
>
Reviewed-by: Tvrtko Ursulin <
[email protected]
>
Reviewed-by: Lionel Landwerlin <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/i915_query.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_query.c
b/drivers/gpu/drm/i915/i915_query.c
index 5821002cad42e2b32a221dabe7febdc164ad6742..6fc4b8eeab428f7b10bf56ba5c07eba5789b59a7 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_query.c
+++ b/
drivers/gpu/drm/i915/i915_query.c
@@
-27,8
+27,7
@@
static int query_topology_info(struct drm_i915_private *dev_priv,
slice_length = sizeof(sseu->slice_mask);
subslice_length = sseu->max_slices *
- DIV_ROUND_UP(sseu->max_subslices,
- BITS_PER_TYPE(sseu->subslice_mask[0]));
+ DIV_ROUND_UP(sseu->max_subslices, BITS_PER_BYTE);
eu_length = sseu->max_slices * sseu->max_subslices *
DIV_ROUND_UP(sseu->max_eus_per_subslice, BITS_PER_BYTE);