/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_psp.c | 48 static int psp_load_smu_fw(struct psp_context *psp); 66 static void psp_check_pmfw_centralized_cstate_management(struct psp_context *psp) in psp_check_pmfw_centralized_cstate_management() argument 68 struct amdgpu_device *adev = psp->adev; in psp_check_pmfw_centralized_cstate_management() 70 psp->pmfw_centralized_cstate_management = false; in psp_check_pmfw_centralized_cstate_management() 80 psp->pmfw_centralized_cstate_management = true; in psp_check_pmfw_centralized_cstate_management() 86 struct psp_context *psp = &adev->psp; in psp_early_init() local 91 psp_v3_1_set_psp_funcs(psp); in psp_early_init() 92 psp->autoload_supported = false; in psp_early_init() 95 psp_v10_0_set_psp_funcs(psp); in psp_early_init() 96 psp->autoload_supported = false; in psp_early_init() [all …]
|
D | amdgpu_psp.h | 96 int (*init_microcode)(struct psp_context *psp); 97 int (*bootloader_load_kdb)(struct psp_context *psp); 98 int (*bootloader_load_spl)(struct psp_context *psp); 99 int (*bootloader_load_sysdrv)(struct psp_context *psp); 100 int (*bootloader_load_soc_drv)(struct psp_context *psp); 101 int (*bootloader_load_intf_drv)(struct psp_context *psp); 102 int (*bootloader_load_dbg_drv)(struct psp_context *psp); 103 int (*bootloader_load_sos)(struct psp_context *psp); 104 int (*ring_init)(struct psp_context *psp, enum psp_ring_type ring_type); 105 int (*ring_create)(struct psp_context *psp, [all …]
|
D | psp_v13_0.c | 44 static int psp_v13_0_init_microcode(struct psp_context *psp) in psp_v13_0_init_microcode() argument 46 struct amdgpu_device *adev = psp->adev; in psp_v13_0_init_microcode() 62 err = psp_init_sos_microcode(psp, chip_name); in psp_v13_0_init_microcode() 65 err = psp_init_ta_microcode(&adev->psp, chip_name); in psp_v13_0_init_microcode() 70 err = psp_init_asd_microcode(psp, chip_name); in psp_v13_0_init_microcode() 73 err = psp_init_toc_microcode(psp, chip_name); in psp_v13_0_init_microcode() 76 err = psp_init_ta_microcode(psp, chip_name); in psp_v13_0_init_microcode() 87 static bool psp_v13_0_is_sos_alive(struct psp_context *psp) in psp_v13_0_is_sos_alive() argument 89 struct amdgpu_device *adev = psp->adev; in psp_v13_0_is_sos_alive() 97 static int psp_v13_0_wait_for_bootloader(struct psp_context *psp) in psp_v13_0_wait_for_bootloader() argument [all …]
|
D | psp_v11_0.c | 86 static int psp_v11_0_init_microcode(struct psp_context *psp) in psp_v11_0_init_microcode() argument 88 struct amdgpu_device *adev = psp->adev; in psp_v11_0_init_microcode() 135 err = psp_init_sos_microcode(psp, chip_name); in psp_v11_0_init_microcode() 138 err = psp_init_asd_microcode(psp, chip_name); in psp_v11_0_init_microcode() 142 err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev); in psp_v11_0_init_microcode() 144 release_firmware(adev->psp.ta_fw); in psp_v11_0_init_microcode() 145 adev->psp.ta_fw = NULL; in psp_v11_0_init_microcode() 149 err = amdgpu_ucode_validate(adev->psp.ta_fw); in psp_v11_0_init_microcode() 153 ta_hdr = (const struct ta_firmware_header_v1_0 *)adev->psp.ta_fw->data; in psp_v11_0_init_microcode() 154 adev->psp.xgmi.feature_version = le32_to_cpu(ta_hdr->xgmi.fw_version); in psp_v11_0_init_microcode() [all …]
|
D | psp_v12_0.c | 48 static int psp_v12_0_init_microcode(struct psp_context *psp) in psp_v12_0_init_microcode() argument 50 struct amdgpu_device *adev = psp->adev; in psp_v12_0_init_microcode() 68 err = psp_init_asd_microcode(psp, chip_name); in psp_v12_0_init_microcode() 73 err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev); in psp_v12_0_init_microcode() 75 release_firmware(adev->psp.ta_fw); in psp_v12_0_init_microcode() 76 adev->psp.ta_fw = NULL; in psp_v12_0_init_microcode() 81 err = amdgpu_ucode_validate(adev->psp.ta_fw); in psp_v12_0_init_microcode() 86 adev->psp.ta_fw->data; in psp_v12_0_init_microcode() 87 adev->psp.hdcp.feature_version = in psp_v12_0_init_microcode() 89 adev->psp.hdcp.size_bytes = in psp_v12_0_init_microcode() [all …]
|
D | psp_v3_1.c | 53 static int psp_v3_1_ring_stop(struct psp_context *psp, 56 static int psp_v3_1_init_microcode(struct psp_context *psp) in psp_v3_1_init_microcode() argument 58 struct amdgpu_device *adev = psp->adev; in psp_v3_1_init_microcode() 74 err = psp_init_sos_microcode(psp, chip_name); in psp_v3_1_init_microcode() 78 err = psp_init_asd_microcode(psp, chip_name); in psp_v3_1_init_microcode() 85 static int psp_v3_1_bootloader_load_sysdrv(struct psp_context *psp) in psp_v3_1_bootloader_load_sysdrv() argument 89 struct amdgpu_device *adev = psp->adev; in psp_v3_1_bootloader_load_sysdrv() 100 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35), in psp_v3_1_bootloader_load_sysdrv() 106 psp_copy_fw(psp, psp->sys.start_addr, psp->sys.size_bytes); in psp_v3_1_bootloader_load_sysdrv() 110 (uint32_t)(psp->fw_pri_mc_addr >> 20)); in psp_v3_1_bootloader_load_sysdrv() [all …]
|
D | psp_v10_0.c | 47 static int psp_v10_0_init_microcode(struct psp_context *psp) in psp_v10_0_init_microcode() argument 49 struct amdgpu_device *adev = psp->adev; in psp_v10_0_init_microcode() 68 err = psp_init_asd_microcode(psp, chip_name); in psp_v10_0_init_microcode() 73 err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev); in psp_v10_0_init_microcode() 75 release_firmware(adev->psp.ta_fw); in psp_v10_0_init_microcode() 76 adev->psp.ta_fw = NULL; in psp_v10_0_init_microcode() 81 err = amdgpu_ucode_validate(adev->psp.ta_fw); in psp_v10_0_init_microcode() 86 adev->psp.ta_fw->data; in psp_v10_0_init_microcode() 87 adev->psp.hdcp.feature_version = in psp_v10_0_init_microcode() 89 adev->psp.hdcp.size_bytes = in psp_v10_0_init_microcode() [all …]
|
D | psp_v11_0_8.c | 31 static int psp_v11_0_8_ring_init(struct psp_context *psp, in psp_v11_0_8_ring_init() argument 36 struct amdgpu_device *adev = psp->adev; in psp_v11_0_8_ring_init() 38 ring = &psp->km_ring; in psp_v11_0_8_ring_init() 57 static int psp_v11_0_8_ring_stop(struct psp_context *psp, in psp_v11_0_8_ring_stop() argument 61 struct amdgpu_device *adev = psp->adev; in psp_v11_0_8_ring_stop() 70 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101), in psp_v11_0_8_ring_stop() 79 ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64), in psp_v11_0_8_ring_stop() 86 static int psp_v11_0_8_ring_create(struct psp_context *psp, in psp_v11_0_8_ring_create() argument 91 struct psp_ring *ring = &psp->km_ring; in psp_v11_0_8_ring_create() 92 struct amdgpu_device *adev = psp->adev; in psp_v11_0_8_ring_create() [all …]
|
D | amdgpu_securedisplay.c | 48 void psp_securedisplay_parse_resp_status(struct psp_context *psp, in psp_securedisplay_parse_resp_status() argument 55 dev_err(psp->adev->dev, "Secure display: Generic Failure."); in psp_securedisplay_parse_resp_status() 58 dev_err(psp->adev->dev, "Secure display: Invalid Parameter."); in psp_securedisplay_parse_resp_status() 61 dev_err(psp->adev->dev, "Secure display: Null Pointer."); in psp_securedisplay_parse_resp_status() 64 dev_err(psp->adev->dev, "Secure display: Failed to write to I2C."); in psp_securedisplay_parse_resp_status() 67 dev_err(psp->adev->dev, "Secure display: Failed to Read DIO Scratch Register."); in psp_securedisplay_parse_resp_status() 70 dev_err(psp->adev->dev, "Secure display: Failed to Read CRC"); in psp_securedisplay_parse_resp_status() 73 dev_err(psp->adev->dev, "Secure display: Failed to initialize I2C."); in psp_securedisplay_parse_resp_status() 76 dev_err(psp->adev->dev, "Secure display: Failed to parse status: %d\n", status); in psp_securedisplay_parse_resp_status() 80 void psp_prep_securedisplay_cmd_buf(struct psp_context *psp, struct securedisplay_cmd **cmd, in psp_prep_securedisplay_cmd_buf() argument [all …]
|
/drivers/crypto/ccp/ |
D | psp-dev.c | 23 struct psp_device *psp; in psp_alloc_struct() local 25 psp = devm_kzalloc(dev, sizeof(*psp), GFP_KERNEL); in psp_alloc_struct() 26 if (!psp) in psp_alloc_struct() 29 psp->dev = dev; in psp_alloc_struct() 30 psp->sp = sp; in psp_alloc_struct() 32 snprintf(psp->name, sizeof(psp->name), "psp-%u", sp->ord); in psp_alloc_struct() 34 return psp; in psp_alloc_struct() 39 struct psp_device *psp = data; in psp_irq_handler() local 43 status = ioread32(psp->io_regs + psp->vdata->intsts_reg); in psp_irq_handler() 46 iowrite32(status, psp->io_regs + psp->vdata->intsts_reg); in psp_irq_handler() [all …]
|
D | tee-dev.c | 191 int tee_dev_init(struct psp_device *psp) in tee_dev_init() argument 193 struct device *dev = psp->dev; in tee_dev_init() 202 psp->tee_data = tee; in tee_dev_init() 205 tee->psp = psp; in tee_dev_init() 207 tee->io_regs = psp->io_regs; in tee_dev_init() 209 tee->vdata = (struct tee_vdata *)psp->vdata->tee; in tee_dev_init() 227 psp->tee_data = NULL; in tee_dev_init() 234 void tee_dev_destroy(struct psp_device *psp) in tee_dev_destroy() argument 236 struct psp_tee_device *tee = psp->tee_data; in tee_dev_destroy() 350 struct psp_device *psp = psp_get_master_device(); in psp_tee_process_cmd() local [all …]
|
D | sev-dev.c | 158 struct psp_device *psp = psp_master; in __sev_do_cmd_locked() local 164 if (!psp || !psp->sev_data) in __sev_do_cmd_locked() 170 sev = psp->sev_data; in __sev_do_cmd_locked() 253 struct psp_device *psp = psp_master; in __sev_platform_init_locked() local 258 if (!psp || !psp->sev_data) in __sev_platform_init_locked() 261 sev = psp->sev_data; in __sev_platform_init_locked() 326 struct psp_device *psp = psp_master; in __sev_platform_shutdown_locked() local 330 if (!psp || !psp->sev_data) in __sev_platform_shutdown_locked() 333 sev = psp->sev_data; in __sev_platform_shutdown_locked() 1009 int sev_dev_init(struct psp_device *psp) in sev_dev_init() argument [all …]
|
D | psp-dev.h | 50 void psp_set_sev_irq_handler(struct psp_device *psp, psp_irq_handler_t handler, 52 void psp_clear_sev_irq_handler(struct psp_device *psp); 54 void psp_set_tee_irq_handler(struct psp_device *psp, psp_irq_handler_t handler, 56 void psp_clear_tee_irq_handler(struct psp_device *psp);
|
/drivers/gpu/drm/amd/display/modules/hdcp/ |
D | hdcp_psp.c | 51 struct psp_context *psp = hdcp->config.psp.handle; in remove_display_from_topology_v2() local 57 dtm_cmd = (struct ta_dtm_shared_memory *)psp->dtm_context.context.mem_context.shared_buf; in remove_display_from_topology_v2() 62 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 71 psp_dtm_invoke(psp, dtm_cmd->cmd_id); in remove_display_from_topology_v2() 80 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 87 struct psp_context *psp = hdcp->config.psp.handle; in remove_display_from_topology_v3() local 93 dtm_cmd = (struct ta_dtm_shared_memory *)psp->dtm_context.context.mem_context.shared_buf; in remove_display_from_topology_v3() 98 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() 107 psp_dtm_invoke(psp, dtm_cmd->cmd_id); in remove_display_from_topology_v3() 108 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() [all …]
|
/drivers/power/supply/ |
D | acer_a500_battery.c | 30 .psp = POWER_SUPPLY_PROP_ ## _psp, \ 35 enum power_supply_property psp; member 96 enum power_supply_property psp, in a500_battery_unit_adjustment() argument 102 switch (psp) { in a500_battery_unit_adjustment() 119 "%s: no need for unit conversion %d\n", __func__, psp); in a500_battery_unit_adjustment() 124 enum power_supply_property psp) in a500_battery_get_ec_data_index() argument 133 if (psp == POWER_SUPPLY_PROP_PRESENT) in a500_battery_get_ec_data_index() 134 psp = POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN; in a500_battery_get_ec_data_index() 137 if (psp == ec_data[i].psp) in a500_battery_get_ec_data_index() 140 dev_dbg(dev, "%s: invalid property %u\n", __func__, psp); in a500_battery_get_ec_data_index() [all …]
|
D | sbs-battery.c | 87 .psp = _psp, \ 94 enum power_supply_property psp; member 222 enum power_supply_property psp) in sbs_get_string_buf() argument 227 if (string_properties[i] == psp) in sbs_get_string_buf() 518 struct i2c_client *client, enum power_supply_property psp, in sbs_get_ti_battery_presence_and_health() argument 530 if (psp == POWER_SUPPLY_PROP_PRESENT) in sbs_get_ti_battery_presence_and_health() 537 if (psp == POWER_SUPPLY_PROP_PRESENT) in sbs_get_ti_battery_presence_and_health() 553 if (psp == POWER_SUPPLY_PROP_PRESENT) { in sbs_get_ti_battery_presence_and_health() 559 } else if (psp == POWER_SUPPLY_PROP_HEALTH) { in sbs_get_ti_battery_presence_and_health() 576 struct i2c_client *client, enum power_supply_property psp, in sbs_get_battery_presence_and_health() argument [all …]
|
D | rn5t618_power.c | 360 enum power_supply_property psp, in rn5t618_battery_get_property() argument 366 switch (psp) { in rn5t618_battery_get_property() 411 enum power_supply_property psp, in rn5t618_battery_set_property() argument 416 switch (psp) { in rn5t618_battery_set_property() 425 enum power_supply_property psp) in rn5t618_battery_property_is_writeable() argument 427 switch (psp) { in rn5t618_battery_property_is_writeable() 436 enum power_supply_property psp, in rn5t618_adp_get_property() argument 451 switch (psp) { in rn5t618_adp_get_property() 490 enum power_supply_property psp, in rn5t618_adp_set_property() argument 496 switch (psp) { in rn5t618_adp_set_property() [all …]
|
D | mp2629_charger.c | 221 enum power_supply_property psp, in mp2629_charger_battery_get_prop() argument 228 switch (psp) { in mp2629_charger_battery_get_prop() 324 enum power_supply_property psp, in mp2629_charger_battery_set_prop() argument 329 switch (psp) { in mp2629_charger_battery_set_prop() 348 enum power_supply_property psp, in mp2629_charger_usb_get_prop() argument 355 switch (psp) { in mp2629_charger_usb_get_prop() 413 enum power_supply_property psp, in mp2629_charger_usb_set_prop() argument 418 switch (psp) { in mp2629_charger_usb_set_prop() 431 enum power_supply_property psp) in mp2629_charger_battery_prop_writeable() argument 433 return (psp == POWER_SUPPLY_PROP_PRECHARGE_CURRENT) || in mp2629_charger_battery_prop_writeable() [all …]
|
D | lego_ev3_battery.c | 38 enum power_supply_property psp, in lego_ev3_battery_get_property() argument 44 switch (psp) { in lego_ev3_battery_get_property() 92 enum power_supply_property psp, in lego_ev3_battery_set_property() argument 97 switch (psp) { in lego_ev3_battery_set_property() 127 enum power_supply_property psp) in lego_ev3_battery_property_is_writeable() argument 131 return psp == POWER_SUPPLY_PROP_TECHNOLOGY && in lego_ev3_battery_property_is_writeable()
|
D | wilco-charger.c | 87 enum power_supply_property psp, in wilco_charge_get_property() argument 95 switch (psp) { in wilco_charge_get_property() 124 enum power_supply_property psp, in wilco_charge_set_property() argument 130 switch (psp) { in wilco_charge_set_property() 154 enum power_supply_property psp) in wilco_charge_property_is_writeable() argument
|
D | axp20x_battery.c | 185 enum power_supply_property psp, in axp20x_battery_get_prop() argument 191 switch (psp) { in axp20x_battery_get_prop() 453 enum power_supply_property psp, in axp20x_battery_set_prop() argument 458 switch (psp) { in axp20x_battery_set_prop() 503 enum power_supply_property psp) in axp20x_battery_prop_writeable() argument 505 return psp == POWER_SUPPLY_PROP_STATUS || in axp20x_battery_prop_writeable() 506 psp == POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN || in axp20x_battery_prop_writeable() 507 psp == POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN || in axp20x_battery_prop_writeable() 508 psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT || in axp20x_battery_prop_writeable() 509 psp == POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT_MAX; in axp20x_battery_prop_writeable()
|
D | axp20x_ac_power.c | 62 enum power_supply_property psp, in axp20x_ac_power_get_property() argument 68 switch (psp) { in axp20x_ac_power_get_property() 158 enum power_supply_property psp, in axp813_ac_power_set_property() argument 163 switch (psp) { in axp813_ac_power_set_property() 193 enum power_supply_property psp) in axp813_ac_power_prop_writeable() argument 195 return psp == POWER_SUPPLY_PROP_ONLINE || in axp813_ac_power_prop_writeable() 196 psp == POWER_SUPPLY_PROP_VOLTAGE_MIN || in axp813_ac_power_prop_writeable() 197 psp == POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT; in axp813_ac_power_prop_writeable()
|
/drivers/staging/greybus/ |
D | power_supply.c | 106 static int get_psp_from_gb_prop(int gb_prop, enum power_supply_property *psp) in get_psp_from_gb_prop() argument 305 *psp = (enum power_supply_property)prop; in get_psp_from_gb_prop() 316 enum power_supply_property psp) in get_psy_prop() argument 321 if (gbpsy->props[i].prop == psp) in get_psy_prop() 327 enum power_supply_property psp) in is_psy_prop_writeable() argument 331 prop = get_psy_prop(gbpsy, psp); in is_psy_prop_writeable() 337 static int is_prop_valint(enum power_supply_property psp) in is_prop_valint() argument 339 return ((psp < POWER_SUPPLY_PROP_MODEL_NAME) ? 1 : 0); in is_prop_valint() 513 enum power_supply_property psp; in gb_power_supply_prop_descriptors_get() local 539 ret = get_psp_from_gb_prop(resp->props[i].property, &psp); in gb_power_supply_prop_descriptors_get() [all …]
|
/drivers/gpu/drm/amd/display/amdgpu_dm/ |
D | amdgpu_dm_hdcp.c | 77 static uint8_t *psp_get_srm(struct psp_context *psp, uint32_t *srm_version, uint32_t *srm_size) in psp_get_srm() argument 82 if (!psp->hdcp_context.context.initialized) { in psp_get_srm() 87 hdcp_cmd = (struct ta_hdcp_shared_memory *)psp->hdcp_context.context.mem_context.shared_buf; in psp_get_srm() 91 psp_hdcp_invoke(psp, hdcp_cmd->cmd_id); in psp_get_srm() 103 static int psp_set_srm(struct psp_context *psp, uint8_t *srm, uint32_t srm_size, uint32_t *srm_vers… in psp_set_srm() argument 108 if (!psp->hdcp_context.context.initialized) { in psp_set_srm() 113 hdcp_cmd = (struct ta_hdcp_shared_memory *)psp->hdcp_context.context.mem_context.shared_buf; in psp_set_srm() 120 psp_hdcp_invoke(psp, hdcp_cmd->cmd_id); in psp_set_srm() 191 psp_set_srm(hdcp_work->hdcp.config.psp.handle, hdcp_work->srm, hdcp_work->srm_size, in hdcp_update_display() 413 struct psp_context *psp = hdcp.config.psp.handle; in enable_assr() local [all …]
|
/drivers/usb/misc/ |
D | apple-mfi-fastcharge.c | 92 enum power_supply_property psp, in apple_mfi_fc_get_property() argument 97 dev_dbg(&mfi->udev->dev, "prop: %d\n", psp); in apple_mfi_fc_get_property() 99 switch (psp) { in apple_mfi_fc_get_property() 114 enum power_supply_property psp, in apple_mfi_fc_set_property() argument 120 dev_dbg(&mfi->udev->dev, "prop: %d\n", psp); in apple_mfi_fc_set_property() 128 switch (psp) { in apple_mfi_fc_set_property() 143 enum power_supply_property psp) in apple_mfi_fc_property_is_writeable() argument 145 switch (psp) { in apple_mfi_fc_property_is_writeable()
|