Commit 4da8b639 authored by sashank saye's avatar sashank saye Committed by Alex Deucher
Browse files

drm/amdgpu: Send Message to SMU on aldebaran passthrough for sbr handling



For Aldebaran chip passthrough case we need to intimate SMU
about special handling for SBR.On older chips we send
LightSBR to SMU, enabling the same for Aldebaran. Slight
difference, compared to previous chips, is on Aldebaran, SMU
would do a heavy reset on SBR. Hence, the word Heavy
instead of Light SBR is used for SMU to differentiate.

Reviewed by: Shaoyun.liu <Shaoyun.liu@amd.com>
Signed-off-by: default avatarsashank saye <sashank.saye@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fbcdbfde
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -2619,11 +2619,10 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
	if (r)
		DRM_ERROR("enable mgpu fan boost failed (%d).\n", r);

	/* For XGMI + passthrough configuration on arcturus, enable light SBR */
	if (adev->asic_type == CHIP_ARCTURUS &&
	    amdgpu_passthrough(adev) &&
	    adev->gmc.xgmi.num_physical_nodes > 1)
		smu_set_light_sbr(&adev->smu, true);
	/* For passthrough configuration on arcturus and aldebaran, enable special handling SBR */
	if (amdgpu_passthrough(adev) && ((adev->asic_type == CHIP_ARCTURUS && adev->gmc.xgmi.num_physical_nodes > 1)||
			       adev->asic_type == CHIP_ALDEBARAN ))
		smu_handle_passthrough_sbr(&adev->smu, true);

	if (adev->gmc.xgmi.num_physical_nodes > 1) {
		mutex_lock(&mgpu_info.mutex);
+3 −1
Original line number Diff line number Diff line
@@ -102,7 +102,9 @@

#define PPSMC_MSG_GfxDriverResetRecovery	0x42
#define PPSMC_MSG_BoardPowerCalibration 	0x43
#define PPSMC_Message_Count			0x44
#define PPSMC_MSG_HeavySBR                      0x45
#define PPSMC_Message_Count			0x46


//PPSMC Reset Types
#define PPSMC_RESET_TYPE_WARM_RESET              0x00
+3 −3
Original line number Diff line number Diff line
@@ -1257,9 +1257,9 @@ struct pptable_funcs {
	int (*set_fine_grain_gfx_freq_parameters)(struct smu_context *smu);

	/**
	 * @set_light_sbr:  Set light sbr mode for the SMU.
	 * @smu_handle_passthrough_sbr:  Send message to SMU about special handling for SBR.
	 */
	int (*set_light_sbr)(struct smu_context *smu, bool enable);
	int (*smu_handle_passthrough_sbr)(struct smu_context *smu, bool enable);

	/**
	 * @wait_for_event:  Wait for events from SMU.
@@ -1415,7 +1415,7 @@ int smu_allow_xgmi_power_down(struct smu_context *smu, bool en);

int smu_get_status_gfxoff(struct amdgpu_device *adev, uint32_t *value);

int smu_set_light_sbr(struct smu_context *smu, bool enable);
int smu_handle_passthrough_sbr(struct smu_context *smu, bool enable);

int smu_wait_for_event(struct amdgpu_device *adev, enum smu_event_type event,
		       uint64_t event_arg);
+2 −1
Original line number Diff line number Diff line
@@ -229,7 +229,8 @@
	__SMU_DUMMY_MAP(BoardPowerCalibration),   \
	__SMU_DUMMY_MAP(RequestGfxclk),           \
	__SMU_DUMMY_MAP(ForceGfxVid),             \
	__SMU_DUMMY_MAP(UnforceGfxVid),
	__SMU_DUMMY_MAP(UnforceGfxVid),           \
	__SMU_DUMMY_MAP(HeavySBR),

#undef __SMU_DUMMY_MAP
#define __SMU_DUMMY_MAP(type)	SMU_MSG_##type
+1 −1
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ int smu_v11_0_deep_sleep_control(struct smu_context *smu,

void smu_v11_0_interrupt_work(struct smu_context *smu);

int smu_v11_0_set_light_sbr(struct smu_context *smu, bool enable);
int smu_v11_0_handle_passthrough_sbr(struct smu_context *smu, bool enable);

int smu_v11_0_restore_user_od_settings(struct smu_context *smu);

Loading