[PATCH 3/3] i915/gvt/dmabuf: update_fb_info: convert size correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Internal (driver) representation is in pages (intel_vgpu_fb_info).
User API is in bytes (vfio_device_gfx_plane_info).

Signed-off-by: Uri Lublin <uril@xxxxxxxxxx>
Signed-off-by: Snir Sheriber <ssheribe@xxxxxxxxxx>
---
 drivers/gpu/drm/i915/gvt/dmabuf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c
index 857e3a02d951..7b66ec2ee167 100644
--- a/drivers/gpu/drm/i915/gvt/dmabuf.c
+++ b/drivers/gpu/drm/i915/gvt/dmabuf.c
@@ -355,7 +355,7 @@ static void update_fb_info(struct vfio_device_gfx_plane_info *gvt_dmabuf,
 	gvt_dmabuf->width = fb_info->width;
 	gvt_dmabuf->height = fb_info->height;
 	gvt_dmabuf->stride = fb_info->stride;
-	gvt_dmabuf->size = fb_info->size;
+	gvt_dmabuf->size = fb_info->size << PAGE_SHIFT;
 	gvt_dmabuf->x_pos = fb_info->x_pos;
 	gvt_dmabuf->y_pos = fb_info->y_pos;
 	gvt_dmabuf->x_hot = fb_info->x_hot;
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux