]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: cache number of MOCS entries
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 24 Jan 2019 00:06:03 +0000 (16:06 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 25 Jan 2019 03:34:34 +0000 (19:34 -0800)
commitc161663dfe6bf4635fa482d34cffb909499db278
tree5ac3fdfc4204c4705b5dd4e82727b57dad407f52
parentd3922d851ed901859f32eb30cae4ece4998664f4
drm/i915: cache number of MOCS entries

Instead of checking the gen number every time we need to know the max
number of entries, just save it into the table struct so we don't need
extra branches throughout the code. This will be useful for Ice Lake
that has 64 rather than 62 defined entries. Ice Lake changes will be
added in a follow up.

v2: make size and n_entries `unsigned int` and introduce changes as a
    pre-work for the Ice Lake changes (Tvrtko)

Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190124000604.18861-7-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_mocs.c