drm/i915/gvt: fix error return check for copy_gma_to_hva()
PATCH 1/1 drm/i915/gvt: fix error return check for copy_gma_to_hva()
From commit 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly"), copy_gma_to_hva() now returns copied data length instead of 0, so need to change error return check for that.
Note: Looks this is caused by backmerge conflict resolving, so 4.11-rc4 is not impacted as commit 73dec95e6ba3 ("drm/i915: Emit to ringbuffer directly") is not in 4.11. But need to fix this before I can apply 4.12 stuff against drm-intel-next correctly.
--- drivers/gpu/drm/i915/gvt/cmd_parser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gvt/cmd_parser.c +4 -4
@@ -1673,7 +1673,7 @@ static int perform_bb_shadow(struct parser_exec_state *s) ret =copy_gma_to_hva (s->vgpu, s->vgpu->gtt.ggtt_mm, gma, gma + bb_size, dst); -if (ret) { +if (ret <0 ) {gvt_vgpu_err ("fail to copy guest ring buffer\n" ); goto unmap_src; }
@@ -2666,7 +2666,7 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)if (gma_head > gma_tail) { ret =copy_gma_to_hva (vgpu, vgpu->gtt.ggtt_mm, gma_head, gma_top, cs); -if (ret) { +if (ret <0 ) {gvt_vgpu_err ("fail to copy guest ring buffer\n" );return ret; }
@@ -2676,7 +2676,7 @@ static int shadow_workload_ring_buffer(struct intel_vgpu_workload *workload)/* copy head or start <-> tail */ ret =copy_gma_to_hva (vgpu, vgpu->gtt.ggtt_mm, gma_head, gma_tail, cs); -if (ret) { +if (ret <0 ) {gvt_vgpu_err ("fail to copy guest ring buffer\n" );return ret; }
@@ -2737,7 +2737,7 @@ static int shadow_indirect_ctx(struct intel_shadow_wa_ctx *wa_ctx) wa_ctx->workload->vgpu->gtt.ggtt_mm, guest_gma, guest_gma + ctx_size, map); -if (ret) { +if (ret <0 ) {gvt_vgpu_err ("fail to copy guest indirect ctx\n" ); goto unmap_src; }
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✓ Fi.CI.BAT: success for drm/i915/gvt: fix error return check for copy_gma_to_hva()
== Series Details ==
== Series Details ==
Series: drm/i915/gvt: fix error return check for copy_gma_to_hva()
URL : https://patchwork.freedesktop.org/series/22049/
State : success
== Summary ==
Series 22049v1 drm/i915/gvt: fix error return check for copy_gma_to_hva()
https://patchwork.freedesktop.org/api/1.0/series/22049/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS (fi-skl-6260u)fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 459s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time: 466s fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 586s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 537s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 564s fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 511s fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 501s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 435s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 432s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 440s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 521s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 509s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 489s fi-kbl-7560u total:278 pass:267 dwarn:1 dfail:0 fail:0 skip:10 time: 592s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 481s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 609s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 487s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 517s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time: 466s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 550s fi-snb-2600 total:278 pass:249 dwarn:0 dfail:0 fail:0 skip:29 time: 419s
dabd992961047cf26698036f563aa86a083284ac drm-tip: 2017y-03m-28d-15h-25m-54s UTC integration manifest 3c1bd3b drm/i915/gvt: fix error return check for copy_gma_to_hva()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4332/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx