Age | Commit message (Collapse) | Author |
|
Disabled by default until the acceleration code stablizes.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now that mesa 9.2 is out with support for tiling
on SI asics, we can enable it here. Tiling improves
memory bandwidth utilization.
V2: update man page
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Seems to run into alignment problems with certain
card configurations.
bug:
https://bugs.freedesktop.org/show_bug.cgi?id=70675
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
When creating a new pixmap/bo for dri2 drawable there is no need to create a
new texture, instead the texture associated with the new pixmap should be use
otherwise there is a missmatch between the bo backing the texture for the
drawable and the bo used by dri2 client.
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The last two bytes of tiling_mode contain the actual tiling mode; the rest are
extra tiling configuration bits. These configuration bits are not necessarily
zero for a linear buffer, so mask them out before checking for linearity
v2: Also fix up evergreen_textured_videofuncs.c
agd5f: remove trailing whitespace
Signed-off-by: Christopher James Halse Rogers <raof@ubuntu.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
I need to stop pushing patches first thing in the morning.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This creates adaptors using glamor if possible.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This causes problems if glamor doesn't have Xv support
enabled. I just noticed that Dave has a better version,
so use that instead.
This reverts commit 4fc1fa920584ace2c84d75af82d06962d0c84ec8.
|
|
v2: guard new glamor Xv bits with USE_GLAMOR
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
We can overflow the 32-bit limit.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=60182
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
For shadowfb, the framebuffer needs to have the RADEON_TILING_SURFACE
flag set, otherwise the appropriate byte swapping won't happen.
See https://bugs.freedesktop.org/show_bug.cgi?id=66663
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
I'm not sure they can handle the shaders properly, especially
only older parts like r300.
This will avoid display corruption problems reported by people
using glamor on older asics by falling back to EXA if they try
and enable glamor.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
|
|
Initial reverse optimus didn't consider multiple screens, so
this overhauls the code to use the new X server interface,
and allows for multiple outputs on the dGPU to be used with
the iGPU doing the rendering. Ported from Dave's nouveau
patch.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This adds support for reverse prime configurations
v2: fix compilation with older xservers
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
The compat naming code for UMS causes problems
with multiple GPU as you may end up with the same
output name on multiple GPUs. Adjust the naming on
secondary GPUs to avoid conflicts.
v2: integrate Dave's fixes for nouveau
v3: keep compat with existing naming on primary GPU
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
In case dst and src rectangles of a Copy operation in the same surface
don't overlap, it is safe to skip the scratch surface. This is a
common case.
Based on evergreen/ni patch from Grigori Goronzy.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Subpixel text rendering is typically done with a solid src and a
pixmap mask. Traditionally, this cannot be accelerated in a single
pass and requires two passes [1]. However, we can cheat a little
with a constant blend color.
We can use:
const.A = src.A / src.A
const.R = src.R / src.A
const.G = src.G / src.A
const.B = src.B / src.A
dst.A = const.A * (src.A * mask.A) + (1 - (src.A * mask.A)) * dst.A
dst.R = const.R * (src.A * mask.R) + (1 - (src.A * mask.R)) * dst.R
dst.G = const.G * (src.A * mask.G) + (1 - (src.A * mask.G)) * dst.G
dst.B = const.B * (src.A * mask.B) + (1 - (src.A * mask.B)) * dst.B
This only needs a single source value. src.A is cancelled down in
the right places.
[1] http://anholt.livejournal.com/32058.html
|
|
Solid pixmaps are currently implemented with scratch pixmaps, which
is slow. This replaces the hack with a proper implementation. The
Composite shader can now either sample a src/mask or use a constant
value.
|
|
In case dst and src rectangles of a Copy operation in the same surface
don't overlap, it is safe to skip the scratch surface. This is a
common case.
|
|
|
|
Before commit ef9bfb262db7004bef3704e5d914687e50d3fca4 and
e5bd99faa3b6629a55168386d5dfa936ee4e97ae, byte swapping for the front buffer
used to be done in hardware. Now that this no longer happens we need to let
DFS/UTS ihandle the byte swapping.
See https://bugs.freedesktop.org/show_bug.cgi?id=66663 .
Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
CIK asics have 128x128 hw cursors
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
leak happens when looping xrandr prop.
Signed-off-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
|
|
Signed-off-by: Samuel Li <samuel.li@amd.com>
|
|
The 'frame' argument passed to event handlers is the plain
CRTC vblank counter that stops progressing when the
associated display is in DPMS-off mode. If we have a
DPMS-off period the frame counter and MSC will
diverge, which can cause some higher-level functions
to return incorrect values.
This patch fixes the problem by adding interpolated
vblanks to the frame counter before using it in handler
functions.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now that we fully emulating a running CRTC through DPMS-off state
it is possible to come up with a zero delay when scheduling
a swap or MSC-wait (e.g., if a call into respective wait function
was entered very late). This patch wraps the TimerSet function
into our own radeon_dri2_schedule_event such that the latter
calls the event right away if zero delay is specified.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Now that the running CRTC is emulated through DPMS-off
states, wait_msc and get_msc must also work on disabled
CRTCs. When CRTC is disabled, we must extrapolate the
MSC count from present time and last MSC when CRTC was
running and also use timers facility in wait_msc.
v2: CRTC-private now stores frame rate instead of nominal
vblank period.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
radeon_dri2_deferred_swap will be used to generate
real events (not just fallbacks) so now it needs to
generate real timestamp and frame counter. Also
this function will be used both by schedule_swap
and wait_msc, so give it a more generic name:
radeon_dri2_deferred_event
v2: - Extrapolate the frame number from the time
of actual execution of the function instead
of using the MSC calculated (extrapolated)
at event scheduling time.
- CRTC-private now stores frame rate instead of
nominal vblank period.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Tracking the CRTC associated with an event will save us
some lookups later in event handlers.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This patch hooks up swap-scheduling function with
vblank-extrapolation function. Rather than waiting for
fixed time, we calculate exactly how much we should wait
and what we should update target_msc to using
radeon_dri2_extrapolate_msc_delay helper function
and schedule the swap completion using DIX's timer facility.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Implement a helper function that will be called when emulating
the running CRTC. The function should be called only when CRTC
is in DPMS-off state. It will look at the vblank count and the
time that was recorded last time the CRTC was running and
calculate how long one must wait (from present time) until
the target_msc is reached if the CRTC were running.
v2: - CRTC-private now stores frame rate instead of nominal
vblank period.
- DIX's timer facility can sometimes wake up the scheduled
functions more than a millisecond earlier. To avoid
generating an old MSC, we have to add more margin when
converting the delay in microseconds to milliseconds.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Normally, MSC value equals the vblank count of the CRTC
on which the drawable resides. However, we are now interpolating
vblanks through DPMS-off state, so if the CRTC is turned
off at some point, the vlbank count does not change, but
MSC does change by the amount that equals the cumulative
number of interpolated vblanks.
So each time we interact with the CRTC's vblank facility,
we have to adjust the vblank counter: in the request, we
have to subtract the number of interpolated vblanks from
MSC and in the reply we have to add the number of interpolated
vblanks to the MSC.
This patch only makes the MSC correct when CRTC is on.
The subsequent patch will construct the MSC when CRTC is not
running.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This adds provisions for interpolating vblanks while the CRTC
is in DPMS-off state. When entering DPMS-off state, we
record the last vblank time, sequence number and frame rate
in CRTC-private structure.
When going back to DPMS-on state we read the current
time and calculate how long we have been off. Then we derive
how many vblanks that would have been had the CRTC remained
running. These are the interpolated vblanks.
Finally, we accumulate the number of interpolated vblanks
in CRTC-private structure to get the number of interpolated
vblanks over the system lifetime.
v2: Track frame rate instead of vblank period. The former
eliminates some roundoff errors.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We are about to modify this function, so let's clean it
up first.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The new helper function retrieves current time in the format
that is compatible with vblank timestamps.
v2: - fix an incorrect statement in a comment
- add a #define so that don't depend on libdrm patches that
have not yet been accepted upstream
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We'll need to use this function in other .c files so
remove static annotation from it. Also, add radeon_
prefix because this function is now part of global namespace,
so it would be nice to know where it is coming from.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
This function no longer uses info argument, so nuke it.
Signed-off-by: Ilija Hadzic <ihadzic@research.bell-labs.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Those didn't define CREATE_PIXMAP_USAGE_SHARED.
|