drm/i915/gvt: cleanup opregion memory allocation code
authorJike Song <jike.song@intel.com>
Fri, 6 Jan 2017 07:16:23 +0000 (15:16 +0800)
committerZhenyu Wang <zhenyuw@linux.intel.com>
Mon, 9 Jan 2017 03:11:32 +0000 (11:11 +0800)
commit03551e971f6e52c8dedd5741bf48631e65675759
treecdc0bceeb04ef78d64ea00675977e511e5b85033
parent4e5378918b5b96e6b93fcadf1ab84a8486ca60a1
drm/i915/gvt: cleanup opregion memory allocation code

According to the spec, ACPI OpRegion must be placed at a physical address
below 4G. That is, for a vGPU it must be associated with a GPA below 4G,
but on host side, it doesn't matter where the backing pages actually are.
So when allocating pages from host, the GFP_DMA32 flag is unnecessary.

Also the allocation is from a sleepable context, so GFP_ATOMIC is also
unnecessary.

This patch also removes INTEL_GVT_OPREGION_PORDER and use get_order()
instead.

Signed-off-by: Jike Song <jike.song@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
drivers/gpu/drm/i915/gvt/opregion.c
drivers/gpu/drm/i915/gvt/reg.h