drm/i915: move intel_hws_csb_write_index() out of i915_drv.h
Underscore prefix the index macros, and place INTEL_HWS_CSB_WRITE_INDEX() as a macro next to them, to declutter i915_drv.h. v2: Don't underscore the index macros (Tvrtko) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220209131143.3365230-1-jani.nikula@intel.com
This commit is contained in:
parent
98476876b8
commit
df62ae6fc9
|
@ -182,6 +182,8 @@ intel_write_status_page(struct intel_engine_cs *engine, int reg, u32 value)
|
|||
#define I915_HWS_CSB_BUF0_INDEX 0x10
|
||||
#define I915_HWS_CSB_WRITE_INDEX 0x1f
|
||||
#define ICL_HWS_CSB_WRITE_INDEX 0x2f
|
||||
#define INTEL_HWS_CSB_WRITE_INDEX(__i915) \
|
||||
(GRAPHICS_VER(__i915) >= 11 ? ICL_HWS_CSB_WRITE_INDEX : I915_HWS_CSB_WRITE_INDEX)
|
||||
|
||||
void intel_engine_stop(struct intel_engine_cs *engine);
|
||||
void intel_engine_cleanup(struct intel_engine_cs *engine);
|
||||
|
|
|
@ -3465,7 +3465,7 @@ int intel_execlists_submission_setup(struct intel_engine_cs *engine)
|
|||
(u64 *)&engine->status_page.addr[I915_HWS_CSB_BUF0_INDEX];
|
||||
|
||||
execlists->csb_write =
|
||||
&engine->status_page.addr[intel_hws_csb_write_index(i915)];
|
||||
&engine->status_page.addr[INTEL_HWS_CSB_WRITE_INDEX(i915)];
|
||||
|
||||
if (GRAPHICS_VER(i915) < 11)
|
||||
execlists->csb_size = GEN8_CSB_ENTRIES;
|
||||
|
|
|
@ -163,7 +163,7 @@ static void emulate_csb_update(struct intel_vgpu_execlist *execlist,
|
|||
hwsp_gpa + I915_HWS_CSB_BUF0_INDEX * 4 + write_pointer * 8,
|
||||
status, 8);
|
||||
intel_gvt_hypervisor_write_gpa(vgpu,
|
||||
hwsp_gpa + intel_hws_csb_write_index(execlist->engine->i915) * 4,
|
||||
hwsp_gpa + INTEL_HWS_CSB_WRITE_INDEX(execlist->engine->i915) * 4,
|
||||
&write_pointer, 4);
|
||||
}
|
||||
|
||||
|
|
|
@ -1696,14 +1696,6 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)
|
|||
return (struct intel_device_info *)INTEL_INFO(dev_priv);
|
||||
}
|
||||
|
||||
static inline int intel_hws_csb_write_index(struct drm_i915_private *i915)
|
||||
{
|
||||
if (GRAPHICS_VER(i915) >= 11)
|
||||
return ICL_HWS_CSB_WRITE_INDEX;
|
||||
else
|
||||
return I915_HWS_CSB_WRITE_INDEX;
|
||||
}
|
||||
|
||||
static inline enum i915_map_type
|
||||
i915_coherent_map_type(struct drm_i915_private *i915,
|
||||
struct drm_i915_gem_object *obj, bool always_coherent)
|
||||
|
|
Loading…
Reference in New Issue