Skip to content

Commit

Permalink
drm/i915/gvt: return error on cmd access
Browse files Browse the repository at this point in the history
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: Zhao Yan <yan.y.zhao@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
  • Loading branch information
Zhao Yan authored and Zhenyu Wang committed Aug 14, 2018
1 parent d6c6113 commit 8d458ea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/gvt/cmd_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -874,7 +874,7 @@ static int cmd_reg_handler(struct parser_exec_state *s,
if (!intel_gvt_mmio_is_cmd_access(gvt, offset)) {
gvt_vgpu_err("%s access to non-render register (%x)\n",
cmd, offset);
return 0;
return -EBADRQC;
}

if (is_shadowed_mmio(offset)) {
Expand Down

0 comments on commit 8d458ea

Please sign in to comment.