[PATCH] drm/i915/gvt: add return error to cmd_reg_handler
Tina Zhang
tina.zhang at intel.com
Mon Feb 20 09:01:44 UTC 2017
cmd_reg_handler should return -EINVAL when error occurs.
Signed-off-by: Tina Zhang <tina.zhang at intel.com>
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 7a5d7f5..bb82b77 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -832,13 +832,13 @@ static int cmd_reg_handler(struct parser_exec_state *s,
if (!intel_gvt_mmio_is_cmd_access(gvt, offset)) {
gvt_err("vgpu%d: %s access to non-render register (%x)\n",
s->vgpu->id, cmd, offset);
- return 0;
+ return -EINVAL;
}
if (is_shadowed_mmio(offset)) {
gvt_err("vgpu%d: found access of shadowed MMIO %x\n",
s->vgpu->id, offset);
- return 0;
+ return -EINVAL;
}
if (offset == i915_mmio_reg_offset(DERRMR) ||
--
1.9.1
More information about the intel-gvt-dev
mailing list