Commit Graph

38 Commits (a72eb27fbc7a66e35018ffbcb5137cfaaf4049aa)

Author SHA1 Message Date
Ian Romanick a3881ad2fe Add ioc32 compat layer for XGI DRM. 2007-09-18 11:03:49 -07:00
Ian Romanick 9c5b9d458b Use ati_pcigart for PCI-e GART table handling. 2007-08-29 14:41:49 -07:00
Ian Romanick c46ffd6b29 Fix late night dumb-dumb mistake. 2007-08-29 00:23:30 -07:00
Ian Romanick 2bcd5b5e33 Use DRM_SPINLOCK / DRM_UNSPINLOCK macros. 2007-08-29 00:04:18 -07:00
Ian Romanick d8a800b63d Implement fence support. 2007-08-15 21:05:26 -07:00
Ian Romanick f563a50d14 Eliminate unused / useless ioctls. 2007-08-14 13:44:51 -07:00
Ian Romanick 20a0e5e429 After calling drm_sman_cleanup, mark both heaps as uninitialized.
Since the heaps weren't marked as uninitialized, SG memory was never
re-allocated.  This prevented the X-server from being able to restart
without re-loading the kernel module.
2007-08-09 18:57:15 -07:00
Ian Romanick 371f0a4d41 Mask off correct bits in M2REG_AUTO_LINK_STATUS for interrupt handling. 2007-08-09 18:15:42 -07:00
Ian Romanick 6dd97099ea Minor clean up of IRQ code. Much, much more to come. 2007-08-09 16:20:44 -07:00
Ian Romanick dbd4d0597f Use sman memory manager instead of internal version. 2007-08-09 16:01:14 -07:00
Ian Romanick aea6b4dea9 Unify alloc and free ioctls.
The DRM_XGI_PCIE_ALLOC and DRM_XGI_FB_ALLOC ioctls (and the matching
free ioctls) are unified to DRM_XGI_ALLOC.  The desired memory region
is selected by xgi_mem_alloc::location.  The region is magically
encoded in xgi_mem_alloc::index, which is used to release the memory.

