drm/i915/gvt: add a fastpath for cmd parsing on MI_NOOP
authorZhao Yan <yan.y.zhao@intel.com>
Wed, 1 Aug 2018 04:15:09 +0000 (00:15 -0400)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Thu, 2 Aug 2018 05:27:09 +0000 (13:27 +0800)
commitdb47685da1d8224f0eaa35c32e1a1ea97b05bae0
treebda95c8b610763468b3f387ec5ac2b92a6b530b5
parent279ce5d117078ee8ea40c40199399889981fd808
drm/i915/gvt: add a fastpath for cmd parsing on MI_NOOP

MI_NOOP is a common command appearing in almost all command buffers, put it
into a fastpath can improve perfomance, especially in command buffers
contains lots of MI_NOOPs (0s).

Take glmark2 as an example, 3% performance increase is observed after
introduced this patch. Meanwhile, in case where abundant in MI_NOOPs,
up to 12% performance increase is measured.

v2: use lowercase for index of MI_NOOP in cmd_info (zhenyu wang)

Signed-off-by: Li Weinan <weinan.z.li@intel.com>
Signed-off-by: Zhao Yan <yan.y.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/cmd_parser.c