[PATCH] drm/i915: Disable display crc feature for vgpu

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

 



for vgpu, it doesn't support display crc feature.
this patch is to skip pipe crc create and report ENODEV
during set_crc_source. igt display crc relatated cases will be
failed instead of dead sleep.

Signed-off-by: Xiaolin Zhang <xiaolin.zhang@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_pipe_crc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_pipe_crc.c b/drivers/gpu/drm/i915/intel_pipe_crc.c
index 1f5cd572a7ff..a4885127a0dc 100644
--- a/drivers/gpu/drm/i915/intel_pipe_crc.c
+++ b/drivers/gpu/drm/i915/intel_pipe_crc.c
@@ -899,6 +899,9 @@ int intel_pipe_crc_create(struct drm_minor *minor)
 	struct dentry *ent;
 	int i;
 
+	if (dev_priv->vgpu.active)
+		return 0;
+
 	for (i = 0; i < ARRAY_SIZE(i915_pipe_crc_data); i++) {
 		struct pipe_crc_info *info = &i915_pipe_crc_data[i];
 
@@ -923,6 +926,9 @@ int intel_crtc_set_crc_source(struct drm_crtc *crtc, const char *source_name,
 	u32 val = 0; /* shut up gcc */
 	int ret = 0;
 
+	if (dev_priv->vgpu.active)
+		return -ENODEV;
+
 	if (display_crc_ctl_parse_source(source_name, &source) < 0) {
 		DRM_DEBUG_DRIVER("unknown source %s\n", source_name);
 		return -EINVAL;
-- 
2.14.2

_______________________________________________
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