<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Failed to receive this mail for 5/6 patch (couldn't find it in my
    mailbox).<br>
    So pasted the comments from patchwork.<br>
    <blockquote type="cite"
      cite="mid:466b9074-2716-f3e8-161a-95b9ca03a06a@intel.com">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <pre class="content">Quoting Jackie Li (2018-03-02 02:16:45)
<span class="quote">> +++ b/drivers/gpu/drm/i915/intel_wopcm.c</span>
<span class="quote">> @@ -219,3 +219,67 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)</span>
<span class="quote">>  </span>
<span class="quote">>         return 0;</span>
<span class="quote">>  }</span>
<span class="quote">> +</span>
<span class="quote">> +static inline int write_and_verify(struct drm_i915_private *dev_priv,</span>
<span class="quote">> +                                  i915_reg_t reg, u32 val, u32 mask,</span>
<span class="quote">> +                                  u32 locked_bit)</span>
<span class="quote">> +{</span>
<span class="quote">> +       u32 reg_val;</span>
<span class="quote">> +</span>
<span class="quote">> +       GEM_BUG_ON(val & ~mask);</span>
<span class="quote">> +</span>
<span class="quote">> +       I915_WRITE(reg, val);</span>
<span class="quote">> +</span>
<span class="quote">> +       reg_val = I915_READ(reg);</span>

I guess I would have expected the error message here, with the wanted
value vs. what was in the register.

<SNIP>
<span class="quote">
> +err_out:</span>
<span class="quote">> +       DRM_ERROR("Failed to init WOPCM registers:\n");</span>
<span class="quote">> +       DRM_ERROR("DMA_GUC_WOPCM_OFFSET=%#x\n",</span>
<span class="quote">> +                 I915_READ(DMA_GUC_WOPCM_OFFSET));</span>
<span class="quote">> +       DRM_ERROR("GUC_WOPCM_SIZE=%#x\n", I915_READ(GUC_WOPCM_SIZE));</span>

As this doesn't really give information what were the computed write
values. But if you see this is most useful for debuggin, this is;</pre>
    </blockquote>
    Thanks for the comments!<br>
    <br>
    This is for debugging. and the consideration was to print both the<br>
    offset and size register values for any reg update errors,  the<br>
    calculated values were printed as debug messages during wopcm<br>
    partitioning (wopcm_init)<br>
    <br>
    Regards,<br>
    -Jackie
    <blockquote type="cite"
      cite="mid:466b9074-2716-f3e8-161a-95b9ca03a06a@intel.com">
      <pre class="content"><span class="reviewed-by">Reviewed-by: Joonas Lahtinen <a class="moz-txt-link-rfc2396E" href="mailto:joonas.lahtinen@linux.intel.com"><joonas.lahtinen@linux.intel.com></a></span>
</pre>
    </blockquote>
    <br>
    <br>
  </body>
</html>