diff options
author | rnoland <rnoland@FreeBSD.org> | 2010-04-22 18:21:25 +0000 |
---|---|---|
committer | rnoland <rnoland@FreeBSD.org> | 2010-04-22 18:21:25 +0000 |
commit | b733ebaa1ccc608f662359519c4712cf384b1360 (patch) | |
tree | 4cbae1e0936ed160e9fca32b44038b3450bb6072 /sys/dev/drm/mga_warp.c | |
parent | c0d6a78ddcc9bdcf4f9ee2858efab1abf0db5bdf (diff) | |
download | FreeBSD-src-b733ebaa1ccc608f662359519c4712cf384b1360.zip FreeBSD-src-b733ebaa1ccc608f662359519c4712cf384b1360.tar.gz |
Rework how drm maps are handled.
* On 32 bit platforms we steal the upper 4 bits of the map handle
to store a unique map id.
* On 64 bit platforms we steal the upper 24 bits.
Resolves issues where the offsets that are handed to mmap may overlap the VRAM on some cards.
Tested on: radeon, intel, mga, and via.
This will break nouveau. I will spin new patches shortly.
Diffstat (limited to 'sys/dev/drm/mga_warp.c')
-rw-r--r-- | sys/dev/drm/mga_warp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/drm/mga_warp.c b/sys/dev/drm/mga_warp.c index dd3e734..98c1615 100644 --- a/sys/dev/drm/mga_warp.c +++ b/sys/dev/drm/mga_warp.c @@ -96,7 +96,7 @@ unsigned int mga_warp_microcode_size(const drm_mga_private_t * dev_priv) static int mga_warp_install_g400_microcode(drm_mga_private_t * dev_priv) { - unsigned char *vcbase = dev_priv->warp->handle; + unsigned char *vcbase = dev_priv->warp->virtual; unsigned long pcbase = dev_priv->warp->offset; memset(dev_priv->warp_pipe_phys, 0, sizeof(dev_priv->warp_pipe_phys)); @@ -124,7 +124,7 @@ static int mga_warp_install_g400_microcode(drm_mga_private_t * dev_priv) static int mga_warp_install_g200_microcode(drm_mga_private_t * dev_priv) { - unsigned char *vcbase = dev_priv->warp->handle; + unsigned char *vcbase = dev_priv->warp->virtual; unsigned long pcbase = dev_priv->warp->offset; memset(dev_priv->warp_pipe_phys, 0, sizeof(dev_priv->warp_pipe_phys)); |