[PATCH] drm/i915/gvt: add return error to cmd_reg_handler
Zhenyu Wang
zhenyuw at linux.intel.com
Tue Feb 21 02:48:10 UTC 2017
On 2017.02.20 17:01:44 +0800, Tina Zhang wrote:
> cmd_reg_handler should return -EINVAL when error occurs.
>
> Signed-off-by: Tina Zhang <tina.zhang at intel.com>
>
applied, thanks!
> 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
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev
--
Open Source Technology Center, Intel ltd.
$gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 163 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gvt-dev/attachments/20170221/fe684cb9/attachment.sig>
More information about the intel-gvt-dev
mailing list