Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/xe/xe2lpm: Fixup Wa_14020756599

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 <tejas.upadhyay@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240607122528.1048610-1-tejas.upadhyay@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>

authored by

Tejas Upadhyay and committed by
Lucas De Marchi
24d0d98a 4ca1a12a

+7 -26
-5
drivers/gpu/drm/xe/xe_rtp.c
··· 324 324 return dss >= dss_per_gslice; 325 325 } 326 326 327 - bool xe_rtp_match_when_media2000(const struct xe_gt *gt, 328 - const struct xe_hw_engine *hwe) 329 - { 330 - return (gt_to_xe(gt))->info.media_verx100 == 2000; 331 - }
-14
drivers/gpu/drm/xe/xe_rtp.h
··· 427 427 bool xe_rtp_match_first_gslice_fused_off(const struct xe_gt *gt, 428 428 const struct xe_hw_engine *hwe); 429 429 430 - /* 431 - * xe_rtp_match_when_media2000 - Match when media GT version 2000 432 - * 433 - * @gt: GT structure 434 - * @hwe: Engine instance 435 - * 436 - * Its one of the case where we need to apply workaround on primary GT 437 - * based on if media GT version 2000 is present. Thus this API will help 438 - * us to match media version 2000. 439 - * 440 - * Returns: true if media GT version 2000, false otherwise. 441 - */ 442 - bool xe_rtp_match_when_media2000(const struct xe_gt *gt, 443 - const struct xe_hw_engine *hwe); 444 430 #endif
+7 -7
drivers/gpu/drm/xe/xe_wa.c
··· 677 677 ENGINE_CLASS(RENDER)), 678 678 XE_RTP_ACTIONS(SET(CHICKEN_RASTER_2, TBIMR_FAST_CLIP)) 679 679 }, 680 + /* 681 + * This WA is also needed on primary GT when the media version is 2000. 682 + * Currently, media version 2000 is always paired with graphics version 683 + * 2004, so just checking the latter is sufficient. In the future, media 684 + * version 2000 can be used with some other graphics version where WA 685 + * still needs to be implemented 686 + */ 680 687 { XE_RTP_NAME("14020756599"), 681 688 XE_RTP_RULES(GRAPHICS_VERSION(2004), ENGINE_CLASS(RENDER)), 682 689 XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS)) ··· 710 703 SET(VFLSKPD, 711 704 DIS_PARTIAL_AUTOSTRIP | 712 705 DIS_AUTOSTRIP)) 713 - }, 714 - 715 - /* Xe2_LPM */ 716 - 717 - { XE_RTP_NAME("14020756599"), 718 - XE_RTP_RULES(ENGINE_CLASS(RENDER), FUNC(xe_rtp_match_when_media2000)), 719 - XE_RTP_ACTIONS(SET(WM_CHICKEN3, HIZ_PLANE_COMPRESSION_DIS)) 720 706 }, 721 707 722 708 {}