Age | Commit message (Collapse) | Author | Files | Lines |
|
We were not doing so in all cases, leaking memory allocated by the
latter.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were leaking the memory allocated by TimerSet.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were leaking it.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were freeing it earlier but then still trying to access it in
AMDGPUFreeRec.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If we hit a problem while setting up ShadowFB, just carrying on trying
to set up HW acceleration instead is unlikely to work.
(Ported from radeon commit 7d435354099119234d443b07e2df1c7b9f97cf3c)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were trying to call acceleration specific functions from LeaveVT.
Instead, memset the scanout buffer to all 0 in LeaveVT and allocate a
new one in EnterVT.
Bugzilla: https://bugs.freedesktop.org/102948
Fixes: c16ff42f927d ("Make all active CRTCs scan out an all-black
framebuffer in LeaveVT")
(Ported from radeon commit 34da04daec82077571558ac3fe1ec0c1203a01ad)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
|
|
|
|
xserver 1.13.0 was released on September 6th, 2012, almost 5 years ago.
This allows cleaning up a bunch of backwards compatibility code.
(Ported from radeon commit 5cdd334b3402c2431deb3a87a8d04ef590da53ee)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The timer fires 1 second after LeaveVT. This gives the next DRM master
enough time to set up scanout of its own buffers.
Fixes prolonged intermittent black screen when switching from Xorg to
e.g. the GDM Wayland mode login VT.
Fixes: c16ff42f927d ("Make all active CRTCs scan out an all-black
framebuffer in LeaveVT")
(Ported from radeon commit 9d9c565c84601f4c6c73ad769f86491088683f7a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Not used anymore.
(Cherry picked from radeon commit e4a3df19d588a4310fcb889ef34e205d0e92e4d7)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
And destroy all other FBs. This is so that other DRM masters can only
get access to this all-black FB, not to any other FB we created, while
we're switched away and not DRM master.
Fixes: b09fde0d81e0 ("Use reference counting for tracking KMS
framebuffer lifetimes")
(Ported from radeon commit 06a465484101f21e99d3a0a62fb03440bcaff93e)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparatory, no functional change intended yet.
(Ported from radeon commit 7f0cd68d1b0c132e32ae736371bce3e12ed33c7a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparatory, no functional change intended yet.
Also inline amdgpu_pixmap_create_fb into amdgpu_pixmap_get_fb, since
there's only one call-site.
(Ported from radeon commit 20f6b56fdb74d88086e8e094013fedbb14e50a24)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparatory, no functional change intended yet.
(Ported from radeon commit 4bc992c31059eb50e22df4ebf5b92d08411f41ef)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparatory, no functional change intended yet.
(Ported from radeon commit 3f6210ca2c8ef60d59efc8139151d3b9838bb875)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Despite all the careful planning of the kernel, a link may become
insufficient to handle the currently-set mode. At this point, the
kernel should mark this particular configuration as being broken
and potentially prune the mode before setting the offending connector's
link-status to BAD and send the userspace a hotplug event. This may
happen right after a modeset or later on.
Upon receiving a hot-plug event, we iterate through the connectors to
re-apply the currently-set mode on all the connectors that have a
link-status property set to BAD. The kernel may be able to get the
link to work by dropping to using a lower link bpp (with the same
display bpp). However, the modeset may fail if the kernel has pruned
the mode, so to make users aware of this problem a warning is outputed
in the logs to warn about having a potentially-black display.
This patch does not modify the current behaviour of always propagating
the events to the randr clients. This allows desktop environments to
re-probe the connectors and select a new resolution based on the new
(currated) mode list if a mode disapeared. This behaviour is expected in
order to pass the Display Port compliance tests.
(Ported from xserver commit bcee1b76aa0db8525b491485e90b8740763d7de6)
[ Michel: Bump libdrm dependency to >= 2.4.78 for
DRM_MODE_LINK_STATUS_BAD ]
(Ported from radeon commit 0472a605e0ec8fec1892bbc3a84698b7ef9c5296)
Acked-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
All callers were already passing in a pixmap.
This allows simplifying the rotated scanout case slightly.
(Ported from radeon commit d822a0f47070374ad0c1a97b559bae27724dc52a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
We were adding entries at the start of the list, i.e. the list was
ordered from most recently added to least recently added. However, the
corresponding DRM events are generally expected to arrive in the same
order as they are queued, which means that amdgpu_drm_queue_alloc would
generally have to traverse the whole list to find the entry
corresponding to an arrived event. Fix this by adding entries at the end
of the list.
(Ported from radeon commit 3e24770b1b472fc15df56d06f5f04778c9db63dd)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
While at it, make them use crtc->driver_private.
(Ported from radeon commit 36ce7920136c0d723c9397a84e7dd5926a9c7943)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Even if TearFree is enabled for the CRTC we're synchronizing to.
(Ported from radeon commit d314cbfb228bb4b8762714f98d0c114a8ee3f061)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Even if TearFree is active for the the CRTC we're synchronizing to. In
that case, for Present flips synchronized to vertical blank, the other
scanout buffer is immediately synchronized and flipped to during the
target vertical blank period. For Present flips not synchronized to
vertical blank, we simply use the MSC and timestamp values of the last
vertical blank period for timing purposes, and let the normal TearFree
mechanism handle display updates.
(Ported from radeon commit 4445765af5b97d0cfd10889fe6d6f58f2ce85659)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended yet.
(Ported from radeon commit 65e0c5ea1b4adff21d673dbf54af99704c429627)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following changes, no functional change intended yet.
(Ported from radeon commit 1443270e52e8562bd8dc3603f301963bd4027cef)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The xserver Present code can submit a flip in response to notifying it
that a vblank event arrived. This can happen before the completion event
of the previous flip is processed. In that case, we were clearing the
drmmode_crtc->flip_pending field prematurely.
Prevent this by only clearing drmmode_crtc->flip_pending when it matches
the framebuffer being scanned out since the flip whose completion event
we're processing.
(Ported from radeon commit 7c10ee9c88378d773c0bcf651fdc5d9f2c6dc5e5)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows removing drmmode_clear_pending_flip and the pending_dpms_mode
field and cleaning up the code considerably.
(Ported from radeon commit e6d7dc2070f4d21a6900916bb70a31839112882c)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended yet.
(Ported from radeon commit f87acdbfb1b0b6d2769764772a52ea8b81675e20)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Allows cleaning up the code considerably.
(Ported from radeon commit 99f1d7a474af3683fe1a66f50c0bb8935478ff0a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Simplifies the code slightly.
(Ported from radeon commit 49cc61ab970ee28d4509b4e2dd0a57165136889f)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
No longer necessary since we're reference counting framebuffers.
(Ported from radeon commit 3f120fa1d5d921656a367751bc079e020e9ab105)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
|
|
As long as the CRTC we're synchronizing to doesn't.
(Ported from radeon commit 5309bde0c4e28adf2b167191c6d7011a19e31eed)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
To reduce code duplication between DRI2 and Present. No functional
change intended yet.
(Ported from radeon commit 9bc3eef74452d924f9101c024f66ad9b14c404c8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following changes, no functional change intended yet.
(Ported from radeon commit c2d26890691ec105858f086b63170ad94c6f7f05)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Xorg doesn't handle the hardware cursor correctly in that case for
rotation and general transforms, and we can't force the SW cursor.
Fixes: ba2aa0a8c12a ("Handle rotation in the driver also with Xorg
1.12-1.18")
(Cherry picked from radeon commit 7d7abf99b5441ddb04dbee99bc8fa7abc30d4c46)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
To ensure that any existing copies of autotools files will be replaced
with the current versions.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Suggested by one of the tools called by autoreconf.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Suggested by one of the tools called by autoreconf.
Acked-by: Alex Deucher <alexander.deucher@amd.com>
|
|
In order to avoid possible freeze / log file spam in that case.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99769
(Ported from radeon commit 94dc2b80f3ef0b2c17c20501d824fb0447d52e7a)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Preparation for following change, no functional change intended.
(Ported from radeon commit aff267ee36cc6a703a532f91f82adc1ba1425ff3)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Destroying the scanout buffers of GPU screens resulted in a crash when
switching back to the Xorg VT.
Fixes: b10ecdbd89b0 ("Use drmmode_crtc_scanout_* helpers for RandR 1.4
scanout pixmaps")
(Ported from radeon commit c9dd28cb0c9c3de676eadac61e727732510f6b9b)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
If a reference count is <= 0, call FatalError with the call location
(in case it doesn't get resolved in the backtrace printed by
FatalError).
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Otherwise, it could happen that we destroy the FB before the flip
completes, resulting in use-after-free and most likely a crash.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
The client could have said anything here, and if what they said doesn't
actually name an atom NameForAtom() will return NULL, and strcmp() will
be unhappy about that.
[copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc]
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
|
|
Now it should always be clear in the log file why acceleration isn't
enabled.
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
References are held by the pixmaps corresponding to the FBs (so
the same KMS FB can be reused as long as the pixmap exists) and by the
CRTCs scanning out from them (so a KMS FB is only destroyed once it's
not being scanned out anymore, preventing intermittent black screens and
worse issues due to a CRTC turning off when it should be on).
v2:
* Only increase reference count in drmmode_fb_reference if it was sane
before
* Make drmmode_fb_reference's indentation match the rest of
drmmode_display.h
(Ported from radeon commit 55e513b978b2afc52b7cafc5bfcb0d1dc78d75f6)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
* Point to the amd-gfx mailing list
* Specify the component in all bugzilla URLs
* Use https:// for all HTML URLs
(Ported from radeon commit d80d01a73c2eaba2e3649b7bc0a3541b3ff782f6)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Remember the shared pixmap passed to drmmode_set_scanout_pixmap for each
CRTC, and just compare against that.
Fixes leaving stale entries in ScreenRec::pixmap_dirty_list under some
circumstances, which would usually result in use-after-free and a crash
down the line.
(Ported from radeon commit 7dc68e26755466f9056f8c72195ab8690660693d)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
|
|
Since 5064ffab631 (2014), glamor's implementation of _ext just drops the
back_pixmap arg, which we were passing NULL (the default) to anyway.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
(Ported from radeon commit 2b7d77b90108911777a11ecaa63435552000c958)
|