drm/i915/query: fix subslice length

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 <lionel.g.landwerlin@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: default avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181109004013.34394-1-daniele.ceraolospurio@intel.com
parent cf303a41
...@@ -27,8 +27,7 @@ static int query_topology_info(struct drm_i915_private *dev_priv, ...@@ -27,8 +27,7 @@ static int query_topology_info(struct drm_i915_private *dev_priv,
slice_length = sizeof(sseu->slice_mask); slice_length = sizeof(sseu->slice_mask);
subslice_length = sseu->max_slices * subslice_length = sseu->max_slices *
DIV_ROUND_UP(sseu->max_subslices, DIV_ROUND_UP(sseu->max_subslices, BITS_PER_BYTE);
BITS_PER_TYPE(sseu->subslice_mask[0]));
eu_length = sseu->max_slices * sseu->max_subslices * eu_length = sseu->max_slices * sseu->max_subslices *
DIV_ROUND_UP(sseu->max_eus_per_subslice, BITS_PER_BYTE); DIV_ROUND_UP(sseu->max_eus_per_subslice, BITS_PER_BYTE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment