Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Dec 2020 20:52:49 +0100
From:      Michael Schuster <michaelsprivate@gmail.com>
To:        Vasily Postnicov <shamaz.mazum@gmail.com>
Cc:        Oskar Sharipov <oskarsh@riseup.net>,  freeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: graphics on amd radeon vega
Message-ID:  <CADqw_g%2BzcaUtXzwsgp8o_eVCspdEZUHY3F3Ltg3yVAL=sUJmMQ@mail.gmail.com>
In-Reply-To: <CADqw_gJkvgbkCN2=4fC0eG6JHUvGuR90RMhQXbAsKiXtoC%2BGXQ@mail.gmail.com>
References:  <X%2BsnT05Xed2y8QP%2B@piggy> <CADnZ6BmO5eaTYBDLkCcEG8esySTbgijSEWagDJtDt=pf4=vqog@mail.gmail.com> <X%2Bsu%2Bn/%2BqHLrMyY9@piggy> <CADqw_gKFYTG1sif6co8xUVJHkhMKMO5jScN%2BoPSmac9oGungvQ@mail.gmail.com> <CADnZ6Bmi_6E%2B4mTrJcOmr5M1UQa22=CU2Vgaiqd4kKWWz1EajA@mail.gmail.com> <X%2Bs%2Bhy2f32dgGT9V@piggy> <CADqw_gKV0k7RG-H57mSpGCLZAYOAOueiH3mZ124GUjcaMwHMzA@mail.gmail.com> <CADnZ6Bn_FSFhZdLc7rqTpHtW4OmJKikFNLWDB4j9RzHE3OgXtA@mail.gmail.com> <CADqw_gLNVRsbzzd0ME7yUf_kSTwqpf0LFKF9TKD69RZrc1feoQ@mail.gmail.com> <CADnZ6BkmYXaW3E6c=8XsgvkgSBeZxnJyEsxAf43Py00Opw%2BSkg@mail.gmail.com> <CADqw_gJkvgbkCN2=4fC0eG6JHUvGuR90RMhQXbAsKiXtoC%2BGXQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Dec 30, 2020 at 3:41 PM Michael Schuster <michaelsprivate@gmail.com=
>
wrote:

>
>
> On Wed, Dec 30, 2020 at 2:54 PM Vasily Postnicov <shamaz.mazum@gmail.com>
> wrote:
>
>> Cannot say for sure where you need to place that. Its either
>> /boot/loader.conf or /etc/sysctl.conf
>>
>> The second sets sysctls later in the boot process. And it can not set
>> tunables, of course.
>>
>> I suggest you figure it yourself)
>>
>
> will do, many thanks!
> Michael
>
>>
>> =D1=81=D1=80, 30 =D0=B4=D0=B5=D0=BA. 2020 =D0=B3., 16:25 Michael Schuste=
r <michaelsprivate@gmail.com>:
>>
>>>
>>>
>>> On Wed, Dec 30, 2020 at 2:01 PM Vasily Postnicov <shamaz.mazum@gmail.co=
m>
>>> wrote:
>>>
>>>> Does sysctl -a | grep exp_hw_support show anything?
>>>>
>>>
>>> indeed it does:
>>> $ sysctl -a | grep exp_hw_support
>>> hw.amdgpu.exp_hw_support: 0
>>> compat.linuxkpi.amdgpu_exp_hw_support: 0
>>> $
>>>
>>>> Usual way to tweak kernel parameters is via sysctl.
>>>>
>>>
I set hw.amdgpu.exp_hw_support=3D"1" in /boot/loader.conf, which seemed to
work, because I now see messages like this in /var/log/messages:

Dec 30 20:02:10 hbeast kernel: amdgpu: [powerplay] smu driver if version =
=3D
0x0000000a, smu fw if version =3D 0x0000000e, smu fw version =3D 0x00373800
(55.56.0)
Dec 30 20:02:10 hbeast kernel: amdgpu: [powerplay] SMU driver if version
not matched
Dec 30 20:02:10 hbeast kernel: amdgpu: [powerplay] dpm has been disabled
Dec 30 20:02:10 hbeast kernel: amdgpu: [powerplay] SMU is initialized
successfully!
Dec 30 20:02:10 hbeast kernel: [drm] VCN decode and encode initialized
successfully(under DPG Mode).
Dec 30 20:02:10 hbeast kernel: drmn0: ring gfx uses VM inv eng 0 on hub 0
Dec 30 20:02:10 hbeast kernel: drmn0: ring comp_1.0.0 uses VM inv eng 1 on
hub 0
[...]
Dec 30 20:02:10 hbeast kernel: drmn0: ring vcn_jpeg uses VM inv eng 6 on
hub 1
Dec 30 20:02:10 hbeast kernel: [drm] Initialized amdgpu 3.35.0 20150101 for
drmn0 on minor 0

