Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: More amd64 drmkms radeon



Taylor R Campbell wrote:
>   Date: Sun, 17 Aug 2014 16:19:54 +0100 (BST)
>   From: Robert Swindells <rjs%fdy2.co.uk@localhost>
>
>   On i386, the ioctl() of DRM_RADEON_GEM_MMAP is returning addresses
>   above 4GB which obviously cause drmMap() of them to fail.
>
>This isn't obvious to me -- off_t is 64-bit everywhere, and the
>`addresses' that DRM_RADEON_GEM_MMAP returns are not physical
>addresses but cookies that correspond to graphics buffers.  If drmMap
>fails, that might mean the mapping between cookies and buffers (the
>`drm_vma' data structures) is wrong.

Ok, "obvious" was wrong.

Things do work better with the following patch though, I get a sort of
display and can move a blob representing the mouse around. I'm guessing
that the display appearance is related to this:

[   232.356] (II) RADEON(0): Setting screen physical size to 480 x 270

The monitor EDID is decoded correctly as 1920x1080.

I also get a panic from pmap_tlb_shootdown() when I kill the server.

Maybe some part of the call tree from the drmMap is truncating to 32
bits ?

RCS file: /cvsroot/src/sys/external/bsd/drm2/dist/drm/radeon/radeon_ttm.c,v
retrieving revision 1.5
diff -u -r1.5 radeon_ttm.c
--- radeon_ttm.c        26 Jul 2014 21:19:45 -0000      1.5
+++ radeon_ttm.c        17 Aug 2014 16:08:18 -0000
@@ -50,7 +50,11 @@
 #include <drm/bus_dma_hacks.h>
 #endif
 
+#ifdef _LP64
 #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)
+#else
+#define        DRM_FILE_PAGE_OFFSET (0xa0000000 >> PAGE_SHIFT)
+#endif
 
 static int radeon_ttm_debugfs_init(struct radeon_device *rdev);
 static void radeon_ttm_debugfs_fini(struct radeon_device *rdev);


Home | Main Index | Thread Index | Old Index