drm/xe: Add sysfs entry to report per tile memory size
authorTejas Upadhyay <tejas.upadhyay@intel.com>
Wed, 28 Jun 2023 06:06:16 +0000 (11:36 +0530)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:35:06 +0000 (11:35 -0500)
commit9641df819772662429721f4b14141308fcf2d667
tree23ad48f7e950dcb99996ebeb0b4066036abd5b9e
parent8c82f914a302e394e2a037241d84ca3af6577f97
drm/xe: Add sysfs entry to report per tile memory size

Add sysfs entry to read per tile physical memory
including stolen memory.

V5:
  - rename var name and make it part of vram struct - Lucas
V4:
  - %s/addr_range/physical_vram_size_byes, make it
    user readable name - Joonas/Aravind
  - Display in bytes - Joonas/Aravind
V3:
  - Exclude DG1, replace sysfs_create_file/files - Aravind
V2:
  - Use DEVICE_ATTR_RO - Aravind
  - Dont put kobj on sysfs_file_create fail - Himal
  - Skip addr_range sysfs create for non dgfx - Himal

Reviewed-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
Signed-off-by: Tejas Upadhyay <tejas.upadhyay@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device_types.h
drivers/gpu/drm/xe/xe_mmio.c
drivers/gpu/drm/xe/xe_tile_sysfs.c