Age | Commit message (Collapse) | Author |
|
We don't know what the CRTC state is.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
The compat header takes care of the old server vs new server.
this commit was autogenerated from util/modular/x-driver-screen-scrn-conv.sh
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
Deferring this could result in trying to unreference buffers from a previous
server generation, i.e. accessing freed memory.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Tested-by: Christian König <Christian.koenig@amd.com>
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=45937
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Use libdrm common surface code so mesa,ddx have same idea
about tiling surface and what their pitch should be and
the alignment constraint.
v2 fix remaining issue add new option to conditionaly enable
v3 fix fbcon copy and r600 exa copy path
v4 fix non tiled path 2D tiling on GPU >= R600, set it to false
as default
v5 adapt to pixel/element size split of libdrm/radeon
v6 update to properly handle falling back to 1d tiled
v6 final fix to tile split value on evergreen and newer
v7 fix default array mode on r6xx, fix height alignment issue
on evergreen
v8 fix tile split value
v9 add stencil tile split support, simplify dri2 for stencil
with evergreen
v10 Try to fix xv path regarding tiling. Adapt to libdrm API
change. Try to fix case where there is no surface which
means non tiled bo.
v11 check for proper libdrm
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42913 .
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
and actually enable it for M7, previous commit only did one function.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
So it appears the M7 family always tiles its depth buffer also.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
When we do the allocations we need to make sure the always tiled
nature is taken into account.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
In particular, handle and propagate failure to allocate GPU accessible memory,
instead of crashing. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=30047 .
Also take care not to leak resources in error paths.
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
libvdpau has a driver loading mechanism that looks for a dri2 driver
first before falling back to nvidia, so lets use that.
Allows use of libvdpau_rx00 without having to set things up separately,
similar to the patch to xf86-video-nouveau.
Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Reviewed-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Michel Dänzer <michel@daenzer.net>
Tested-by: Michel Dänzer <michel@daenzer.net>
|
|
Buffer exchange assumes that the front buffer pixmap and name
information is accurate. That may not be the case eg. if the window
has been (un)redirected since the buffer was created.
Signed-off-by: Ville Syrjala <syrjala@sci.fi>
|
|
Reported-by: Nils Wallménius <nils.wallmenius@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Base alignment may be 256B or 512B depending on the group
size. Also need to check against front size for virtualX.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
improvements to high-crtc handling done in
f0b7d7b449cc77bb2b281d81108507f8bc2e6018 introduced a bug that caused
the populate_vbl_request_type to never use the high-crtc field even
when it should. The reason is that the offending patch put the code
under #ifdef DRM_VBLANK_HIGH_CRTC_MASK which is not visible outside the
enum type, so #else was always taken in compilation type. This patch
fixes it by basing #ifdef on (pre-processor visible)
DRM_VBLANK_HIGH_CRTC_SHIFT constant
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
|
|
* Fix build against libdrm that doesn't define *_VBLANK_HIGH_CRTC*.
* If we have more than two CRTCs but can't use DRM_VBLANK_HIGH_CRTC_MASK, don't
enable scheduling in the first place rather than relying on
DRM_VBLANK_SECONDARY magically doing something sensible for higher CRTCs.
* Only set up client state tracking when scheduling is enabled.
* Only declare pRADEONEnt when it's needed, and break long lines.
|
|
Hi Alex,
Enclosed is a revised version of two patches sent on Mar 18 and Mar 22,
respectively. Details summarized in these two threads:
http://lists.freedesktop.org/archives/dri-devel/2011-March/009463.html
http://lists.freedesktop.org/archives/dri-devel/2011-March/009582.html
This patch reconciles the DDX with the change in libdrm sent to this list
earlier today. Specifically, it refers to a symbol that has been renamed
from DRM_CAP_HIGH_CRTC to DRM_CAP_VBLANK_HIGH_CRTC. It *supersedes* the
previous patch (i.e. apply it to the master branch as it exists at the
time of this writing, not as an incremental patch to the one sent previously).
Regards,
Ilija
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Based on Ben's nouveau patch.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
target_msc wasn't passed from vblank event handler
to pageflip routine, due to a missing initalization.
Now fixed.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
|
|
When a drawable is page-flipped on multiple crtc's (fullscreen
drawable on mirror-mode or multi-head x-screen), only one pageflip
event is finally delivered, after the last participating crtc signals
flip completion, this to avoid visual corruption.
Old code returned vblank count and timestamps of flip completion
of this last crtc, instead of the values of the "master crtc", the
one that was used for initially scheduling/triggering the pagflip
via vblank events. (master = radeon_dri2_drawable_crtc(drawable))
This patch makes sure that the pageflip completion values of the
"master" crtc are returned, otherwise client applications will
get confused by the random (msc, ust) values returned by whichever
crtc was the last to complete its flip. Without this, the returned
values change randomly and jump forward and backward in time and
count.
The patch also implements a consistency check on returned vblank
count values of pageflip completion. Impossible values are detected,
a x-warning is logged and returned (msc,ust) values are marked invalid,
so clients could perform error handling. Such a warning would indicate
bugs in the pageflip completion routine of future kms drivers or the
ddx to aid driver debugging.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
|
|
A new optional kms driver option "SwapbuffersWait" is defined
for xorg.conf, which defaults to "on". If "on", DRI2 bufferswaps
will be synchronized to vsync, otherwise not.
This currently only affects copy-swaps, not pageflipped swaps.
It also requires a swap_interval setting of zero by the OpenGL
client.
Ideally, we'd provide a way for dri2 to pass the current swap
interval to the ddx so we could change this dynamically.
Signed-off-by: Mario Kleiner <mario.kleiner@tuebingen.mpg.de>
|
|
requires radeon drm 2.8.0 or higher
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
This lets multi-screen work better, but still having issues after server
recycle, but it doesn't crash at least.
|
|
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=31086 .
|
|
Properly handle asynchronous DRI2 events for disconnected clients.
Track client's pending requests and mark them as invalid when the
client disconnects.
This is based on the version from Alban Browaeys in bug #29065.
v1 (Alban Browaeys): Based upon a detailed explanation from Oldřich
Jedlička and comments from Christopher James Halse Rogers.
on http://lists.x.org/archives/xorg-driver-ati/2010-August/016780.html .
v2: Updated version to apply on master. Removed unnecessary
client_index field from _DRI2FrameEvent. Added freeing/removing from
list to failed paths of radeon_dri2_schedule_wait_msc and
radeon_dri2_schedule_swap.
v3: Adopt to older xorg-server that doesn't have dixRegisterPrivateKey.
v4: Conditional include of list.h, unreachable return removed.
v5: Distribute list.h as xorg_list.h, remove xorg-server version check.
Use the version from xorg-server when available (checked in
configure.ac).
v6: Removed xorg_list.h, made DRI2 scheduling features dependent on
list.h presence.
|
|
git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-ati
|
|
evergreen uses separate allocations for depth and stencil,
so to handle that, create a depth buffer large enough to
handle both. This is required for using the stencil
buffer in mesa.
|
|
When a client calls ScheduleSwap we set up a kernel callback when the
relevent vblank event occurs. However, it's possible for the client
to go away between calling ScheduleSwap and the vblank event,
resulting in the buffers being destroyed before they're passed to
radeon_dri2_frame_event_handler.
Add reference-counting to the buffers and take a reference in
radeon_dri2_schedule_swap to ensure the buffers won't be destroyed
before the vblank event is dealt with.
This parallels the approach taken by the Intel DDX in commit
0d2392d44aae95d6b571d98f7ec323cf672a687f.
Fixes: http://bugs.freedesktop.org/show_bug.cgi?id=29065
v2: Don't write completion events to the client if it has quit.
v3: Don't try to unref the NULL buffers from a DRI2_WAITMSC event.
Take a ref in schedule_swap earlier, so the offscreen fallback
doesn't incorrectly destroy the buffers.
Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
port of 0be3e95c844247746742805830860ace9f546d99 from intel driver.
Remove explicit batchbuffer submit in DRI2 copyregion
Now that we submit from the flush callback chain, we know we'll always
submit before the client receives the reply or event that blocks it from
rendering the next frame.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
SW de-tiling used in the r600c 3D driver has issues with
certain configurations.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Requires radeon drm 2.6.0 and updated mesa.
v2: - fix lockup due to not emiting DB_DEPTH_INFO
https://bugs.freedesktop.org/show_bug.cgi?id=28342
- fix drm minor version to deal with evergreen accel
v3: rebase on current ddx git
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Fixes crashes with xserver master, where looking up a pixmap private on a
window no longer happens to work.
|
|
Fixes deprecation warnings with xserver master and should also work with older
xservers.
|
|
It's already exposed and used by exa and Xv and has
the same functionality. radeon_covering_crtc() can
be dropped eventually.
|
|
This patch is mostly a port over of Intel ddx code for
MSC support. It needs a radeon KMS module with version
2.4 which has the query for hw crtc id.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
|
|
|
|
This patch returns NULL for pixmap creation when we are using
mixed pixmaps and the pixmap has a size.
The size check is necessary for the front buffer.
We add a flag to force pixmap creation for certain pixmaps
that need to be hw, like the DRI2 and Xv ones.
Idea from Michel and workarounds from Ben Skeggs.
v2: add Option "EXALowVRAM" to allow configuring this, value in MBs.
Signed-off-by: Dave Airlie <airlied@redhat.com>
|
|
|
|
|
|
Bump requirement for xserver in KMS mode to 1.6.2 for DRI2Buffer2Ptr.
|
|
|
|
|
|
Adapted from various patches from Dave and Jerome.
|
|
This requires an X server from git with createpixmap2 support fixed up in it.
On 1.6 and previous it won't do any tiling, if you are running git server
please upgrade to latest git.
Option "AllowColorTiling" "true" to enable and do some testing
|
|
|
|
|
|
|
|
|
|
|