]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/oa: Implement Wa_14026633728
authorAshutosh Dixit <ashutosh.dixit@intel.com>
Mon, 27 Apr 2026 22:11:33 +0000 (15:11 -0700)
committerAshutosh Dixit <ashutosh.dixit@intel.com>
Wed, 29 Apr 2026 19:24:02 +0000 (12:24 -0700)
CRI Wa_14026633728 requires MERTOA buffer to be allocated in device memory,
not system memory (which is the default for OA buffers).

v2: Move WA to xe_device_wa_oob.rules and use XE_DEVICE_WA() (Matt Roper)

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patch.msgid.link/20260427221133.2500532-4-ashutosh.dixit@intel.com
drivers/gpu/drm/xe/xe_device_wa_oob.rules
drivers/gpu/drm/xe/xe_oa.c

index d129cddb6ead4e87200ae062ce2b7fe659c13d31..92371c4905290001a86b5e6e4ce954dda395840a 100644 (file)
@@ -4,3 +4,4 @@
 22019338487_display    PLATFORM(LUNARLAKE)
 14022085890    SUBPLATFORM(BATTLEMAGE, G21)
 14026539277    PLATFORM(NOVALAKE_P), PLATFORM_STEP(A0, B0)
+14026633728    PLATFORM(CRESCENTISLAND)
index 83797c9479f7c5364fb98e999152722a863b845b..5de5bf19240a2915396077765ddfd4423d519f55 100644 (file)
@@ -15,6 +15,7 @@
 #include <uapi/drm/xe_drm.h>
 
 #include <generated/xe_wa_oob.h>
+#include <generated/xe_device_wa_oob.h>
 
 #include "abi/guc_actions_slpc_abi.h"
 #include "instructions/xe_mi_commands.h"
@@ -250,6 +251,11 @@ static void oa_timestamp_clear(struct xe_oa_stream *stream, u32 report_offset)
                xe_map_wr(stream->oa->xe, map, report_offset + 4, u32, 0);
 }
 
+static bool mert_wa_14026633728(struct xe_oa_stream *s)
+{
+       return s->oa_unit->type == DRM_XE_OA_UNIT_TYPE_MERT && XE_DEVICE_WA(s->oa->xe, 14026633728);
+}
+
 static bool xe_oa_buffer_check_unlocked(struct xe_oa_stream *stream)
 {
        u32 gtt_offset = xe_bo_ggtt_addr(stream->oa_buffer.bo);
@@ -893,11 +899,14 @@ static void xe_oa_stream_destroy(struct xe_oa_stream *stream)
 
 static int xe_oa_alloc_oa_buffer(struct xe_oa_stream *stream, size_t size)
 {
+       u32 vram = mert_wa_14026633728(stream) ?
+               XE_BO_FLAG_VRAM_IF_DGFX(xe_device_get_root_tile(stream->oa->xe)) :
+               XE_BO_FLAG_SYSTEM;
        struct xe_bo *bo;
 
        bo = xe_bo_create_pin_map_novm(stream->oa->xe, stream->gt->tile,
                                       size, ttm_bo_type_kernel,
-                                      XE_BO_FLAG_SYSTEM | XE_BO_FLAG_GGTT, false);
+                                      vram | XE_BO_FLAG_GGTT, false);
        if (IS_ERR(bo))
                return PTR_ERR(bo);