This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] SK-AM68:禁用 APM 事件

Guru**** 2387080 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1511837/sk-am68-disabling-apm-events

器件型号:SK-AM68

工具/软件:

您好、

我正在尝试禁用板载 GPU 上的 APM 事件、因为它对我们的程序有明显的影响、但我无法正确执行此操作。

到目前为止、我已尝试禁用以下内核配置:

CONFIG_ENERGY_MODEL=n
CONFIG_SUSPEND=n
CONFIG_WQ_POWER_EFFICIENT_DEFAULT=n
# CONFIG_PM=n # Causes kernel panic
CONFIG_PM_SLEEP=n
CONFIG_HIBERNATION=n
CONFIG_CPU_PM=n
CONFIG_CPU_IDLE=n

CONFIG_ARCH_SUSPEND_POSSIBLE=n
CONFIG_PM_CLK=n # Doesn't work without CONFIG_PM=n
CONFIG_PM_GENERIC_DOMAINS=n
CONFIG_PM_GENERIC_DOMAINS_OF=n
CONFIG_CPU_FREQ_GOV_POWERSAVE=n
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=n

CONFIG_ARCH_HIBERNATION_POSSIBLE=n
CONFIG_ARCH_SUSPEND_POSSIBLE=n

CONFIG_ACPI=n

我无法找到与 APM 相关的任何配置选项、我发现这些选项异常、因为它已启用并在板上运行。

这是我的 PVR 转储,以防它有任何用途:

