Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
There were numerous unnecessary fields in xgi_cmd_info. The remaining
fields had pretty crummy names. Cut out the cruft, and rename the
rest. As a result, the unused parameter "triggerCounter" to
triggerHWCommandList can be removed.
|
|
|
|
Generate the begin command once in a temporary buffer. Then,
depending on whether the command is to be written directly to the
hardware or to a secondary buffer, copy to command to the correct place.
|
|
Moved the getCurBatchBeginPort before its only caller. Modified
function to return the command ID instead of the port offset.
Function also now assumes input begin type is value.
Added code to ioctl handler to validate begin type.
|
|
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
ioctl wrapper
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Should be OK on G84 for a single channel, multiple channels *almost* work.
Untested on G80.
|
|
|
|
Two large blocks of code were moved out of this function into separate
functions. This brought some much needed sanity to the indentation.
Some dead varaibles were removed.
|
|
I'm not convinced that get_cycles is the right approach here, but it's
better than the weird way that rtdsc was being used.
|
|
|
|
|
|
Dave Airlie pointed out on IRC that idr_replace lets us know if the ID hasn't
been allocated, so we don't need a special pointer value for allocated IDs that
don't have valid information yet.
|
|
There's a difference between a drawable ID not having valid drawable
information and not being allocated at all. Not making the distinction would
break i915 DRM swap scheduling with older X servers that don't push drawable
cliprect information to the DRM.
|
|
|
|
|
|
|
|
|
|
list_for_each_entry_safe
|
|
The whole purpose of xgi_pcie_heap_check is to log information about
entries on the used_list. If XGI_DEBUG is not set, it doesn't print
anything. Therefore we can #ifdef the whole function body.
Convert open-code list iteration to use list_for_each_entry.
|
|
Comment in the code explains it. Basically, I put an if-statement
around a block of code to prevent a NULL pointer dereference that
should never happen in the first place. Eventually, this will need to
come out.
|
|
A few of the PCI-e GART related fields in struct xgi_info were
hardcoded to u32. None of them need to be. Convert them to either
unsigned int or bool.
|
|
|