Commit 0f83eb88 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-fixes-5.4-2019-10-02' of git://people.freedesktop.org/~agd5f/linux into drm-fixes



drm-fixes-5.4-2019-10-02:

amdgpu:
- Enable bulk moves
- Power metrics fixes for Navi
- Fix S4 regression
- Add query for tcc disabled mask
- Fix several leaks in error paths
- randconfig fixes
- clang fixes

Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
From: Alex Deucher <alexdeucher@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191002204909.3519-1-alexander.deucher@amd.com
parents 54ecb8f7 c0e70e10
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ amdgpu-y += amdgpu_device.o amdgpu_kms.o \
	amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
	amdgpu_gtt_mgr.o amdgpu_vram_mgr.o amdgpu_virt.o amdgpu_atomfirmware.o \
	amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \
	amdgpu_vf_error.o amdgpu_sched.o amdgpu_debugfs.o amdgpu_ids.o \
	amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
	amdgpu_gmc.o amdgpu_xgmi.o amdgpu_csa.o amdgpu_ras.o amdgpu_vm_cpu.o \
	amdgpu_vm_sdma.o amdgpu_pmu.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o
	amdgpu_vm_sdma.o amdgpu_discovery.o amdgpu_ras_eeprom.o smu_v11_0_i2c.o


amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o
amdgpu-$(CONFIG_PERF_EVENTS) += amdgpu_pmu.o


+22 −12
Original line number Original line Diff line number Diff line
@@ -189,7 +189,7 @@ static int acp_hw_init(void *handle)
	u32 val = 0;
	u32 val = 0;
	u32 count = 0;
	u32 count = 0;
	struct device *dev;
	struct device *dev;
	struct i2s_platform_data *i2s_pdata;
	struct i2s_platform_data *i2s_pdata = NULL;


	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
	struct amdgpu_device *adev = (struct amdgpu_device *)handle;


@@ -231,20 +231,21 @@ static int acp_hw_init(void *handle)
	adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell),
	adev->acp.acp_cell = kcalloc(ACP_DEVS, sizeof(struct mfd_cell),
							GFP_KERNEL);
							GFP_KERNEL);


	if (adev->acp.acp_cell == NULL)
	if (adev->acp.acp_cell == NULL) {
		return -ENOMEM;
		r = -ENOMEM;
		goto failure;
	}


	adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL);
	adev->acp.acp_res = kcalloc(5, sizeof(struct resource), GFP_KERNEL);
	if (adev->acp.acp_res == NULL) {
	if (adev->acp.acp_res == NULL) {
		kfree(adev->acp.acp_cell);
		r = -ENOMEM;
		return -ENOMEM;
		goto failure;
	}
	}


	i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL);
	i2s_pdata = kcalloc(3, sizeof(struct i2s_platform_data), GFP_KERNEL);
	if (i2s_pdata == NULL) {
	if (i2s_pdata == NULL) {
		kfree(adev->acp.acp_res);
		r = -ENOMEM;
		kfree(adev->acp.acp_cell);
		goto failure;
		return -ENOMEM;
	}
	}


	switch (adev->asic_type) {
	switch (adev->asic_type) {
@@ -341,14 +342,14 @@ static int acp_hw_init(void *handle)
	r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell,
	r = mfd_add_hotplug_devices(adev->acp.parent, adev->acp.acp_cell,
								ACP_DEVS);
								ACP_DEVS);
	if (r)
	if (r)
		return r;
		goto failure;


	for (i = 0; i < ACP_DEVS ; i++) {
	for (i = 0; i < ACP_DEVS ; i++) {
		dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
		dev = get_mfd_cell_dev(adev->acp.acp_cell[i].name, i);
		r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev);
		r = pm_genpd_add_device(&adev->acp.acp_genpd->gpd, dev);
		if (r) {
		if (r) {
			dev_err(dev, "Failed to add dev to genpd\n");
			dev_err(dev, "Failed to add dev to genpd\n");
			return r;
			goto failure;
		}
		}
	}
	}