which seems an improvement over before, though every invocation of "sysctl
-a" causes a crash dump with this stack:

(kgdb) bt
#0  0xffffffff80c14083 in sched_switch ()
#1  0xffffffff80bf0635 in mi_switch ()
#2  0xffffffff80c3fe69 in sleepq_switch ()
#3  0xffffffff80c40246 in sleepq_catch_signals ()
#4  0xffffffff80c3ffa9 in sleepq_wait_sig ()
#5  0xffffffff80befb4a in _sleep ()
#6  0xffffffff80c5a3fa in pipe_read ()
#7  0xffffffff80c56fc1 in dofileread ()
#8  0xffffffff80c56b3c in sys_read ()
#9  0xffffffff81035fde in amd64_syscall ()
#10 <signal handler called>
#11 0x000000080039ee6a in ?? ()

... so I reverted (or rather, returned to the previous build environment).

cheers & thx
Michael


>>> from looking at other settings, I would guess I need to put this in
>>> /boot/loader.conf to make this persistent across reboot ... correct?
>>> (again, sorry if that's an FAQ - feel free to point me to documentation
>>> about this)
>>>
>>>> But this is linux stuff so it can be anything else.
>>>>
>>>> If sysctl does not help, you can recompile the whole driver changing
>>>> int amdgpu_exp_hw_support =3D 0;
>>>> to
>>>> int amdgpu_exp_hw_support =3D 1;
>>>> in drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
>>>>
>>>
>>> I already found that, though I wanted to keep that as a very last resor=
t
>>> :-)
>>>
>>> thx
>>> Michael
>>>
>>>>
>>>> =D1=81=D1=80, 30 =D0=B4=D0=B5=D0=BA. 2020 =D0=B3., 15:17 Michael Schus=
ter <michaelsprivate@gmail.com
>>>> >:
>>>>
>>>>> On Tue, Dec 29, 2020 at 3:35 PM Oskar Sharipov <oskarsh@riseup.net>
>>>>> wrote:
>>>>>
>>>>> > On Tue, Dec 29, 2020 at 05:04:38PM +0300, Vasily Postnicov wrote:
>>>>> > > 13-CURRENT supports that chip. See
>>>>> > >
>>>>> >
>>>>> https://github.com/freebsd/drm-kmod/blob/drm_v5.4.62_4/drivers/gpu/dr=
m/amd/amdgpu/amdgpu_drv.c
>>>>> > >
>>>>> > > > {0x1002, 0x15d8, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
>>>>> CHIP_RAVEN|AMD_IS_APU}
>>>>> >
>>>>> > Oh, wow. Then I will consider could I try CURRENT now or wait
>>>>> > until it released. Thank you!
>>>>> >
>>>>>
>>>>> when I Install this version on current as of today, I see this in
>>>>> /var/log/messages:
>>>>>
>>>>> Dec 30 13:11:56 hbeast kernel: [drm] amdgpu kernel modesetting enable=
d.
>>>>> Dec 30 13:11:56 hbeast kernel: drmn0: <drmn> on vgapci0
>>>>> Dec 30 13:11:56 hbeast kernel: [drm] This hardware requires
>>>>> experimental
>>>>> hardware support.
>>>>> Dec 30 13:11:56 hbeast kernel: See modparam exp_hw_support
>>>>> Dec 30 13:11:56 hbeast kernel: device_attach: drmn0 attach returned 1=
9
>>>>> sorry if this is an FAQ, but I couldn't find an answer: how do I
>>>>> enable/modify "modparam exp_hw_support"?
>>>>>
>>>>> thx
>>>>> Michael
>>>>>
>>>>> --
>>>>>
>>>> --
Michael Schuster
http://recursiveramblings.wordpress.com/
recursion, n: see 'recursion'



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_g%2BzcaUtXzwsgp8o_eVCspdEZUHY3F3Ltg3yVAL=sUJmMQ>