drm/i915/gvt: use directly assignment for structure copying

Let c compiler handle the structure copying. The compiler will use
builtin function to handle that.

Signed-off-by: Changbin Du <changbin.du@intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
This commit is contained in:
Changbin Du 2017-04-06 10:56:03 +08:00 committed by Zhenyu Wang
parent 43c29e1f44
commit fd3bd0a99c
2 changed files with 2 additions and 4 deletions

View File

@ -2477,7 +2477,7 @@ static int cmd_parser_exec(struct parser_exec_state *s)
t1 = get_cycles();
memcpy(&s_before_advance_custom, s, sizeof(struct parser_exec_state));
s_before_advance_custom = *s;
if (info->handler) {
ret = info->handler(s);

View File

@ -687,9 +687,7 @@ static int submit_context(struct intel_vgpu *vgpu, int ring_id,
}
if (emulate_schedule_in)
memcpy(&workload->elsp_dwords,
&vgpu->execlist[ring_id].elsp_dwords,
sizeof(workload->elsp_dwords));
workload->elsp_dwords = vgpu->execlist[ring_id].elsp_dwords;
gvt_dbg_el("workload %p ring id %d head %x tail %x start %x ctl %x\n",
workload, ring_id, head, tail, start, ctl);