Hey, apologies to continually bother you with this, but I've gotten a
driver that compiles and detects the card... however it seems to be having
powerplay table issues, I was wondering if this was ever an issue when
initially porting, and if so how'd you go about fixing it?
Leaving the powerplay untouched and only altering the amdgpu subdirectory
results in this error in the following error in dmesg:
initializing kernel modesetting (VEGA20 0x1002:0x66AF 0x1002:0x081E 0xC1).
amdgpu_device_resize_fb_bar: stub
amdgpu: [powerplay] smc start failed
amdgpu: [powerplay] powerplay hw init failed
[drm] *ERROR* hw_init of IP block <powerplay> failed -22
drm:pid0:amdgpu_device_init *ERROR* amdgpu_device_ip_init failed
drm:pid0:amdgpu_attachhook *ERROR* Fatal error during GPU init
efifb0 at mainbus0: 3440x1440, 32bpp
wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0
wskbd1: connecting to wsdisplay0
wskbd2: connecting to wsdisplay0
wskbd3: connecting to wsdisplay0
wskbd4: connecting to wsdisplay0
wsdisplay0: screen 1-5 added (std, vt100 emulation)

Compiling the kernel with the additional powerplay changes relevant to vega
20 results in a similar message, although instead of the "hw_init" having
issues, it complains about "Unmatch PPTable version, vbios update may be
needed". I'd post a diff, but trying to generate a diff through cvs isn't
picking up the files I've added even with the --new-file option, but I'm
rather unfamiliar with cvs/diff in general so it's probable I screwed the
pooch on that part somehow. Any help would be very much appreciated, and
thanks for the help you've given already!

On Wed, Sep 4, 2019 at 8:04 PM Jonathan Gray <[email protected]> wrote:

