From: Yan Zhao Date: Wed, 23 Dec 2020 03:46:23 +0000 (+0800) Subject: drm/i915/gvt: update F_CMD_WRITE_PATCH flag when parsing init ctx X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=b7ccb10ed80c6e152cf2a4eb16f548715cc1869a;p=linux.git drm/i915/gvt: update F_CMD_WRITE_PATCH flag when parsing init ctx if a vreg has write handler, set its flag F_CMD_WRITE_PATCH on when parsing init ctx. Cc: Kevin Tian Signed-off-by: Yan Zhao Signed-off-by: Zhenyu Wang Link: http://patchwork.freedesktop.org/patch/msgid/20201223034623.17368-1-yan.y.zhao@intel.com Reviewed-by: Zhenyu Wang --- diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c index 83fa4f17c943f..97f1c3e270e6b 100644 --- a/drivers/gpu/drm/i915/gvt/cmd_parser.c +++ b/drivers/gpu/drm/i915/gvt/cmd_parser.c @@ -953,7 +953,12 @@ static int cmd_reg_handler(struct parser_exec_state *s, } if (is_init_ctx(s)) { + struct intel_gvt_mmio_info *mmio_info; + intel_gvt_mmio_set_cmd_accessible(gvt, offset); + mmio_info = intel_gvt_find_mmio_info(gvt, offset); + if (mmio_info && mmio_info->write) + intel_gvt_mmio_set_cmd_write_patch(gvt, offset); return 0; }