drm/i915: Parametrize UOS_RSA_SCRATCH
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 Sep 2015 17:03:24 +0000 (20:03 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 Sep 2015 08:20:13 +0000 (10:20 +0200)
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_guc_reg.h
drivers/gpu/drm/i915/intel_guc_loader.c

index b35566164c4d9bfffa3e81d746b83ef7b8a7b6c4..c4cb1c0c4d0d76af3162412b0ec09e8b96007caf 100644 (file)
@@ -41,7 +41,7 @@
 
 #define SOFT_SCRATCH(n)                        (0xc180 + ((n) * 4))
 
-#define UOS_RSA_SCRATCH_0              0xc200
+#define UOS_RSA_SCRATCH(i)             (0xc200 + (i) * 4)
 #define DMA_ADDR_0_LOW                 0xc300
 #define DMA_ADDR_0_HIGH                        0xc304
 #define DMA_ADDR_1_LOW                 0xc308
index 40241f37e24b94bfe37f3de4e1cc799e6e4e98b4..5d17b63c107cc5664b5ad3b1bff24031d7ef6c0f 100644 (file)
@@ -258,7 +258,7 @@ static int guc_ucode_xfer_dma(struct drm_i915_private *dev_priv)
        /* Copy RSA signature from the fw image to HW for verification */
        sg_pcopy_to_buffer(sg->sgl, sg->nents, rsa, UOS_RSA_SIG_SIZE, offset);
        for (i = 0; i < UOS_RSA_SIG_SIZE / sizeof(u32); i++)
-               I915_WRITE(UOS_RSA_SCRATCH_0 + i * sizeof(u32), rsa[i]);
+               I915_WRITE(UOS_RSA_SCRATCH(i), rsa[i]);
 
        /* Set the source address for the new blob */
        offset = i915_gem_obj_ggtt_offset(fw_obj);