Commit Graph

4716 Commits (894c86e8400f13f1ee0dfe23ca4b5f98c32d9223)

Author SHA1 Message Date
Carl Worth 2d9990c7e8 Increment version to 2.4.18 for release.
The primary motivation of the release is the bug fix in commit
4f0f871730
2010-02-16 12:12:41 -08:00
Ben Skeggs 88e8a8bbaf nouveau: bump MAX_PUSH to 512 2010-02-16 15:42:00 +10:00
Luca Barbieri b496c63143 nouveau: interface changes for 0.0.16 DRM
This commit encompasses the changes necessary to run on top of the 0.0.16
nouveau interface, additional APIs to support the new features of the
interface, as well as code from Luca Barbieri to improve the pushbuf
interface, which just happens to break nouveau's libdrm ABI so was delayed
until now.

API changes as a result of 0.0.16 DRM interface:

1. No more bo_pin()/bo_unpin(), these were only there for UMS and we no
   longer support it.

2. Any random nouveau_bo can be submitted to the GPU as a push buffer.

3. Relocations can be applied on any nouveau_bo

This patch changes the pushbuffer ABI to:

1. No longer use/expose nouveau_pushbuffer. Everything is directly
   in nouveau_channel. This saves the extra "pushbuf" pointer dereference.

2. Use cur/end pointers instead of tracking the remaining size.
   Pushing data now only needs to alter cur and not both cur and remaining.

The goal is to make the *_RING macros faster and make the interface simpler
and cleaner in the process.

The *_RING APIs are unchanged, but those are inlined and the ABI is changed.

Also, anything accessing pushbuf->remaining instead of using AVAIL_RING
will need to be fixed.
2010-02-16 10:16:37 +10:00
Alex Deucher 4a17be4a86 drm: a some new connector types from the kernel
Add eDP (embedded displayport) and generic TV

Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
2010-02-10 19:39:46 -05:00
Chris Wilson 4f0f871730 intel: Handle resetting of input params after EINTR during SET_TILING
The SET_TILING is pernicious in that it overwrites the input arguments
following an error in order to report the current tiling state of the
buffer. This caught us by surprise as we then fed those arguments back
into to the ioctl unmodified following an EINTR and so the kernel then
reported success for the no-op. We interpreted this success as meaning
that the tiling on the buffer had changed so updated our state and
started using the buffer incorrectly in the new tiled/untiled manner.
This lead to all sorts of random corruption and GPU hangs, even though
the batch buffers would look sane (when the GPU had not wandered off
into forbidden territory).

References:

  Bug 25475 - [i915] Xorg crash / Execbuf while wedged
  http://bugs.freedesktop.org/show_bug.cgi?id=25475

  Bug 25554 - i830_uxa_prepare_access: gtt bo map failed: Input/output error
  http://bugs.freedesktop.org/show_bug.cgi?id=25554

(And probably every other weird bug in the last few months.)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-10 09:52:36 +00:00
Chris Wilson fdcde592c2 intel: Account for potential pinned buffers hogging fences
As the kernel reports the total number of fences, we must guess how many
fences are likely to be pinned. In the typical system these will be only
used by the scanout buffers, of which there may be one per pipe, and any
number of manually pinned fenced buffers. So take a conservative guess
and reserve two fences for use by the system.

Note this reduces the number of fences to 3 for i915 and prior.

Reference:
  http://bugs.freedesktop.org/show_bug.cgi?id=25911
  The latest intel driver 2.10.0 causes kernel oops and system hangs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-02-09 08:37:37 +00:00
