drm/i915/gvt: Make MI_USER_INTERRUPT nop in cmd parser
authorZhipeng Gong <zhipeng.gong@intel.com>
Mon, 26 Mar 2018 07:18:56 +0000 (15:18 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Wed, 28 Mar 2018 08:14:59 +0000 (16:14 +0800)
commit5da795b061a139b55d7393e79c7af688c58a4267
tree957d21fe399f72fdd4f7d0f1353517523cf5f2e2
parentac0fd9cfc837d1d30cb958dc34769e90aad43078
drm/i915/gvt: Make MI_USER_INTERRUPT nop in cmd parser

GVT-g dispatches request to host i915 and depends on i915 notify
ring interrupt mechanism to check completion of request.
For now MI_USER_INTERRUPT in guest requests is passed through
in GVT-g cmd parser and i915 does not use it, which causes
unnecessary interrupt handling in i915.
On the other hand, if several requests from guest are combined into
one request in and contain MI_USER_INTERRUPT in the middle of
combined request. GVT-g still has to wait on the whole request to
complete to inject user interrupts to guest.

This patch makes all the MI_USER_INTERRUPT nop to save some interrupt
handling.

Here is test result to run glmark2 on guest for 10 seconds:
host master interrupts number is reduced from 16021 to 11162
host user interrupts number is reduced from 7936 to 3536

v2:
- revise commit message. (Kevin)

Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Zhipeng Gong <zhipeng.gong@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/cmd_parser.c