]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix DMA handling in radeon_dummy_page_init():
authorMarius Strobl <marius@FreeBSD.org>
Wed, 28 May 2014 08:59:23 +0000 (08:59 +0000)
committerMarius Strobl <marius@FreeBSD.org>
Wed, 28 May 2014 08:59:23 +0000 (08:59 +0000)
commit0c12d5ed93319590dca867fa8e7f8b42d5ab86cc
treed3ed48a0d883e41220e216ef4182c1ad5506a1c6
parent0d88706547762bfbb76f499d845e89e981760f97
Fix DMA handling in radeon_dummy_page_init():
- Based on actual usage and on what Linux does, dummy_page.addr should
  contain the physical bus address of the dummy page rather than its
  virtual one. As a side-effect, correcting this bug fixes compilation
  with PAE support enabled by getting rid of an inappropriate cast.
- Also based on actual usage of dummy_page.addr, theoretically Radeon
  devices could do a maximum of 44-bit DMA. In reality, though, it is
  more likely that they only support 32-bit DMA, at least that is what
  radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0
  to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on
  amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead,
  which the existing 32-bit DMA limits within the drm2 code spelled as
  0xFFFFFFFF should also be changed to.

Reviewed by: dumbbell
MFC after:      1 week
Sponsored by:   Bally Wulff Games & Entertainment GmbH
sys/dev/drm2/radeon/radeon_device.c