@@ -367,7 +368,8 @@ static int acp_hw_init(void *handle)
			break;
			break;
		if (--count == 0) {
		if (--count == 0) {
			dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
			dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
			return -ETIMEDOUT;
			r = -ETIMEDOUT;
			goto failure;
		}
		}
		udelay(100);
		udelay(100);
	}
	}
@@ -384,7 +386,8 @@ static int acp_hw_init(void *handle)
			break;
			break;
		if (--count == 0) {
		if (--count == 0) {
			dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
			dev_err(&adev->pdev->dev, "Failed to reset ACP\n");
			return -ETIMEDOUT;
			r = -ETIMEDOUT;
			goto failure;
		}
		}
		udelay(100);
		udelay(100);
	}
	}
@@ -393,6 +396,13 @@ static int acp_hw_init(void *handle)
	val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
	val &= ~ACP_SOFT_RESET__SoftResetAud_MASK;
	cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
	cgs_write_register(adev->acp.cgs_device, mmACP_SOFT_RESET, val);
	return 0;
	return 0;

failure:
	kfree(i2s_pdata);
	kfree(adev->acp.acp_res);
	kfree(adev->acp.acp_cell);
	kfree(adev->acp.acp_genpd);
	return r;
}
}


/**
/**
+2 −1
Original line number Original line Diff line number Diff line
@@ -81,9 +81,10 @@
 * - 3.32.0 - Add syncobj timeline support to AMDGPU_CS.
 * - 3.32.0 - Add syncobj timeline support to AMDGPU_CS.
 * - 3.33.0 - Fixes for GDS ENOMEM failures in AMDGPU_CS.
 * - 3.33.0 - Fixes for GDS ENOMEM failures in AMDGPU_CS.
 * - 3.34.0 - Non-DC can flip correctly between buffers with different pitches
 * - 3.34.0 - Non-DC can flip correctly between buffers with different pitches
 * - 3.35.0 - Add drm_amdgpu_info_device::tcc_disabled_mask
 */
 */
#define KMS_DRIVER_MAJOR	3
#define KMS_DRIVER_MAJOR	3
#define KMS_DRIVER_MINOR	34
#define KMS_DRIVER_MINOR	35
#define KMS_DRIVER_PATCHLEVEL	0
#define KMS_DRIVER_PATCHLEVEL	0


#define AMDGPU_MAX_TIMEOUT_PARAM_LENTH	256
#define AMDGPU_MAX_TIMEOUT_PARAM_LENTH	256
+1 −0
Original line number Original line Diff line number Diff line
@@ -165,6 +165,7 @@ struct amdgpu_gfx_config {
	uint32_t num_sc_per_sh;
	uint32_t num_sc_per_sh;
	uint32_t num_packer_per_sc;
	uint32_t num_packer_per_sc;
	uint32_t pa_sc_tile_steering_override;
	uint32_t pa_sc_tile_steering_override;
	uint64_t tcc_disabled_mask;
};
};


struct amdgpu_cu_info {
struct amdgpu_cu_info {
+2 −0
Original line number Original line Diff line number Diff line
@@ -787,6 +787,8 @@ static int amdgpu_info_ioctl(struct drm_device *dev, void *data, struct drm_file
			dev_info.pa_sc_tile_steering_override =
			dev_info.pa_sc_tile_steering_override =
				adev->gfx.config.pa_sc_tile_steering_override;
				adev->gfx.config.pa_sc_tile_steering_override;


		dev_info.tcc_disabled_mask = adev->gfx.config.tcc_disabled_mask;

		return copy_to_user(out, &dev_info,
		return copy_to_user(out, &dev_info,
				    min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
				    min((size_t)size, sizeof(dev_info))) ? -EFAULT : 0;
	}
	}
Loading