summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorYan Zhao <yan.y.zhao@intel.com>2020-12-23 11:46:23 +0800
committerZhenyu Wang <zhenyuw@linux.intel.com>2020-12-25 11:16:28 +0800
commitb7ccb10ed80c6e152cf2a4eb16f548715cc1869a (patch)
treee95fd694851d1cd0377018d7a7128c169fce49d8 /drivers/gpu/drm
parent885e1938452fc7fc37a3051d76e1ddb7ead099fa (diff)
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 <kevin.tian@intel.com> Signed-off-by: Yan Zhao <yan.y.zhao@intel.com> Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20201223034623.17368-1-yan.y.zhao@intel.com Reviewed-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/gvt/cmd_parser.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gvt/cmd_parser.c b/drivers/gpu/drm/i915/gvt/cmd_parser.c
index 83fa4f17c943..97f1c3e270e6 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;
}