aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/gvt/cmd_parser.c
diff options
context:
space:
mode:
authorZhao Yan <[email protected]>2018-08-01 04:15:48 +0000
committerZhenyu Wang <[email protected]>2018-08-14 07:26:39 +0000
commit8d458ea0ec331adb4c829289e9a56c97d3c1e542 (patch)
tree6222f71c839e253207993a48e5f2a0f5e9576e91 /drivers/gpu/drm/i915/gvt/cmd_parser.c
parentdrm/i915/gvt: initialize dmabuf mutex in vgpu_create (diff)
downloadkernel-8d458ea0ec331adb4c829289e9a56c97d3c1e542.tar.gz
kernel-8d458ea0ec331adb4c829289e9a56c97d3c1e542.zip
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: Zhao Yan <[email protected]> Signed-off-by: Zhenyu Wang <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/i915/gvt/cmd_parser.c')
-rw-r--r--drivers/gpu/drm/i915/gvt/cmd_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 45e89b1e0481..a614db310ea2 100644
--- a/drivers/gpu/drm/i915/gvt/cmd_parser.c
+++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c
@@ -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)) {