> amdgpu tracks the linux-4.19.y (lts) branch of linux-stable
> currently this is 4.19.69
>
> On Wed, Sep 04, 2019 at 10:28:51AM -0500, Charlie Burnett wrote:
> > Thanks for the advice!
> > Do you happen to have a link to the commit amdgpu is at currently?
> >
> > On Wed, Sep 4, 2019 at 9:44 AM Jonathan Gray <[email protected]> wrote:
> >
> > > Look for individual post 4.19 linux commits that are relevant.
> > > We have in the past taken small patches to enable more
> > > generations of hardware.
> > >
> > > On Wed, Sep 04, 2019 at 08:11:24AM -0500, Charlie Burnett wrote:
> > > > Hey,
> > > > I???ve been trying to write a patch to get vega 20 working, but due
> to a
> > > > screw up on my end I lost the progress I???d made. Before I start
> over
> > > again,
> > > > I was wondering if you had any advice on how to do it? Before, I was
> > > trying
> > > > to more or less just port the vega 20 hwmgr files in from FreeBSD drm
> > > next
> > > > which is at linux drm 5.0 as well as the other files which seemed to
> > > > mention Vega 20 or seemed to be needed to compile. I wasn???t having
> much
> > > > luck as you can imagine, and currently I???m still in university so
> my
> > > > experience with kernel patching isn???t fantastic, I was wondering
> if you
> > > > might have any advice where to begin if I???m having to start from
> > > scratch?
> > > > Best regards,
> > > > Charlie Burnett
> > > >
> > > > On Thu, Aug 1, 2019 at 11:06 PM Jonathan Gray <[email protected]> wrote:
> > > >
> > > > > On Fri, Aug 02, 2019 at 03:11:54AM -0500, Charlie Burnett wrote:
> > > > > > Hey-
> > > > > > I'd been messing around with the AMDGPU on current (which I'm
> aware
> > > is
> > > > > very
> > > > > > experimental) and had very few issues with it using a Vega 56
> GPU. I
> > > > > > recently swapped to another Vega GPU (Radeon VII) and have issues
> > > with
> > > > > the
> > > > > > display not showing anything. Still boots fine, in that I can
> still
> > > enter
> > > > > > commands (i.e. reboot) so it has to be a display issue. I tried
> > > searching
> > > > > > for the diff where the firmware was added which I'm certain I saw
> > > (for
> > > > > Vega
> > > > > > 20) but can't seem to find it in the commit history. Anyone have
> a
> > > fix
> > > > > for
> > > > > > it, and if not, who should I talk to if I wanted to help get it
> > > working?
> > > > > I
> > > > > > saw most of the AMDGPU commits have been by @jonathangray if he
> > > would be
> > > > > > the best option.
> > > > > > Thanks!
> > > > >
> > > > > vega20 firmware was added when ports/sysutils/firmware/amdgpu was
> > > > > updated to 20190312.
> > > > >
> > > > > vega20 is marked as experimental in the version of drm we have,
> but we
> > > > > don't currently check the flag on probe like linux does.
> > > > >
> > > > > The following diff will prevent amdgpu from matching on devices
> > > > > in the amdgpu_pciidlist table with the AMD_EXP_HW_SUPPORT flag
> > > > > (currently these are all vega20 ids).
> > > > >
> > > > > Index: sys/dev/pci/drm/include/drm/drm_drv.h
> > > > > ===================================================================
> > > > > RCS file: /cvs/src/sys/dev/pci/drm/include/drm/drm_drv.h,v
> > > > > retrieving revision 1.2
> > > > > diff -u -p -r1.2 drm_drv.h
> > > > > --- sys/dev/pci/drm/include/drm/drm_drv.h       25 Jul 2019
> 05:48:16
> > > > > -0000      1.2
> > > > > +++ sys/dev/pci/drm/include/drm/drm_drv.h       2 Aug 2019 03:29:58
> > > -0000
> > > > > @@ -291,5 +291,7 @@ static inline bool drm_drv_uses_atomic_m
> > > > >  int    drm_dev_register(struct drm_device *, unsigned long);
> > > > >  void   drm_dev_unregister(struct drm_device *);
> > > > >  int    drm_getpciinfo(struct drm_device *, void *, struct
> drm_file *);
> > > > > +const struct drm_pcidev        *drm_find_description(int, int,
> > > > > +    const struct drm_pcidev *);
> > > > >
> > > > >  #endif
> > > > > Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
> > > > > ===================================================================
> > > > > RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c,v
> > > > > retrieving revision 1.3
> > > > > diff -u -p -r1.3 amdgpu_kms.c
> > > > > --- sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c     4 Jul 2019 03:39:07
> > > -0000
> > > > >      1.3
> > > > > +++ sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c     2 Aug 2019 03:35:35
> > > -0000
> > > > > @@ -1337,10 +1337,23 @@ int amdgpu_debugfs_firmware_init(struct
> > > > >  int
> > > > >  amdgpu_probe(struct device *parent, void *match, void *aux)
> > > > >  {
> > > > > +       struct pci_attach_args *pa = aux;
> > > > > +       const struct drm_pcidev *id_entry;
> > > > > +       unsigned long flags = 0;
> > > > > +
> > > > >         if (amdgpu_fatal_error)
> > > > >                 return 0;
> > > > > -       if (drm_pciprobe(aux, amdgpu_pciidlist))
> > > > > -               return 20;
> > > > > +
> > > > > +       id_entry = drm_find_description(PCI_VENDOR(pa->pa_id),
> > > > > +           PCI_PRODUCT(pa->pa_id), amdgpu_pciidlist);
> > > > > +       if (id_entry != NULL) {
> > > > > +               flags = id_entry->driver_data;
> > > > > +               if (flags & AMD_EXP_HW_SUPPORT)
> > > > > +                       return 0;
> > > > > +               else
> > > > > +                       return 20;
> > > > > +       }
> > > > > +
> > > > >         return 0;
> > > > >  }
> > > > >
> > > > >
> > > > >
> > >
>
>

Reply via email to