xref: /linux/drivers/gpu/drm/i915/intel_cpu_info.c (revision 96c84703f1cf6ea43617f9565166681cd71df104)
1 // SPDX-License-Identifier: MIT
2 /*
3  * Copyright © 2024 Intel Corporation
4  *
5  * Avoid INTEL_<PLATFORM> name collisions between asm/intel-family.h and
6  * intel_device_info.h by having a separate file.
7  */
8 
9 #include "intel_cpu_info.h"
10 
11 #ifdef CONFIG_X86
12 #include <asm/cpu_device_id.h>
13 #include <asm/intel-family.h>
14 
15 static const struct x86_cpu_id g8_cpu_ids[] = {
16 	X86_MATCH_VFM(INTEL_ALDERLAKE,		NULL),
17 	X86_MATCH_VFM(INTEL_ALDERLAKE_L,	NULL),
18 	X86_MATCH_VFM(INTEL_COMETLAKE,		NULL),
19 	X86_MATCH_VFM(INTEL_KABYLAKE,		NULL),
20 	X86_MATCH_VFM(INTEL_KABYLAKE_L,		NULL),
21 	X86_MATCH_VFM(INTEL_RAPTORLAKE,		NULL),
22 	X86_MATCH_VFM(INTEL_RAPTORLAKE_P,	NULL),
23 	X86_MATCH_VFM(INTEL_RAPTORLAKE_S,	NULL),
24 	X86_MATCH_VFM(INTEL_ROCKETLAKE,		NULL),
25 	{}
26 };
27 
28 /**
29  * intel_match_g8_cpu - match current CPU against g8_cpu_ids
30  *
31  * This matches current CPU against g8_cpu_ids, which are applicable
32  * for G8 workaround.
33  *
34  * Returns: %true if matches, %false otherwise.
35  */
36 bool intel_match_g8_cpu(void)
37 {
38 	return x86_match_cpu(g8_cpu_ids);
39 }
40 #else /* CONFIG_X86 */
41 
42 bool intel_match_g8_cpu(void) { return false; }
43 
44 #endif /* CONFIG_X86 */
45