mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-09-04 20:19:47 +08:00 
			
		
		
		
	accel/ivpu: Implement D0i2 disable test mode
Add power_profile firmware boot param and set it to 0 by default which is default FW power profile. Implement IVPU_TEST_MODE_D0I2_DISABLE which is used for setting power profile boot param value to 1 which prevents NPU from entering d0i2 power state. Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Signed-off-by: Karol Wachowski <karol.wachowski@intel.com> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20250204084622.2422544-7-jacek.lawrynowicz@linux.intel.com
This commit is contained in:
		
							parent
							
								
									55e856c344
								
							
						
					
					
						commit
						011529fe81
					
				| @ -111,6 +111,7 @@ struct ivpu_wa_table { | ||||
| 	bool disable_clock_relinquish; | ||||
| 	bool disable_d0i3_msg; | ||||
| 	bool wp0_during_power_up; | ||||
| 	bool disable_d0i2; | ||||
| }; | ||||
| 
 | ||||
| struct ivpu_hw_info; | ||||
| @ -208,6 +209,7 @@ extern bool ivpu_force_snoop; | ||||
| #define IVPU_TEST_MODE_TURBO		  BIT(9) | ||||
| #define IVPU_TEST_MODE_CLK_RELINQ_DISABLE BIT(10) | ||||
| #define IVPU_TEST_MODE_CLK_RELINQ_ENABLE  BIT(11) | ||||
| #define IVPU_TEST_MODE_D0I2_DISABLE       BIT(12) | ||||
| extern int ivpu_test_mode; | ||||
| 
 | ||||
| struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv); | ||||
|  | ||||
| @ -534,6 +534,8 @@ static void ivpu_fw_boot_params_print(struct ivpu_device *vdev, struct vpu_boot_ | ||||
| 		 boot_params->d0i3_entry_vpu_ts); | ||||
| 	ivpu_dbg(vdev, FW_BOOT, "boot_params.system_time_us = %llu\n", | ||||
| 		 boot_params->system_time_us); | ||||
| 	ivpu_dbg(vdev, FW_BOOT, "boot_params.power_profile = %u\n", | ||||
| 		 boot_params->power_profile); | ||||
| } | ||||
| 
 | ||||
| void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params *boot_params) | ||||
| @ -634,6 +636,8 @@ void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params | ||||
| 		boot_params->d0i3_delayed_entry = 1; | ||||
| 	boot_params->d0i3_residency_time_us = 0; | ||||
| 	boot_params->d0i3_entry_vpu_ts = 0; | ||||
| 	if (IVPU_WA(disable_d0i2)) | ||||
| 		boot_params->power_profile = 1; | ||||
| 
 | ||||
| 	boot_params->system_time_us = ktime_to_us(ktime_get_real()); | ||||
| 	wmb(); /* Flush WC buffers after writing bootparams */ | ||||
|  | ||||
| @ -77,11 +77,15 @@ static void wa_init(struct ivpu_device *vdev) | ||||
| 	if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) | ||||
| 		vdev->wa.wp0_during_power_up = true; | ||||
| 
 | ||||
| 	if (ivpu_test_mode & IVPU_TEST_MODE_D0I2_DISABLE) | ||||
| 		vdev->wa.disable_d0i2 = true; | ||||
| 
 | ||||
| 	IVPU_PRINT_WA(punit_disabled); | ||||
| 	IVPU_PRINT_WA(clear_runtime_mem); | ||||
| 	IVPU_PRINT_WA(interrupt_clear_with_0); | ||||
| 	IVPU_PRINT_WA(disable_clock_relinquish); | ||||
| 	IVPU_PRINT_WA(wp0_during_power_up); | ||||
| 	IVPU_PRINT_WA(disable_d0i2); | ||||
| } | ||||
| 
 | ||||
| static void timeouts_init(struct ivpu_device *vdev) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Karol Wachowski
						Karol Wachowski