Commit b5c11b8e authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amd/powerplay: update all printk to pr_* on hwmgr

parent 19946cfd
Loading
Loading
Loading
Loading
+13 −13
Original line number Diff line number Diff line
@@ -287,7 +287,7 @@ static int cz_init_dynamic_state_adjustment_rule_settings(
					kzalloc(table_size, GFP_KERNEL);

	if (NULL == table_clk_vlt) {
		printk(KERN_ERR "[ powerplay ] Can not allocate memory!\n");
		pr_err("Can not allocate memory!\n");
		return -ENOMEM;
	}

@@ -328,12 +328,12 @@ static int cz_get_system_info_data(struct pp_hwmgr *hwmgr)
			&size, &frev, &crev);

	if (crev != 9) {
		printk(KERN_ERR "[ powerplay ] Unsupported IGP table: %d %d\n", frev, crev);
		pr_err("Unsupported IGP table: %d %d\n", frev, crev);
		return -EINVAL;
	}

	if (info == NULL) {
		printk(KERN_ERR "[ powerplay ] Could not retrieve the Integrated System Info Table!\n");
		pr_err("Could not retrieve the Integrated System Info Table!\n");
		return -EINVAL;
	}

@@ -360,7 +360,7 @@ static int cz_get_system_info_data(struct pp_hwmgr *hwmgr)

	if (cz_hwmgr->sys_info.htc_tmp_lmt <=
			cz_hwmgr->sys_info.htc_hyst_lmt) {
		printk(KERN_ERR "[ powerplay ] The htcTmpLmt should be larger than htcHystLmt.\n");
		pr_err("The htcTmpLmt should be larger than htcHystLmt.\n");
		return -EINVAL;
	}

@@ -722,7 +722,7 @@ static int cz_tf_update_sclk_limit(struct pp_hwmgr *hwmgr,

	clock = hwmgr->display_config.min_core_set_clock;
	if (clock == 0)
		printk(KERN_INFO "[ powerplay ] min_core_set_clock not set\n");
		pr_info("min_core_set_clock not set\n");

	if (cz_hwmgr->sclk_dpm.hard_min_clk != clock) {
		cz_hwmgr->sclk_dpm.hard_min_clk = clock;
@@ -1161,13 +1161,13 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr)

	result = cz_initialize_dpm_defaults(hwmgr);
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] cz_initialize_dpm_defaults failed\n");
		pr_err("cz_initialize_dpm_defaults failed\n");
		return result;
	}

	result = cz_get_system_info_data(hwmgr);
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] cz_get_system_info_data failed\n");
		pr_err("cz_get_system_info_data failed\n");
		return result;
	}

@@ -1176,40 +1176,40 @@ static int cz_hwmgr_backend_init(struct pp_hwmgr *hwmgr)
	result = phm_construct_table(hwmgr, &cz_setup_asic_master,
				&(hwmgr->setup_asic));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to construct setup ASIC\n");
		pr_err("Fail to construct setup ASIC\n");
		return result;
	}

	result = phm_construct_table(hwmgr, &cz_power_down_asic_master,
				&(hwmgr->power_down_asic));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to construct power down ASIC\n");
		pr_err("Fail to construct power down ASIC\n");
		return result;
	}

	result = phm_construct_table(hwmgr, &cz_disable_dpm_master,
				&(hwmgr->disable_dynamic_state_management));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to disable_dynamic_state\n");
		pr_err("Fail to disable_dynamic_state\n");
		return result;
	}
	result = phm_construct_table(hwmgr, &cz_enable_dpm_master,
				&(hwmgr->enable_dynamic_state_management));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to enable_dynamic_state\n");
		pr_err("Fail to enable_dynamic_state\n");
		return result;
	}
	result = phm_construct_table(hwmgr, &cz_set_power_state_master,
				&(hwmgr->set_power_state));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to construct set_power_state\n");
		pr_err("Fail to construct set_power_state\n");
		return result;
	}
	hwmgr->platform_descriptor.hardwareActivityPerformanceLevels =  CZ_MAX_HARDWARE_POWERLEVELS;

	result = phm_construct_table(hwmgr, &cz_phm_enable_clock_power_gatings_master, &(hwmgr->enable_clock_power_gatings));
	if (result != 0) {
		printk(KERN_ERR "[ powerplay ] Fail to construct enable_clock_power_gatings\n");
		pr_err("Fail to construct enable_clock_power_gatings\n");
		return result;
	}
	return result;
