Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Apr 2020 15:08:33 +0300
From:      Andriy Gapon <avg@FreeBSD.org>
To:        freebsd-x11@freebsd.org
Subject:   Re: drm kmod with Vega 3
Message-ID:  <89efbce5-2950-7206-7af5-2ffd2edf49aa@FreeBSD.org>
In-Reply-To: <1abf8e1e-8a5a-e9fe-a45b-eb5cb20f03f7@FreeBSD.org>
References:  <2ca574c4-431e-7387-cea0-7563ef301df7@FreeBSD.org> <6c8c7e81-8abd-a8d7-f4cf-3e26fc328bcd@gjunka.com> <e0d95bf8-babb-a9e3-60f8-6c90484067b4@FreeBSD.org> <1abf8e1e-8a5a-e9fe-a45b-eb5cb20f03f7@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15/04/2020 09:49, Andriy Gapon wrote:
> A progress report.
> I patched drm-v5.0 with changes based on this upstream commit:
>     commit 466bcb75b0791ba301817cdadeed20398f2224fe
>     Author: Aaron Liu <aaron.liu@amd.com>
>     Date:   Mon Jan 14 16:08:32 2019 +0800
> 
>         drm/amdgpu/psp: ignore psp response status
> 
>         In some cases, psp response status is not 0 even there is no
>         problem while the command is submitted. Some version of PSP FW
>         doesn't write 0 to that field.
>         So here we would like to only print a warning instead of an error
>         during psp initialization to avoid breaking hw_init and it doesn't
>         return -EINVAL.
> 
> After that the driver attaches successfully and produces dmesg output very
> similar to that of Linux 5.3.0.
> 
> Still, that's not a success.  The screen remains totally blank / black after the
> driver attaches.  Whether I stay in the console or start X (via startx) it
> remains the same.  In Xorg.log I see that the X server successfully loads amdgpu
> and there are no errors.  I can interact with the system in blind mode, it still
> accepts input and reacts to it.
> 
> Patched FreeBSD amdgpu dmesg: https://people.freebsd.org/~avg/amdgpu.dmesg.txt
> Full Linux dmesg: https://people.freebsd.org/~avg/linux-5.3.0-28.dmesg.out

I tried to pick up a few "random" changes from Linux, but nothing helped.
Here is a FreeBSD log with compat.linuxkpi.drm_debug=0xfff:
https://people.freebsd.org/~avg/fbsd-dmesg.txt
Here is Linux log with drm.debug=0xfff:
https://people.freebsd.org/~avg/linux-5.3.9-dmesg.txt

They are very similar, but there are some differences.
Most obviously, Linux does not have those
[drm] pstate TEST_DEBUG_DATA: 0x0
WARNING !(0) failed at
/usr/home/avg/devel/kms-drm/drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c:868

If anyone can suggest anything I will try it (additional debug or code changes
to test).
Otherwise, I will have to give up on FreeBSD on that laptop.

-- 
Andriy Gapon



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?89efbce5-2950-7206-7af5-2ffd2edf49aa>