Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Disable display crc feature for vgpu
@ 2017-12-05  8:57 Xiaolin Zhang
  2017-12-05  9:24 ` ✓ Fi.CI.BAT: success for " Patchwork
  2017-12-05 10:31 ` ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Xiaolin Zhang @ 2017-12-05  8:57 UTC (permalink / raw)
  To: intel-gfx; +Cc: intel-gvt-dev

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@intel.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-12-05 10:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-05  8:57 [PATCH] drm/i915: Disable display crc feature for vgpu Xiaolin Zhang
2017-12-05  9:24 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-12-05 10:31 ` ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox