2017-12-21 21:57:32 +00:00
|
|
|
/*
|
|
|
|
* Copyright © 2014-2017 Intel Corporation
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
|
|
|
* copy of this software and associated documentation files (the "Software"),
|
|
|
|
* to deal in the Software without restriction, including without limitation
|
|
|
|
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
|
|
* and/or sell copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice (including the next
|
|
|
|
* paragraph) shall be included in all copies or substantial portions of the
|
|
|
|
* Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
|
|
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
|
|
|
* IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _INTEL_DEVICE_INFO_H_
|
|
|
|
#define _INTEL_DEVICE_INFO_H_
|
|
|
|
|
2018-09-26 21:12:22 +01:00
|
|
|
#include <uapi/drm/i915_drm.h>
|
|
|
|
|
2021-03-26 15:21:33 +02:00
|
|
|
#include "intel_step.h"
|
|
|
|
|
2019-04-24 18:48:39 +01:00
|
|
|
#include "gt/intel_engine_types.h"
|
|
|
|
#include "gt/intel_context_types.h"
|
|
|
|
#include "gt/intel_sseu.h"
|
|
|
|
|
2023-05-09 09:51:59 -07:00
|
|
|
#include "gem/i915_gem_object_types.h"
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
struct drm_printer;
|
|
|
|
struct drm_i915_private;
|
2022-09-06 16:49:25 -07:00
|
|
|
struct intel_gt_definition;
|
2017-12-21 21:57:32 +00:00
|
|
|
|
|
|
|
/* Keep in gen based order, and chronological order within a gen */
|
|
|
|
enum intel_platform {
|
|
|
|
INTEL_PLATFORM_UNINITIALIZED = 0,
|
|
|
|
/* gen2 */
|
|
|
|
INTEL_I830,
|
|
|
|
INTEL_I845G,
|
|
|
|
INTEL_I85X,
|
|
|
|
INTEL_I865G,
|
|
|
|
/* gen3 */
|
|
|
|
INTEL_I915G,
|
|
|
|
INTEL_I915GM,
|
|
|
|
INTEL_I945G,
|
|
|
|
INTEL_I945GM,
|
|
|
|
INTEL_G33,
|
|
|
|
INTEL_PINEVIEW,
|
|
|
|
/* gen4 */
|
|
|
|
INTEL_I965G,
|
|
|
|
INTEL_I965GM,
|
|
|
|
INTEL_G45,
|
|
|
|
INTEL_GM45,
|
|
|
|
/* gen5 */
|
|
|
|
INTEL_IRONLAKE,
|
|
|
|
/* gen6 */
|
|
|
|
INTEL_SANDYBRIDGE,
|
|
|
|
/* gen7 */
|
|
|
|
INTEL_IVYBRIDGE,
|
|
|
|
INTEL_VALLEYVIEW,
|
|
|
|
INTEL_HASWELL,
|
|
|
|
/* gen8 */
|
|
|
|
INTEL_BROADWELL,
|
|
|
|
INTEL_CHERRYVIEW,
|
|
|
|
/* gen9 */
|
|
|
|
INTEL_SKYLAKE,
|
|
|
|
INTEL_BROXTON,
|
|
|
|
INTEL_KABYLAKE,
|
|
|
|
INTEL_GEMINILAKE,
|
|
|
|
INTEL_COFFEELAKE,
|
2020-06-02 15:05:40 +01:00
|
|
|
INTEL_COMETLAKE,
|
2018-01-11 16:00:04 -02:00
|
|
|
/* gen11 */
|
|
|
|
INTEL_ICELAKE,
|
2019-03-22 10:58:43 -07:00
|
|
|
INTEL_ELKHARTLAKE,
|
2020-10-14 00:59:48 +05:30
|
|
|
INTEL_JASPERLAKE,
|
2019-07-11 10:30:56 -07:00
|
|
|
/* gen12 */
|
|
|
|
INTEL_TIGERLAKE,
|
2020-05-04 15:52:06 -07:00
|
|
|
INTEL_ROCKETLAKE,
|
2020-07-13 11:23:17 -07:00
|
|
|
INTEL_DG1,
|
2021-01-19 11:29:31 -08:00
|
|
|
INTEL_ALDERLAKE_S,
|
2021-05-06 19:19:23 +03:00
|
|
|
INTEL_ALDERLAKE_P,
|
2021-07-21 15:30:28 -07:00
|
|
|
INTEL_DG2,
|
2022-07-07 17:03:34 -07:00
|
|
|
INTEL_METEORLAKE,
|
2017-12-21 21:57:32 +00:00
|
|
|
INTEL_MAX_PLATFORMS
|
|
|
|
};
|
|
|
|
|
2019-03-27 14:23:28 +00:00
|
|
|
/*
|
|
|
|
* Subplatform bits share the same namespace per parent platform. In other words
|
|
|
|
* it is fine for the same bit to be used on multiple parent platforms.
|
2024-12-11 17:29:50 +05:30
|
|
|
* Devices can belong to multiple subplatforms if needed, so it's possible to set
|
|
|
|
* multiple bits for same device.
|
2019-03-27 14:23:28 +00:00
|
|
|
*/
|
|
|
|
|
2024-12-11 17:29:50 +05:30
|
|
|
#define INTEL_SUBPLATFORM_BITS (4)
|
2021-01-21 16:19:36 +00:00
|
|
|
#define INTEL_SUBPLATFORM_MASK (BIT(INTEL_SUBPLATFORM_BITS) - 1)
|
2019-03-27 14:23:28 +00:00
|
|
|
|
|
|
|
/* HSW/BDW/SKL/KBL/CFL */
|
|
|
|
#define INTEL_SUBPLATFORM_ULT (0)
|
|
|
|
#define INTEL_SUBPLATFORM_ULX (1)
|
|
|
|
|
2021-07-28 14:59:42 -07:00
|
|
|
/* ICL */
|
2019-03-27 14:23:28 +00:00
|
|
|
#define INTEL_SUBPLATFORM_PORTF (0)
|
|
|
|
|
2022-02-22 06:14:24 -08:00
|
|
|
/* TGL */
|
|
|
|
#define INTEL_SUBPLATFORM_UY (0)
|
|
|
|
|
2021-07-21 15:30:28 -07:00
|
|
|
/* DG2 */
|
|
|
|
#define INTEL_SUBPLATFORM_G10 0
|
|
|
|
#define INTEL_SUBPLATFORM_G11 1
|
2022-01-20 15:50:16 -08:00
|
|
|
#define INTEL_SUBPLATFORM_G12 2
|
2024-12-11 17:29:50 +05:30
|
|
|
#define INTEL_SUBPLATFORM_D 3
|
2021-07-21 15:30:28 -07:00
|
|
|
|
2022-04-18 11:51:57 +05:30
|
|
|
/* ADL */
|
|
|
|
#define INTEL_SUBPLATFORM_RPL 0
|
2021-12-02 22:35:43 -08:00
|
|
|
|
2021-12-10 10:48:02 +05:30
|
|
|
/* ADL-P */
|
2022-04-18 11:51:57 +05:30
|
|
|
/*
|
|
|
|
* As #define INTEL_SUBPLATFORM_RPL 0 will apply
|
|
|
|
* here too, SUBPLATFORM_N will have different
|
|
|
|
* bit set
|
|
|
|
*/
|
|
|
|
#define INTEL_SUBPLATFORM_N 1
|
2023-01-30 15:38:05 +05:30
|
|
|
#define INTEL_SUBPLATFORM_RPLU 2
|
2021-12-10 10:48:02 +05:30
|
|
|
|
2024-08-01 20:10:51 -07:00
|
|
|
/* MTL */
|
2024-10-28 16:31:32 -07:00
|
|
|
#define INTEL_SUBPLATFORM_ARL_H 0
|
|
|
|
#define INTEL_SUBPLATFORM_ARL_U 1
|
|
|
|
#define INTEL_SUBPLATFORM_ARL_S 2
|
2024-08-01 20:10:51 -07:00
|
|
|
|
2019-03-14 22:38:36 +00:00
|
|
|
enum intel_ppgtt_type {
|
2018-09-26 21:12:22 +01:00
|
|
|
INTEL_PPGTT_NONE = I915_GEM_PPGTT_NONE,
|
|
|
|
INTEL_PPGTT_ALIASING = I915_GEM_PPGTT_ALIASING,
|
|
|
|
INTEL_PPGTT_FULL = I915_GEM_PPGTT_FULL,
|
|
|
|
};
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
#define DEV_INFO_FOR_EACH_FLAG(func) \
|
|
|
|
func(is_mobile); \
|
2019-05-06 16:48:01 +03:00
|
|
|
func(require_force_probe); \
|
2019-10-24 12:51:19 -07:00
|
|
|
func(is_dgfx); \
|
2017-12-21 21:57:32 +00:00
|
|
|
/* Keep has_* in alphabetical order */ \
|
|
|
|
func(has_64bit_reloc); \
|
2021-12-08 19:46:10 +05:30
|
|
|
func(has_64k_pages); \
|
2019-01-03 11:21:04 +00:00
|
|
|
func(gpu_reset_clobbers_display); \
|
2022-05-19 10:08:00 +01:00
|
|
|
func(has_reset_engine); \
|
2022-05-10 23:02:26 -07:00
|
|
|
func(has_3d_pipeline); \
|
2022-02-19 00:17:50 +05:30
|
|
|
func(has_flat_ccs); \
|
2019-07-30 11:04:06 -07:00
|
|
|
func(has_global_mocs); \
|
2022-09-15 18:46:46 -07:00
|
|
|
func(has_gmd_id); \
|
2022-05-19 10:08:02 +01:00
|
|
|
func(has_gt_uc); \
|
2022-04-19 12:33:08 -07:00
|
|
|
func(has_heci_pxp); \
|
|
|
|
func(has_heci_gscfi); \
|
2022-01-20 13:29:47 -08:00
|
|
|
func(has_guc_deprivilege); \
|
2023-10-17 11:08:00 -07:00
|
|
|
func(has_guc_tlb_invalidation); \
|
2022-05-05 14:38:03 -07:00
|
|
|
func(has_l3_ccs_read); \
|
2017-12-21 21:57:32 +00:00
|
|
|
func(has_l3_dpf); \
|
|
|
|
func(has_llc); \
|
|
|
|
func(has_logical_ring_contexts); \
|
2022-05-19 10:07:59 +01:00
|
|
|
func(has_logical_ring_elsq); \
|
2022-05-19 09:57:30 +01:00
|
|
|
func(has_media_ratio_mode); \
|
drm/i915/pvc: Add register steering
Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does
document several new types of multicast register ranges. Fortunately,
most of the different MCR types all provide valid values at instance
(0,0) so there's no need to read fuse registers and calculate a
non-terminated instance. We'll lump all of those range types (BSLICE,
HALFBSLICE, TILEPSMI, CC, and L3BANK) into a single category called
"INSTANCE0" to keep things simple. We'll also perform explicit steering
for each of these multicast register types, even if the implicit
steering setup for COMPUTE/DSS ranges would have worked too; this is
based on guidance from our hardware architects who suggested that we
move away from implicit steering and start explicitly steer all MCR
register accesses on modern platforms (we'll work on transitioning
COMPUTE/DSS to explicit steering in the future).
Note that there's one additional MCR range type defined in the bspec
(SQIDI) that we don't handle here. Those ranges use a different
steering control register that we never touch; since instance 0 is also
always a valid setting there, we can just ignore those ranges.
Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING().
PVC hardware still has units referred to as mslices, but there's no
register steering based on mslice for this platform.
v2:
- Rebase on other recent changes
- Swap two table rows to keep table sorted & easy to read. (Harish)
Bspec: 67609
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Harish Chegondi <harish.chegondi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220608170700.4026648-1-matthew.d.roper@intel.com
2022-06-08 10:07:00 -07:00
|
|
|
func(has_mslice_steering); \
|
2022-10-26 22:20:51 +00:00
|
|
|
func(has_oa_bpc_reporting); \
|
2022-10-26 22:21:01 +00:00
|
|
|
func(has_oa_slice_contrib_limits); \
|
2023-03-23 15:58:59 -07:00
|
|
|
func(has_oam); \
|
2022-06-01 08:07:25 -07:00
|
|
|
func(has_one_eu_per_fuse_bit); \
|
2021-09-24 12:14:38 -07:00
|
|
|
func(has_pxp); \
|
2022-05-19 10:08:01 +01:00
|
|
|
func(has_rc6); \
|
2017-12-21 21:57:32 +00:00
|
|
|
func(has_rc6p); \
|
2019-04-19 14:48:36 +01:00
|
|
|
func(has_rps); \
|
2017-12-21 21:57:32 +00:00
|
|
|
func(has_runtime_pm); \
|
|
|
|
func(has_snoop); \
|
2018-07-20 11:19:10 +01:00
|
|
|
func(has_coherent_ggtt); \
|
2022-08-26 14:27:18 -07:00
|
|
|
func(tuning_thread_rr_after_dep); \
|
2017-12-21 21:57:32 +00:00
|
|
|
func(unfenced_needs_alignment); \
|
2018-11-30 15:20:48 -08:00
|
|
|
func(hws_needs_physical);
|
|
|
|
|
2022-10-11 08:38:50 -07:00
|
|
|
struct intel_ip_version {
|
2021-10-19 17:23:51 -07:00
|
|
|
u8 ver;
|
|
|
|
u8 rel;
|
2022-09-15 18:46:46 -07:00
|
|
|
u8 step;
|
2021-10-19 17:23:51 -07:00
|
|
|
};
|
|
|
|
|
2022-08-19 15:02:36 +03:00
|
|
|
struct intel_runtime_info {
|
2022-09-15 18:46:46 -07:00
|
|
|
/*
|
|
|
|
* Single "graphics" IP version that represents
|
|
|
|
* render, compute and copy behavior.
|
|
|
|
*/
|
2022-09-02 15:10:54 -07:00
|
|
|
struct {
|
2022-10-11 08:38:50 -07:00
|
|
|
struct intel_ip_version ip;
|
2022-09-02 15:10:54 -07:00
|
|
|
} graphics;
|
|
|
|
struct {
|
2022-10-11 08:38:50 -07:00
|
|
|
struct intel_ip_version ip;
|
2022-09-02 15:10:54 -07:00
|
|
|
} media;
|
2022-08-19 15:02:37 +03:00
|
|
|
|
2022-08-19 15:02:36 +03:00
|
|
|
/*
|
|
|
|
* Platform mask is used for optimizing or-ed IS_PLATFORM calls into
|
|
|
|
* single runtime conditionals, and also to provide groundwork for
|
|
|
|
* future per platform, or per SKU build optimizations.
|
|
|
|
*
|
|
|
|
* Array can be extended when necessary if the corresponding
|
|
|
|
* BUILD_BUG_ON is hit.
|
|
|
|
*/
|
|
|
|
u32 platform_mask[2];
|
|
|
|
|
|
|
|
u16 device_id;
|
2021-04-12 22:09:54 -07:00
|
|
|
|
2022-08-19 15:02:36 +03:00
|
|
|
struct intel_step_info step;
|
2022-08-19 15:02:38 +03:00
|
|
|
|
2022-08-19 15:02:39 +03:00
|
|
|
unsigned int page_sizes; /* page sizes supported by the HW */
|
2020-04-17 15:51:07 -04:00
|
|
|
|
2019-03-14 22:38:36 +00:00
|
|
|
enum intel_ppgtt_type ppgtt_type;
|
|
|
|
unsigned int ppgtt_size; /* log2, e.g. 31/32/48 bits */
|
|
|
|
|
2022-08-19 15:02:41 +03:00
|
|
|
bool has_pooled_eu;
|
2022-08-19 15:02:36 +03:00
|
|
|
};
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
struct intel_device_info {
|
|
|
|
enum intel_platform platform;
|
|
|
|
|
2020-04-17 15:51:07 -04:00
|
|
|
unsigned int dma_mask_size; /* available DMA address bits */
|
|
|
|
|
2022-09-06 16:49:25 -07:00
|
|
|
const struct intel_gt_definition *extra_gt_list;
|
|
|
|
|
2021-07-23 12:10:24 -07:00
|
|
|
u8 gt; /* GT number, 0 if undefined */
|
|
|
|
|
2023-06-27 18:13:59 +03:00
|
|
|
intel_engine_mask_t platform_engine_mask; /* Engines supported by the HW */
|
|
|
|
u32 memory_regions; /* regions supported by the HW */
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
#define DEFINE_FLAG(name) u8 name:1
|
|
|
|
DEV_INFO_FOR_EACH_FLAG(DEFINE_FLAG);
|
|
|
|
#undef DEFINE_FLAG
|
2018-11-30 15:20:48 -08:00
|
|
|
|
2019-03-27 14:23:28 +00:00
|
|
|
/*
|
2022-08-19 15:02:36 +03:00
|
|
|
* Initial runtime info. Do not access outside of i915_driver_create().
|
2019-03-27 14:23:28 +00:00
|
|
|
*/
|
2022-08-19 15:02:36 +03:00
|
|
|
const struct intel_runtime_info __runtime;
|
2023-05-09 09:51:59 -07:00
|
|
|
|
|
|
|
u32 cachelevel_to_pat[I915_MAX_CACHE_LEVEL];
|
|
|
|
u32 max_pat_index;
|
2017-12-21 21:57:32 +00:00
|
|
|
};
|
|
|
|
|
2018-02-07 21:05:43 +00:00
|
|
|
struct intel_driver_caps {
|
|
|
|
unsigned int scheduler;
|
2018-07-06 11:14:41 +01:00
|
|
|
bool has_logical_contexts:1;
|
2018-02-07 21:05:43 +00:00
|
|
|
};
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
const char *intel_platform_name(enum intel_platform platform);
|
|
|
|
|
2023-04-11 13:56:43 +03:00
|
|
|
void intel_device_info_driver_create(struct drm_i915_private *i915, u16 device_id,
|
|
|
|
const struct intel_device_info *match_info);
|
2022-09-15 18:46:46 -07:00
|
|
|
void intel_device_info_runtime_init_early(struct drm_i915_private *dev_priv);
|
2018-12-31 16:56:43 +02:00
|
|
|
void intel_device_info_runtime_init(struct drm_i915_private *dev_priv);
|
2019-12-07 18:29:37 +00:00
|
|
|
|
2022-08-19 15:02:35 +03:00
|
|
|
void intel_device_info_print(const struct intel_device_info *info,
|
|
|
|
const struct intel_runtime_info *runtime,
|
|
|
|
struct drm_printer *p);
|
2017-12-21 21:57:32 +00:00
|
|
|
|
2018-02-07 21:05:43 +00:00
|
|
|
void intel_driver_caps_print(const struct intel_driver_caps *caps,
|
|
|
|
struct drm_printer *p);
|
|
|
|
|
2017-12-21 21:57:32 +00:00
|
|
|
#endif
|