Bump to version 0.11.0.  This update requires a new DDX.
2007-08-09 15:30:36 -07:00
Ian Romanick 25cb876f85 Associate master file pointer with command list buffer.
Pass the master's file pointer, as supplied to xgi_bootstrap, to
xgi_cmdlist_initialize.  Associate that pointer with the memory
allocated for the command list buffer.  By doing this the memory will
be automatically cleaned up when the master closes the device.  This
allows the removal of some clean up code.
2007-08-09 15:23:13 -07:00
Ian Romanick 6718198897 Release client memory in reclaim_buffers_idlelocked instead of preclose. 2007-08-06 16:56:20 -07:00
Ian Romanick f3072becda Refactor xgi_(fb|pcie)_free_all into xgi_free_all. 2007-08-06 16:35:07 -07:00
Ian Romanick 90907c5915 Replace per-heap semaphores with drm_device::struct_mutex. 2007-08-06 16:17:23 -07:00
Ian Romanick 08919d8a70 Move additional GE initialization into the kernel.
This code comes directly from the X server.
2007-07-30 12:01:52 -07:00
Ian Romanick 2fc697a7d2 Fix GE shut-down sequence.
When the GE is shut down, an empty command packet without a begin-link
must be sent.  After this command is sent, wait for the hardware to go
idle.  Finally, turn off the GE and disable MMIO.
2007-07-30 10:20:15 -07:00
Ian Romanick cd51f13138 Convert to new ioctl interface between core DRM and device-specific module. 2007-07-27 15:45:59 -07:00
Ian Romanick c37ed9eca5 Eliminate use of DRM_ERR. 2007-07-26 17:01:16 -07:00
Ian Romanick 8e64d2ae86 Fix license formatting. 2007-07-24 13:36:02 -07:00
Ian Romanick 2ef2997ee3 Fix flags for serveral ioctls. 2007-07-24 13:29:29 -07:00
Ian Romanick 887cb31ee9 Fix bug preventing X server from restarting.
The core DRM lastclose routine automatically destroys all mappings and
releases SG memory.  XP10 DRM and DDX assumed this data stayed around
until module unload.  xgi_bootstrap was reworked to recreate all these
mappings.  In addition, the drm_addmap for the GART backing store was
moved into the kernel.  This causes a change to the ioctl protocol and
a version bump.
2007-07-24 13:27:44 -07:00
Ian Romanick 2097d743f2 Eliminate XGI_CHECK_PCI_CONFIG.
Based on review comments from airlied, XGI_CHECK_PCI_CONFIG is
removed.  He believes (and I tend to agree) that this is a largely
unnecessary workaround for a bug elsewhere.
2007-07-23 13:26:28 -07:00
Ian Romanick 56665a42f4 Delete unused variable in xgi_driver_load. 2007-07-19 19:09:24 -07:00
Ian Romanick 970674f486 Fix error handing related to xgi_cmdlist_initialize.
xgi_cmdlist_initialize wasn't correctly checking for errors from
xgi_pcie_alloc.  Furthermore, xgi_bootstrap, the one caller of
xgi_cmdlist_initialize, wasn't check its return value.
2007-07-19 19:08:47 -07:00
Ian Romanick 2f53ce4af2 Move MMIO drm_addmap (and code that depends on it) to xgi_bootstrap.
For reasons that I don't understand, the drm_addmap call would succeed
in xgi_driver_load, but writes to the map later would oops.  Moving it
to xgi_bootstrap fixes this problem.
2007-07-19 11:05:13 -07:00
Ian Romanick 5ba94c2ab8 Initial pass at converting driver to DRM infrastructure. 2007-07-19 10:29:18 -07:00
Ian Romanick 658ff2daf3 Eliminate several useless ioctls and associated cruft.
The ioctlss XGI_ESC_DEVICE_INFO, XGI_ESC_MEM_COLLECT,
XGI_ESC_PCIE_CHECK, XGI_ESC_GET_SCREEN_INFO, XGI_ESC_PUT_SCREEN_INFO,
XGI_ESC_MMIO_INFO, and XGI_ESC_SAREA_INFO, are completely unnecessary.
The will be doubly useless when the driver is converted to the DRM
infrastructure.
2007-07-16 20:58:43 -07:00
Ian Romanick 76ca1e858f Convert occurances of U32 to other types.
Most occurances of U32 were converted to u32.  These are cases where
the data represents something that will be written to the hardware.
Other cases were converted to 'unsigned int'.

U32 was the last type in xgi_types.h, so that file is removed.
2007-07-09 18:54:25 -07:00
Ian Romanick 5c481d0a42 Eliminiate fields in xgi_info that are duplicates of fields in pci_dev. 2007-07-09 16:43:48 -07:00
Ian Romanick a3f56dc3d0 Adjust the types of the fields of xgi_aperture. 2007-07-09 16:07:27 -07:00
Ian Romanick 2f2d8b9688 Merge xgi_mem_req and xgi_mem_alloc into a single type.
These two structures were used as the request and reply for certain
ioctls.  Having a different type for an ioctl's input and output is
just wierd.  In addition, each structure contained fields (e.g., pid)
that had no business being there.

This change requires updates to user-space.
2007-07-09 15:59:09 -07:00
Ian Romanick 86e75b7f7f Remove XGI_IOCTL_CPUID and associated cruft. 2007-07-05 17:49:13 -07:00
Ian Romanick 88328d4ef0 Eliminate structure typedefs
Documentation/CodingStyle says that 'typedef struct foo foo_t' is
evil.  I tend to agree.  Elminate all uses of such construct.
2007-06-29 15:27:38 -07:00
Ian Romanick 33b8476dfb Fix return type of xgi_find_pcie_block.
This function used to return 'void *', which was then cast to
'xgi_pcie_block_t *' at the only caller.  I changed the return type to
'struct xgi_pcie_block_s *' and removed the explicit cast.
2007-06-29 09:30:02 -07:00
Ian Romanick 8cee7dca95 Clean up warnings about unused variables and functions. 2007-06-26 13:46:36 -07:00
Ian Romanick 434657a258 dos2unix and Lindent 2007-06-26 13:10:30 -07:00
Ian Romanick 7af9d67037 Initial XP10 code drop from XGI.
See attachment 10246 on https://bugs.freedesktop.org/show_bug.cgi?id=5921
2007-06-26 13:05:29 -07:00