drm/xe: Relocate regs_are_mcr function
authorJanga Rahul Kumar <janga.rahul.kumar@intel.com>
Fri, 3 May 2024 19:39:01 +0000 (01:09 +0530)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 6 May 2024 16:24:49 +0000 (09:24 -0700)
Relocate regs_are_mcr funciton to a higher position in the file
for improved visibility.

Cc: Matt Roper <matthew.d.roper@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240503193902.2056202-2-janga.rahul.kumar@intel.com
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
drivers/gpu/drm/xe/xe_mocs.c

index 1e92f8ee07ba728adbf3462f4e51403253e8f5d3..aef09eb423e9b75fff7e618fcd77ae57d84fdf9a 100644 (file)
@@ -255,6 +255,16 @@ static const struct xe_mocs_entry gen12_mocs_desc[] = {
                   L3_1_UC)
 };
 
+static bool regs_are_mcr(struct xe_gt *gt)
+{
+       struct xe_device *xe = gt_to_xe(gt);
+
+       if (xe_gt_is_media_type(gt))
+               return MEDIA_VER(xe) >= 20;
+       else
+               return GRAPHICS_VERx100(xe) >= 1250;
+}
+
 static const struct xe_mocs_entry dg1_mocs_desc[] = {
        /* UC */
        MOCS_ENTRY(1, 0, L3_1_UC),
@@ -467,16 +477,6 @@ static u32 get_entry_control(const struct xe_mocs_info *info,
        return info->table[info->unused_entries_index].control_value;
 }
 
-static bool regs_are_mcr(struct xe_gt *gt)
-{
-       struct xe_device *xe = gt_to_xe(gt);
-
-       if (xe_gt_is_media_type(gt))
-               return MEDIA_VER(xe) >= 20;
-       else
-               return GRAPHICS_VERx100(xe) >= 1250;
-}
-
 static void __init_mocs_table(struct xe_gt *gt,
                              const struct xe_mocs_info *info)
 {