summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-11-12Set version for 7.6.1 releasexf86-video-ati-7.6.1Michel Dänzer
2015-11-12Remove duplicate free(output_ids) callMichel Dänzer
Fixes double-free regression introduced by commit 875ad48e ("Simplify drmmode_set_mode_major() and avoid leaking memory.").
2015-11-12Post 7.6.0 release version bumpMichel Dänzer
2015-11-12Bump version for 7.6.0 releasexf86-video-ati-7.6.0Michel Dänzer
2015-11-12Clean up radeon_dri2_create_buffer2()Tom St Denis
Remove the depth_pixmap variable from the function and clear out any dead/odd behaviour that results. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> (ported from amdgpu commit 6000aef4e2f0a121b94023484406fb6f04688f74) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Properly handle drmModeAddFB failure in drmmode_crtc_scanout_allocateMichel Dänzer
We were printing an error message, but not propagating the failure. That would probably lead to trouble down the road. (ported from amdgpu commit 21e72fb2418b5cc7fc849a9cf951186e209036b0) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Eliminate redundant data parameter from drmmode_crtc_scanout_createMichel Dänzer
drmmode_crtc_scanout_create just needs to call drmmode_crtc_scanout_allocate when scanout->bo is NULL. This makes it clearer to the reader / compiler that drmmode_crtc_scanout_create doesn't dereference scanout->bo when it's NULL. (ported from amdgpu commit 8da1d0c870e1081d77925807d6e3bbc61a23f54f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Don't advertise rotation support without hardware acceleration v2Michel Dänzer
Rotation currently doesn't work without acceleration (doesn't actually rotate with Option "NoAccel", crashes with Option "AccelMethod" "none" or when glamor fails to initialize) and would probably be too slow anyway. v2: Also remove now dead code checking for ShadowFB from drmmode_crtc_scanout_allocate(). (ported from amdgpu commit dc40582d5ff94d812cbc08f95cf14b80cd0f410d) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Simplify drmmode_set_mode_major() and avoid leaking memory.Tom St Denis
The function would leak the memory allocated for output_ids. This patch addresses that as well as simplifies the logic somewhat. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> (ported from amdgpu commit 460560502a1bdf26d06f3c30df46fa9f28ffb9e5) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Clean up allocation in RADEONInitVideo()Tom St Denis
The allocation of the adapters should use the correct sizeof (even if allocating an array of pointers). Signed-off-by: Tom St Denis <tom.stdenis@amd.com> (ported from amdgpu commit db3bb2061b9ac16b0922d9afae99874820356a04) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-12Simplify pick best crtc to fold two loops into oneTom St Denis
This patch folds the two for loops from radeon_pick_best_crtc() into one to reduce the LOC and make the routine easier to read. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> (ported from amdgpu commit 3055724aef76a624718f26d5f0f9e9d567ffbcfb) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-11-11dri2: Avoid calculation with undefined msc valueTom St Denis
If the get_msc() call fails for any reason we should avoid updating the vblank counter delta with undefined data. Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Signed-off-by: Michel Dänzer <michel.daenzer@amd.com> (minor fixups) (ported from amdgpu commit 8823c3d4c6db70cff7699b31088f2d92db8faaf4) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-26Handle failures in setting a CRTC to a DRM mode properlyStephen Chandler Paul
This fixes a bug where running the card out of PPLL's when hotplugging another monitor would result in all of the displays going blank and failing to work properly until X was restarted or the user switched to another VT. [Michel Dänzer: Pass errno instead of -ret to strerror()] Signed-off-by: Stephen Chandler Paul <cpaul@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-10-16Call xf86CrtcRotate from initial drmmode_set_desired_modes callMichel Dänzer
Fixes various problems when rotation is specified in xorg.conf. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92475 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-10-02Only align screen / scanout pixmap height where necessaryMichel Dänzer
When using glamor acceleration, the pixmap's header has to have a height that matches exactly what the actual height is minus the GPU memory alignment. Otherwise CRTCs scanning out from the main scanout buffer (e.g. every CRTC that isn't rotated or transformed in some way) won't always work. This results in a bug where rotating one monitor in a multi-monitor setup won't always work properly. Easiest way to reproduce this: - Have two monitors (I've gotten this working with a 1920x1080 and 1280x1024, along with two 1920x1080s) - Rotate one of them from 0° to 90°, then rotate the same monitor from 90° to 180°. The monitor that hasn't been rotated won't properly update, and will stay on a blank screen This doesn't seem to make any difference when using EXA for acceleration. Compared to Stephen Chandler's patch, this drops the height alignment in most places and only keeps it where it's really necessary. Reported-and-Tested-by: Stephen Chandler Paul <cpaul@redhat.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-20DRI2: Keep MSC monotonic when moving window between CRTCsMichel Dänzer
This mirrors the DRI3 implementation in xserver. Fixes VDPAU video playback hanging when moving the window between CRTCs. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=66384 (Ported from amdgpu commit 63948ea091a9b324327ade7ec4fc5d67ca7e6f6f) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-19DRI2: Don't ignore rotated CRTCs in amdgpu_dri2_drawable_crtcMichel Dänzer
Waiting for vblank interrupts works fine with rotated CRTCs. The only case we can't handle with rotation is page flipping, which is handled in can_exchange(). This fixes gnome-shell hanging on rotation, probably because amdgpu_dri2_get_msc returned MSC/UST 0 for rotated CRTCs. (Ported from amdgpu commit 7b3212e33cd36fb6f122774df27b56ec4e1a22b8) Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-10add new OLAND pci idAlex Deucher
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-11Make selection between DRI2 and DRI3 consistent with other drivers. (v2)Mario Kleiner
Add Option "DRI" to allow selection of maximum DRI level. This allows the user to select the maximum level of DRI implementation to use, DRI2 or DRI3. It replaces the old option "DRI3" which had exactly the same purpose, but differs from the method used in both intel ddx and nouveau ddx. Make this consistent before a new stable driver is released. v2: Retain handling of old Option "DRI3" for backwards compatibility, but Option "DRI" will take precedence over "DRI3" if both are provided. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-08-07Wait for scanout BO initialization to finish before setting modeMichel Dänzer
This should avoid intermittent artifacts which could sometimes be visible when setting a new scanout pixmap, e.g. on server startup or when changing resolutions. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-08-06Only call drmmode_copy_fb (at most) once on server startupMichel Dänzer
It doesn't make sense to copy the screen contents from console when VT switching back to Xorg or when Xorg resets. Fixes intermittent artifacts when VT switching back from console to the gdm login screen. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-07-30glamor: Move declaration of struct radeon_pixmap out of #if/#else blocksMichel Dänzer
Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-30Remove unused local variable pRADEONEntMichel Dänzer
../../src/radeon_probe.c: In function 'radeon_get_scrninfo': ../../src/radeon_probe.c:157:22: warning: variable 'pRADEONEnt' set but not used [-Wunused-but-set-variable] RADEONEntPtr pRADEONEnt; ^ Reviewed-by: Dave Airlie <airlied@redhat.com>
2015-07-28radeon: move radeon_pixmap forward declaration into other blockDave Airlie
There is already a radeon_pixmap forward decl here, the #else block is missing one. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-28radeon: cleanup the entity recDave Airlie
Some of these were set, some of them were always opposites, so clean things up. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-23Do not link radeon_drv.so against libpciaccessEmil Velikov
It's only used/needed by ati_drv.so Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-07-10radeon: adopt for new X server dirty tracking APIs.Dave Airlie
Signed-off-by: Dave Airlie <airlied@redhat.com>
2015-07-09present: Handle DPMS off in radeon_present_get_ust_mscMichel Dänzer
The DRM_IOCTL_WAIT_VBLANK ioctl may return an error during DPMS off, which would trigger an error message in drmmode_crtc_get_ust_msc. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-07-09present: Look at all CRTCs to determine if we can flipMichel Dänzer
Inspired by modesetting driver change by Kenneth Graunke. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-07-08present: Fall back to modeset for unflip operationMichel Dänzer
It's not always possible to use the page flip ioctl for this, e.g. during DPMS off. We were previously just skipping the unflip in that case, which could result in hangs when setting DPMS off while a fullscreen Present app is running, e.g. at the GNOME3 lock screen. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-07-07Do not try to enable already enabled CRTCs in DPMS hookPiotr Redlewski
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91227 Signed-off-by: Piotr Redlewski <predlewski@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-06-29Fix inconsistent default eg_tile_split in evergreen_accel.cMario Kleiner
eg_tile_split() maps the default: switch-case to tile split flag 6, like for a tile split size of 4096 Bytes. All other instances of tile split mappings or reverse mappings in both the ddx and in Mesa's radeon gallium drivers assign the default: case to tile split flag 4, consistent with a default of 1024 Bytes. Make this one outlier consistent with other instances of mappings in the code to avoid surprises. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2015-06-25Disable CRTCs when disabling the outputsPiotr Redlewski
When turning the outputs off (DPMSModeOff), CRTCs stayed enabled. This led to higher gpu temperatures than with fglrx driver. v2: when entering DPMS also disable active CRTCs v3: use drmmode_set_mode_major() for enabling CRTCs when leaving DPMS Signed-off-by: Piotr Redlewski <predlewski@gmail.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-06-25Skip disabled CRTCs in radeon_scanout_(do_)updateMichel Dänzer
The vblank / page flip ioctls don't work as expected for a disabled CRTC. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-22Don't set TILE_SPLIT flags if surface.tile_split == 0.Mario Kleiner
On pre-Evergreen hw, libdrm's r6_surface_best() helper for the surface managers radeon_surface_best() routine is a no-op and therefore doesn't assign any tile_split settings to created surfaces, so it leaves surface.tile_split on its "undefined" value of 0. Mesa's DRI3/Present backend creates DRI3 Pixmaps via the DRIImage extension and the radeon gallium driver implementation of that extension uses the libdrm surface manager for backing bo creation and treats an undefined surface.tile_split==0, as returned by the surface manager for pre-evergreen, as a signal to not assign any tile_split flags to the DRI3 Pixmaps bo. The ddx also uses libdrm surface manager to create the x-screen pixmap, but so far treated the returned undefined surface.tile_split==0 by mapping it to eg_tile_split()'s default tile_split flags, which are different from Mesa's tiling flags for DRI3 pixmaps. Under DRI3/Present this causes a mismatch of src pixmap and destination root pixmaps tiling flags and thereby prevents page flipping for pixmap presents. Change the ddx code to treat surface.tile_split==0 the same way as the radeon gallium driver to avoid mismatched tiling flags and thereby allow DRI3/Present page-flip to work on pre-Evergreen hw. Tested on RV730 and Evergreen "Juniper". Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
2015-06-11Don't attempt a DRI2/Present page flip while the other one is flippingMichel Dänzer
Fixes corrupted display and hangs when switching between DRI2 and DRI3 fullscreen apps, e.g. a compositor using DRI3 and a fullscreen app using DRI2 or vice versa. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2015-06-11Allow/Fix use of multiple ZaphodHead outputs per x-screen. (v2)Mario Kleiner
Defining multiple ZaphodHead outputs per x-screen in a multiple x-screen's per gpu configuration caused all outputs except one per x-screen to go dark, because there was a fixed mapping x-screen number -> crtc number, limiting the number of crtc's per x-screen to one. On a ZaphodHead's setup, be more clever and assign as many crtc's to a given x-screen as there are ZaphodHeads defined for that screen, assuming there are enough unused crtc's available. Tested on a triple display setup with different combos of one, two or three ZaphodHeads per one, two or three x-screens. This is a port of similar code from xf86-video-nouveau. v2: Implement suggestions by Michel Dänzer: Less verbose debug output, more clear warning message on crtc allocation failure. Move clearing of per gpu assigned_crtc mask to CloseScreen, indeed testing shows no need for the more complex new server generation check from v1. Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com> (v1) Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
2015-06-01DRI2: Fix handling of drmmode_crtc_get_ust_msc return codeMichel Dänzer
Fixes regression introduced in commit 76c2923ac5c7230a8b2f9f8329c308d28b44d9c0 ("DRI2: Split out helper for getting UST and MSC of a specific CRTC"). Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
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>