[01/10] drm/amdkfd: add renoir cache info for CRAT

Submitted by Huang, Ray on Sept. 4, 2019, 3:48 p.m.

Details

Message ID 20190904154803.5102-2-ray.huang@amd.com
State New
Headers show
Series "drm/amdkfd: introduce the kfd support for Renoir" ( rev: 1 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Huang, Ray Sept. 4, 2019, 3:48 p.m.
Renoir's cache info should be the same with raven and carrizo's.

Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 ++++
 1 file changed, 4 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
index a84c810..2a428c9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
@@ -138,6 +138,7 @@  static struct kfd_gpu_cache_info carrizo_cache_info[] = {
 /* TODO - check & update Vega10 cache details */
 #define vega10_cache_info carrizo_cache_info
 #define raven_cache_info carrizo_cache_info
+#define renoir_cache_info carrizo_cache_info
 /* TODO - check & update Navi10 cache details */
 #define navi10_cache_info carrizo_cache_info
 
@@ -668,6 +669,9 @@  static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
 	case CHIP_RAVEN:
 		pcache_info = raven_cache_info;
 		num_of_cache_types = ARRAY_SIZE(raven_cache_info);
+	case CHIP_RENOIR:
+		pcache_info = renoir_cache_info;
+		num_of_cache_types = ARRAY_SIZE(renoir_cache_info);
 	case CHIP_NAVI10:
 		pcache_info = navi10_cache_info;
 		num_of_cache_types = ARRAY_SIZE(navi10_cache_info);

Comments

On 2019-09-04 11:48 a.m., Huang, Ray wrote:
> Renoir's cache info should be the same with raven and carrizo's.

>

> Signed-off-by: Huang Rui <ray.huang@amd.com>

> ---

>   drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 ++++

>   1 file changed, 4 insertions(+)

>

> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

> index a84c810..2a428c9 100644

> --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c

> @@ -138,6 +138,7 @@ static struct kfd_gpu_cache_info carrizo_cache_info[] = {

>   /* TODO - check & update Vega10 cache details */

>   #define vega10_cache_info carrizo_cache_info

>   #define raven_cache_info carrizo_cache_info

> +#define renoir_cache_info carrizo_cache_info

>   /* TODO - check & update Navi10 cache details */

>   #define navi10_cache_info carrizo_cache_info

>   

> @@ -668,6 +669,9 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,

>   	case CHIP_RAVEN:

>   		pcache_info = raven_cache_info;

>   		num_of_cache_types = ARRAY_SIZE(raven_cache_info);

> +	case CHIP_RENOIR:

> +		pcache_info = renoir_cache_info;

> +		num_of_cache_types = ARRAY_SIZE(renoir_cache_info);


I just noticed, there are break; statements missing here. Which branch 
are your changes based on? At least the surrounding code looks OK on 
amd-staging-drm-next, but seems to be missing a break statement at least 
in the Raven case here.

Regards,
   Felix


>   	case CHIP_NAVI10:

>   		pcache_info = navi10_cache_info;

>   		num_of_cache_types = ARRAY_SIZE(navi10_cache_info);
On Thu, Sep 05, 2019 at 03:35:20AM +0800, Kuehling, Felix wrote:
> On 2019-09-04 11:48 a.m., Huang, Ray wrote:
> > Renoir's cache info should be the same with raven and carrizo's.
> >
> > Signed-off-by: Huang Rui <ray.huang@amd.com>
> > ---
> >   drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 4 ++++
> >   1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> > index a84c810..2a428c9 100644
> > --- a/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> > +++ b/drivers/gpu/drm/amd/amdkfd/kfd_crat.c
> > @@ -138,6 +138,7 @@ static struct kfd_gpu_cache_info carrizo_cache_info[] = {
> >   /* TODO - check & update Vega10 cache details */
> >   #define vega10_cache_info carrizo_cache_info
> >   #define raven_cache_info carrizo_cache_info
> > +#define renoir_cache_info carrizo_cache_info
> >   /* TODO - check & update Navi10 cache details */
> >   #define navi10_cache_info carrizo_cache_info
> >   
> > @@ -668,6 +669,9 @@ static int kfd_fill_gpu_cache_info(struct kfd_dev *kdev,
> >   	case CHIP_RAVEN:
> >   		pcache_info = raven_cache_info;
> >   		num_of_cache_types = ARRAY_SIZE(raven_cache_info);
> > +	case CHIP_RENOIR:
> > +		pcache_info = renoir_cache_info;
> > +		num_of_cache_types = ARRAY_SIZE(renoir_cache_info);
> 
> I just noticed, there are break; statements missing here. Which branch 
> are your changes based on? At least the surrounding code looks OK on 
> amd-staging-drm-next, but seems to be missing a break statement at least 
> in the Raven case here.
> 

Thanks to catch this. I will re-send v2 patch later.

Thanks,
Ray

> Regards,
>    Felix
> 
> 
> >   	case CHIP_NAVI10:
> >   		pcache_info = navi10_cache_info;
> >   		num_of_cache_types = ARRAY_SIZE(navi10_cache_info);