Commit 399a1332 authored by Koby Elbaz's avatar Koby Elbaz Committed by Rodrigo Vivi

drm/xe: add 28-bit address support in struct xe_reg

Xe driver currently supports 22-bit addresses for MMIO access.
Future platforms will have additional MMIO extension with
larger address spaces, and to access them, the driver will
have to support wider address representation.
Please note that while the XE_REG macro is used for MMIO access,
XE_REG_EXT macro will be used for MMIO-extension access.
Signed-off-by: default avatarKoby Elbaz <kelbaz@habana.ai>
Reviewed-by: default avatarOfir Bitton <obitton@habana.ai>
Reviewed-by: default avatarMoti Haimovski <mhaimovski@habana.ai>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent e814389f
......@@ -19,7 +19,7 @@ struct xe_reg {
union {
struct {
/** @addr: address */
u32 addr:22;
u32 addr:28;
/**
* @masked: register is "masked", with upper 16bits used
* to identify the bits that are updated on the lower
......@@ -35,6 +35,10 @@ struct xe_reg {
* value can inspect it.
*/
u32 mcr:1;
/**
* @ext: access MMIO extension space for current register.
*/
u32 ext:1;
};
/** @raw: Raw value with both address and options */
u32 raw;
......@@ -84,6 +88,16 @@ struct xe_reg_mcr {
*/
#define XE_REG(r_, ...) ((const struct xe_reg)XE_REG_INITIALIZER(r_, ##__VA_ARGS__))
/**
* XE_REG_EXT - Create a struct xe_reg from extension offset and additional
* flags
* @r_: Register extension offset
* @...: Additional options like access mode. See struct xe_reg for available
* options.
*/
#define XE_REG_EXT(r_, ...) \
((const struct xe_reg)XE_REG_INITIALIZER(r_, ##__VA_ARGS__, .ext = 1))
/**
* XE_REG_MCR - Create a struct xe_reg_mcr from offset and additional flags
* @r_: Register offset
......
......@@ -140,6 +140,19 @@ struct xe_tile {
void *regs;
} mmio;
/**
* @mmio_ext: MMIO-extension info for a tile.
*
* Each tile has its own additional 256MB (28-bit) MMIO-extension space.
*/
struct {
/** @size: size of tile's additional MMIO-extension space */
size_t size;
/** @regs: pointer to tile's additional MMIO-extension space */
void *regs;
} mmio_ext;
/** @mem: memory management info for tile */
struct {
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment