Age | Commit message (Collapse) | Author |
|
|
|
|
|
me to match other drivers and avoid ifdeffing. The linux via_drv.c will
be moved from shared-core to linux-core soon by repocopy.
Submitted by: Jake Burkholder <jake@FreeBSD.org> Tested by: unichrome
|
|
|
|
contexts registered with the callers filp was wrong.
|
|
caller on fb / agp memory alloc and free. Otherwise malicious clients
can register allocations on other clients or free memory used by other
clients which will lead to severe memory manager inconsistensies.
|
|
|
|
|
|
|
|
understandable: preinit -> load postinit -> (removed) presetup ->
firstopen postsetup -> (removed) open_helper -> open prerelease ->
preclose free_filp_priv -> postclose pretakedown -> lastclose
postcleanup -> unload release -> reclaim_buffers_locked version ->
(removed)
postinit and version were replaced with generic code in the Linux DRM
(drivers now set their version numbers and description in the driver
structure, like on BSD). postsetup wasn't used at all. Fixes the savage
hooks for initializing and tearing down mappings at the right times.
Testing involved at least starting X, running glxgears, killing
glxgears, exiting X, and repeating.
Tested on: FreeBSD (g200, g400, r200, r128) Linux (r200, savage4)
|
|
the driver already knew their correct value. For example the physical
address of the framebuffer and registers.
|
|
needing root.
|
|
|
|
driver's preinit routine, and by using DRM_COPY_TO_USER_IOCTL when
copying out to an ioctl's data pointer. Pulled from the latest version
of my drm-hook-rename.diff and only compile-tested after that.
|
|
|
|
a cmdbuf, which could lead to hangs.
Submitted by: Aapo Tahkola
|
|
copy'n'pasted).
Submitted by: jkim
|
|
|
|
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle.
Big thanks to everyone involved!
|
|
|
|
|
|
compatiblity with userspace..
|
|
|
|
is ok to be shared, it will be passive on BSD.
|
|
|
|
This is Egberts code, ported to Pauls framework by me..
|
|
code duplication, and it also hands you the map pointer so you don't
need to re-find it.
- Remove the permanent maps flag. Instead, for register and framebuffer
maps, we always check whether there's already a map of that type and
offset around. Move the Radeon map initialization into presetup (first
open) so it happens again after every takedown.
- Remove the split cleanup of maps between driver takedown (last close) and
cleanup (module unload). Instead, always tear down maps on takedown,
and drivers can recreate them on first open.
- Make MGA always use addmap, instead of allocating consistent memory in
the PCI case and then faking up a map for it, which accomplished nearly
the same thing, in a different order. Note that the maps are exposed to
the user again: we may want to expose a flag to avoid this, but it's
not a security concern, and saves us a lot of code.
- Remove rmmaps in the MGA driver. Since the function is only called during
takedown anyway, we can let them die a natural death.
- Make removal of maps happen in one function, which is called by both
drm_takedown and drm_rmmap_ioctl.
Reviewed by: idr (previous revision) Tested on: mga (old/new/pci dma),
radeon, savage
|
|
|
|
the code for it, rather than introducing something that isn't going to
work 100% of the time.
|
|
didn't have it.
|
|
|
|
|
|
|
|
|
|
zero does not mean no privs, instead it grants write access
_DRM_READ_ONLY only applies to non-root users. Problem is only in CVS,
initmaps are not in the kernel yet.
|
|
zero does not mean no privs, instead it grants write access
_DRM_READ_ONLY only applies to non-root users. Problem is only in CVS,
initmaps are not in the kernel yet.
|
|
radeonfb.
|
|
|
|
This patch adds serveral new ioctls and a new query to get_param query to
support PCI MGA cards.
Two ioctls were added to implement interrupt based waiting. With this
change, the client-side driver no longer needs to map the primary DMA
region or the MMIO region. Previously, end-of-frame waiting was done by
busy waiting in the client-side driver until one of the MMIO registers
(the current DMA pointer) matched a pointer to the end of primary DMA
space. By using interrupts, the busy waiting and the extra mappings are
removed.
A third ioctl was added to bootstrap DMA. This ioctl, which is used by the
X-server, moves a *LOT* of code from the X-server into the kernel. This
allows the kernel to do whatever needs to be done to setup DMA buffers.
The entire process and the locations of the buffers are hidden from
user-mode.
Additionally, a get_param query was added to differentiate between G4x0
cards and G550 cards. A gap was left in the numbering sequence so that,
if needed, G450 cards could be distinguished from G400 cards. According
to Ville Syrjälä, the G4x0 cards and the G550 cards handle
anisotropic filtering differently. This seems the most compatible way
to let the client-side driver know which card it's own. Doing this very
small change now eliminates the need to bump the DRM minor version
twice.
http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2
A number of ioctl handlers in linux-core were also modified so that they
could be called in-kernel. In these cases, the in-kernel callable
version kept the existing name (e.g., drm_agp_acquire) and the ioctl
handler added _ioctl to the name (e.g., drm_agp_acquire_ioctl).
This patch also replaces the drm_agp_do_release function with
drm_agp_release. drm_agp_release (drm_core_agp_release in the previous
patch) is very similar to drm_agp_do_release, and I saw no reason to
have both.
This commit *breaks the build* on BSD. Eric said that he would make the
required updates to the BSD side soon.
Xorg bug: 3259 Reviewed by: Eric Anholt
|
|
|
|
|
|
There were two problems. First, the 'warp' and 'primary' pointers weren't
cleared, so mga_do_cleanup_dma, which gets called multiple times, would
try to ioremapfree them multiple times. This resulted in the new error
messages to syslog. The second problem was the, since the dev_private
structure isn't reallocated and cleaned out in mga_do_init_dma, when
the server is reloaded idle-waits would wait for impossible values.
I have given this patch some more riggorous testing. This includes:
- Load module, start server, run GL app, stop server, unload module.
- Load module, start server, run GL app, stop server, unload module, reload
module, restart server, run GL app.
- Load module, start server, run GL app, stop server, restart server, run
GL app, stop server, unload module.
In all three cases, everything worked as expected. Please let me know if
there are any further regressions with this patch.
Xorg bug: 3408 Reported by: Chris Rankin
|
|
From: Dave Airlie + Benjamin Herrenschmidt
|
|
|
|
|
|
time. Remove it and an out-dated comment.
|
|
the driver is loaded and is always expected to be around, it should
only be deallocated when the driver is unloaded.
Xorg bug: #3408 Reported by: Chris Rankin
|
|
There's two choices when fb is or isn't loaded as we treat ourselves as a
PCI driver in the latter case.
If we are a PCI driver, then register the suspend/resume functions
directly. If not, then we register as a sysdev and pick up the
suspend/resume actions and pump them down into a generic *power
function.
It'll be nice when this little mess is sorted out with regard to being a
real PCI driver ;-/
|
|
that a device absolutely is, absolutely is not, or may or may not be
AGP. Modify the i915 DRM to use this to force all i9x5 devices to be
"AGP" (even the PCI-e devices).
Reported by: Lukas Hejtmanek
|
|
|