aboutsummaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorMatt Roper <[email protected]>2023-02-23 10:57:40 -0800
committerRodrigo Vivi <[email protected]>2023-12-19 18:29:43 -0500
commit90385dcfc040648e928a883298a19e2afbba41e5 (patch)
tree157cefcb32e4b8fef943e4251496d47471bd3155 /drivers/gpu
parentf659ac1564d96b1ba19694db9899d6fb18ffc3e7 (diff)
drm/xe/mocs: Drop HAS_RENDER_L3CC flag
The HAS_RENDER_L3CC is set unconditionally so there's no need to keep it as a dedicated flag. For error checking purposes, we can just make sure the 'table' field is initialized properly. Cc: Lucas De Marchi <[email protected]> Suggested-by: Lucas De Marchi <[email protected]> Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/xe/xe_mocs.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/xe/xe_mocs.c b/drivers/gpu/drm/xe/xe_mocs.c
index ef237853fdab..e09c6242aafc 100644
--- a/drivers/gpu/drm/xe/xe_mocs.c
+++ b/drivers/gpu/drm/xe/xe_mocs.c
@@ -25,7 +25,6 @@ static inline void mocs_dbg(const struct drm_device *dev,
enum {
HAS_GLOBAL_MOCS = BIT(0),
- HAS_RENDER_L3CC = BIT(1),
};
struct xe_mocs_entry {
@@ -440,10 +439,11 @@ static unsigned int get_mocs_settings(struct xe_device *xe,
*/
XE_WARN_ON(info->unused_entries_index == 0);
- if (XE_WARN_ON(info->size > info->n_entries))
+ if (XE_WARN_ON(info->size > info->n_entries)) {
+ info->table = NULL;
return 0;
+ }
- flags = HAS_RENDER_L3CC;
if (!IS_DGFX(xe))
flags |= HAS_GLOBAL_MOCS;
@@ -538,6 +538,6 @@ void xe_mocs_init(struct xe_gt *gt)
* sure the LNCFCMOCSx registers are programmed for the subsequent
* memory transactions including guc transactions
*/
- if (flags & HAS_RENDER_L3CC)
+ if (table.table)
init_l3cc_table(gt, &table);
}