[PATCH] drm/i915/gvt: add return error to cmd_reg_handler
Zhenyu Wang
zhenyuw at linux.intel.com
Wed Feb 22 06:01:29 UTC 2017
On 2017.02.20 17:01:44 +0800, Tina Zhang wrote:
> cmd_reg_handler should return -EINVAL when error occurs.
>
Although this one is correct handling, looks error path for
cmd parser failure has not been cleaned properly for this.
So I might drop this one now. And pls include this for further
complete fixes for cmd parser error handler.
> 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
>
> _______________________________________________
> 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/20170222/6347fead/attachment.sig>
More information about the intel-gvt-dev
mailing list