[PATCH] drm/i915/gvt: Use consist max display pipe numbers as i915 definition
Zhenyu Wang
zhenyuw at linux.intel.com
Mon Feb 18 09:09:13 UTC 2019
On 2019.02.14 12:56:33 +0800, Colin Xu wrote:
> GVT implements a homogeneous vGPU as host GPU so max vGPU display pipes
> can't exceed HW. The inconsistency definition has potential risks which
> could cause array indexing overflow.
>
> Remove the unnecessary define of INTEL_GVT_MAX_PIPE and align with i915.
>
> Signed-off-by: Colin Xu <colin.xu at intel.com>
> ---
> drivers/gpu/drm/i915/gvt/gvt.h | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
> index 8bce09de4b82..ef710e259726 100644
> --- a/drivers/gpu/drm/i915/gvt/gvt.h
> +++ b/drivers/gpu/drm/i915/gvt/gvt.h
> @@ -111,11 +111,9 @@ struct intel_vgpu_cfg_space {
>
> #define vgpu_cfg_space(vgpu) ((vgpu)->cfg_space.virtual_cfg_space)
>
> -#define INTEL_GVT_MAX_PIPE 4
> -
> struct intel_vgpu_irq {
> bool irq_warn_once[INTEL_GVT_EVENT_MAX];
> - DECLARE_BITMAP(flip_done_event[INTEL_GVT_MAX_PIPE],
> + DECLARE_BITMAP(flip_done_event[I915_MAX_PIPES],
> INTEL_GVT_EVENT_MAX);
> };
>
> --
Looks good to me.
Reviewed-by: Zhenyu Wang <zhenyuw at linux.intel.com>
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20190218/18ddb1fc/attachment.sig>
More information about the intel-gvt-dev
mailing list