]> 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)
commitdc8da4ba80549ed0cc575bd9a6fa5b5894ed8797
tree5ac3fdfc4204c4705b5dd4e82727b57dad407f52
parent63561f2cfe8b5d484739ab445545d879ef273654
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