Benign repos Download

smu_v13_0_7_ppt.c

Code formats a zero-padded integerAssigns a negative errno constant
SHA-25653ce8cf3247076bf0f7fdc4154f5a55ab479098f14ae2d9c521359786388d3b7

Evidence

imports amdgpu.h lines 18–52
18:67… RWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24#define SWSMU_CODE_LAYER_L2
25
26#include <linux/firmware.h>
27#include <linux/pci.h>
28#include <linux/i2c.h>
29#include "amdgpu.h"
30#include "amdgpu_smu.h"
31#include "atomfirmware.h"
32#include "amdgpu_atomfirmware.h"
33#include "amdgpu_atombios.h"
34#include "smu_v13_0.h"
35#include "smu13_driver_if_v13_0_7.h"
36#include "soc15_common.h"
37#include "atom.h"
38#include "smu_v13_0_7_ppt.h"
39#include "smu_v13_0_7_pptable.h"
40#include "smu_v13_0_7_ppsmc.h"
41#include "nbio/nbio_4_3_0_offset.h"
42#include "nbio/nbio_4_3_0_sh_mask.h"
43#include "mp/mp_13_0_0_offset.h"
44#include "mp/mp_13_0_0_sh_mask.h"
45
46#include "asic_reg/mp/mp_13_0_0_sh_mask.h"
47#include "smu_cmn.h"
48#include "amdgpu_ras.h"
49
50/*
51 * DO NOT use these for err/warn/info/debug messages.
52 * Use dev_err, dev_warn, dev_info …
Copies bytes with native memcpy lines 394–402
394:9… lay_table->smc_pptable.SkuTable.DebugOverrides |= 0x00000080;
395
396 memcpy(table_context->driver_pptable, &powerplay_table->smc_pptable,
397 sizeof(PPTable_t));
398
⋯4 lines
Kernel error code return lines 411–419
411 MP1_FIRMWARE_FLAGS__INTERRUPTS_ENABLED__SHIFT)
412 return 0;
413
414 return -EIO;
415}
416
417#ifndef atom_smc_dpm_info_table_13_0_7
418struct atom_smc_dpm_info_table_13_0_7 {
419 struct atom_common_table_header table_heade …
Assigns a negative errno constant lines 989–1001
989:9… = 4;
990 break;
991 case AMDGPU_PP_SENSOR_GPU_INPUT_POWER:
992 default:
993 ret = -EOPNOTSUPP;
994 break;
995 }
⋯6 lines
Code formats a zero-padded integer lines 1448–1459
1448:11… max_value);
1449 size += sysfs_emit_at(buf, size, "VDDGFX_OFFSET: %7dmv %10dmv\n",
1450 min_value, max_value);
1451 }
⋯8 lines

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.