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

Commit f939a5f4 authored by Dave Airlie's avatar Dave Airlie
Browse files

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

A bit bigger than I would normally like, but most of the large changes are
for polaris support and since polaris went upstream in 4.7, I'd like
to get the fixes in so it's in good shape when the hw becomes available.
The major changes only touch the polaris code so there is little chance
for regressions on other asics.  The rest are just the usual collection
of bug fixes.

* 'drm-fixes-4.7' of git://people.freedesktop.org/~agd5f/linux:
  drm/amd/powerplay: enable clock stretch feature for polaris
  drm/amdgpu/gfx8: update golden setting for polaris10
  drm/amd/powerplay: enable avfs feature for polaris
  drm/amdgpu/atombios: add avfs struct for Polaris10/11
  drm/amd/powerplay: add avfs related define for polaris
  drm/amd/powrplay: enable stutter_mode for polaris.
  drm/amd/powerplay: disable UVD SMU handshake for MCLK.
  drm/amd/powerplay: initialize variables which were missed.
  drm/amd/powerplay: enable PowerContainment feature for polaris10/11.
  drm/amd/powerplay: need to notify system bios pcie device ready
  drm/amd/powerplay: fix bug that function parameter was incorect.
  drm/amd/powerplay: fix logic error.
  drm/amdgpu: initialize amdgpu_cgs_acpi_eval_object result value
  drm/amdgpu: precedence bug in amdgpu_device_init()
  drm/amdgpu: fix num_rbs exposed to userspace (v2)
  drm/amdgpu: missing bounds check in amdgpu_set_pp_force_state()
parents c65c3de6 270d0136
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -909,7 +909,7 @@ static int amdgpu_cgs_acpi_eval_object(struct cgs_device *cgs_device,
	struct cgs_acpi_method_argument *argument = NULL;
	uint32_t i, count;
	acpi_status status;
	int result;
	int result = 0;
	uint32_t func_no = 0xFFFFFFFF;

	handle = ACPI_HANDLE(&adev->pdev->dev);
+1 −1
Original line number Diff line number Diff line
@@ -1535,7 +1535,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
	/* Post card if necessary */
	if (!amdgpu_card_posted(adev) ||
	    (adev->virtualization.is_virtual &&
	     !adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN)) {
	     !(adev->virtualization.caps & AMDGPU_VIRT_CAPS_SRIOV_EN))) {
		if (!adev->bios) {
			dev_err(adev->dev, "Card not posted and no BIOS - ignoring\n");
			return -EINVAL;
+2 −1
Original line number Diff line number Diff line
@@ -447,7 +447,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
			dev_info.max_memory_clock = adev->pm.default_mclk * 10;
		}
		dev_info.enabled_rb_pipes_mask = adev->gfx.config.backend_enable_mask;
		dev_info.num_rb_pipes = adev->gfx.config.num_rbs;
		dev_info.num_rb_pipes = adev->gfx.config.max_backends_per_se *
			adev->gfx.config.max_shader_engines;
		dev_info.num_hw_gfx_contexts = adev->gfx.config.max_hw_contexts;
		dev_info._pad = 0;
		dev_info.ids_flags = 0;
+13 −15
Original line number Diff line number Diff line
@@ -270,21 +270,20 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
	struct drm_device *ddev = dev_get_drvdata(dev);
	struct amdgpu_device *adev = ddev->dev_private;
	enum amd_pm_state_type state = 0;
	long idx;
	unsigned long idx;
	int ret;

	if (strlen(buf) == 1)
		adev->pp_force_state_enabled = false;
	else {
		ret = kstrtol(buf, 0, &idx);
	else if (adev->pp_enabled) {
		struct pp_states_info data;

		if (ret) {
		ret = kstrtoul(buf, 0, &idx);
		if (ret || idx >= ARRAY_SIZE(data.states)) {
			count = -EINVAL;
			goto fail;
		}

		if (adev->pp_enabled) {
			struct pp_states_info data;
		amdgpu_dpm_get_pp_num_states(adev, &data);
		state = data.states[idx];
		/* only set user selected power states */
@@ -295,7 +294,6 @@ static ssize_t amdgpu_set_pp_force_state(struct device *dev,
			adev->pp_force_state_enabled = true;
		}
	}
	}
fail:
	return count;
}
+2 −1
Original line number Diff line number Diff line
@@ -297,7 +297,8 @@ static const u32 polaris11_golden_common_all[] =
static const u32 golden_settings_polaris10_a11[] =
{
	mmATC_MISC_CG, 0x000c0fc0, 0x000c0200,
	mmCB_HW_CONTROL, 0xfffdf3cf, 0x00006208,
	mmCB_HW_CONTROL, 0xfffdf3cf, 0x00007208,
	mmCB_HW_CONTROL_2, 0, 0x0f000000,
	mmCB_HW_CONTROL_3, 0x000001ff, 0x00000040,
	mmDB_DEBUG2, 0xf00fffff, 0x00000400,
	mmPA_SC_ENHANCE, 0xffffffff, 0x20000001,
Loading