From fc2c1543e51ee6fc8a2956594456eb4db5f0a3ca Mon Sep 17 00:00:00 2001 From: Brijesh Singh Date: Wed, 23 Aug 2017 06:57:17 -0400 Subject: OvmfPkg/VirtioLib: take VirtIo instance in VirtioRingInit/VirtioRingUninit Passing the VirtIo protocol instance will allow the vring to use VIRTIO_DEVICE_PROTOCOL.AllocateSharedPages () to allocate vring buffer. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Tom Lendacky Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Brijesh Singh Reviewed-by: Laszlo Ersek Regression-tested-by: Laszlo Ersek --- OvmfPkg/VirtioGpuDxe/Commands.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'OvmfPkg/VirtioGpuDxe/Commands.c') diff --git a/OvmfPkg/VirtioGpuDxe/Commands.c b/OvmfPkg/VirtioGpuDxe/Commands.c index 962087c..c2e4d72 100644 --- a/OvmfPkg/VirtioGpuDxe/Commands.c +++ b/OvmfPkg/VirtioGpuDxe/Commands.c @@ -3,6 +3,7 @@ VirtIo GPU initialization, and commands (primitives) for the GPU device. Copyright (C) 2016, Red Hat, Inc. + Copyright (c) 2017, AMD Inc, All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this @@ -127,7 +128,7 @@ VirtioGpuInit ( // // [...] population of virtqueues [...] // - Status = VirtioRingInit (QueueSize, &VgpuDev->Ring); + Status = VirtioRingInit (VgpuDev->VirtIo, QueueSize, &VgpuDev->Ring); if (EFI_ERROR (Status)) { goto Failed; } @@ -148,7 +149,7 @@ VirtioGpuInit ( return EFI_SUCCESS; ReleaseQueue: - VirtioRingUninit (&VgpuDev->Ring); + VirtioRingUninit (VgpuDev->VirtIo, &VgpuDev->Ring); Failed: // @@ -183,7 +184,7 @@ VirtioGpuUninit ( // configuration. // VgpuDev->VirtIo->SetDeviceStatus (VgpuDev->VirtIo, 0); - VirtioRingUninit (&VgpuDev->Ring); + VirtioRingUninit (VgpuDev->VirtIo, &VgpuDev->Ring); } /** -- cgit v1.1