libdrm_radeon: add radeon_bo_is_referenced_by_cs function
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
nouveau: Update some nouveau_class.h definitions from renouveau.xml.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Pekka Paalanen <pq@iki.fi>
intel: Export madvise
Wrap the madvise ioctl for use in APPLE_object_purgeable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Wrap the madvise ioctl for use in APPLE_object_purgeable.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Only install libdrm_intel.pc if we build libdrm_intel
nouveau: turn another assertion into an error
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
nouveau: modify api slightly to allow caller to handle reloc failures
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
Signed-off-by: Ben Skeggs <skeggsb@beleth.(none)>
nouveau: add reloc refcnt to pending bo list
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: drop rendering on the floor rather than asserting if flush fails
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: update view of available aperture space after each flush
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
radeon: fix allocation
The old code increments the command stream size by another kbyte, but does
not make sure that the requested packet size fits into the stream. The patch
ensures that the whole next packet fits there and rounds the allocated size to
a power of two.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
The old code increments the command stream size by another kbyte, but does
not make sure that the requested packet size fits into the stream. The patch
ensures that the whole next packet fits there and rounds the allocated size to
a power of two.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Add support for vblank events
The kernel will now write data to the DRM fd for various event types if
requested. Currently, the only supported event is a vblank event: it contains
the vblank count for the event as well as a timestamp from when the event
ocurred. Since the DRM fd is now pollable, it's easy to integrate into
existing event loops.
The kernel will now write data to the DRM fd for various event types if
requested. Currently, the only supported event is a vblank event: it contains
the vblank count for the event as well as a timestamp from when the event
ocurred. Since the DRM fd is now pollable, it's easy to integrate into
existing event loops.
intel: Only call clock_gettime once per unreference_final.
Notably when freeing a batchbuffer, we often end up freeing many of the
buffers it points at as well. Avoiding repeated calls brings us a 9% CPU
win for cairo-gl.
[ # ] backend test min(s) median(s) stddev. count
before:
[ 0] gl firefox-talos-gfx 58.941 58.966 0.75% 3/3
after:
[ 0] gl firefox-talos-gfx 54.186 54.195 0.49% 3/3
Notably when freeing a batchbuffer, we often end up freeing many of the
buffers it points at as well. Avoiding repeated calls brings us a 9% CPU
win for cairo-gl.
[ # ] backend test min(s) median(s) stddev. count
before:
[ 0] gl firefox-talos-gfx 58.941 58.966 0.75% 3/3
after:
[ 0] gl firefox-talos-gfx 54.186 54.195 0.49% 3/3
intel: Improve bo_references performance by skipping the tree walk.
If the target we're asking about hasn't ever been used as a relocation
target, then it obviously hasn't been used as a target by the batch's reloc
tree. This is the common case for good GL programming where you only map
fresh buffers, and gives us a 5% win in cairo-gl.
[ # ] backend test min(s) median(s) stddev. count
before:
[ 0] gl firefox-talos-gfx 64.680 64.756 0.06% 3/3
after:
[ 0] gl firefox-talos-gfx 60.816 60.970 0.29% 3/3
If the target we're asking about hasn't ever been used as a relocation
target, then it obviously hasn't been used as a target by the batch's reloc
tree. This is the common case for good GL programming where you only map
fresh buffers, and gives us a 5% win in cairo-gl.
[ # ] backend test min(s) median(s) stddev. count
before:
[ 0] gl firefox-talos-gfx 64.680 64.756 0.06% 3/3
after:
[ 0] gl firefox-talos-gfx 60.816 60.970 0.29% 3/3
nouveau: retry if pushbuf ioctl interrupted by signal
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: function to return status of bo being referenced in pushbuf
Will be used to implement gallium's is_{texture,buffer}_referenced()
callbacks properly.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Will be used to implement gallium's is_{texture,buffer}_referenced()
callbacks properly.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau: nv30: add render target logbase2 width,height
intel: Add the defines for the kernel overlay support landing in 2.6.33.
intel: Fallback to atomic-ops.h [libatomic-ops-dev]
Use the external implementation for atomic operations across a wide
range of architectures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Use the external implementation for atomic operations across a wide
range of architectures.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
configure: Typo in error message.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
configure: Conditionally build libdrm_intel
Only build libdrm_intel automatically if we have support for atomic
operations. To force configure to build drm pass --enable-intel, which
will cause the configure to error if no support is found. Or pass
--disable-intel to explicitly prevent libdrm_intel from being built.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Only build libdrm_intel automatically if we have support for atomic
operations. To force configure to build drm pass --enable-intel, which
will cause the configure to error if no support is found. Or pass
--disable-intel to explicitly prevent libdrm_intel from being built.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bump to 2.4.15 for release.
intel: Remove the asserts about the ignored alignment parameter.
I slipped it in with the alloc_tiled changes, since we were explicitly
throwing the parameter away. It caught some bogus released code, which
we've now fixed, so remove the asserts to keep old drivers working.
I slipped it in with the alloc_tiled changes, since we were explicitly
throwing the parameter away. It caught some bogus released code, which
we've now fixed, so remove the asserts to keep old drivers working.
intel: Add a bo_alloc function for tiled BOs.
This simplifies driver code in handling object allocation, and also gives us
an opportunity to possibly cache tiled buffers if it turns out to be a win.
[anholt: This is chopped out of the execbuf2 patch, as it seems to be useful
separately and cleans up the execbuf2 changes to be more obvious]
This simplifies driver code in handling object allocation, and also gives us
an opportunity to possibly cache tiled buffers if it turns out to be a win.
[anholt: This is chopped out of the execbuf2 patch, as it seems to be useful
separately and cleans up the execbuf2 changes to be more obvious]
intel: Fix up some stale doxygen comments.
intel: Reformat to the kernel coding style. Welcome to the 8-space future.
This is done with:
Lindent *.[ch]
perl -pi -e 's|drm_intel_bo \* |drm_intel_bo *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr \* |drm_intel_bufmgr *|g' *.[ch]
perl -pi -e 's|drm_intel_bo_gem \* |drm_intel_bo_gem *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr_gem \* |drm_intel_bufmgr_gem *|g' *.[ch]
perl -pi -e 's|_fake \* |_fake *|g' *.[ch]
hand-editing to whack indented comments into line and other touchups.
This is done with:
Lindent *.[ch]
perl -pi -e 's|drm_intel_bo \* |drm_intel_bo *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr \* |drm_intel_bufmgr *|g' *.[ch]
perl -pi -e 's|drm_intel_bo_gem \* |drm_intel_bo_gem *|g' *.[ch]
perl -pi -e 's|drm_intel_bufmgr_gem \* |drm_intel_bufmgr_gem *|g' *.[ch]
perl -pi -e 's|_fake \* |_fake *|g' *.[ch]
hand-editing to whack indented comments into line and other touchups.
intel: Don't allocate more relocation entries than the BO could support.
This saves 32k of relocation entry storage for many 965 state buffers. No
noticeable impact on performance for cairo-gl firefox.
This saves 32k of relocation entry storage for many 965 state buffers. No
noticeable impact on performance for cairo-gl firefox.
tests: Disable intel-specific tests with --disable-intel
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel: Add a configure option to *disable* building libdrm-intel
In conjunction with the atomic operation patch, it may be more
convenient for some people to disable building libdrm-intel and its
dependencies upon the atomic intrinsics then it is for them to use a
supported compiler.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
In conjunction with the atomic operation patch, it may be more
convenient for some people to disable building libdrm-intel and its
dependencies upon the atomic intrinsics then it is for them to use a
supported compiler.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
intel: report errno
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
libdrm_radeon: Update RADEON_TILING_* flags to what's in current kernels.
libdrm_radeon: Zero-initialize structures to silence valgrind warnings
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
Signed-off-by: Nicolai Hähnle <nhaehnle@gmail.com>
intel: Use atomic refcounters
As the target architecture for Intel GPUs is the x86, we can presume to
have reasonable compiler support for Intel atomic intrinsics, i.e. gcc,
and so use those in preference to pulling in a complicated mess of
fragile assembly.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[anholt: hand-resolved against my previous commit. This brings cairo-gl
firefox-talos-gfx time from 65 seconds back down to 62 seconds.]
Signed-off-by: Eric Anholt <eric@anholt.net>
As the target architecture for Intel GPUs is the x86, we can presume to
have reasonable compiler support for Intel atomic intrinsics, i.e. gcc,
and so use those in preference to pulling in a complicated mess of
fragile assembly.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
[anholt: hand-resolved against my previous commit. This brings cairo-gl
firefox-talos-gfx time from 65 seconds back down to 62 seconds.]
Signed-off-by: Eric Anholt <eric@anholt.net>
intel: Mark cached bo as purgeable
Set the DONTNEED flag on cached buffers so that the kernel is free to
discard those when under memory pressure.
[anholt: This takes firefox-talos-gfx time from ~62 seconds to ~65 seconds
on my GM965, but it seems like a hit worth taking for the improved
functionality from saving memory]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Set the DONTNEED flag on cached buffers so that the kernel is free to
discard those when under memory pressure.
[anholt: This takes firefox-talos-gfx time from ~62 seconds to ~65 seconds
on my GM965, but it seems like a hit worth taking for the improved
functionality from saving memory]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
intel: Don't free the reloc list when putting a freed BO in the cache.
This takes firefox-talos-gfx from 74 seconds to 70 seconds on my GM965.
This takes firefox-talos-gfx from 74 seconds to 70 seconds on my GM965.
intel: Add a new function to check if a BO's reloc tree references some BO.
There are a bunch of places in GL where if we can't do this we have to
flush the batchbuffer, and the cost of lookups here is outweighed by flush
savings.
There are a bunch of places in GL where if we can't do this we have to
flush the batchbuffer, and the cost of lookups here is outweighed by flush
savings.
Bump to 2.4.14 for release.
intel: Remove the max_entries stuff that complicated bo reuse.
I thought I was going to do all sorts of crazy experiments with it. I never
did, and it turned out the free-after-a-few-seconds plan is working out fine.
I thought I was going to do all sorts of crazy experiments with it. I never
did, and it turned out the free-after-a-few-seconds plan is working out fine.
intel: Remove the old swrast flag for reducing cache flushing.
It hasn't been doing anything effective since
52e5d24fae4af6f2f4a5304a516c8c5ab347a11b, and we pretty much don't bo_map
pinned buffers any more anyway.
It hasn't been doing anything effective since
52e5d24fae4af6f2f4a5304a516c8c5ab347a11b, and we pretty much don't bo_map
pinned buffers any more anyway.
drmModeFreeConnector: free encoders and properties
These were leaking.
Signed-off-by: Keith Packard <keithp@keithp.com>
These were leaking.
Signed-off-by: Keith Packard <keithp@keithp.com>
radeon: fix 32/64 bit issue with sign extension
Not sure what intptr_t was up to here.
Reported and tested by: Kevin DeKorte
Signed-off-by: Dave Airlie <airlied@redhat.com>
Not sure what intptr_t was up to here.
Reported and tested by: Kevin DeKorte
Signed-off-by: Dave Airlie <airlied@redhat.com>
libdrm_intel: include B43 chipset check
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
libdrm_intel: add new pci ids
New ids for G41, Clarkdale and Arrandale.
Make sure we don't need to count fence also on new chips.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
New ids for G41, Clarkdale and Arrandale.
Make sure we don't need to count fence also on new chips.
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Bump to version 2.4.13 for release.
Add drm_intel_bo_busy to query whether mapping a BO would block.
Revert "libdrm_radeon: Always wait for BO idle in bo_map."
This reverts commit 0a732983f059c353b267b6bf877e1f0eea4e033f.
Paul Nieminen and Dave Airlie pointed out on IRC that this shouldn't be
necessary. I was seeing visual corruption in X before I made this change, but
I can't reproduce that anymore so it was probably an unrelated issue.
This reverts commit 0a732983f059c353b267b6bf877e1f0eea4e033f.
Paul Nieminen and Dave Airlie pointed out on IRC that this shouldn't be
necessary. I was seeing visual corruption in X before I made this change, but
I can't reproduce that anymore so it was probably an unrelated issue.
libdrm_radeon: Always wait for BO idle in bo_map.
This allows users to eliminate explicit bo_wait calls before bo_map calls.
This allows users to eliminate explicit bo_wait calls before bo_map calls.
Kill last remnant of replacefb ioctl
Kenrels doesn't expose this ioctl
Kenrels doesn't expose this ioctl
radeon: pull in z pipe changes from kernel
radeon: add support for busy/domain check interface.
airlied: modified the interface to drop busy return value, just return
it normally, also fixed int->uint32_t for domain
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
airlied: modified the interface to drop busy return value, just return
it normally, also fixed int->uint32_t for domain
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
nouveau: fix a thinko in copyless pushbuf ioctl
No idea why G80 doesn't hit this, but, this fixes at least one NV40 card.
No idea why G80 doesn't hit this, but, this fixes at least one NV40 card.
libdrm_radeon: Optimize copy of table to cs buffer with specialized call.
Using this call in OUT_BATCH_TABLE reduces radeonEmitState cpu usage from
9% to 5% and emit_vpu goes from 7% to 1.5%. I did use calgrind to profile
gears for cpu hotspots with r500 card.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Using this call in OUT_BATCH_TABLE reduces radeonEmitState cpu usage from
9% to 5% and emit_vpu goes from 7% to 1.5%. I did use calgrind to profile
gears for cpu hotspots with r500 card.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
libdrm_radeon: Fix loops so that compiler can optimize them.
GCC did war about optimization not possible because possible forever loop.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
GCC did war about optimization not possible because possible forever loop.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
libdrm/radeon: Update head of linked list not to point freed memory.
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
nouveau: support for copy-less pushbuf ioctl
nouveau: for the moment, assert if we exceed some reloc limits
Nasty, but nicer than silently not writing into the pushbuf
Nasty, but nicer than silently not writing into the pushbuf
radeon: fix bo wait at map time.
Filter radeon pkgconfig file as do intel and nouveau
radeon: fix GTT writing space check
Noticed by vehemens on irc.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Noticed by vehemens on irc.
Signed-off-by: Dave Airlie <airlied@redhat.com>
link libdrm_intel with -lrt for new use of clock_gettime().
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
libdrm_radeon: add tiling support
radeon: don't map/unmap explicitly.
This caches the mapping and just use mapping as a sync point
This caches the mapping and just use mapping as a sync point
nouveau: don't overwrite user-specified bo size needlessly
nouveau: user buffers need to be mappable
nouveau: drm api 0.0.15, update object header, remove fake bo support
14 years agolibdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which inbalances cpu_p...
libdrm/nouveau: unmap before ufree means nvbo->sysmem != NULL, which inbalances cpu_prep/cpu_finish
- The bo was mapped with sysmem == NULL, so this means cpu prep is called.
- The bo was unmapped with sysmem != NULL, so this means cpu finish is not called.
- This can lead to a non-zero "cpu writers" count in ttm_bo.
- The bo was mapped with sysmem == NULL, so this means cpu prep is called.
- The bo was unmapped with sysmem != NULL, so this means cpu finish is not called.
- This can lead to a non-zero "cpu writers" count in ttm_bo.
Add RADEON_INIT_R600_CP too
this rounds out the r6xx/r7xx stuff in radeon_drm.h
this rounds out the r6xx/r7xx stuff in radeon_drm.h
Add R600_SCRATCH_REG_OFFSET to radeon_drm.h
This lets us libdrm from master for r6xx/r7xx 3d
This lets us libdrm from master for r6xx/r7xx 3d
Bump to version 2.4.12 for release.
intel: Free buffers in the BO cache that haven't been reused in a while.
The goal of the BO cache is to keep buffers on hand for fast continuous use,
as in every frame of a game or every batchbuffer of the X Server. Keeping
older buffers on hand not only doesn't serve this purpose, it may hurt
performance by resulting in disk cache getting kicked out, or even driving
the system to swap.
Bug #20766.
The goal of the BO cache is to keep buffers on hand for fast continuous use,
as in every frame of a game or every batchbuffer of the X Server. Keeping
older buffers on hand not only doesn't serve this purpose, it may hurt
performance by resulting in disk cache getting kicked out, or even driving
the system to swap.
Bug #20766.
configure: move AC_USE_SYSTEM_EXTENSIONS up higher
this was giving me a warning on automake 1.11
this was giving me a warning on automake 1.11
nouveau: fix pin for buffers created with bo_wrap
s/AC_USE_SYSTEM_MACROS/AC_USE_SYSTEM_EXTENSIONS/
Not sure what I was thinking.
Not sure what I was thinking.
libdrm: Make chown check for return value
If call was interrupted by signal we have to make call again.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
If call was interrupted by signal we have to make call again.
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
libdrm: Set _XOPEN_SOURCE and _GNU_SOURCE
Several POSIX extensions are used in the libdrm code (e.g., mknod and ffs).
Set _XOPEN_SOURCE and _GNU_SOURCE to something reasonable to ensure that
prototypes for these functions are available. This is done in configure.ac
using AC_USE_SYSTEM_MACROS. This requires autoconf 2.60 or later. Eventually
the code should check for the existance of these defines and do something
reasonable if they are not available.
Inspired by a patch by Pauli Nieminen and suggestions from Julien Cristau.
Thanks.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Several POSIX extensions are used in the libdrm code (e.g., mknod and ffs).
Set _XOPEN_SOURCE and _GNU_SOURCE to something reasonable to ensure that
prototypes for these functions are available. This is done in configure.ac
using AC_USE_SYSTEM_MACROS. This requires autoconf 2.60 or later. Eventually
the code should check for the existance of these defines and do something
reasonable if they are not available.
Inspired by a patch by Pauli Nieminen and suggestions from Julien Cristau.
Thanks.
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
intel: Fix up math errors when allocating very large BOs.
The logbase2 would overflow and wrap the size around to 0, making the code
allocate a 4kb object instead. By simplifying the code to just walk the
14-entry bucket array comparing sizes instead of indexing on
ffs(1 << logbase2(size)), we avoid silly math errors and have code of
approximately the same speed.
Many thanks to Simon Farnsworth for debugging and providing a working patch.
Bug #27365.
The logbase2 would overflow and wrap the size around to 0, making the code
allocate a 4kb object instead. By simplifying the code to just walk the
14-entry bucket array comparing sizes instead of indexing on
ffs(1 << logbase2(size)), we avoid silly math errors and have code of
approximately the same speed.
Many thanks to Simon Farnsworth for debugging and providing a working patch.
Bug #27365.
intel: fix compiler warning about returning a void value.
bug #21999
bug #21999
libdrm: Fix pci id numbers to unsigned so code won't mix signed/unsigned integers.
strcasecmp is in strings.h.
Based on patch by Pauli Nieminen. Thanks.
Based on patch by Pauli Nieminen. Thanks.
libdrm: Remove typedef for non-existing enum
radeon: move cs space checking code to libdrm_radeon.
This ports a lot of the space checking code into a the common
library, so that the DDX and mesa can use it.
This ports a lot of the space checking code into a the common
library, so that the DDX and mesa can use it.
radeon: fix cs buffer realloc padding
We always realloc at least 0x1000 dwords (page on most system)
when growing the cs buffer this is to avoid having to realloc
at each cs_begin.
We always realloc at least 0x1000 dwords (page on most system)
when growing the cs buffer this is to avoid having to realloc
at each cs_begin.
radeon: fix realloc of packets.
This should use ndw not cdw, using cdw leads to realloc alignment going wrong
This should use ndw not cdw, using cdw leads to realloc alignment going wrong
radeon: add buffer naming function
radeon: add support for write followed by read relocs.
the DDX does this and used to handle it internally
the DDX does this and used to handle it internally
remove some old ttm bits
drm: Strip old ttm.
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
Signed-off-by: Thomas Hellstrom <thellstrom-at-vmware-dot-com>
modetest: use gtt unmap for object
Match gtt map/unmap for correctness.
Match gtt map/unmap for correctness.
libdrm/radeon: add initial libdrm_radeon
requires --enable-radeon-experimental-api for now
requires --enable-radeon-experimental-api for now
nouveau: 0.0.14 + extend bo interface to support subrange mapping
Normal map() should operate as before, and map_range()/map_flush() should
give correct results but lacking any performance difference from map().
Nothing exiting being done here yet, but the interface is a good start.
Normal map() should operate as before, and map_range()/map_flush() should
give correct results but lacking any performance difference from map().
Nothing exiting being done here yet, but the interface is a good start.
nouveau: fix bo mapping issue
Fix build on kernels < 2.6.26
The commit 651e3dc6dd58a79c90db7513ee2fb28360a4560d, "drm: Fix
compilation on 2.6.30" broke all builds on kernels before 2.6.26.
Variadic functions cannot be inlined.
The variadic inline function is replaced with a variadic macro.
Also, the function dev_name() added by that same commit is never used,
so it is removed.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
The commit 651e3dc6dd58a79c90db7513ee2fb28360a4560d, "drm: Fix
compilation on 2.6.30" broke all builds on kernels before 2.6.26.
Variadic functions cannot be inlined.
The variadic inline function is replaced with a variadic macro.
Also, the function dev_name() added by that same commit is never used,
so it is removed.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
nouveau: fill in bo->tiled field for referenced buffers
Fixes the dri1 gallium driver if the front buffer happens to be non-linear.
Fixes the dri1 gallium driver if the front buffer happens to be non-linear.
nv50: magic fix for "3d busted without the binary driver first" issue
No idea what this reg does.. NVIDIA put 0x802 into it on some chips, the
criteria aren't too clear on when they do that however. Hopefully 0x800
will work everywhere...
No idea what this reg does.. NVIDIA put 0x802 into it on some chips, the
criteria aren't too clear on when they do that however. Hopefully 0x800
will work everywhere...
drm: Fix compilation on 2.6.30
This fixes DRM compilation of nouveau.ko on kernel 2.6.30.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
This fixes DRM compilation of nouveau.ko on kernel 2.6.30.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
nouveau: bump for 0.0.13
nouveau: backlight support for ppc laptops
Patch allows the backlight to be manipulated under gnome on apple powerpc
based NV30 machines. It works fine on my powerbook, and should also work
for older NV17/NV18 machines.
Note that older powerpc specific tools (pbbuttonsd) have some problems with
this implementation (because the device is not yet there at the start time
of the daemon, and the code makes incorrect assumptions about the max
brightness values). However, IMHO these things can and should be addressed
in the daemon.
Some style/warning fixes applied by Stuart Bennett <stuart@freedesktop.org>
Patch allows the backlight to be manipulated under gnome on apple powerpc
based NV30 machines. It works fine on my powerbook, and should also work
for older NV17/NV18 machines.
Note that older powerpc specific tools (pbbuttonsd) have some problems with
this implementation (because the device is not yet there at the start time
of the daemon, and the code makes incorrect assumptions about the max
brightness values). However, IMHO these things can and should be addressed
in the daemon.
Some style/warning fixes applied by Stuart Bennett <stuart@freedesktop.org>
intel: quiet a warning.
intel: Only do BO caching up to 64MB objects.
This avoids making objects significantly bigger than they would be
otherwise, which would result in some failing at binding to the GTT.
Found from firefox hanging on:
http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg
due to a software fallback trying to do a GTT-mapped copy between two 73MB
BOs that were instead each 128MB, and failing because both couldn't fit
simultaneously.
The cost here is that we get no opportunity to cache these objects and
avoid the mapping. But since the objects are a significant percentage
of the aperture size, each mapped access is likely having to fault and rebind
the object most of the time anyway.
Bug #20152 (2/3)
This avoids making objects significantly bigger than they would be
otherwise, which would result in some failing at binding to the GTT.
Found from firefox hanging on:
http://upload.wikimedia.org/wikipedia/commons/b/b7/Singapore_port_panorama.jpg
due to a software fallback trying to do a GTT-mapped copy between two 73MB
BOs that were instead each 128MB, and failing because both couldn't fit
simultaneously.
The cost here is that we get no opportunity to cache these objects and
avoid the mapping. But since the objects are a significant percentage
of the aperture size, each mapped access is likely having to fault and rebind
the object most of the time anyway.
Bug #20152 (2/3)
libdrm/intel: Make get_pipe_from_crtc_id per-bufmgr. Return -1 on failure.
The convention is that all APIs are per-bufmgr, so make this one the same.
Then, have it return -1 on failure so that the application can know what's
going on and do something sensible.
Signed-off-by: Keith Packard <keithp@keithp.com>
The convention is that all APIs are per-bufmgr, so make this one the same.
Then, have it return -1 on failure so that the application can know what's
going on and do something sensible.
Signed-off-by: Keith Packard <keithp@keithp.com>
Add new drm_intel_get_pipe_from_crtc_id function.
This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl,
allowing applications to discover the pipe number corresponding
to a given CRTC ID. This is necessary for doing pipe-specific
operations such as waiting for vblank on a given CRTC.
This wraps the new DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID ioctl,
allowing applications to discover the pipe number corresponding
to a given CRTC ID. This is necessary for doing pipe-specific
operations such as waiting for vblank on a given CRTC.