Matthew W. S. Bell e4a519635f Tidy up compile warnings by cleaning up types. 2010-02-04 19:45:10 -05:00
Pauli Nieminen 1802e1a4e7 libdrm/radeon: Fix section size mismatch to reset the section.
If there is section size mismatch reusing the section object
makes section start fail.
Reseting the object before doing error checking prevents the
possible flood of errors.
2010-02-04 12:14:37 +10:00
Dave Airlie 520c658706 radeon: enable by default now that kms is out of staging 2010-02-02 10:58:50 +10:00
Dave Airlie 973d8d6bd0 intel: check return value for calloc 2010-02-02 10:57:12 +10:00
Francisco Jerez 53e261c01d nouveau: Regenerate nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-02-01 01:48:13 +01:00
Marcin Slusarz 55ba98fadf nouveau: add nouveau_resource_destroy
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-31 16:09:03 +01:00
Jakob Bornecrantz 44a0e0a099 libkms: Rework interface to not duplicate fields from kms and make formats explicit
List of changes:
Fixes the cursor size to 64x64, you still need ti supply width and height
Explicitly make the cursor format A8R8G8B8
Explicitly make the scanout format X8R8G8B8
2010-01-28 17:32:54 +01:00
Marcin Kościelnicki f2730574f2 nouveau: Update nouveau_drm.h 2010-01-27 14:50:32 +10:00
Jakob Bornecrantz dfa7297860 libkms: Fix return value in vmwgfx_bo_create 2010-01-23 01:39:07 +00:00
Ben Skeggs 7b32812298 nouveau: fail channel creation if pushbuf init fails 2010-01-21 15:18:15 +10:00
Chris Wilson 9de34e2dbf intel: Add pkg-config dependency on libdrm.so using 'Requires' 2010-01-20 10:42:46 +00:00
Alan Coopersmith dc1ed9952e Support gcc's __FUNCTION__ for people using other compilers
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-16 19:37:06 -08:00
Alan Coopersmith b1ce1e6bfb Add support for Solaris libc atomic operations
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-16 19:37:06 -08:00
Alan Coopersmith fe7b93fb49 Include alloca.h in tests/drmstat.c when configure detects it
Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-01-16 19:37:05 -08:00
Marcin Slusarz 3d3d87f3a7 nouveau: disable flush_notify on channel_free
We don't want do call flush_notify when we will FIRE the RING
a couple of lines later, because grobj bound to this channel
might be already freed.
2010-01-15 23:02:48 +01:00
Marcin Slusarz a03dcc2104 nouveau: fix memory leak in nouveau_channel_free 2010-01-15 23:02:48 +01:00
Jakob Bornecrantz 2959266188 libkms: Fix multiple map unmap in vmwgfx and add comment in intel 2010-01-15 20:13:20 +00:00
Jerome Glisse 320811b282 radeon: get device id from the kernel, use it in cs_print
This allow external tools to know for which asics a cs
is destinated to.
2010-01-14 20:01:55 +01:00
Jerome Glisse 2612371a62 radeon: simpler cs print function
We don't intend libdrm-radeon to become clever enough to
decode cs for all GPU we support. Better to let an external
tool do the job. This will print raw cs in an easy to parse
way.
2010-01-14 12:28:20 +01:00
Jerome Glisse 74937cda17 radeon: indentation + trailing space cleanup 2010-01-14 11:28:25 +01:00
Jerome Glisse 6bf1ed2979 radeon: indentation & trailing space cleanup 2010-01-14 11:24:16 +01:00
Jerome Glisse b06cb754a1 radeon: indentation + trailing space cleanup 2010-01-14 11:10:45 +01:00
Jakob Bornecrantz 06a2d6567e tests: Update kmstest a bit 2010-01-12 22:35:28 +01:00
Jakob Bornecrantz d920fa9d0b libkms: Use sysfs instead of udev to find driver
Udev code is still there just commented out.
2010-01-12 21:10:12 +00:00
Jakob Bornecrantz d207a38701 tests: Add a very small libkms test 2010-01-08 15:34:44 +00:00
Jakob Bornecrantz 8838bb1d63 libkms/intel: Don't fail to create bo if we fail to tile 2010-01-08 15:19:44 +00:00
Francisco Jerez 5963c023b8 nouveau: Update nouveau_class.h.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2010-01-08 04:37:39 +01:00
Jakob Bornecrantz bfa44bb861 libkms: Add intel backend 2010-01-08 03:05:31 +00:00
Jakob Bornecrantz 9042d72109 libkms: Pick driver backend via pci id that we get from udev 2010-01-08 03:05:00 +00:00
Peter Clifton 04f90a4470 modes: Retry GETCONNECTOR if a hotplug event occurs between the two ioctls
If the available modes changes between the two GETCONNECTOR ioctls, that
caused the kernel to skip filling one array and led to a crash (as the size
of the allocated and initialised block of memory differed from the reported
size, and might be NULL if no modes were present at first).

This bug manifest its self on my machine due to spurious false positive
detections of a connected TV-out.

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912
       Crash whilst probing modes

Based upon the similar fixes for the GETRESOURCES ioctls by Chris Wilson,
in the following commits:

    commit e6c136ca7a
    commit 85fb3e55fd
    commit d1308f4fe7

Signed-off-by: Peter Clifton <pcjc2@cam.ac.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06 23:46:14 +00:00
Chris Wilson e6c136ca7a modes: Fix previous commit for potential legal NULLs
If the count is 0, then the malloc is permitted to return NULL, so don't
throw an error in that case.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06 16:54:22 +00:00
Chris Wilson 85fb3e55fd modes: Free local resources after allocation failure in GETRESOURCES
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-01-06 15:41:17 +00:00
Chris Wilson d1308f4fe7 modes: Retry GETRESOURCES if a hotplug event occurs between the two ioctls
Peter Clifton hit an issue whereby he had a spurious TV hotplug event
that occurred between the two GETRESOURCES ioctls that caused the kernel
to skip filling one array and led to a crash (as the size of the
allocated and initialised block of memory differed from the reported
size).

Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=25912
       Crash whilst probing modes

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: Peter Clifton <pcjc2@cam.ac.uk>
2010-01-06 15:33:21 +00:00
Jakob Bornecrantz 5dbc1b333b libkms: Make vmwgfx optional 2010-01-05 21:06:13 +01:00
Jakob Bornecrantz dfbaffea07 libkms: Remove duped vmwgfx_drm.h header 2010-01-05 21:04:57 +01:00
Jakob Bornecrantz 2f7f7cecca Merge branch 'master' into libkms-master
Conflicts:
	configure.ac
2010-01-05 20:59:24 +01:00
Jakob Bornecrantz d6059c3dd1 libkms: Disable by default 2010-01-05 20:58:37 +01:00
Jakob Bornecrantz 6d3b8bbddd vmwgfx: Add experimental vmwgfx kernel header 2010-01-05 20:04:13 +01:00
Marcin Slusarz c5c503b519 nouveau: add BEGIN_RING_NI 2009-12-30 22:11:55 +01:00
Younes Manton cd2e4ba9aa nouveau: Unreference pushbuf objects on channel destruction.
- unreference pushbuf objects on channel destruction

Based on Krzysztof Smiechowicz's patch.
2009-12-28 18:07:08 -05:00
Francisco Jerez cb1caaaa05 nouveau: Update some object definitions from renouveau.xml.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-28 18:01:42 +01:00
Marcin Kościelnicki 5fd00ddc9f nouveau: Update nouveau_class.h with new renouveau.xml definitions.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
2009-12-28 17:49:10 +01:00
Dave Airlie fdb33d56de libdrm 2.4.17 2009-12-21 15:03:31 +10:00
Dave Airlie 6de39fc730 radeon: fix BO null check, should be in higher level fn 2009-12-21 14:59:48 +10:00