+7 −7
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static int phm_run_table(struct pp_hwmgr *hwmgr,
	phm_table_function *function;

	if (rt_table->function_list == NULL) {
		pr_debug("[ powerplay ] this function not implement!\n");
		pr_debug("this function not implement!\n");
		return 0;
	}

@@ -63,14 +63,14 @@ int phm_dispatch_table(struct pp_hwmgr *hwmgr,
	void *temp_storage;

	if (hwmgr == NULL || rt_table == NULL) {
		printk(KERN_ERR "[ powerplay ] Invalid Parameter!\n");
		pr_err("Invalid Parameter!\n");
		return -EINVAL;
	}

	if (0 != rt_table->storage_size) {
		temp_storage = kzalloc(rt_table->storage_size, GFP_KERNEL);
		if (temp_storage == NULL) {
			printk(KERN_ERR "[ powerplay ] Could not allocate table temporary storage\n");
			pr_err("Could not allocate table temporary storage\n");
			return -ENOMEM;
		}
	} else {
@@ -95,7 +95,7 @@ int phm_construct_table(struct pp_hwmgr *hwmgr,
	phm_table_function *rtf;

	if (hwmgr == NULL || master_table == NULL || rt_table == NULL) {
		printk(KERN_ERR "[ powerplay ] Invalid Parameter!\n");
		pr_err("Invalid Parameter!\n");
		return -EINVAL;
	}

@@ -116,7 +116,7 @@ int phm_construct_table(struct pp_hwmgr *hwmgr,
	for (table_item = master_table->master_list;
		NULL != table_item->tableFunction; table_item++) {
		if ((rtf - run_time_list) > function_count) {
			printk(KERN_ERR "[ powerplay ] Check function results have changed\n");
			pr_err("Check function results have changed\n");
			kfree(run_time_list);
			return -EINVAL;
		}
@@ -128,7 +128,7 @@ int phm_construct_table(struct pp_hwmgr *hwmgr,
	}

	if ((rtf - run_time_list) > function_count) {
		printk(KERN_ERR "[ powerplay ] Check function results have changed\n");
		pr_err("Check function results have changed\n");
		kfree(run_time_list);
		return -EINVAL;
	}
@@ -144,7 +144,7 @@ int phm_destroy_table(struct pp_hwmgr *hwmgr,
		      struct phm_runtime_table_header *rt_table)
{
	if (hwmgr == NULL || rt_table == NULL) {
		printk(KERN_ERR "[ powerplay ] Invalid Parameter\n");
		pr_err("Invalid Parameter\n");
		return -EINVAL;
	}

+4 −4
Original line number Diff line number Diff line
@@ -198,7 +198,7 @@ int phm_wait_on_register(struct pp_hwmgr *hwmgr, uint32_t index,
	uint32_t cur_value;

	if (hwmgr == NULL || hwmgr->device == NULL) {
		printk(KERN_ERR "[ powerplay ] Invalid Hardware Manager!");
		pr_err("Invalid Hardware Manager!");
		return -EINVAL;
	}

@@ -228,7 +228,7 @@ void phm_wait_on_indirect_register(struct pp_hwmgr *hwmgr,
				uint32_t mask)
{
	if (hwmgr == NULL || hwmgr->device == NULL) {
		printk(KERN_ERR "[ powerplay ] Invalid Hardware Manager!");
		pr_err("Invalid Hardware Manager!");
		return;
	}

@@ -550,7 +550,7 @@ int phm_initializa_dynamic_state_adjustment_rule_settings(struct pp_hwmgr *hwmgr
	table_clk_vlt = kzalloc(table_size, GFP_KERNEL);

	if (NULL == table_clk_vlt) {
		printk(KERN_ERR "[ powerplay ] Can not allocate space for vddc_dep_on_dal_pwrl! \n");
		pr_err("Can not allocate space for vddc_dep_on_dal_pwrl! \n");
		return -ENOMEM;
	} else {
		table_clk_vlt->count = 4;
@@ -626,7 +626,7 @@ void phm_apply_dal_min_voltage_request(struct pp_hwmgr *hwmgr)
			return;
		}
	}
	printk(KERN_ERR "DAL requested level can not"
	pr_err("DAL requested level can not"
			" found a available voltage in VDDC DPM Table \n");
}

+3 −3
Original line number Diff line number Diff line
@@ -145,10 +145,10 @@ int atomctrl_initialize_mc_reg_table(
				GetIndexIntoMasterTable(DATA, VRAM_Info), &size, &frev, &crev);

	if (module_index >= vram_info->ucNumOfVRAMModule) {
		printk(KERN_ERR "[ powerplay ] Invalid VramInfo table.");
		pr_err("Invalid VramInfo table.");
		result = -1;
	} else if (vram_info->sHeader.ucTableFormatRevision < 2) {
		printk(KERN_ERR "[ powerplay ] Invalid VramInfo table.");
		pr_err("Invalid VramInfo table.");
		result = -1;
	}

@@ -688,7 +688,7 @@ int atomctrl_calculate_voltage_evv_on_sclk(
		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM7), 1000);
		break;
	default:
		printk(KERN_ERR "DPM Level not supported\n");
		pr_err("DPM Level not supported\n");
		fPowerDPMx = Convert_ULONG_ToFraction(1);
		fDerateTDP = GetScaledFraction(le32_to_cpu(getASICProfilingInfo->ulTdpDerateDPM0), 1000);
	}
+2 −2
Original line number Diff line number Diff line
@@ -535,7 +535,7 @@ static int get_pcie_table(
		if ((uint32_t)atom_pcie_table->ucNumEntries <= pcie_count)
			pcie_count = (uint32_t)atom_pcie_table->ucNumEntries;
		else
			printk(KERN_ERR "[ powerplay ] Number of Pcie Entries exceed the number of SCLK Dpm Levels! \
			pr_err("Number of Pcie Entries exceed the number of SCLK Dpm Levels! \
			Disregarding the excess entries... \n");

		pcie_table->count = pcie_count;
@@ -577,7 +577,7 @@ static int get_pcie_table(
		if ((uint32_t)atom_pcie_table->ucNumEntries <= pcie_count)
			pcie_count = (uint32_t)atom_pcie_table->ucNumEntries;
		else
			printk(KERN_ERR "[ powerplay ] Number of Pcie Entries exceed the number of SCLK Dpm Levels! \
			pr_err("Number of Pcie Entries exceed the number of SCLK Dpm Levels! \
			Disregarding the excess entries... \n");

		pcie_table->count = pcie_count;
Loading