On Tue, 2017-12-12 at 14:56 -0800, Jackie Li wrote: > intel_guc_reg.h should only include definition for GuC registers > and related register bits. GuC WOPCM related values should not > be defined in intel_guc_reg.h > > This patch creates a better file structure by moving GuC WOPCM > related definitions int to a new header intel_guc_wopcm.h > and moving GuC WOPCM related functions to a new source file > intel_guc_wopcm.c > > Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx> > Cc: Sagar Arun Kamble <sagar.a.kamble@xxxxxxxxx> > Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > Cc: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> > Signed-off-by: Jackie Li <yaodong.li@xxxxxxxxx> <SNIP> > +++ b/drivers/gpu/drm/i915/intel_uc.c > @@ -218,7 +218,7 @@ int intel_uc_init_hw(struct drm_i915_private *dev_priv) > } > > /* init WOPCM */ > - I915_WRITE(GUC_WOPCM_SIZE, intel_guc_wopcm_size(dev_priv)); > + I915_WRITE(GUC_WOPCM_SIZE, intel_guc_wopcm_size(guc)); This is a write-once register, the code needs to be refactored to account that somebody (like an ugly BIOS) wrote it already and we have to live with that value. Otherwise we're digging a hole for future selves. We should also verify that the write sticks as we expect. Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx