Skip to content

Commit

Permalink
drm/i915/huc: Use helper function while waiting for DMA completion
Browse files Browse the repository at this point in the history
Waiting for DMA status register can be done with dedicated function.
Lets use it as additional bonus will be smaller driver footprint.

Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20171024105056.43276-1-michal.wajdeczko@intel.com
  • Loading branch information
Michal Wajdeczko authored and Chris Wilson committed Oct 26, 2017
1 parent c41937f commit bad7b7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/i915/intel_huc.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ static int huc_ucode_xfer(struct intel_uc_fw *huc_fw, struct i915_vma *vma)
I915_WRITE(DMA_CTRL, _MASKED_BIT_ENABLE(HUC_UKERNEL | START_DMA));

/* Wait for DMA to finish */
ret = wait_for((I915_READ(DMA_CTRL) & START_DMA) == 0, 100);
ret = intel_wait_for_register_fw(dev_priv, DMA_CTRL, START_DMA, 0, 100);

DRM_DEBUG_DRIVER("HuC DMA transfer wait over with ret %d\n", ret);

Expand Down

0 comments on commit bad7b7e

Please sign in to comment.