summaryrefslogtreecommitdiff
path: root/shared-core
AgeCommit message (Collapse)Author
2005-07-27fix driver date and drm minor version for r300 supportRoland Scheidegger
2005-07-20Add latest r300 support from r300.sf.net CVS. Patch submitted by volodya,Eric Anholt
with BSD fix from jkim and the r300_reg.h license from Nicolai Haehnle. Big thanks to everyone involved!
2005-07-16revert last change due to me bring up too earlyDave Airlie
2005-07-16up the versionDave Airlie
2005-07-16Egbert noticed this issue, but changing the IOW to IOWR mess upDave Airlie
compatiblity with userspace..
2005-07-15VIA: Fix sparse warnings (Alexey Dobriyan)Thomas Hellstrom
2005-07-03Add sysfs attribute dri_library_name on Linux. code in share-core/via_drv.cJon Smirl
is ok to be shared, it will be passive on BSD.
2005-06-29Move to linux specific directoryAlan Hourihane
2005-06-29add mga and r128 32/64 bitsDave Airlie
This is Egberts code, ported to Pauls framework by me..
2005-06-28- Remove drm_initmap and replace its usage with drm_addmap. This reducesEric Anholt
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
2005-06-28add compat code from Paul MackerrasDave Airlie
2005-06-28Given that BenH says using the sysdev approach for DRM is bogus, I'll yankAlan Hourihane
the code for it, rather than introducing something that isn't going to work 100% of the time.
2005-06-27Reverse the pm_message_t patch for now, it appears that the 2.6.12 releaseAlan Hourihane
didn't have it.
2005-06-27Check for 2.6.12 suspend/resume changes (pm_message_t)Alan Hourihane
2005-06-27Check dev_privAlan Hourihane
2005-06-27Save state of registers for suspend/resume.Alan Hourihane
2005-06-24Fix suspend problem when i915 private hasn't been initialized yet.Alan Hourihane
2005-06-21Change initialization of savage register access to _DRM_READ_ONLY. Flags ofJon Smirl
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.
2005-06-20Change initialization of radeon register access to _DRM_READ_ONLY. Flags ofJon Smirl
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.
2005-06-19Remove I2C support from radeon driver. Same support is available fromJon Smirl
radeonfb.
2005-06-17fix up drm_alloc_agp to take a dev arg and not pass crappy agpgart aroundDave Airlie
2005-06-14Adds support for PCI cards to MGA DRMIan Romanick
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
2005-06-11fix up drm.h for C++ include as this can be included in user programsDave Airlie
2005-06-10add dragonfly #define from Xorg CVSDave Airlie
2005-06-09Completely re-initialize DMA settingsIan Romanick
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
2005-06-06fix some issues with radeon interrupt handlingDave Airlie
From: Dave Airlie + Benjamin Herrenschmidt
2005-06-06Fix copyrightsAlan Hourihane
2005-06-04Remove warnings about code mixed with declerations..Dave Airlie
2005-06-03Minor clean-ups. The drm_mga_fullscreen_t stuff has been dead for a looongIan Romanick
time. Remove it and an out-dated comment.
2005-06-03Move the deallocation of dev_private. Since dev_private is allocated whenIan Romanick
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
2005-05-28Re-implement the power management.Alan Hourihane
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 ;-/
2005-05-27Modify drm_driver::device_is_agp to return a tri-state value to indicateIan Romanick
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
2005-05-27add radeon registers from VHA code these are the "unknown" registersDave Airlie
2005-05-23VIA:Thomas Hellstrom
64-bit fixes. Bumped driver date and patchlevel.
2005-05-22Refactor the routines for "calculating" the size of the WARP microcode. TheIan Romanick
two routines (one for G200 and one for G400) were replaced with static const variables and a single function that returns the correct size. The code to generate an error if the allocated WARP region is too small was refactored from mga_warp_install_{g200,g400}_microcode to mga_wrap_install_microcode. mga_warp_microcode_size is global to the MGA DRM because it will soon be used by code in another file.
2005-05-21Forgot to bump the patchlevel and driver date on last commit.Ian Romanick
2005-05-21Change the MGA initialization and cleanup a bit. The dev_private structureIan Romanick
is now allocated (and partially filled in) by the new mga_driver_preinit function. This allows the driver to detect the type of card (i.e., G200 class vs. G400 class) on its own. The chipset value passed to mga_dma_init is now ignored. This same technique is used by the radeon DRM. As a result of this, mga_driver_pretakedown was converted to mga_driver_postcleanup. This routine gets called in some other places than might be expected, and it sets the dev_private pointer to NULL. That little gem took over an hour to track down. :(
2005-05-18Add i945G pci ids to drmDave Airlie
From: Christopher Allen Wing <wingc@engin.umich.edu> Signed-off-by: Dave Airlie <airlied@linux.ie>
2005-05-16Added device_is_agp callback to drm_driver. This function is called by theIan Romanick
platform-specific drm_device_is_agp function. Added implementation of this function the the Linux-specific portion of the MGA driver to detect PCI G450 cards. Added code to the Linux-specific portion of the generic DRM layer to not initialize AGP infrastructure if the card is not AGP (this matches what already existed in BSD). Bumped the driver date and the driver patch-level for MGA. This mostly fixes bugzilla #3248. The BSD side still needs an implementation of mga_driver_device_is_agp.
2005-05-15wrap config.h include with defined for KERNELDave Airlie
2005-05-08VIA: Fix for oops when AGP ring-buffer initialization is called and thereThomas Hellstrom
is no AGP memory acquired.
2005-04-26Clean up some const qualifier cast warnings.Eric Anholt
2005-04-26Convert BSD code to mostly use bus_dma, the dma abstraction for dealingEric Anholt
with IOMMUs and such. There is one usage of the forbidden vtophys() left in drm_scatter.c which will be fixed up soon. This required a KPI change for drm_pci_alloc/free() to return/use a drm_dma_handle_t that keeps track of os-specific bits, rather than just passing around the vaddr/busaddr/size. Submitted by: Tonnerre Lombard (partially) Tested on: FreeBSD: Rage128 AGP/PCI Linux: Savage4 AGP/PCI
2005-04-26Use msleep instead of tsleep to drop the DRM device lock and avoid aEric Anholt
sleep-with- mutex held. This probably ought to be an os-independent sleep function ala DRM_USLEEP.
2005-04-20VIA: Interrupt handler bugfixes. Bumped patchlevel to 2.6.2.Thomas Hellstrom
2005-04-18VIA:Thomas Hellstrom
1) Security fix: Stopped possible MMIO access to PCI DMA area for the unichrome Pro. 2) Fixed an odd cpu usage problem by padding small AGP DMA submissions. Bumped patchlevel.
2005-03-29Missing file via_video.c commited.Thomas Hellstrom
2005-03-29Add skeletal imagine driver (but don't build it yet).Adam Jackson
2005-03-28Via updates:Thomas Hellstrom
New PCI command parser. Moved from via_dma.c to via_verifier.c so functions with similar functionality are close to eachother. Moved video related functions to via_video.c, which might be extended in the future, as new video functionality is added. New device-specific generic IRQ IOCTL, similar to the general VBLANK IOCTL, but with support for multiple device IRQ sources and functionality. Support for Unichrome Pro PM800/CN400 video DMA commands in verifier and PCI parser. Support for Unichrome Pro PM800/CN400 HQV IRQs in the new generic IRQ IOCTL. Bumped minor. New version 2.6.0.
2005-03-25Don't know who set the i915GM PCI ID incorrectly but it should be 0x2592Alan Hourihane