Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 550e3b23 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux into drm-next

Some more radeon and amdgpu stuff for drm-next.  Mostly just bug fixes
for new features and cleanups.

* 'drm-next-4.6' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu: fix rb bitmap & cu bitmap calculation
  drm/amdgpu: trace the pd_addr in vm_grab_id as well
  drm/amdgpu: fix VM faults caused by vm_grab_id() v4
  drm/amdgpu: update radeon acpi header
  drm/radeon: update radeon acpi header
  drm/amd: cleanup get_mfd_cell_dev()
  drm/amdgpu: fix error handling in amdgpu_bo_list_set
  drm/amd/powerplay: fix code style warning.
  drm/amd: Do not make DRM_AMD_ACP default to y
  drm/amdgpu/gfx: fix off by one in rb rework (v2)
parents 984fee64 6157bd7a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -2,7 +2,6 @@ menu "ACP Configuration"

config DRM_AMD_ACP
       bool "Enable ACP IP support"
       default y
       select MFD_CORE
       select PM_GENERIC_DOMAINS if PM
       help
+9 −7
Original line number Diff line number Diff line
@@ -769,8 +769,9 @@ struct amdgpu_ib {
	uint32_t			*ptr;
	struct amdgpu_fence		*fence;
	struct amdgpu_user_fence        *user;
	bool				grabbed_vmid;
	struct amdgpu_vm		*vm;
	unsigned			vm_id;
	uint64_t			vm_pd_addr;
	struct amdgpu_ctx		*ctx;
	uint32_t			gds_base, gds_size;
	uint32_t			gws_base, gws_size;
@@ -877,7 +878,7 @@ struct amdgpu_vm_pt {
};

struct amdgpu_vm_id {
	unsigned		id;
	struct amdgpu_vm_manager_id	*mgr_id;
	uint64_t			pd_gpu_addr;
	/* last flushed PD/PT update */
	struct fence			*flushed_updates;
@@ -954,10 +955,11 @@ void amdgpu_vm_get_pt_bos(struct amdgpu_vm *vm, struct list_head *duplicates);
void amdgpu_vm_move_pt_bos_in_lru(struct amdgpu_device *adev,
				  struct amdgpu_vm *vm);
int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
		      struct amdgpu_sync *sync, struct fence *fence);
		      struct amdgpu_sync *sync, struct fence *fence,
		      unsigned *vm_id, uint64_t *vm_pd_addr);
void amdgpu_vm_flush(struct amdgpu_ring *ring,
		     struct amdgpu_vm *vm,
		     struct fence *updates);
		     unsigned vmid,
		     uint64_t pd_addr);
uint64_t amdgpu_vm_map_gart(const dma_addr_t *pages_addr, uint64_t addr);
int amdgpu_vm_update_page_directory(struct amdgpu_device *adev,
				    struct amdgpu_vm *vm);
+2 −4
Original line number Diff line number Diff line
@@ -240,12 +240,10 @@ static int acp_poweron(struct generic_pm_domain *genpd)
static struct device *get_mfd_cell_dev(const char *device_name, int r)
{
	char auto_dev_name[25];
	char buf[8];
	struct device *dev;

	sprintf(buf, ".%d.auto", r);
	strcpy(auto_dev_name, device_name);
	strcat(auto_dev_name, buf);
	snprintf(auto_dev_name, sizeof(auto_dev_name),
		 "%s.%d.auto", device_name, r);
	dev = bus_find_device_by_name(&platform_bus_type, NULL, auto_dev_name);
	dev_info(dev, "device %s added to pm domain\n", auto_dev_name);

+3 −0
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
		usermm = amdgpu_ttm_tt_get_usermm(entry->robj->tbo.ttm);
		if (usermm) {
			if (usermm != current->mm) {
				amdgpu_bo_unref(&entry->robj);
				r = -EPERM;
				goto error_free;
			}
@@ -151,6 +152,8 @@ static int amdgpu_bo_list_set(struct amdgpu_device *adev,
	return 0;

error_free:
	while (i--)
		amdgpu_bo_unref(&array[i].robj);
	drm_free_large(array);
	return r;
}
+4 −3
Original line number Diff line number Diff line
@@ -75,6 +75,7 @@ int amdgpu_ib_get(struct amdgpu_device *adev, struct amdgpu_vm *vm,
	}

	ib->vm = vm;
	ib->vm_id = 0;

	return 0;
}
@@ -139,7 +140,7 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,
		return -EINVAL;
	}

	if (vm && !ibs->grabbed_vmid) {
	if (vm && !ibs->vm_id) {
		dev_err(adev->dev, "VM IB without ID\n");
		return -EINVAL;
	}
@@ -152,10 +153,10 @@ int amdgpu_ib_schedule(struct amdgpu_ring *ring, unsigned num_ibs,

	if (vm) {
		/* do context switch */
		amdgpu_vm_flush(ring, vm, last_vm_update);
		amdgpu_vm_flush(ring, ib->vm_id, ib->vm_pd_addr);

		if (ring->funcs->emit_gds_switch)
			amdgpu_ring_emit_gds_switch(ring, ib->vm->ids[ring->idx].id,
			amdgpu_ring_emit_gds_switch(ring, ib->vm_id,
						    ib->gds_base, ib->gds_size,
						    ib->gws_base, ib->gws_size,
						    ib->oa_base, ib->oa_size);
Loading