2020-10-28 12:31:19 +08:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Liu Xinyun <xinyun.liu@intel.com>
|
|
|
|
Date: Wed, 24 Apr 2019 17:01:38 +0800
|
|
|
|
Subject: [PATCH] drm/i915/gvt: replace magic for cursor ddb size with
|
|
|
|
GVT_CURSOR_BLOCKS
|
|
|
|
|
|
|
|
the cursor ddb size to hard coded to 8 for local display
|
|
|
|
virtualization. Replace it with GVT_CURSOR_BLOCKS
|
|
|
|
|
|
|
|
V2: refine commit message
|
|
|
|
|
|
|
|
Tracked-On: projectacrn/acrn-hypervisor#3106
|
|
|
|
Signed-off-by: Liu Xinyun <xinyun.liu@intel.com>
|
|
|
|
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
Signed-off-by: Junxiao Chang <junxiao.chang@intel.com>
|
|
|
|
---
|
|
|
|
drivers/gpu/drm/i915/gvt/gvt.c | 7 ++++---
|
|
|
|
drivers/gpu/drm/i915/gvt/gvt.h | 1 +
|
|
|
|
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/drivers/gpu/drm/i915/gvt/gvt.c b/drivers/gpu/drm/i915/gvt/gvt.c
|
2021-06-16 23:22:13 +08:00
|
|
|
index 89e29b20a538..0c2e61ebabfb 100644
|
2020-10-28 12:31:19 +08:00
|
|
|
--- a/drivers/gpu/drm/i915/gvt/gvt.c
|
|
|
|
+++ b/drivers/gpu/drm/i915/gvt/gvt.c
|
|
|
|
@@ -339,15 +339,16 @@ void intel_gvt_allocate_ddb(struct intel_gvt *gvt,
|
|
|
|
for_each_pipe_masked(dev_priv, pipe, active_crtcs) {
|
|
|
|
start = pipe_size * (i++);
|
|
|
|
end = start + pipe_size;
|
|
|
|
- ddb->plane[pipe][PLANE_CURSOR].start = end - 8;
|
|
|
|
+ ddb->plane[pipe][PLANE_CURSOR].start = end - GVT_CURSOR_BLOCKS;
|
|
|
|
ddb->plane[pipe][PLANE_CURSOR].end = end;
|
|
|
|
|
|
|
|
plane_cnt = (INTEL_INFO(dev_priv)->num_sprites[pipe] + 1);
|
|
|
|
- plane_size = (pipe_size - 8) / plane_cnt;
|
|
|
|
+ plane_size = (pipe_size - GVT_CURSOR_BLOCKS) / plane_cnt;
|
|
|
|
|
|
|
|
for_each_universal_plane(dev_priv, pipe, plane) {
|
|
|
|
ddb->plane[pipe][plane].start = start +
|
|
|
|
- (plane * (pipe_size - 8) / plane_cnt);
|
|
|
|
+ (plane * (pipe_size - GVT_CURSOR_BLOCKS) /
|
|
|
|
+ plane_cnt);
|
|
|
|
ddb->plane[pipe][plane].end =
|
|
|
|
ddb->plane[pipe][plane].start + plane_size;
|
|
|
|
}
|
|
|
|
diff --git a/drivers/gpu/drm/i915/gvt/gvt.h b/drivers/gpu/drm/i915/gvt/gvt.h
|
|
|
|
index 5ee96126ab16..7a12fc6636a1 100644
|
|
|
|
--- a/drivers/gpu/drm/i915/gvt/gvt.h
|
|
|
|
+++ b/drivers/gpu/drm/i915/gvt/gvt.h
|
|
|
|
@@ -52,6 +52,7 @@
|
|
|
|
|
|
|
|
#define GVT_MAX_VGPU 8
|
|
|
|
|
|
|
|
+#define GVT_CURSOR_BLOCKS 8
|
|
|
|
enum {
|
|
|
|
INTEL_GVT_HYPERVISOR_XEN = 0,
|
|
|
|
INTEL_GVT_HYPERVISOR_KVM,
|
|
|
|
--
|
|
|
|
https://clearlinux.org
|
|
|
|
|