All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tuikov, Luben" <Luben.Tuikov-5C7GfCeVMHo@public.gmane.org>
To: "Yin, Tianci (Rico)" <Tianci.Yin-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
Subject: Re: [PATCH 4/8] drm/amdgpu: update atomfirmware header with memory training related members
Date: Fri, 11 Oct 2019 22:53:20 +0000	[thread overview]
Message-ID: <155db3ea-82ba-e3d7-8e2f-96df99772871@amd.com> (raw)
In-Reply-To: <20191011035033.24935-4-tianci.yin-5C7GfCeVMHo@public.gmane.org>

On 2019-10-10 11:50 p.m., Tianci Yin wrote:
> From: "Tianci.Yin" <tianci.yin@amd.com>
> 
> add new vram_reserve_block structure and atomfirmware_internal_constants enumeration
> 
> Change-Id: I6ba642ecd7ad94250162ae5c322ed8d85de9c35a
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Tianci.Yin <tianci.yin@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

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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-10-11 22:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-11  3:50 [PATCH 1/8] drm/amdgpu: update amdgpu_discovery to handle revision Tianci Yin
     [not found] ` <20191011035033.24935-1-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11  3:50   ` [PATCH 2/8] drm/amdgpu: add a generic fb accessing helper function Tianci Yin
     [not found]     ` <20191011035033.24935-2-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11 22:44       ` Tuikov, Luben
2019-10-11  3:50   ` [PATCH 3/8] drm/amdgpu: introduce psp_v11_0_is_sos_alive interface Tianci Yin
2019-10-11  3:50   ` [PATCH 4/8] drm/amdgpu: update atomfirmware header with memory training related members Tianci Yin
     [not found]     ` <20191011035033.24935-4-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11 22:53       ` Tuikov, Luben [this message]
     [not found]         ` <155db3ea-82ba-e3d7-8e2f-96df99772871-5C7GfCeVMHo@public.gmane.org>
2019-10-12  2:21           ` Alex Deucher
2019-10-11  3:50   ` [PATCH 5/8] drm/amdgpu/atomfirmware: add memory training related helper functions Tianci Yin
     [not found]     ` <20191011035033.24935-5-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11 23:09       ` Tuikov, Luben
2019-10-11  3:50   ` [PATCH 6/8] drm/amdgpu: add psp memory training callbacks and macro Tianci Yin
2019-10-11  3:50   ` [PATCH 7/8] drm/amdgpu: reserve vram for memory training Tianci Yin
     [not found]     ` <20191011035033.24935-7-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11 23:23       ` Tuikov, Luben
     [not found]         ` <9084e67e-adc2-b512-b593-ca218c17a366-5C7GfCeVMHo@public.gmane.org>
2019-10-12  2:26           ` Alex Deucher
2019-10-14  8:26           ` Koenig, Christian
     [not found]             ` <a93b3b8e-4df9-f6e2-95f7-3f0c0d8bebdc-5C7GfCeVMHo@public.gmane.org>
2019-10-14  8:35               ` Yin, Tianci (Rico)
2019-10-11  3:50   ` [PATCH 8/8] drm/amdgpu/psp: add psp memory training implementation Tianci Yin
     [not found]     ` <20191011035033.24935-8-tianci.yin-5C7GfCeVMHo@public.gmane.org>
2019-10-11 23:44       ` Tuikov, Luben
  -- strict thread matches above, loose matches on Subject: below --
2019-10-08 19:29 [PATCH 0/8] low latency memory training for navi Alex Deucher
     [not found] ` <20191008192934.5481-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-08 19:29   ` [PATCH 4/8] drm/amdgpu: update atomfirmware header with memory training related members Alex Deucher
     [not found]     ` <20191008192934.5481-5-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2019-10-08 20:25       ` William Lewis
2019-10-09  3:26       ` Tuikov, Luben

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=155db3ea-82ba-e3d7-8e2f-96df99772871@amd.com \
    --to=luben.tuikov-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-5C7GfCeVMHo@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=Tianci.Yin-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.