Commit 8d458ea0 authored by Zhao Yan's avatar Zhao Yan Committed by Zhenyu Wang

drm/i915/gvt: return error on cmd access

If a register is not cmd accessible, should not just print error
message. Return error here so as not to deliver this cmd.

v2: return -EBADRQC to align with return value elsewhere. (kevin tian)
Signed-off-by: default avatarZhao Yan <yan.y.zhao@intel.com>
Signed-off-by: default avatarZhenyu Wang <zhenyuw@linux.intel.com>
parent d6c6113b
...@@ -874,7 +874,7 @@ static int cmd_reg_handler(struct parser_exec_state *s, ...@@ -874,7 +874,7 @@ static int cmd_reg_handler(struct parser_exec_state *s,
if (!intel_gvt_mmio_is_cmd_access(gvt, offset)) { if (!intel_gvt_mmio_is_cmd_access(gvt, offset)) {
gvt_vgpu_err("%s access to non-render register (%x)\n", gvt_vgpu_err("%s access to non-render register (%x)\n",
cmd, offset); cmd, offset);
return 0; return -EBADRQC;
} }
if (is_shadowed_mmio(offset)) { if (is_shadowed_mmio(offset)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment