drm/i915/uc: Move uC WOPCM setup in uc_init_hw

The register we write are not WOPCM regs but uC ones related to how
GuC and HuC are going to use the WOPCM, so it makes logical sense
for them to be programmed as part of uc_init_hw. The WOPCM map on the
other side is not uC-specific (although that is our main use-case), so
keep that separate.

v2: move write_and_verify to uncore, fix log, re-use err_out tag,
    add intel_wopcm_guc_base, fix log

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190730230743.19542-2-daniele.ceraolospurio@intel.com
这个提交包含在:
Daniele Ceraolo Spurio
2019-07-30 16:07:40 -07:00
提交者 Chris Wilson
父节点 602776f96b
当前提交 63064d822c
修改 6 个文件,包含 76 行新增80 行删除

查看文件

@@ -9,8 +9,6 @@
#include <linux/types.h>
struct intel_gt;
/**
* struct intel_wopcm - Overall WOPCM info and WOPCM regions.
* @size: Size of overall WOPCM.
@@ -26,6 +24,21 @@ struct intel_wopcm {
} guc;
};
/**
* intel_wopcm_guc_base()
* @wopcm: intel_wopcm structure
*
* Returns the base of the WOPCM shadowed region.
*
* Returns:
* 0 if GuC is not present or not in use.
* Otherwise, the GuC WOPCM base.
*/
static inline u32 intel_wopcm_guc_base(struct intel_wopcm *wopcm)
{
return wopcm->guc.base;
}
/**
* intel_wopcm_guc_size()
* @wopcm: intel_wopcm structure
@@ -43,6 +56,5 @@ static inline u32 intel_wopcm_guc_size(struct intel_wopcm *wopcm)
void intel_wopcm_init_early(struct intel_wopcm *wopcm);
int intel_wopcm_init(struct intel_wopcm *wopcm);
int intel_wopcm_init_hw(struct intel_wopcm *wopcm, struct intel_gt *gt);
#endif