]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/cmdparser: Ignore Length operands during command matching
authorJon Bloomfield <jon.bloomfield@intel.com>
Thu, 20 Sep 2018 16:45:10 +0000 (09:45 -0700)
committerJon Bloomfield <jon.bloomfield@intel.com>
Tue, 5 Nov 2019 19:38:34 +0000 (11:38 -0800)
commit67de0fb65661432d35cbdedcdbac378c0dc739b8
tree55c640b8d7c5c0fa596fd2cbfcfc5d46da8270d1
parent88e523187acec1bf5904a8742c52369e401e896c
drm/i915/cmdparser: Ignore Length operands during command matching

Some of the gen instruction macros (e.g. MI_DISPLAY_FLIP) have the
length directly encoded in them. Since these are used directly in
the tables, the Length becomes part of the comparison used for
matching during parsing. Thus, if the cmd being parsed has a
different length to that in the table, it is not matched and the
cmd is accepted via the default variable length path.

Fix by masking out everything except the Opcode in the cmd tables

Cc: Tony Luck <tony.luck@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: Jon Bloomfield <jon.bloomfield@intel.com>
Reviewed-by: Chris Wilson <chris.p.wilson@intel.com>
drivers/gpu/drm/i915/i915_cmd_parser.c