drm/i915/gvt: cleanup usage for typed mmio reg vs. offset
authorZhenyu Wang <zhenyuw@linux.intel.com>
Tue, 19 Dec 2017 05:02:51 +0000 (13:02 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Fri, 22 Dec 2017 08:33:03 +0000 (16:33 +0800)
commit90551a1296d4dbe0dccc4c3cb5e57e7f2c929009
tree8a277d0f916fdd8acd8ae314c98bb1fb37cdf81f
parent4e889d62b89d00e641d588eafed7e721e0a46090
drm/i915/gvt: cleanup usage for typed mmio reg vs. offset

We had previous hack that tried to accept either i915_reg_t or offset
value to access vGPU virtual/shadow regs which broke that purpose to
be type safe in context. This one trys to explicitly separate the usage
of typed mmio reg with real offset.

Old vgpu_vreg(offset) helper is used only for offset now with new
vgpu_vreg_t(reg) is used for i915_reg_t only. Convert left usage
of that to new helper.

Also fixed left KASAN warning issues caused by previous hack.

v2: rebase, fixup against recent mmio switch change

Reviewed-by: Zhi Wang <zhi.a.wang@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/cmd_parser.c
drivers/gpu/drm/i915/gvt/display.c
drivers/gpu/drm/i915/gvt/edid.c
drivers/gpu/drm/i915/gvt/fb_decoder.c
drivers/gpu/drm/i915/gvt/gtt.c
drivers/gpu/drm/i915/gvt/gvt.h
drivers/gpu/drm/i915/gvt/handlers.c
drivers/gpu/drm/i915/gvt/mmio.c
drivers/gpu/drm/i915/gvt/mmio.h
drivers/gpu/drm/i915/gvt/mmio_context.c
drivers/gpu/drm/i915/gvt/vgpu.c