[PATCH] drm: radeon: constify drm_prop_enum_list structures.

2017-07-01 Thread Arvind Yadav
drm_prop_enum_lists are not supposed to change at runtime. All functions working with drm_prop_enum_list provided by work with const drm_prop_enum_list. So mark the non-const structs as const. File size before: textdata bss dec hex filename 18276 384 0 18660

Re: [PATCH RFC 1/2] drm/amdgpu: Add AMDGPU_BO_FLAG_CPU_ACCESS

2017-07-01 Thread Christian König
Am 30.06.2017 um 17:18 schrieb John Brooks: For userspace BO allocations, replace AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED with a new AMDGPU_BO_FLAG_CPU_ACCESS flag. This flag will be used to indicate that a BO should currently be CPU accessible. Unlike the CPU_ACCESS_REQUIRED flag, it is meant to

Re: [PATCH 1/5] drm/amdgpu/atombios: use bios_scratch_reg_offset for atombios

2017-07-01 Thread Christian König
Am 30.06.2017 um 23:32 schrieb Alex Deucher: Align with the atomfirmware code. Signed-off-by: Alex Deucher Patch #1 and #2 in this series are Acked-by: Christian König . Patch #3-#5 are Reviewed-by: Christian König

[PATCH RFC v2 1/2] drm/amdgpu: Add AMDGPU_BO_FLAG_CPU_ACCESS

2017-07-01 Thread John Brooks
For userspace BO allocations, replace AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED with a new AMDGPU_BO_FLAG_CPU_ACCESS flag. This flag will be used to indicate that a BO should currently be CPU accessible. Unlike the CPU_ACCESS_REQUIRED flag, it is meant to be an ephemeral rather than a permanent

[PATCH 0/2] Fix a couple of amdgpu de-initialization failures

2017-07-01 Thread John Brooks
These patches fix problems that occur when attempting to unload the amdgpu module on my R9 290. It now unloads without any (obvious) errors. Unfortunately, however, I hit a snag when trying to load the module again after unloading it: [ 150.849380] [drm] amdgpu kernel modesetting enabled. [

[PATCH 2/2] drm/amdgpu: Don't call amd_powerplay_destroy() if we don't have powerplay

2017-07-01 Thread John Brooks
amd_powerplay_destroy() expects a handle pointing to a struct pp_instance. On chips without PowerPlay, pp_handle points to a struct amdgpu_device. The resulting attempt to kfree() fields of the wrong struct ends in fire: [ 91.560405] BUG: unable to handle kernel paging request at

[PATCH 1/2] drm/ttm: Fix use-after-free in ttm_bo_clean_mm

2017-07-01 Thread John Brooks
We unref the man->move fence in ttm_bo_clean_mm() and then call ttm_bo_force_list_clean() which waits on it, except the refcount is now zero so a warning is generated (or worse): [149492.279301] refcount_t: increment on 0; use-after-free. [149492.279309] [ cut here ]