Skip to content

Commit

Permalink
drm/xe/guc: Enable WA 14018913170
Browse files Browse the repository at this point in the history
The GuC handles the WA, the KMD just needs to set the flag to enable
it on the appropriate platforms.

v2:
  - Fixed CI checkpatch warning, alignment should match open parenthesis.
  - Fixed GUC FW version check to use XE_UC_FW_VER_RELEASE which points to
    current GUC FW version instead of XE_UC_FW_VER_COMPATIBILITY which
    holds GUC FW I/F version (Badal).
v3:
  - Removed extra character in debug print.

Signed-off-by: Karthik Poosa <karthik.poosa@intel.com>
Reviewed-by: Badal Nilawar <badal.nilawar@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240117055035.2417711-1-karthik.poosa@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
  • Loading branch information
Karthik Poosa authored and Rodrigo Vivi committed Jan 18, 2024
1 parent 79f8eac commit c5a06c9
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/gpu/drm/xe/xe_guc.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,15 @@ static u32 guc_ctl_ads_flags(struct xe_guc *guc)
return flags;
}

#define GUC_VER(maj, min, pat) (((maj) << 16) | ((min) << 8) | (pat))

static u32 guc_ctl_wa_flags(struct xe_guc *guc)
{
struct xe_device *xe = guc_to_xe(guc);
struct xe_gt *gt = guc_to_gt(guc);
struct xe_uc_fw *uc_fw = &guc->fw;
struct xe_uc_fw_version *version = &uc_fw->versions.found[XE_UC_FW_VER_RELEASE];

u32 flags = 0;

if (XE_WA(gt, 22012773006))
Expand Down Expand Up @@ -165,6 +170,14 @@ static u32 guc_ctl_wa_flags(struct xe_guc *guc)
if (XE_WA(gt, 1509372804))
flags |= GUC_WA_RENDER_RST_RC6_EXIT;

if (XE_WA(gt, 14018913170)) {
if (GUC_VER(version->major, version->minor, version->patch) >= GUC_VER(70, 7, 0))
flags |= GUC_WA_ENABLE_TSC_CHECK_ON_RC6;
else
drm_warn(&xe->drm, "can't apply WA 14018913170, GUC version expected >= 70.7.0, found %u %u %u\n",
version->major, version->minor, version->patch);
}

return flags;
}

Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/xe/xe_guc_fwif.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ struct guc_update_exec_queue_policy {
#define GUC_WA_POLLCS BIT(18)
#define GUC_WA_RENDER_RST_RC6_EXIT BIT(19)
#define GUC_WA_RCS_REGS_IN_CCS_REGS_LIST BIT(21)
#define GUC_WA_ENABLE_TSC_CHECK_ON_RC6 BIT(22)

#define GUC_CTL_FEATURE 2
#define GUC_CTL_ENABLE_SLPC BIT(2)
Expand Down
5 changes: 5 additions & 0 deletions drivers/gpu/drm/xe/xe_wa_oob.rules
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@
14019821291 MEDIA_VERSION_RANGE(1300, 2000)
14015076503 MEDIA_VERSION(1300)
16020292621 GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
14018913170 GRAPHICS_VERSION(2004), GRAPHICS_STEP(A0, B0)
MEDIA_VERSION(2000), GRAPHICS_STEP(A0, A1)
GRAPHICS_VERSION_RANGE(1270, 1274)
MEDIA_VERSION(1300)
PLATFORM(DG2)

0 comments on commit c5a06c9

Please sign in to comment.