diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 23 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/atombios_i2c.c | 15 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/atombios_i2c.h | 2 | ||||
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 7 | 
4 files changed, 24 insertions, 23 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index 252edba16e36..892d60fb225b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c @@ -421,29 +421,6 @@ static int acp_suspend(void *handle)  static int acp_resume(void *handle)  { -	int i, ret; -	struct acp_pm_domain *apd; -	struct amdgpu_device *adev = (struct amdgpu_device *)handle; - -	/* return early if no ACP */ -	if (!adev->acp.acp_genpd) -		return 0; - -	/* SMU block will power on ACP irrespective of ACP runtime status. -	 * Power off explicitly based on genpd ACP runtime status so that ACP -	 * hw and ACP-genpd status are in sync. -	 * 'suspend_power_off' represents "Power status before system suspend" -	*/ -	if (adev->acp.acp_genpd->gpd.suspend_power_off == true) { -		apd = container_of(&adev->acp.acp_genpd->gpd, -					struct acp_pm_domain, gpd); - -		for (i = 4; i >= 0 ; i--) { -			ret = acp_suspend_tile(apd->cgs_dev, ACP_TILE_P1 + i); -			if (ret) -				pr_err("ACP tile %d tile suspend failed\n", i); -		} -	}  	return 0;  } diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c index 13cdb01e9b45..bc56c8a181e6 100644 --- a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c +++ b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.c @@ -156,3 +156,18 @@ u32 amdgpu_atombios_i2c_func(struct i2c_adapter *adap)  	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;  } +void amdgpu_atombios_i2c_channel_trans(struct amdgpu_device* adev, u8 slave_addr, u8 line_number, u8 offset, u8 data) +{ +	PROCESS_I2C_CHANNEL_TRANSACTION_PS_ALLOCATION args; +	int index = GetIndexIntoMasterTable(COMMAND, ProcessI2cChannelTransaction); + +	args.ucRegIndex = offset; +	args.lpI2CDataOut = data; +	args.ucFlag = 1; +	args.ucI2CSpeed = TARGET_HW_I2C_CLOCK; +	args.ucTransBytes = 1; +	args.ucSlaveAddr = slave_addr; +	args.ucLineNumber = line_number; + +	amdgpu_atom_execute_table(adev->mode_info.atom_context, index, (uint32_t *)&args); +} diff --git a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.h b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.h index d6128d9de56e..251aaf41f65d 100644 --- a/drivers/gpu/drm/amd/amdgpu/atombios_i2c.h +++ b/drivers/gpu/drm/amd/amdgpu/atombios_i2c.h @@ -27,5 +27,7 @@  int amdgpu_atombios_i2c_xfer(struct i2c_adapter *i2c_adap,  		      struct i2c_msg *msgs, int num);  u32 amdgpu_atombios_i2c_func(struct i2c_adapter *adap); +void amdgpu_atombios_i2c_channel_trans(struct amdgpu_device* adev, +		u8 slave_addr, u8 line_number, u8 offset, u8 data);  #endif diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c index b2ebd4fef6cf..c2ef94511f70 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c @@ -28,6 +28,7 @@  #include "vid.h"  #include "amdgpu_ucode.h"  #include "amdgpu_atombios.h" +#include "atombios_i2c.h"  #include "clearstate_vi.h"  #include "gmc/gmc_8_2_d.h" @@ -284,6 +285,7 @@ static const u32 golden_settings_polaris11_a11[] =  	mmTCP_ADDR_CONFIG, 0x000003ff, 0x000000f3,  	mmTCP_CHAN_STEER_HI, 0xffffffff, 0x00000000,  	mmTCP_CHAN_STEER_LO, 0xffffffff, 0x00003210, +	mmVGT_RESET_DEBUG, 0x00000004, 0x00000004,  };  static const u32 polaris11_golden_common_all[] = @@ -314,6 +316,7 @@ static const u32 golden_settings_polaris10_a11[] =  	mmTCC_CTRL, 0x00100000, 0xf31fff7f,  	mmTCP_ADDR_CONFIG, 0x000003ff, 0x000000f7,  	mmTCP_CHAN_STEER_HI, 0xffffffff, 0x00000000, +	mmVGT_RESET_DEBUG, 0x00000004, 0x00000004,  };  static const u32 polaris10_golden_common_all[] = @@ -696,6 +699,10 @@ static void gfx_v8_0_init_golden_registers(struct amdgpu_device *adev)  						 polaris10_golden_common_all,  						 (const u32)ARRAY_SIZE(polaris10_golden_common_all));  		WREG32_SMC(ixCG_ACLK_CNTL, 0x0000001C); +		if (adev->pdev->revision == 0xc7) { +			amdgpu_atombios_i2c_channel_trans(adev, 0x10, 0x96, 0x1E, 0xDD); +			amdgpu_atombios_i2c_channel_trans(adev, 0x10, 0x96, 0x1F, 0xD0); +		}  		break;  	case CHIP_CARRIZO:  		amdgpu_program_register_sequence(adev,  | 
