[PATCH 1/1] drm/radeon: check return vlaue of radeon_fence_emit

2017-04-23 Thread Pan Bian
From: Pan Bian Function radeon_fence_emit() returns -ENOMEM if there is no enough memory. And in this case, function radeon_ring_unlock_undo() rather than function radeon_ring_unlock_commit() should be called. However, in function radeon_test_create_and_emit_fence(), the

[PATCH 1/1] drm/radeon: check return value of radeon_ring_lock

2017-04-23 Thread Pan Bian
From: Pan Bian Function radeon_ring_lock() returns an errno on failure, and its return value should be validated. However, in functions r420_cp_errata_init() and r420_cp_errata_fini(), its return value is not checked. This patch adds the checks. Signed-off-by: Pan Bian

Port of amdgpu watermark improvements to radeon-kms.

2017-04-23 Thread Mario Kleiner
Hi, a direct port of the patches we already have in amdgpu, for completeness. These are tested on an old HD-5770, DCE4 only. -mario ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 1/2] drm/radeon: Avoid overflows/divide-by-zero in latency_watermark calculations.

2017-04-23 Thread Mario Kleiner
At dot clocks > approx. 250 Mhz, some of these calcs will overflow and cause miscalculation of latency watermarks, and for some overflows also divide-by-zero driver crash. Make calcs more overflow resistant. This is a direct port of the corresponding patch from amdgpu-kms, copy-paste for cik from

[PATCH 2/2] drm/radeon: Make display watermark calculations more accurate

2017-04-23 Thread Mario Kleiner
Avoid big roundoff errors in scanline/hactive durations for high pixel clocks, especially for >= 500 Mhz, and thereby program more accurate display fifo watermarks. This is a port of the corresponding amdgpu patch. Implemented for DCE 4,6,8. Tested on Evergreen/DCE-4 with Radeon HD-5770.

[PATCH 1/2] drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path.

2017-04-23 Thread Mario Kleiner
This apparently got lost when implementing the new DCE-6 support and would cause failures in pageflip scheduling and timestamping. Signed-off-by: Mario Kleiner Cc: Alex Deucher Cc: sta...@vger.kernel.org ---