[PATCH 4/8] drm/amdgpu: update atomfirmware header with memory training related members

Tuikov, Luben Luben.Tuikov at amd.com
Fri Oct 11 22:53:20 UTC 2019


On 2019-10-10 11:50 p.m., Tianci Yin wrote:
> From: "Tianci.Yin" <tianci.yin at amd.com>
> 
> add new vram_reserve_block structure and atomfirmware_internal_constants enumeration
> 
> Change-Id: I6ba642ecd7ad94250162ae5c322ed8d85de9c35a
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> Signed-off-by: Tianci.Yin <tianci.yin at amd.com>
> ---
>  drivers/gpu/drm/amd/include/atomfirmware.h | 28 +++++++++++++++++-----
>  1 file changed, 22 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/include/atomfirmware.h b/drivers/gpu/drm/amd/include/atomfirmware.h
> index e88541d67aa0..463c18e99d78 100644
> --- a/drivers/gpu/drm/amd/include/atomfirmware.h
> +++ b/drivers/gpu/drm/amd/include/atomfirmware.h
> @@ -492,12 +492,13 @@ struct atom_firmware_info_v3_1
>  /* Total 32bit cap indication */
>  enum atombios_firmware_capability
>  {
> -  ATOM_FIRMWARE_CAP_FIRMWARE_POSTED = 0x00000001,
> -  ATOM_FIRMWARE_CAP_GPU_VIRTUALIZATION  = 0x00000002,
> -  ATOM_FIRMWARE_CAP_WMI_SUPPORT  = 0x00000040,
> -  ATOM_FIRMWARE_CAP_HWEMU_ENABLE  = 0x00000080,
> -  ATOM_FIRMWARE_CAP_HWEMU_UMC_CFG = 0x00000100,
> -  ATOM_FIRMWARE_CAP_SRAM_ECC      = 0x00000200,
> +	ATOM_FIRMWARE_CAP_FIRMWARE_POSTED = 0x00000001,
> +	ATOM_FIRMWARE_CAP_GPU_VIRTUALIZATION  = 0x00000002,
> +	ATOM_FIRMWARE_CAP_WMI_SUPPORT  = 0x00000040,
> +	ATOM_FIRMWARE_CAP_HWEMU_ENABLE  = 0x00000080,
> +	ATOM_FIRMWARE_CAP_HWEMU_UMC_CFG = 0x00000100,
> +	ATOM_FIRMWARE_CAP_SRAM_ECC      = 0x00000200,
> +	ATOM_FIRMWARE_CAP_ENABLE_2STAGE_BIST_TRAINING  = 0x00000400,
>  };
>  
>  enum atom_cooling_solution_id{
> @@ -671,6 +672,21 @@ struct vram_usagebyfirmware_v2_1
>    uint16_t  used_by_driver_in_kb; 
>  };
>  
> +/* This is part of vram_usagebyfirmware_v2_1 */
> +struct vram_reserve_block
> +{
> +	uint32_t start_address_in_kb;
> +	uint16_t used_by_firmware_in_kb;
> +	uint16_t used_by_driver_in_kb;
> +};
> +
> +/* Definitions for constance */
> +enum atomfirmware_internal_constants
> +{
> +	ONE_K	= 0x400,
> +	ONE_MEG	= 0x100000,
> +	ONE_G	= 0x40000000,

So... this is pronounced in English as "One Gee", and even though
I like it much much better due to what is actually says (no, it is not
"one gigabyte"), I'd rather you called this "ONE_GiB".

You do not have "One G" anywhere in this code. :-)

To fit international standardization and the move Linux constants
have been going to, name them this:

ONE_KiB
ONE_MiB
ONE_GiB

This means what it says and also that they are power of 2.

ONE_GB (10^9) is less than ONE_GiB (2^30).

Regards,
Luben

> +};
>  
>  /* 
>    ***************************************************************************
> 



More information about the amd-gfx mailing list