aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorChris Wilson <[email protected]>2017-01-14 00:28:23 +0000
committerChris Wilson <[email protected]>2017-01-14 16:17:44 +0000
commit992e418dd945755fe947c8df7329e71e76b9e4f8 (patch)
tree88dee7a13b233ad2c29784d9dfc88fcc4e7a5059 /include/linux
parent8d9046ad5d9b7e5ede7cdf566a190f136f239614 (diff)
drm/i915: Compact memcmp in i915_vma_compare()
In preparation for the next patch to convert to using an anonymous union and leaving the excess bytes in the union uninitialised, we first need to make sure we do not compare using those uninitialised bytes. We also want to preserve the compactness of the code, avoiding a second call to memcmp or introducing a switch, so we take advantage of using the type as an encoded size (as well as a unique identifier for each type of view). v2: Add the rationale for why we encode size into ggtt_view.type as a comment before the memcmp() v3: Use a switch to also assert that no two i915_ggtt_view_type have the same value. Signed-off-by: Chris Wilson <[email protected]> Reviewed-by: Tvrtko Ursulin <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions