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

Commit 96fb1a24 authored by Dave Airlie's avatar Dave Airlie
Browse files

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

Alex writes:
"Fixes pull request for radeon.  The main things here are
fixing a ATPX regression from the acpi rework, fixing some
fallout from the async VM work, and fixing some module options
that were broken in certain cases.  Other than that, mainly
just bug fixes."

* 'drm-fixes-3.7' of git://people.freedesktop.org/~agd5f/linux:
  drm/radeon: fix ATPX regression in acpi rework
  drm/radeon: fix ATPX function documentation
  drm/radeon: move the retry to gem_object_create
  drm/radeon: move size limits to gem_object_create.
  drm/radeon: use vzalloc for gart pages
  drm/radeon: fix and simplify pot argument checks v3
  drm/radeon: fix header size estimation in VM code
  drm/radeon: remove set_page check from VM code
  drm/radeon: fix si_set_page v2
  drm/radeon: fix cayman_vm_set_page v2
  drm/radeon: fix PFP sync in vm_flush
  drm/radeon: add error output if VM CS fails on cayman
  drm/radeon: give each backlight a unique id
  drm/radeon: fix sparse warning
  drm/radeon: add some new SI PCI ids
parents b8e902f2 0b90365e
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -184,6 +184,7 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
	struct radeon_backlight_privdata *pdata;
	struct radeon_encoder_atom_dig *dig;
	u8 backlight_level;
	char bl_name[16];

	if (!radeon_encoder->enc_priv)
		return;
@@ -203,7 +204,9 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,
	memset(&props, 0, sizeof(props));
	props.max_brightness = RADEON_MAX_BL_LEVEL;
	props.type = BACKLIGHT_RAW;
	bd = backlight_device_register("radeon_bl", &drm_connector->kdev,
	snprintf(bl_name, sizeof(bl_name),
		 "radeon_bl%d", dev->primary->index);
	bd = backlight_device_register(bl_name, &drm_connector->kdev,
				       pdata, &radeon_atom_backlight_ops, &props);
	if (IS_ERR(bd)) {
		DRM_ERROR("Backlight registration failed\n");
+1 −0
Original line number Diff line number Diff line
@@ -2829,6 +2829,7 @@ static bool evergreen_vm_reg_valid(u32 reg)
	case CAYMAN_SQ_EX_ALLOC_TABLE_SLOTS:
		return true;
	default:
		DRM_ERROR("Invalid register 0x%x in CS\n", reg);
		return false;
	}
}
+27 −18
Original line number Diff line number Diff line
@@ -1538,12 +1538,16 @@ void cayman_vm_set_page(struct radeon_device *rdev, uint64_t pe,
{
	struct radeon_ring *ring = &rdev->ring[rdev->asic->vm.pt_ring_index];
	uint32_t r600_flags = cayman_vm_page_flags(rdev, flags);
	int i;

	radeon_ring_write(ring, PACKET3(PACKET3_ME_WRITE, 1 + count * 2));
	while (count) {
		unsigned ndw = 1 + count * 2;
		if (ndw > 0x3FFF)
			ndw = 0x3FFF;

		radeon_ring_write(ring, PACKET3(PACKET3_ME_WRITE, ndw));
		radeon_ring_write(ring, pe);
		radeon_ring_write(ring, upper_32_bits(pe) & 0xff);
	for (i = 0; i < count; ++i) {
		for (; ndw > 1; ndw -= 2, --count, pe += 8) {
			uint64_t value = 0;
			if (flags & RADEON_VM_PAGE_SYSTEM) {
				value = radeon_vm_map_gart(rdev, addr);
@@ -1560,6 +1564,7 @@ void cayman_vm_set_page(struct radeon_device *rdev, uint64_t pe,
			radeon_ring_write(ring, upper_32_bits(value));
		}
	}
}

/**
 * cayman_vm_flush - vm flush using the CP
@@ -1586,4 +1591,8 @@ void cayman_vm_flush(struct radeon_device *rdev, int ridx, struct radeon_vm *vm)
	/* bits 0-7 are the VM contexts0-7 */
	radeon_ring_write(ring, PACKET0(VM_INVALIDATE_REQUEST, 0));
	radeon_ring_write(ring, 1 << vm->id);

	/* sync PFP to ME, otherwise we might get invalid PFP reads */
	radeon_ring_write(ring, PACKET3(PACKET3_PFP_SYNC_ME, 0));
	radeon_ring_write(ring, 0x0);
}
+1 −0
Original line number Diff line number Diff line
@@ -502,6 +502,7 @@
#define	PACKET3_MPEG_INDEX				0x3A
#define	PACKET3_WAIT_REG_MEM				0x3C
#define	PACKET3_MEM_WRITE				0x3D
#define	PACKET3_PFP_SYNC_ME				0x42
#define	PACKET3_SURFACE_SYNC				0x43
#              define PACKET3_CB0_DEST_BASE_ENA    (1 << 6)
#              define PACKET3_CB1_DEST_BASE_ENA    (1 << 7)
+3 −3
Original line number Diff line number Diff line
@@ -87,7 +87,7 @@ static union acpi_object *radeon_atpx_call(acpi_handle handle, int function,
		atpx_arg_elements[1].integer.value = 0;
	}

	status = acpi_evaluate_object(handle, "ATPX", &atpx_arg, &buffer);
	status = acpi_evaluate_object(handle, NULL, &atpx_arg, &buffer);

	/* Fail only if calling the method fails and ATPX is supported */
	if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
@@ -373,11 +373,11 @@ static int radeon_atpx_power_state(enum vga_switcheroo_client_id id,
}

/**
 * radeon_atpx_pci_probe_handle - look up the ATRM and ATPX handles
 * radeon_atpx_pci_probe_handle - look up the ATPX handle
 *
 * @pdev: pci device
 *
 * Look up the ATPX and ATRM handles (all asics).
 * Look up the ATPX handles (all asics).
 * Returns true if the handles are found, false if not.
 */
static bool radeon_atpx_pci_probe_handle(struct pci_dev *pdev)
Loading