导航

    全志在线开发者论坛

    • 注册
    • 登录
    • 搜索
    • 版块
    • 话题
    • 在线文档
    • 社区主页

    A133 linux5.4 GPU(ge8300)无法使用

    Linux
    1
    2
    1831
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • L
      afaf LV 4 最后由 liangzhicheng 编辑

      A133 linux5.4 下的 GPU 无法正常使用(编译为 linux 固件,非安卓固件)

      insmod pvrsrvkm.ko 打印 read BVNC 0.0.0.0,无法读取到 BVNC,指定使用 22.102.54.38

      接着跑 QT 例程时打印读取不到固件 rgx.fw.22.102.54.38。

      root@dragonboard:~# dmesg | grep -i pvr
      [    8.367677] pvrsrvkm: loading out-of-tree module taints kernel.
      [    8.423943] pvrsrvkm 1800000.gpu: set gpu core rate:504000000 freq:504000000-950000uV dfs:0x00000001
      [    8.423955] pvrsrvkm 1800000.gpu: set gpu core rate:504000000 freq:472500000-950000uV dfs:0x00000002
      [    8.423961] pvrsrvkm 1800000.gpu: set gpu core rate:504000000 freq:441000000-950000uV dfs:0x00000004
      [    8.423966] pvrsrvkm 1800000.gpu: set gpu core rate:252000000 freq:252000000-950000uV dfs:0x00000001
      [    8.424210] pvrsrvkm 1800000.gpu: idle:0 dvfs:0 power:0 Yes mode:1 volt:1000000 core:504000000
      [    8.424755] WARNING: CPU: 1 PID: 271 at /home/lzcyf/SVN_Code/MainBoard/longan/kernel/linux-5.4/modules/gpu/img-rgx/linux/rogue_km/binary_sunxi_linux_release/target_aarch64/kbuild/services/system/rgx_sunxi/sunxi_platform.c:122 switch_interl_dfs+0x3c/0x48 [pvrsrvkm]
      [    8.424759] Modules linked in: pvrsrvkm(O+) sunxi_ve
      [    8.424858] pc : switch_interl_dfs+0x3c/0x48 [pvrsrvkm]
      [    8.424923] lr : switch_interl_dfs+0x24/0x48 [pvrsrvkm]
      [    8.425064]  switch_interl_dfs+0x3c/0x48 [pvrsrvkm]
      [    8.425126]  sunxiPrePowerState+0x74/0xa0 [pvrsrvkm]
      [    8.425188]  RGXBvncInitialiseConfiguration+0x11c/0x69c [pvrsrvkm]
      [    8.425249]  RGXRegisterDevice+0x430/0x1240 [pvrsrvkm]
      [    8.425312]  PVRSRVDeviceCreate+0x478/0xe68 [pvrsrvkm]
      [    8.425375]  pvr_drm_load+0x70/0x104 [pvrsrvkm]
      [    8.425437]  pvr_probe+0x54/0x94 [pvrsrvkm]
      [    8.425550]  pvr_init+0x4c/0x1000 [pvrsrvkm]
      [    8.433002] PVR_K:  271: Read BVNC 0.0.0.0 from HW device registers
      [    8.448535] PVR_K:(Error):   271: HW device BVNC configuration not found! in RGXBvncInitialiseConfiguration()
      [    8.464620] PVR_K:  271: Reverting to compile time BVNC 22.102.54.38
      [    8.483510] PVR_K:  271: RGX Device initialised with BVNC 22.102.54.38
      [    8.496570] [drm] Initialized pvr 1.10.5260539 20170530 for 1800000.gpu on minor 0
      [   11.746741] pvrsrvkm 1800000.gpu: Direct firmware load for rgx.fw.22.102.54.38 failed with error -2
      [   11.746781] PVR_K:(Error):   730: RGXLoadFirmware: request_firmware('rgx.fw.22.102.54.38') failed (-2), trying 'rgx.fw.22.102p.54.38'
      [   11.746921] pvrsrvkm 1800000.gpu: Direct firmware load for rgx.fw.22.102p.54.38 failed with error -2
      [   11.746942] PVR_K:(Error):   730: RGXLoadFirmware: request_firmware('rgx.fw.22.102p.54.38') failed (-2), trying 'rgx.fw'
      [   11.747071] pvrsrvkm 1800000.gpu: Direct firmware load for rgx.fw failed with error -2
      [   11.747091] PVR_K:(Fatal):   730: RGXLoadFirmware: request_firmware('rgx.fw') failed (-2)
      [   11.747098] PVR_K:(Error):   730: InitFirmware: RGXLoadFirmware failed
      [   11.747106] PVR_K:(Error):   730: RGXInit: InitFirmware failed (4)
      [   11.747115] PVR_K:(Error):   730: PVRSRVDeviceInitialise: Initialisation of Rogue device failed (PVRSRV_ERROR_INIT_FAILURE)
      [   11.747124] PVR_K:(Error):   730: PVRSRVDeviceInitialise: Services failed to finalise the device (PVRSRV_ERROR_NOT_INITIALISED)
      [   11.747140] PVR_K:(Error):   730: PVRSRVCommonDeviceOpen: Failed to initialise device (PVRSRV_ERROR_NOT_INITIALISED)
      [   11.749471] PVR_K:(Error):   730: PVRSRVCommonDeviceOpen: Driver already in bad state. Device open failed.
      

      将固件 rgx.fw.22.102.54.38 放到 /lib/firmware/ 下,重启系统后再次安装 pvrsrvkm.ko 后跑 QT 例程,dmesg 可看到下面的打印信息

      好像是说 gpu 电源没起来?处于 idle 模式?

      [   12.918945] PVR_K:(Error):   773: PollForValueKM: Timeout. Expected 0x1 but found 0x0 (mask 0xffffffff).
      [   12.918959] PVR_K:(Error):   773: RGXPostPowerState: Polling for 'FW started' flag failed.
      [   12.918967] PVR_K:  773: BIF0 - OK
      [   12.918977] PVR_K:  773: RGX FW State: OK (HWRState 0x00000000: )
      [   12.918986] PVR_K:  773: RGX FW Power State: RGXFWIF_POW_OFF (APM enabled: 0 ok, 0 denied, 0 non-idle, 0 other, 0 total. Latency: 100 ms)
      [   12.918994] PVR_K:  773: RGX DVFS: 0 frequency changes. Current frequency: 504 MHz (sampled at 2dec1c5ce)
      [   12.919000] PVR_K:  773: RGX FW OS 0 State: 0x00000000 (Active: No, Freelists: Not Ok, Grow Request Pending: No)
      [   12.919034] PVR_K:  773: Number of HWR: GP(0/0+0), 2D(0/0+0), TA(0/0+0), 3D(0/0+0), CDM(0/0+0), FALSE(0,0,0,0,0)
      [   12.919043] PVR_K:  773: DM 0 (GP)
      [   12.919056] PVR_K:  773: DM 1 (HWRflags 0x00000000: working; )
      [   12.919065] PVR_K:  773: DM 2 (HWRflags 0x00000000: working; )
      [   12.919074] PVR_K:  773: DM 3 (HWRflags 0x00000000: working; )
      [   12.919083] PVR_K:  773: DM 4 (HWRflags 0x00000000: working; )
      [   12.919092] PVR_K:  773: ------[ RGX registers ]------
      [   12.919100] PVR_K:  773: RGX Register Base Address (Linear):   0x00000000867a8d2b
      [   12.919104] PVR_K:  773: RGX Register Base Address (Physical): 0x01800000
      [   12.919113] PVR_K:  773: CORE_ID                       : 0x0000000000000000
      [   12.919117] PVR_K:  773: CORE_REVISION                 : 0x00000000
      [   12.919121] PVR_K:  773: DESIGNER_REV_FIELD1           : 0x00000000
      [   12.919125] PVR_K:  773: DESIGNER_REV_FIELD2           : 0x00000000
      [   12.919130] PVR_K:  773: CHANGESET_NUMBER              : 0x0000000000000000
      [   12.919135] PVR_K:  773: CLK_CTRL                      : 0x0000000000000000
      [   12.919140] PVR_K:  773: CLK_STATUS                    : 0x0000000000000000
      [   12.919144] PVR_K:  773: CLK_CTRL2                     : 0x0000000000000000
      [   12.919149] PVR_K:  773: CLK_STATUS2                   : 0x0000000000000000
      [   12.919154] PVR_K:  773: EVENT_STATUS                  : 0x00000000
      [   12.919158] PVR_K:  773: TIMER                         : 0x0000000000000000
      [   12.919163] PVR_K:  773: BIF_FAULT_BANK0_MMU_STATUS    : 0x00000000
      [   12.919167] PVR_K:  773: BIF_FAULT_BANK0_REQ_STATUS    : 0x0000000000000000
      [   12.919172] PVR_K:  773: BIF_FAULT_BANK1_MMU_STATUS    : 0x00000000
      [   12.919176] PVR_K:  773: BIF_FAULT_BANK1_REQ_STATUS    : 0x0000000000000000
      [   12.919180] PVR_K:  773: BIF_MMU_STATUS                : 0x00000000
      [   12.919184] PVR_K:  773: BIF_MMU_ENTRY                 : 0x00000000
      [   12.919188] PVR_K:  773: BIF_MMU_ENTRY_STATUS          : 0x0000000000000000
      [   12.919193] PVR_K:  773: BIF_STATUS_MMU                : 0x00000000
      [   12.919197] PVR_K:  773: BIF_READS_EXT_STATUS          : 0x00000000
      [   12.919201] PVR_K:  773: BIF_READS_INT_STATUS          : 0x00000000
      [   12.919206] PVR_K:  773: BIFPM_STATUS_MMU              : 0x00000000
      [   12.919210] PVR_K:  773: BIFPM_READS_EXT_STATUS        : 0x00000000
      [   12.919214] PVR_K:  773: BIFPM_READS_INT_STATUS        : 0x00000000
      [   12.919218] PVR_K:  773: Warning: BRN44871 is present
      [   12.919223] PVR_K:  773: BIF_CAT_BASE_INDEX            : 0x0000000000000000
      [   12.919227] PVR_K:  773: BIF_CAT_BASE0                 : 0x0000000000000000
      [   12.919232] PVR_K:  773: BIF_CAT_BASE1                 : 0x0000000000000000
      [   12.919236] PVR_K:  773: BIF_CAT_BASE2                 : 0x0000000000000000
      [   12.919240] PVR_K:  773: BIF_CAT_BASE3                 : 0x0000000000000000
      [   12.919245] PVR_K:  773: BIF_CAT_BASE4                 : 0x0000000000000000
      [   12.919249] PVR_K:  773: BIF_CAT_BASE5                 : 0x0000000000000000
      [   12.919253] PVR_K:  773: BIF_CAT_BASE6                 : 0x0000000000000000
      [   12.919258] PVR_K:  773: BIF_CAT_BASE7                 : 0x0000000000000000
      [   12.919262] PVR_K:  773: BIF_CTRL_INVAL                : 0x00000000
      [   12.919266] PVR_K:  773: BIF_CTRL                      : 0x00000000
      [   12.919271] PVR_K:  773: BIF_PM_CAT_BASE_VCE0          : 0x0000000000000000
      [   12.919275] PVR_K:  773: BIF_PM_CAT_BASE_TE0           : 0x0000000000000000
      [   12.919280] PVR_K:  773: BIF_PM_CAT_BASE_ALIST0        : 0x0000000000000000
      [   12.919284] PVR_K:  773: BIF_PM_CAT_BASE_VCE1          : 0x0000000000000000
      [   12.919288] PVR_K:  773: BIF_PM_CAT_BASE_TE1           : 0x0000000000000000
      [   12.919293] PVR_K:  773: BIF_PM_CAT_BASE_ALIST1        : 0x0000000000000000
      [   12.919297] PVR_K:  773: PERF_TA_PHASE                 : 0x00000000
      [   12.919301] PVR_K:  773: PERF_TA_CYCLE                 : 0x00000000
      [   12.919305] PVR_K:  773: PERF_3D_PHASE                 : 0x00000000
      [   12.919309] PVR_K:  773: PERF_3D_CYCLE                 : 0x00000000
      [   12.919314] PVR_K:  773: PERF_TA_OR_3D_CYCLE           : 0x00000000
      [   12.919318] PVR_K:  773: PERF_TA_AND_3D_CYCLE          : 0x00000000
      [   12.919322] PVR_K:  773: PERF_COMPUTE_PHASE            : 0x00000000
      [   12.919327] PVR_K:  773: PERF_COMPUTE_CYCLE            : 0x00000000
      [   12.919331] PVR_K:  773: PM_PARTIAL_RENDER_ENABLE      : 0x00000000
      [   12.919335] PVR_K:  773: ISP_RENDER                    : 0x00000000
      [   12.919339] PVR_K:  773: TLA_STATUS                    : 0x0000000000000000
      [   12.919344] PVR_K:  773: MCU_FENCE                     : 0x0000000000000000
      [   12.919348] PVR_K:  773: VDM_CONTEXT_STORE_STATUS      : 0x00000000
      [   12.919352] PVR_K:  773: VDM_CONTEXT_STORE_TASK0       : 0x0000000000000000
      [   12.919357] PVR_K:  773: VDM_CONTEXT_STORE_TASK1       : 0x0000000000000000
      [   12.919361] PVR_K:  773: VDM_CONTEXT_STORE_TASK2       : 0x0000000000000000
      [   12.919365] PVR_K:  773: VDM_CONTEXT_RESUME_TASK0      : 0x0000000000000000
      [   12.919370] PVR_K:  773: VDM_CONTEXT_RESUME_TASK1      : 0x0000000000000000
      [   12.919374] PVR_K:  773: VDM_CONTEXT_RESUME_TASK2      : 0x0000000000000000
      [   12.919378] PVR_K:  773: ISP_CTL                       : 0x00000000
      [   12.919382] PVR_K:  773: ISP_STATUS                    : 0x00000000
      [   12.919386] PVR_K:  773: MTS_INTCTX                    : 0x00000000
      [   12.919391] PVR_K:  773: MTS_BGCTX                     : 0x00000000
      [   12.919395] PVR_K:  773: MTS_BGCTX_COUNTED_SCHEDULE    : 0x00000000
      [   12.919399] PVR_K:  773: MTS_SCHEDULE                  : 0x00000000
      [   12.919403] PVR_K:  773: MTS_GPU_INT_STATUS            : 0x00000000
      [   12.919408] PVR_K:  773: CDM_CONTEXT_STORE_STATUS      : 0x00000000
      [   12.919412] PVR_K:  773: CDM_CONTEXT_PDS0              : 0x0000000000000000
      [   12.919417] PVR_K:  773: CDM_CONTEXT_PDS1              : 0x0000000000000000
      [   12.919421] PVR_K:  773: CDM_TERMINATE_PDS             : 0x0000000000000000
      [   12.919425] PVR_K:  773: CDM_TERMINATE_PDS1            : 0x0000000000000000
      [   12.919430] PVR_K:  773: SIDEKICK_IDLE                 : 0x00000000
      [   12.919434] PVR_K:  773: SLC_IDLE                      : 0x00000000
      [   12.919438] PVR_K:  773: SLC_STATUS0                   : 0x00000000
      [   12.919442] PVR_K:  773: SLC_STATUS1                   : 0x0000000000000000
      [   12.919447] PVR_K:  773: SLC_STATUS2                   : 0x0000000000000000
      [   12.919451] PVR_K:  773: SLC_CTRL_BYPASS               : 0x00000000
      [   12.919456] PVR_K:  773: SLC_CTRL_MISC                 : 0x0000000000000000
      [   12.919461] PVR_K:  773: MIPS_ADDR_REMAP1_CONFIG1      : 0x00000000
      [   12.919465] PVR_K:  773: MIPS_ADDR_REMAP1_CONFIG2      : 0x0000000000000000
      [   12.919470] PVR_K:  773: MIPS_ADDR_REMAP2_CONFIG1      : 0x00000000
      [   12.919474] PVR_K:  773: MIPS_ADDR_REMAP2_CONFIG2      : 0x0000000000000000
      [   12.919478] PVR_K:  773: MIPS_ADDR_REMAP3_CONFIG1      : 0x00000000
      [   12.919483] PVR_K:  773: MIPS_ADDR_REMAP3_CONFIG2      : 0x0000000000000000
      [   12.919487] PVR_K:  773: MIPS_ADDR_REMAP4_CONFIG1      : 0x00000000
      [   12.919491] PVR_K:  773: MIPS_ADDR_REMAP4_CONFIG2      : 0x0000000000000000
      [   12.919495] PVR_K:  773: MIPS_ADDR_REMAP5_CONFIG1      : 0x00000000
      [   12.919500] PVR_K:  773: MIPS_ADDR_REMAP5_CONFIG2      : 0x0000000000000000
      [   12.919504] PVR_K:  773: MIPS_WRAPPER_CONFIG           : 0x0000000000000000
      [   12.919508] PVR_K:  773: MIPS_EXCEPTION_STATUS         : 0x00000000
      [   12.983167] Modules linked in: dc_sunxi(O) gc030a_mipi gc2385_mipi gc5025_mipi vin_v4l2 vin_io sunxi_thermal videobuf2_dma_contig nvmem_sunxi_sid pvrsrvkm(O) sunxi_ve
      [   13.019045] pc : OSCPUCacheFlushRangeKM+0x50/0x80 [pvrsrvkm]
      [   13.025491] lr : CacheOpPMRExec+0x99c/0xb18 [pvrsrvkm]
      [   13.126813]  OSCPUCacheFlushRangeKM+0x50/0x80 [pvrsrvkm]
      [   13.132899]  CacheOpPMRExec+0x99c/0xb18 [pvrsrvkm]
      [   13.138422]  CacheOpValExec+0x48/0xb0 [pvrsrvkm]
      [   13.143751]  RGXDumpRGXRegisters+0x3fdc/0x4ba8 [pvrsrvkm]
      [   13.149899]  RGXPostPowerState+0x14c/0x1b0 [pvrsrvkm]
      [   13.155687]  PVRSRVSetDevicePowerStateKM+0x174/0x240 [pvrsrvkm]
      [   13.162435]  PVRSRVDeviceFinalise+0x180/0x4e4 [pvrsrvkm]
      [   13.168504]  PVRSRVDeviceInitialise+0x108/0x2a4 [pvrsrvkm]
      [   13.174750]  PVRSRVCommonDeviceOpen+0x98/0x128 [pvrsrvkm]
      [   13.180899]  pvr_drm_open+0x50/0x78 [pvrsrvkm]
      
      

      查看源码,有一些提示
      9d3315ec-6e3f-4c22-9334-41370911275d-image.png

      直接翻译注释

      当bFirmwareStarted失败时,可以通过执行以下调试转储获得一些信息,但不幸的是,如果未启动的原因是GPU电源未打开,则可能存在潜在危险。
      然而,如果我们已经到达这一点,系统层已经返回没有错误,我们假设GPU电源确实是ON。
      

      设备树 board.dts 配置如下

      &gpu {
        gpu_idle = <0>;
        dvfs_status = <1>;
        pll_rate = <504000>;
        independent_power = <0>;
        operating-points = <
          /* KHz   uV */
          504000 950000
          472500 950000
          441000 950000
          252000 950000
         >;
         gpu-supply = <&reg_dcdc4>;
      };
      

      linux menuconfig:
      1、打开 DRM
      f15a47eb-3ea0-4486-afdf-f3d0f5db02cc-image.png
      2、选择 GPU 为 ge8300
      d17082b3-2d00-47ea-89c2-1d40cc29bc8e-image.png

      有大神知道怎么搞吗,linux5.4 下无法使用 gpu,而编译安卓的固件就可以,Linux的固件就不行。

      1 条回复 最后回复 回复 引用 分享 0
      • L
        afaf LV 4 最后由 编辑

        GPU 安卓部分是正常的,linux 部分才有这个问题,我使用的是 linux,不适用安卓。

        1 条回复 最后回复 回复 引用 分享 0
        • 1 / 1
        • First post
          Last post

        Copyright © 2024 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

        行为准则 | 用户协议 | 隐私权政策