summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/dmabuf.c
diff options
context:
space:
mode:
authorDave Airlie2019-04-05 02:45:27 +0200
committerDave Airlie2019-04-05 02:45:32 +0200
commit23b5f422e8f42d9d3b7063c05c839a8b0ff5adf5 (patch)
tree24031152e7229436684791f5a979f29c12cd8247 /drivers/gpu/drm/i915/gvt/dmabuf.c
parentMerge branch 'drm-fixes-5.1' of git://people.freedesktop.org/~agd5f/linux int... (diff)
parentMerge tag 'gvt-fixes-2019-04-04' of https://github.com/intel/gvt-linux into d... (diff)
downloadkernel-qcow2-linux-23b5f422e8f42d9d3b7063c05c839a8b0ff5adf5.tar.gz
kernel-qcow2-linux-23b5f422e8f42d9d3b7063c05c839a8b0ff5adf5.tar.xz
kernel-qcow2-linux-23b5f422e8f42d9d3b7063c05c839a8b0ff5adf5.zip
Merge tag 'drm-intel-fixes-2019-04-04' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
Only one fix for DSC (backoff after drm_modeset_lock deadlock) and GVT's fixes including vGPU display plane size calculation, shadow mm pin count, error recovery path for workload create and one kerneldoc fix. Signed-off-by: Dave Airlie <airlied@redhat.com> From: Rodrigo Vivi <rodrigo.vivi@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190404161116.GA14522@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/dmabuf.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/dmabuf.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c
index 3e7e2b80c857..5d887f7cc0d5 100644
--- a/drivers/gpu/drm/i915/gvt/dmabuf.c
+++ b/drivers/gpu/drm/i915/gvt/dmabuf.c
@@ -238,9 +238,6 @@ static int vgpu_get_plane_info(struct drm_device *dev,
default:
gvt_vgpu_err("invalid tiling mode: %x\n", p.tiled);
}
-
- info->size = (((p.stride * p.height * p.bpp) / 8) +
- (PAGE_SIZE - 1)) >> PAGE_SHIFT;
} else if (plane_id == DRM_PLANE_TYPE_CURSOR) {
ret = intel_vgpu_decode_cursor_plane(vgpu, &c);
if (ret)
@@ -262,14 +259,13 @@ static int vgpu_get_plane_info(struct drm_device *dev,
info->x_hot = UINT_MAX;
info->y_hot = UINT_MAX;
}
-
- info->size = (((info->stride * c.height * c.bpp) / 8)
- + (PAGE_SIZE - 1)) >> PAGE_SHIFT;
} else {
gvt_vgpu_err("invalid plane id:%d\n", plane_id);
return -EINVAL;
}
+ info->size = (info->stride * info->height + PAGE_SIZE - 1)
+ >> PAGE_SHIFT;
if (info->size == 0) {
gvt_vgpu_err("fb size is zero\n");
return -EINVAL;