]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Simplify MOCS table definition
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 24 Jan 2019 00:05:59 +0000 (16:05 -0800)
committerLucas De Marchi <lucas.demarchi@intel.com>
Fri, 25 Jan 2019 03:34:34 +0000 (19:34 -0800)
commit7ddda431c106f95c7223dabce23b19228f232138
tree277aa738c134538a40f32f84c32395e7a5191f29
parent1aa4ec8986b0c38e0761c6a124d409e370fca1c5
drm/i915: Simplify MOCS table definition

Make the defines for LE and L3 caching options to contain the shifts and
remove the zeros from the tables as shifting zeros always result in
zero.

Starting from Ice Lake the MOCS table is defined in the spec and
contains all entries. So to simplify checking the table with the values
set in code, the value is now part of the macro name. This allows to
still give the most used option and sensible name, but also to easily
cross check the table from the spec for gen >= 11.

By removing the zeros we avoid maintaining a huge table since the one
from spec contains many more entries. The new table for Ice Lake will
be added by other patches, this only reformats the table.

While at it also fix the indentation.

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Tomasz Lis <tomasz.lis@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190124000604.18861-3-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_mocs.c