summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-05-28glamor: Only wait for GPU writes in radeon_glamor_prepare_access_cpu_roMichel Dänzer
We don't need to wait for GPU reads to finish before reading with the CPU. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-21present: Remove get_drmmode_crtc helperMichel Dänzer
It was getting the drmmode_crtc_private_ptr in a roundabout way. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-20Replace SyncFence typedef with declaration of struct _SyncFenceMichel Dänzer
Fixes build failure in some environments: CC radeon_sync.lo In file included from radeon_sync.c:28: /home/tinderbox/xorg-build/include/xorg/misync.h:31: error: redefinition of typedef 'SyncFence' radeon.h:93: note: previous declaration of 'SyncFence' was here make[2]: *** [radeon_sync.lo] Error 1 Reported-Tested-and-Acked-by: David Airlie <airlied@redhat.com>
2015-05-15glamor: Deal with glamor_glyphs_init being removed from xserverMichel Dänzer
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-13add new bonaire pci idAlex Deucher
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-05-11present: Fix present notify timestamps and counts.Mario Kleiner
Invalid (msc,ust)=(0,0) were returned to the server because a wrong crtc_id was used to specify which crtc should deliver pageflip completion data. Fix it in accordance with the dri2 implementation. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2015-05-11present: Move check for async flipsMario Kleiner
Check for and reject currently unsupported async_flip inside radeon_present_check_flip() instead of inside radeon_present_flip(). This way the server can detect early that async flips aren't supported by the ddx and can deal with this correctly by using its non-vsync'ed CopyRegion fallback. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2015-04-28Skip disabled CRTCs in drmmode_set_desired_modes() even if set_hw == FALSEMichel Dänzer
Not skipping a disabled CRTC results in a crash. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90187 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-27Don't call radeon_get_pixmap_private() when using EXAMichel Dänzer
It only works when using glamor. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90169 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23On screen resize, clear the new buffer before displaying itMichel Dänzer
Fixes garbage being intermittently visible during a screen resize. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27757#c7 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23Make drmmode_copy_fb() work with glamor as wellMichel Dänzer
Needed for Xorg -background none. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23Update scanout pixmap contents before setting a mode with itMichel Dänzer
This ensures the scanout pixmaps used for Option "TearFree" and Option "ShadowPrimary" have been initialized when their initial mode is set. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23Defer initial modeset until the first BlockHandler invocationMichel Dänzer
This ensures that the screen pixmap contents have been initialized when the initial modes are set. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=27757 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23Defer initial drmmode_copy_fb call until root window creationMichel Dänzer
That's late enough for acceleration to be fully initialized, but still early enough to set pScreen->canDoBGNoneRoot. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-23Only copy fbcon BO contents if bgNoneRoot is TRUEMichel Dänzer
Otherwise, the X server will initialize the screen pixmap contents anyway. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-22DRI2: Clear old->devPrivate.ptr in fixup_glamorMichel Dänzer
It doesn't point to the memory of the newly allocated BO. Fixes crash running piglit with Option "ShadowPrimary" enabled. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-17Add Option "TearFree" v4Michel Dänzer
Avoids tearing by flipping between two scanout BOs per (non-rotated) CRTC v2: * Fix condition for TearFree log message (Richard Wilbur) * Log warning message about DRI page flipping being enabled because of TearFree (or ShadowPrimary) also when building without glamor support v3: * Only override fb_id/x/y if all scanout pixmaps have been successfully allocated v4: * Make log warning clearer if drmModePageFlip returns an error Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)
2015-04-03glamor: Remove the stride member of struct radeon_pixmapMichel Dänzer
Its value was always the same as that of the PixmapRec devKind member. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-03glamor: Add Option "ShadowPrimary" v2Michel Dänzer
When this option is enabled, most pixmaps (including the screen pixmap) are allocated in system RAM and mostly accessed by the CPU. Changed areas of the screen pixmap are copied to dedicated per-CRTC scanout pixmaps regularly, triggered by the vblank interrupt. v2: * Set region data pointer to NULL for keeping only the extents * Move pRegion and pBox local variable declarations closer to their uses in drmmode_set_mode_major()
2015-04-03glamor: Add wrappers for the X server rendering hooksMichel Dänzer
They can choose between using the GPU or CPU for the operation.
2015-04-03glamor: Add radeon_pixmap parameter to radeon_glamor_create_textured_pixmapMichel Dänzer
2015-04-03glamor: Remove unused function radeon_glamor_pixmap_is_offscreenMichel Dänzer
2015-04-03Add RADEON_CREATE_PIXMAP_SCANOUT flagMichel Dänzer
It means that the pixmap is used for scanout exclusively.
2015-04-03Split out struct drmmode_scanout for rotation shadow buffer informationMichel Dänzer
Will be used for other kinds of dedicated scanout buffers as well.
2015-04-03Rename scanout_pixmap_x field to prime_pixmap_xMichel Dänzer
To avoid confusion with upcoming changes.
2015-04-03present: Don't flip between BOs with different tiling parametersMichel Dänzer
The kernel driver doesn't handle that correctly yet. Fixes or at least avoids issues with OpenGL fullscreen apps with DRI3 enabled and using PRIME or with (2D) tiling disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89720 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-03Add radeon_get_pixmap_tiling_flags helperMichel Dänzer
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-04-02Only enable SYNC extension fences and the Present extension along with DRI3Michel Dänzer
This avoids some trouble with the Gallium nine state tracker, which uses the Present extension even when DRI3 is disabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89772 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-30DRI2: Use radeon_get_pixmap_handleMichel Dänzer
Now we can share pixmaps with no struct radeon_bo via DRI2. Fixes VDPAU video playback freezing when using an OpenGL compositor with DRI3 enabled. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89755 Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Nick Sarnie <commendsarnex@gmail.com>
2015-03-30Move get_pixmap_handle helper to radeon_bo_helper.cMichel Dänzer
No functional change. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Tested-by: Nick Sarnie <commendsarnex@gmail.com>
2015-03-30Move radeon_drm_handler/abort_proc fields to drmmode_flipdata_recMichel Dänzer
Their values are the same for all DRM flip ioctl calls within a single radeon_do_pageflip() call. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-30Simplify radeon_do_pageflip() error handling slightly moreMichel Dänzer
We don't need the local variable old_fb_id. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-30Increase robustness against DRM page flip ioctl failures v3Michel Dänzer
Centralize cleanup, only clean up things that have been allocated for the failed ioctl call. Fixes double-free after a flip ioctl failure. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89681 v2: Only call drmModeRmFB for flipdata->old_fb_id on receipt of last DRM page flip event. Fixes Black screen on making glxgears fullscreen with DRI3 enabled. v3: Avoid double-free of flipdata in the unlikely case that calloc fails for flipcarrier, but only for the second or later CRTC. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v2)
2015-03-30glamor: Handle GLAMOR_* flags removed from xserverMichel Dänzer
The behaviour is the same as when the removed flags were passed in. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-25glamor: Avoid generating GEM flink names for BOs shared via DRI3 v2Michel Dänzer
We can't create our own struct radeon_bo representation in this case because destroying that would make the GEM handle inaccessible to glamor as well. So just get the handle directly via dma-buf. v2: Close dma-buf file descriptor, pointed out by Axel Davy. Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-25Present: Add radeon_present_get_pixmap_handle helperMichel Dänzer
Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-25Make radeon_do_pageflip take a BO handle directlyMichel Dänzer
Reviewed-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-24Adapt radeon_sync.c for misyncshm.h vs misync.h as wellMichel Dänzer
This should have been part of the previous commit. Without this, SYNC extension fences (and by extension DRI3) were disabled because it checked for HAVE_MISYNC_H, but configure now only defines HAVE_MISYNCSHM_H.
2015-03-23configure.ac: Check for misyncshm.h againMichel Dänzer
We need this header, which was added after the other misync*.h headers, along with DRI3 support.
2015-03-19EXA: Return NULL from radeon_get_pixmap_bo if there is no driver privateMichel Dänzer
This mirrors what the glamor part of the function does. Fixes a crash running glxgears_pixmap with DRI3 enabled, reported by "marvin24" on IRC.
2015-03-18dri3: Use screen->CreatePixmap instead of fbCreatePixmap directlyMichel Dänzer
Fixes crash with EXA reported by "marvin24" on IRC.
2015-03-18glamor: Add glamor_fd_from_pixmap define for standalone glamor treeMichel Dänzer
2015-03-18Always include misync.h before other misync headersMichel Dänzer
Older versions of xserver didn't include misync.h from other misync headers as needed.
2015-03-18DRI3: Use open hook instead of open_clientMichel Dänzer
We don't need the client pointer, and this allows it to work with older versions of xserver as well.
2015-03-18Initialize boolean variable before calling xf86GetOptValBoolMichel Dänzer
We were just lucky that it contained 0 in most cases.
2015-03-17Add xorg_list_for_each_entry_safe fallback in radeon_list.hMichel Dänzer
Fixes another build failure against older versions of xserver reported by "Pali" on IRC.
2015-03-17Simplify includes in radeon_{dri3,present}.cMichel Dänzer
Just include radeon.h first. Fixes build failures against older versions of xserver because compat-api.h wasn't getting picked up. Reported by "Pali" on IRC.
2015-03-17Add DRI3 support v2Michel Dänzer
Must be enabled with Option "DRI3" in xorg.conf. v2: Adapt to v2 of patches 11/12. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-17Handle tiling in radeon_set_shared_pixmap_backingDavid Heidelberger
[ Michel Dänzer: Fixups for glamor ] Signed-off-by: David Heidelberger <david.heidelberger@ixit.cz> Signed-off-by: Axel Davy <axel.davy@ens.fr> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-17Add support for the Present extension v2Michel Dänzer
v2: Fix up for struct radeon_drm_queue -> radeon_drm_queue_entry. Swapped order of patches 11 & 12 because the Present extension uses SYNC fences. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>