On Tue, Jun 08, 2021 at 01:51:21PM +0000, Jerome Kasper wrote:
> Hello bugs@
> 
> Since i'm following -current i lately encountered drm issues with my graphic 
> card that doesn't attach anymore while it was working on 6.9-stable.
> sysupgrade -s done today and still having the issue. 
> Non attachement occurs at each reboot leaving graphics to efifb
> 
> Any method to track down faulty code or simple way to bisect the commit
> that broke things would be greatly appreciated? Wondering if it didn't
> came along with the amdgpu firmware upgrade?

Most likely related.  You can find the old firmware at
http://firmware.openbsd.org/firmware/6.9/amdgpu-firmware-20201218.tgz
to confirm if that is the case.

I would also be interested to know how a kernel with the following
diff goes.  The mapping is an optimisation, there is a fallback.

Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c,v
retrieving revision 1.5
diff -u -p -r1.5 amdgpu_ttm.c
--- sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c     21 Oct 2020 02:16:53 -0000      
1.5
+++ sys/dev/pci/drm/amd/amdgpu/amdgpu_ttm.c     8 Jun 2021 14:56:39 -0000
@@ -1870,11 +1870,11 @@ int amdgpu_ttm_init(struct amdgpu_device
            adev->gmc.visible_vram_size,
            BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE,
            &adev->mman.aper_bsh)) {
-               DRM_ERROR("Failed to remap VRAM\n");
-               return -ENOMEM;
+               adev->mman.aper_base_kaddr = NULL;
+       } else {
+               adev->mman.aper_base_kaddr = bus_space_vaddr(adev->memt,
+                   adev->mman.aper_bsh);
        }
-       adev->mman.aper_base_kaddr = bus_space_vaddr(adev->memt,
-           adev->mman.aper_bsh);
 #endif
 #endif
 

Reply via email to