root@am68-sk:~# dmesg | grep -i pvr
[    6.819663] pvrsrvkm: loading out-of-tree module taints kernel.
[    6.841654] PVR_K:  183: Device: 4e20000000.gpu
[    6.895646] PVR_K:  183: Read BVNC 36.53.104.796 from HW device registers
[    6.932829] PVR_K:  183: RGX Device registered BVNC 36.53.104.796 with 1 core in the system
[    6.996556] [drm] Initialized pvr 24.2.6643903 20170530 for 4e20000000.gpu on minor 1
[   21.663153] PVR_K:  331: RGX Firmware image 'rgx.fw.36.53.104.796' loaded
[   21.675470] PVR_K:  331: Shader binary image 'rgx.sh.36.53.104.796' loaded
[   58.912050] PVR_K:  388: User requested PVR debug info
[   58.918064] PVR_K:  388: ------------[ PVR DBG: START (High) ]------------
[   58.924962] PVR_K:  388: OS kernel info: Linux 6.6.58-ti-01497-ga7758da17c28-dirty #1 SMP PREEMPT Wed Nov 27 13:23:15 UTC 2024 aarch64
[   58.937093] PVR_K:  388: DDK info: Rogue_DDK_Linux_WS rogueddk 24.2@6643903 (release) j721s2_linux
[   58.946520] PVR_K:  388: Time now: 58946516us
[   58.950885] PVR_K:  388: Services State: OK
[   58.955066] PVR_K:  388: Server Errors: 0
[   58.959079] PVR_K:  388: Connections Device ID:0(128) P331-V331-T331-weston, P388-V388-T388-pvrdebug
[   58.968199] PVR_K:  388: ------[ Driver Info ]------
[   58.973156] PVR_K:  388: Comparison of UM/KM components: MATCHING
[   58.979253] PVR_K:  388: KM Arch: 64 Bit
[   58.983176] PVR_K:  388: Driver Mode: Native
[   58.987447] PVR_K:  388: UM Connected Clients: 64 Bit
[   58.992490] PVR_K:  388: UM info: 24.2 @  6643903 (release) build options: 0x80020810
[   59.000308] PVR_K:  388: KM info: 24.2 @  6643903 (release) build options: 0x00020810
[   59.008122] PVR_K:  388: Window system: lws-generic
[   59.012996] PVR_K:  388: Power lock status: Free
[   59.017609] PVR_K:  388: ------[ Server Thread Summary ]------
[   59.023439] PVR_K:  388:   pvr_defer_free : Running
[   59.028313] PVR_K:  388:     Number of deferred cleanup items: QUEUED: 00000  CONNECTION : 00000 MMU : 00000 OSMEM : 00000 PMR : 00000
[   59.040378] PVR_K:  388:     Number of deferred cleanup items dropped after retry limit reached : 0
[   59.049408] PVR_K:  388:   pvr_device_wdg : Running
[   59.054278] PVR_K:  388: Active Threads (UM/KM): 1 / 2
[   59.059410] PVR_K:  388: Suspended Threads: 0
[   59.063763] PVR_K:  388: ------[ RGX Device ID:0 Start ]------
[   59.069624] PVR_K:  388: ------[ RGX Info ]------
[   59.074331] PVR_K:  388: Device Node (Info): 00000000e0c6ba78 (000000001f8b300c)
[   59.081733] PVR_K:  388:     DevmemHistoryRecordStats - None
[   59.087383] PVR_K:  388: RGX BVNC: 36.53.104.796 (rogue)
[   59.092688] PVR_K:  388: RGX Device State: ACTIVE
[   59.097384] PVR_K:  388: RGX Power State: OFF
[   59.101734] PVR_K:  388: RGX Health Status: OK, Reason: NONE
[   59.107383] PVR_K:  388: FW info: 24.2 @  6643903 (release) build options: 0x80020810
[   59.115201] PVR_K:  388: TRP: HW support - Yes; SW disabled
[   59.120767] PVR_K:  388: WGP: HW support - Yes; SW disabled
[   59.126333] PVR_K:  388: RGX HWR State 0x00000001: HWR OK;
[   59.131812] PVR_K:  388: RGX FW Power State: RGXFWIF_POW_OFF (APM enabled: 3 ok, 0 denied, 0 non-idle, 2 retry, 0 other, 5 total. Latency: 100 ms)
[   59.144918] PVR_K:  388: RGX DVFS: 0 frequency changes. Current frequency: 799.998 MHz (sampled at 23352097475 ns). FW frequency: 800.000 MHz.
[   59.157688] PVR_K:  388: RGX FW OS 0 - State: active; Freelists: Ok; Priority: 0; Isolation group: 0;  Time Slice*: 0% (0ms); MTS off;
[   59.169756] PVR_K:  388: RGX Kernel CCB WO:0x37 RO:0x37
[   59.174976] PVR_K:  388: RGX Firmware CCB WO:0x0 RO:0x0
[   59.180192] PVR_K:  388: RGX Kernel CCB commands executed = 55
[   59.186016] PVR_K:  388: RGX SLR: Forced UFO updates requested = 0
[   59.192190] PVR_K:  388: RGX Errors: WGP:0, TRP:0
[   59.196889] PVR_K:  388: Thread0: FW IRQ count = 92
[   59.201758] PVR_K:  388: Last sampled IRQ count in LISR = 92
[   59.207411] PVR_K:  388: FW System config flags = 0x00020000 (Ctx switch options: Medium CSW profile;)
[   59.216703] PVR_K:  388: FW OS config flags = 0x0000000F (Ctx switch: TDM; GEOM; 3D; CDM;)
[   59.224955] PVR_K:  388:  (!) RGX power is down. No registers dumped
[   59.231297] PVR_K:  388: ------[ RGX FW Trace Info ]------
[   59.236773] PVR_K:  388: Debug log type: none
[   59.241120] PVR_K:  388: RGX FW thread 0: Trace buffer not yet allocated
[   59.247808] PVR_K:  388: ------[ Full CCB Status ]------
[   59.253115] PVR_K:  388: FWCtx 0x00045840 (TQ_3D-P331-T331-weston)
[   59.259284] PVR_K:  388:   `--<Empty>
[   59.262941] PVR_K:  388: FWCtx 0x00045040 (TA-P331-T331-weston)
[   59.268851] PVR_K:  388:   `--<Empty>
[   59.272508] PVR_K:  388: FWCtx 0x00045118 (3D-P331-T331-weston)
[   59.278416] PVR_K:  388:   `--<Empty>
[   59.282073] PVR_K:  388: ------[ RGX Device ID:0 End ]------
[   59.287723] PVR_K:  388: ------[ Device ID: 128 - Phys Heaps ]------
[   59.294078] PVR_K:  388: 0x000000007d12541c -> PdMs: SYSMEM, Type: UMA, default, Usage Flags: 0x00000004 (GPU_LOCAL), Refs: 11, Free Size: 16264806400B, Total Size: 16576684032B, Spas Region: 0000000000000000
[   59.312555] PVR_K:  388: PMR Zombie Count: 0, PMR Zombie Count In Cleanup: 0
[   59.319592] PVR_K:  388: PMR Live Count: 84
[   59.323770] PVR_K:  388: ------[ System Summary Device ID:0 ]------
[   59.330033] PVR_K:  388: Device System Power State: OFF
[   59.335251] PVR_K:  388: MaxHWTOut: 500000us, WtTryCt: 10000, WDGTOut(on,off): (10000ms,3600000ms)
[   59.344196] PVR_K:  388: ------[ AppHint Settings ]------
[   59.349586] PVR_K:  388:   Build Vars
[   59.353243] PVR_K:  388:     EnableTrustedDeviceAceConfig: N
[   59.358892] PVR_K:  388:     CleanupThreadPriority: 0x00000005
[   59.364715] PVR_K:  388:     WatchdogThreadPriority: 0x00000000
[   59.370622] PVR_K:  388:     HWPerfClientBufferSize: 0x000c0000
[   59.376530] PVR_K:  388:     DevmemHistoryBufSizeLog2: 0x0000000b
[   59.382611] PVR_K:  388:     DevmemHistoryMaxEntries: 0x00002710
[   59.388608] PVR_K:  388:   Module Params
[   59.392533] PVR_K:  388:     none
[   59.395841] PVR_K:  388:   Debug Info Params
[   59.400103] PVR_K:  388:     none
[   59.403404] PVR_K:  388:   Debug Info Params Device ID: 0
[   59.408796] PVR_K:  388:     none
[   59.412105] PVR_K:  388: ------[ Active Sync Checkpoints ]------
[   59.418106] PVR_K:  388: (SyncCP Counts: InUse:6 Max:9)
[   59.423315] PVR_K:  388: (SyncCP Mirrored Counts: InUse:0 Max:0)
[   59.429316] PVR_K:  388: sw: RM_SWTimeline-weston-331 @0 cur=0
[   59.435145] PVR_K:  388: ------[ Native Fence Sync: timelines ]------
[   59.441579] PVR_K:  388: foreign_sync: @0 ctx=1 refs=1
[   59.446712] PVR_K:  388: rogue-ta3d: @43 ctx=5 refs=3
[   59.451750] PVR_K:  388:  @41: (++) refs=1 fwaddr=0x100423e9 enqueue=1 status=Signalled 41-update fence
[   59.461119] PVR_K:  388:  @42: (++) refs=1 fwaddr=0x10042019 enqueue=1 status=Signalled 42-update fence
[   59.470502] PVR_K:  388: V3-weston-331: @43 ctx=6 refs=3
[   59.475799] PVR_K:  388:  @41: (++) refs=1 fwaddr=0x100423f1 enqueue=1 status=Signalled 41-es3_DoKickTA_43
[   59.485429] PVR_K:  388:  @42: (++) refs=3 fwaddr=0x10042001 enqueue=1 status=Signalled 42-es3_DoKickTA_44
[   59.495069] PVR_K:  388: P3-weston-331: @43 ctx=7 refs=3
[   59.500366] PVR_K:  388:  @41: (++) refs=1 fwaddr=0x100423f9 enqueue=1 status=Signalled 41-es3_DoKick3D_43
[   59.509995] PVR_K:  388:  @42: (++) refs=3 fwaddr=0x10042009 enqueue=1 status=Signalled 42-es3_DoKick3D_44
[   59.519633] PVR_K:  388: rogue-tq3d: @0 ctx=10 refs=1
[   59.524679] PVR_K:  388: QE-weston-331: @2 ctx=11 refs=1
[   59.529983] PVR_K:  388: ------------[ PVR DBG: END ]------------

 


我使用的是 ti-linux-staging 6.6内核。

我还尝试了 该 TI 文档中推荐的方法 来禁用 APM、但这没有影响。

请告诉我禁用 APM 的正确方法。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:

    则说明您使用的是9.01 SDK。 您是否对根文件系统或内核补丁进行了任何修改? 这是在 EVM 还是定制电路板上?

    此致、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    我使用 Yocto (scarthgap)创建发行版、因为驱动程序来自 TI、所以我在此处发布了内容。

    我对内核所做的唯一更改是我的第一个帖子的片段中的配置以及其他一些配置:

    CONFIG_SPI_OMAP24XX=y
    CONFIG_SPI_SLAVE=y
    CONFIG_SPI_SPIDEV=y

    是的、这是我使用的 EVM

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Matt:

    感谢您提供的信息、接下来的几天我将回复您。 感谢您的耐心。

    此致、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好:  

    对延迟深表歉意。 我看到可以在以下 Rogue_Power_Management_Info 文档中找到禁用 APM:https://software-dl.ti.com/jacinto7/esd/processor-sdk-linux-j721s2/11_00_00_08/exports/docs/linux/Foundational_Components

    请通过设备 /sys/devices/path-to-device/power/control 接口尝试"...setting 将电源控制设置为"打开"。 随后可以通过读取该设备文件来检查其状态。"

    谢谢您、
    Sarabesh S.

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Sarabesh:

    谢谢你的答复,但我在我的帖子中提到,这是我尝试过的(我链接的文档的一节, 3.6.8,提到了与你链接的方法相同的方法, 3.6.3 )。

    我的解决方案是将补丁和片段设置应用到 u-boot、以便编辑 PVR 驱动程序参数。

    额外设置如下所示:
    pvrsrvkm.DisableClockGating=0
    pvrsrvkm.EnableRDPowerIsland=0
    pvrsrvkm.EnableFullSyncTracking=0
    pvrsrvkm.EnableSoftResetContextSwitch=0

    这些应用于以下文件:

    u-boot-ti-staging/2024.04+git/git/include/configs/ti_armv7_common.h

    u-boot-ti-staging/2024.04+git/git/include/config_distro_bootcmd.h

    对于 config_distro_bootcmd.h 补丁、这些设置应与"setenv bootargs ${bootargs}pvrsrvkm.DisableClockGating=0……"一起使用

    可能需要在 u-boot config 中启用 CONFIG_CMF_INI (如果使用 bitbake、则通过 bitbake -c menuconfig 访问)

    如果不起作用、则对于 ti-img-rogue-driver、将 PVRSRV_APPHINT_ENABLEAPM=RGX_ACTIVEPM_FORCE_OFF 添加到 extra_OEMAKE

    我认为只需要其中一项更改、但我没有花时间确定哪一项是解决方案、因为我只是同时应用所有修补程序

    此致、

    马特