[Intel-gfx] [PATCH 2/3] drm/i915: Make i915_coherent_map_type GT-centric
Andi Shyti
andi.shyti at linux.intel.com
Tue Aug 1 14:32:00 UTC 2023
Hi Jonathan,
Apparently checkpatch is complaining...
[...]
> diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
> index 119deb9f938c..1897cb5aa2a2 100644
> --- a/drivers/gpu/drm/i915/gt/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
> @@ -1191,7 +1191,7 @@ lrc_pre_pin(struct intel_context *ce,
> GEM_BUG_ON(!i915_vma_is_pinned(ce->state));
>
> *vaddr = i915_gem_object_pin_map(ce->state->obj,
> - i915_coherent_map_type(ce->engine->i915,
> + intel_gt_coherent_map_type(ce->engine->gt,
> ce->state->obj,
> false) |
... here:
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
> I915_MAP_OVERRIDE);
[...]
> diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_context.c
> index 76fbae358072..afce036bcaa8 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_context.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_context.c
> @@ -88,7 +88,7 @@ static int __live_context_size(struct intel_engine_cs *engine)
> goto err;
>
> vaddr = i915_gem_object_pin_map_unlocked(ce->state->obj,
> - i915_coherent_map_type(engine->i915,
> + intel_gt_coherent_map_type(engine->gt,
> ce->state->obj, false));
... here:
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
> if (IS_ERR(vaddr)) {
> err = PTR_ERR(vaddr);
[...]
> diff --git a/drivers/gpu/drm/i915/gt/selftest_lrc.c b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> index a78a3d2c2e16..bc883de02295 100644
> --- a/drivers/gpu/drm/i915/gt/selftest_lrc.c
> +++ b/drivers/gpu/drm/i915/gt/selftest_lrc.c
> @@ -1292,7 +1292,7 @@ static int compare_isolation(struct intel_engine_cs *engine,
> }
>
> lrc = i915_gem_object_pin_map_unlocked(ce->state->obj,
> - i915_coherent_map_type(engine->i915,
> + intel_gt_coherent_map_type(engine->gt,
> ce->state->obj,
> false));
... here:
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
> if (IS_ERR(lrc)) {
[...]
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> index 2eb891b270ae..c0fa9d232205 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c
> @@ -792,7 +792,7 @@ int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size,
> return PTR_ERR(vma);
>
> vaddr = i915_gem_object_pin_map_unlocked(vma->obj,
> - i915_coherent_map_type(guc_to_gt(guc)->i915,
> + intel_gt_coherent_map_type(guc_to_gt(guc),
> vma->obj, true));
... here:
CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
> if (IS_ERR(vaddr)) {
> i915_vma_unpin_and_release(&vma, 0);
[...]
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> index 1ce07d7e8769..8e0b5d48ddf6 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp_tee.c
> @@ -11,6 +11,7 @@
> #include "gem/i915_gem_lmem.h"
>
> #include "i915_drv.h"
> +#include "gt/intel_gt.h"
>
> #include "intel_pxp.h"
> #include "intel_pxp_cmd_interface_42.h"
> @@ -245,7 +246,7 @@ static int alloc_streaming_command(struct intel_pxp *pxp)
> }
>
> /* map the lmem into the virtual memory pointer */
> - cmd = i915_gem_object_pin_map_unlocked(obj, i915_coherent_map_type(i915, obj, true));
> + cmd = i915_gem_object_pin_map_unlocked(obj, intel_gt_coherent_map_type(pxp->ctrl_gt, obj, true));
... and here:
WARNING:LONG_LINE: line length of 105 exceeds 100 columns
Can you please fix those, run again checkpatch.pl and resend?
Thanks,
Andi
> if (IS_ERR(cmd)) {
> drm_err(&i915->drm, "Failed to map gsc message page!\n");
> err = PTR_ERR(cmd);
More information about the Intel-gfx
mailing list