All of lore.kernel.org
 help / color / mirror / Atom feed
* missing wire up of nbif_v6_3_1_sriov_funcs ?
@ 2025-02-19 18:53 Dr. David Alan Gilbert
  2025-02-19 19:49 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-19 18:53 UTC (permalink / raw)
  To: alexander.deucher, Hawking.Zhang, Likun.Gao; +Cc: amd-gfx, dri-devel

Hi All,
  I think you may be misisng some wiring of nbif_v6_3_1_sriov_funcs.

  My scripts noticed 'nbif_v6_3_1_sriov_funcs' was unused;
It was added in:
  Commit: 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support")


and is:
drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c:
  const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {

but, it's not referenced, which makes me think it perhaps
should be in:
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

I see for 4.3.x there is:
  case IP_VERSION(4, 3, 0):
  case IP_VERSION(4, 3, 1):
    if (amdgpu_sriov_vf(adev))
      adev->nbio.funcs = &nbio_v4_3_sriov_funcs;
    else
      adev->nbio.funcs = &nbio_v4_3_funcs;
    adev->nbio.hdp_flush_reg = &nbio_v4_3_hdp_flush_reg;
    break;

but for 6.3.1 we have:

  case IP_VERSION(6, 3, 1):
    adev->nbio.funcs = &nbif_v6_3_1_funcs;
    adev->nbio.hdp_flush_reg = &nbif_v6_3_1_hdp_flush_reg;
    break;


so is that supposed to have something similar?

Dave

-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: missing wire up of nbif_v6_3_1_sriov_funcs ?
  2025-02-19 18:53 missing wire up of nbif_v6_3_1_sriov_funcs ? Dr. David Alan Gilbert
@ 2025-02-19 19:49 ` Alex Deucher
  2025-02-19 19:59   ` Dr. David Alan Gilbert
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2025-02-19 19:49 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: alexander.deucher, Hawking.Zhang, Likun.Gao, amd-gfx, dri-devel

On Wed, Feb 19, 2025 at 2:04 PM Dr. David Alan Gilbert
<linux@treblig.org> wrote:
>
> Hi All,
>   I think you may be misisng some wiring of nbif_v6_3_1_sriov_funcs.
>
>   My scripts noticed 'nbif_v6_3_1_sriov_funcs' was unused;
> It was added in:
>   Commit: 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support")
>
>
> and is:
> drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c:
>   const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {
>
> but, it's not referenced, which makes me think it perhaps
> should be in:
> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
>
> I see for 4.3.x there is:
>   case IP_VERSION(4, 3, 0):
>   case IP_VERSION(4, 3, 1):
>     if (amdgpu_sriov_vf(adev))
>       adev->nbio.funcs = &nbio_v4_3_sriov_funcs;
>     else
>       adev->nbio.funcs = &nbio_v4_3_funcs;
>     adev->nbio.hdp_flush_reg = &nbio_v4_3_hdp_flush_reg;
>     break;
>
> but for 6.3.1 we have:
>
>   case IP_VERSION(6, 3, 1):
>     adev->nbio.funcs = &nbif_v6_3_1_funcs;
>     adev->nbio.hdp_flush_reg = &nbif_v6_3_1_hdp_flush_reg;
>     break;
>
>
> so is that supposed to have something similar?

They can be dropped.  I think they were just copy and paste leftovers.

Alex

>
> Dave
>
> --
>  -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: missing wire up of nbif_v6_3_1_sriov_funcs ?
  2025-02-19 19:49 ` Alex Deucher
@ 2025-02-19 19:59   ` Dr. David Alan Gilbert
  2025-02-19 20:00     ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Dr. David Alan Gilbert @ 2025-02-19 19:59 UTC (permalink / raw)
  To: Alex Deucher
  Cc: alexander.deucher, Hawking.Zhang, Likun.Gao, amd-gfx, dri-devel

* Alex Deucher (alexdeucher@gmail.com) wrote:
> On Wed, Feb 19, 2025 at 2:04 PM Dr. David Alan Gilbert
> <linux@treblig.org> wrote:
> >
> > Hi All,
> >   I think you may be misisng some wiring of nbif_v6_3_1_sriov_funcs.
> >
> >   My scripts noticed 'nbif_v6_3_1_sriov_funcs' was unused;
> > It was added in:
> >   Commit: 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support")
> >
> >
> > and is:
> > drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c:
> >   const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {
> >
> > but, it's not referenced, which makes me think it perhaps
> > should be in:
> > drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> >
> > I see for 4.3.x there is:
> >   case IP_VERSION(4, 3, 0):
> >   case IP_VERSION(4, 3, 1):
> >     if (amdgpu_sriov_vf(adev))
> >       adev->nbio.funcs = &nbio_v4_3_sriov_funcs;
> >     else
> >       adev->nbio.funcs = &nbio_v4_3_funcs;
> >     adev->nbio.hdp_flush_reg = &nbio_v4_3_hdp_flush_reg;
> >     break;
> >
> > but for 6.3.1 we have:
> >
> >   case IP_VERSION(6, 3, 1):
> >     adev->nbio.funcs = &nbif_v6_3_1_funcs;
> >     adev->nbio.hdp_flush_reg = &nbif_v6_3_1_hdp_flush_reg;
> >     break;
> >
> >
> > so is that supposed to have something similar?
> 
> They can be dropped.  I think they were just copy and paste leftovers.

Thanks for the reply.

OK, I'll send a patch then to remove nbif_v6_3_1_sriov_funcs.

Dave

> Alex
> 
> >
> > Dave
> >
> > --
> >  -----Open up your eyes, open up your mind, open up your code -------
> > / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \
> > \        dave @ treblig.org |                               | In Hex /
> >  \ _________________________|_____ http://www.treblig.org   |_______/
-- 
 -----Open up your eyes, open up your mind, open up your code -------   
/ Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \ 
\        dave @ treblig.org |                               | In Hex /
 \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: missing wire up of nbif_v6_3_1_sriov_funcs ?
  2025-02-19 19:59   ` Dr. David Alan Gilbert
@ 2025-02-19 20:00     ` Alex Deucher
  0 siblings, 0 replies; 4+ messages in thread
From: Alex Deucher @ 2025-02-19 20:00 UTC (permalink / raw)
  To: Dr. David Alan Gilbert
  Cc: alexander.deucher, Hawking.Zhang, Likun.Gao, amd-gfx, dri-devel

On Wed, Feb 19, 2025 at 3:00 PM Dr. David Alan Gilbert <dave@treblig.org> wrote:
>
> * Alex Deucher (alexdeucher@gmail.com) wrote:
> > On Wed, Feb 19, 2025 at 2:04 PM Dr. David Alan Gilbert
> > <linux@treblig.org> wrote:
> > >
> > > Hi All,
> > >   I think you may be misisng some wiring of nbif_v6_3_1_sriov_funcs.
> > >
> > >   My scripts noticed 'nbif_v6_3_1_sriov_funcs' was unused;
> > > It was added in:
> > >   Commit: 894c6d3522d1 ("drm/amdgpu: Add nbif v6_3_1 ip block support")
> > >
> > >
> > > and is:
> > > drivers/gpu/drm/amd/amdgpu/nbif_v6_3_1.c:
> > >   const struct amdgpu_nbio_funcs nbif_v6_3_1_sriov_funcs = {
> > >
> > > but, it's not referenced, which makes me think it perhaps
> > > should be in:
> > > drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> > >
> > > I see for 4.3.x there is:
> > >   case IP_VERSION(4, 3, 0):
> > >   case IP_VERSION(4, 3, 1):
> > >     if (amdgpu_sriov_vf(adev))
> > >       adev->nbio.funcs = &nbio_v4_3_sriov_funcs;
> > >     else
> > >       adev->nbio.funcs = &nbio_v4_3_funcs;
> > >     adev->nbio.hdp_flush_reg = &nbio_v4_3_hdp_flush_reg;
> > >     break;
> > >
> > > but for 6.3.1 we have:
> > >
> > >   case IP_VERSION(6, 3, 1):
> > >     adev->nbio.funcs = &nbif_v6_3_1_funcs;
> > >     adev->nbio.hdp_flush_reg = &nbif_v6_3_1_hdp_flush_reg;
> > >     break;
> > >
> > >
> > > so is that supposed to have something similar?
> >
> > They can be dropped.  I think they were just copy and paste leftovers.
>
> Thanks for the reply.
>
> OK, I'll send a patch then to remove nbif_v6_3_1_sriov_funcs.

Thanks!

Alex

>
> Dave
>
> > Alex
> >
> > >
> > > Dave
> > >
> > > --
> > >  -----Open up your eyes, open up your mind, open up your code -------
> > > / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \
> > > \        dave @ treblig.org |                               | In Hex /
> > >  \ _________________________|_____ http://www.treblig.org   |_______/
> --
>  -----Open up your eyes, open up your mind, open up your code -------
> / Dr. David Alan Gilbert    |       Running GNU/Linux       | Happy  \
> \        dave @ treblig.org |                               | In Hex /
>  \ _________________________|_____ http://www.treblig.org   |_______/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-20  9:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 18:53 missing wire up of nbif_v6_3_1_sriov_funcs ? Dr. David Alan Gilbert
2025-02-19 19:49 ` Alex Deucher
2025-02-19 19:59   ` Dr. David Alan Gilbert
2025-02-19 20:00     ` Alex Deucher

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.