]> Git Repo - linux.git/commitdiff
drm/xe/xe2lpm: Fixup Wa_14020756599
authorTejas Upadhyay <[email protected]>
Fri, 7 Jun 2024 12:25:28 +0000 (17:55 +0530)
committerLucas De Marchi <[email protected]>
Tue, 11 Jun 2024 15:21:01 +0000 (08:21 -0700)
This WA needs to be applied to graphics GT when the media version
is 2000. Currently, media version 2000 is always paired with
graphics version 2004 which will result in writing same register
with same bits twice. We can't add optional rule in rtp
framework and also writing same register with same bits gives
warning.

Currently, media version 2000 is always paired with graphics version
2004, so just checking the latter is sufficient.

V2(Lucas):
  - Add more detail in commit message
  - Improve code comment to follow guideline

Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/2016
Fixes: 131328aa5699 ("drm/xe/xe2lpm: Add permanent Wa_14020756599")
Signed-off-by: Tejas Upadhyay <[email protected]>
Reviewed-by: Lucas De Marchi <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Signed-off-by: Lucas De Marchi <[email protected]>
drivers/gpu/drm/xe/xe_rtp.c
drivers/gpu/drm/xe/xe_rtp.h
drivers/gpu/drm/xe/xe_wa.c

index 01c32a932780e604e3f9ecf72db9aebc4336effb..eff1c9c2f5ccc89819a43135a757e06eda55b495 100644 (file)
@@ -324,8 +324,3 @@ bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
        return dss >= dss_per_gslice;
 }
 
-bool xe_rtp_match_when_media2000(const struct xe_gt *gt,
-                                const struct xe_hw_engine *hwe)
-{
-       return (gt_to_xe(gt))->info.media_verx100 == 2000;
-}
index a32645f5f80b4e415daf14221ed02bb9a675a856..337b1ef1959c6246b60fc12f9e65ab1a85fcd3aa 100644 (file)
@@ -427,18 +427,4 @@ bool xe_rtp_match_first_render_or_compute(const struct xe_gt *gt,
 bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt,
                                         const struct xe_hw_engine *hwe);
 
-/*
- * xe_rtp_match_when_media2000 - Match when media GT version 2000
- *
- * @gt: GT structure
- * @hwe: Engine instance
- *
- * Its one of the case where we need to apply workaround on primary GT
- * based on if media GT version 2000 is present. Thus this API will help
- * us to match media version 2000.
- *
- * Returns: true if media GT version 2000, false otherwise.
- */
-bool xe_rtp_match_when_media2000(const struct xe_gt *gt,
-                                const struct xe_hw_engine *hwe);
 #endif
index 26b170a0cdc7ecde0d17eefd9d0abed2ddae5f0f..18a4d5dd5a4c3cb9f282491f10812176df2c87f1 100644 (file)
@@ -677,6 +677,13 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
                       ENGINE_CLASS(RENDER)),
          XE_RTP_ACTIONS(SET(CHICKEN_RASTER_2, TBIMR_FAST_CLIP))
        },
+       /*
+        * This WA is also needed on primary GT when the media version is 2000.
+        * Currently, media version 2000 is always paired with graphics version
+        * 2004, so just checking the latter is sufficient. In the future, media
+        * version 2000 can be used with some other graphics version where WA
+        * still needs to be implemented
+        */
        { XE_RTP_NAME("14020756599"),
          XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)),
          XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS))
@@ -705,13 +712,6 @@ static const struct xe_rtp_entry_sr lrc_was[] = {
                             DIS_AUTOSTRIP))
        },
 
-       /* Xe2_LPM */
-
-       { XE_RTP_NAME("14020756599"),
-         XE_RTP_RULES(ENGINE_CLASS(RENDER), FUNC(xe_rtp_match_when_media2000)),
-         XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS))
-       },
-
        {}
 };
 
This page took 0.053153 seconds and 4 git commands to generate.