# 验证

Source: [https://docs.qualcomm.com/doc/80-70014-20Y/topic/bring-up.html](https://docs.qualcomm.com/doc/80-70014-20Y/topic/bring-up.html)

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- 由 Microsoft Visio, SVG Export 生成 Video-Verify-workflow.svg Page-1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="9.00521in" height="1.76563in" viewbox="0 0 648.375 127.125" xml:space="preserve" color-interpolation-filters="sRGB" class="st8"><v:documentproperties v:langid="2052">	<v:userdefs>		<v:ud v:nameu="msvNoAutoConnect" v:val="VT0(1):26"></v:ud>	</v:userdefs></v:documentproperties>
<style>.svg-1 .st1 { fill: #f7f8fa; stroke: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 0.75 }
.svg-1 .st2 { fill: #ffffff; stroke: #3253dc; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.25 }
.svg-1 .st3 { fill: #000000; font-family: 黑体; font-size: 1.00001em }
.svg-1 .st4 { font-family: Arial; font-size: 1em }
.svg-1 .st5 { font-size: 1em }
.svg-1 .st6 { marker-end: url("#mrkr5-26"); stroke: #000000; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2.25 }
.svg-1 .st7 { fill: #000000; fill-opacity: 1; stroke: #000000; stroke-opacity: 1; stroke-width: 0.47169815932882 }
.svg-1 .st8 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<defs id="Markers">	<g id="lend5">		<path d="M 2 1 L 0 0 L 1.98117 -0.993387 C 1.67173 -0.364515 1.67301 0.372641 1.98465 1.00043 " style="stroke:none"></path>	</g>	<marker id="mrkr5-26" class="st7" v:arrowtype="5" v:arrowsize="2" v:setback="3.71" refx="-3.709999637247" orient="auto" markerunits="strokeWidth" overflow="visible">		<use xlink:href="#lend5" transform="scale(-2.1199997927126,-2.1199997927126) "></use>	</marker></defs><g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Page-1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<g id="shape1-1" v:mid="1" v:groupcontext="shape" transform="translate(18,-18.0002)">		<title>shape13-1</title>		<rect x="0" y="36.0003" width="612" height="91.125" class="st1"></rect>	</g>	<g id="shape2-3" v:mid="2" v:groupcontext="shape" transform="translate(495,-39.7847)">		<title>shape6-3</title>		<desc>Run the use case</desc>		<v:userdefs>			<v:ud v:nameu="CTypeTopLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeTopRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CornerLockHoriz" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockVert" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockDiag" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="TopLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="TopRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="54" cy="101.64" width="108.01" height="50.9605"></v:textrect>		<path d="M10.8 127.13 L97.2 127.13 A10.7998 10.7998 -180 0 0 108 116.33 L108 86.96 A10.7998 10.7998 -180 0 0 97.2 76.16					 L10.8 76.16 A10.7998 10.7998 -180 0 0 0 86.96 L0 116.33 A10.7998 10.7998 -180 0 0 10.8 127.13 Z" class="st2"></path>		<text x="30" y="105.54" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>运行用例</text>		</g>	<g id="shape3-6" v:mid="3" v:groupcontext="shape" transform="translate(342.375,-39.7847)">		<title>shape7-6</title>		<desc>Verify if decode/encode is offloaded to VPU</desc>		<v:userdefs>			<v:ud v:nameu="CTypeTopLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeTopRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CornerLockHoriz" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockVert" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockDiag" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="TopLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="TopRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="54" cy="101.64" width="108.01" height="50.9605"></v:textrect>		<path d="M10.8 127.13 L97.2 127.13 A10.7998 10.7998 -180 0 0 108 116.33 L108 86.96 A10.7998 10.7998 -180 0 0 97.2 76.16					 L10.8 76.16 A10.7998 10.7998 -180 0 0 0 86.96 L0 116.33 A10.7998 10.7998 -180 0 0 10.8 127.13 Z" class="st2"></path>		<text x="28.33" y="90.54" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>验证解码<tspan class="st4">/</tspan><tspan x="6" dy="1.3em" class="st5">编码是否已分载到</tspan><tspan class="st4"> </tspan><tspan x="41.66" dy="1.225em" class="st4">VPU</tspan></text>		</g>	<g id="shape4-13" v:mid="4" v:groupcontext="shape" transform="translate(189.375,-39.7847)">		<title>shape8-11</title>		<desc>Verify if VPU driver is loaded</desc>		<v:userdefs>			<v:ud v:nameu="CTypeTopLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeTopRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CornerLockHoriz" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockVert" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockDiag" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="TopLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="TopRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="54" cy="101.64" width="108.01" height="50.9605"></v:textrect>		<path d="M10.8 127.13 L97.2 127.13 A10.7998 10.7998 -180 0 0 108 116.33 L108 86.96 A10.7998 10.7998 -180 0 0 97.2 76.16					 L10.8 76.16 A10.7998 10.7998 -180 0 0 0 86.96 L0 116.33 A10.7998 10.7998 -180 0 0 10.8 127.13 Z" class="st2"></path>		<text x="12" y="97.74" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>验证是否加载了<tspan class="st4"> </tspan><tspan x="16" dy="1.3em" class="st4">VPU </tspan>驱动程序</text>		</g>	<g id="shape5-18" v:mid="5" v:groupcontext="shape" transform="translate(36.375,-39.7847)">		<title>shape9-15</title>		<desc>Boot up the driver</desc>		<v:userdefs>			<v:ud v:nameu="CTypeTopLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeTopRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotLeftSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CTypeBotRightSnip" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="CornerLockHoriz" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockVert" v:prompt="" v:val="VT0(1):5"></v:ud>			<v:ud v:nameu="CornerLockDiag" v:prompt="" v:val="VT0(0):5"></v:ud>			<v:ud v:nameu="TopLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="TopRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotLeftOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="BotRightOffset" v:prompt="" v:val="VT0(0):26"></v:ud>			<v:ud v:nameu="visVersion" v:prompt="" v:val="VT0(15):26"></v:ud>		</v:userdefs>		<v:textblock v:margins="rect(4,4,4,4)"></v:textblock>		<v:textrect cx="54" cy="101.64" width="108.01" height="50.9605"></v:textrect>		<path d="M10.8 127.13 L97.2 127.13 A10.7998 10.7998 -180 0 0 108 116.33 L108 86.96 A10.7998 10.7998 -180 0 0 97.2 76.16					 L10.8 76.16 A10.7998 10.7998 -180 0 0 0 86.96 L0 116.33 A10.7998 10.7998 -180 0 0 10.8 127.13 Z" class="st2"></path>		<text x="18" y="105.54" class="st3" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>启动驱动程序</text>		</g>	<g id="shape6-21" v:mid="6" v:groupcontext="shape" v:layermember="0" transform="translate(144.375,-65.2649)">		<title>shape10-18</title>		<path d="M0 127.13 L36.65 127.13 L36.65 127.13" class="st6"></path>	</g>	<g id="shape7-27" v:mid="7" v:groupcontext="shape" v:layermember="0" transform="translate(297.375,-65.2649)">		<title>shape11-24</title>		<path d="M0 127.13 L36.65 127.13 L36.65 127.13" class="st6"></path>	</g>	<g id="shape8-32" v:mid="8" v:groupcontext="shape" v:layermember="0" transform="translate(450.375,-65.2649)">		<title>shape12-29</title>		<path d="M0 127.13 L36.28 127.13 L36.28 127.13" class="st6"></path>	</g></g>
</svg>

此处提供的命令和示例可验证以下内容：
- VPU 驱动程序已成功加载
- 解码/编码已分载到 VPU

## 验证 VPU 驱动程序是否已成功加载

VPU 驱动程序作为内核镜像的一部分加载。您可以通过执行以下方法确认 VPU 驱动程序是否加载成功：

**方法 1：**
- 在设备 shell 上执行以下 `lsmode` 命令：

        lsmod | grep -i "iris"Copy to clipboard
- 下面是示例输出，可帮助您验证 VPU 驱动程序是否已成功加载。确保输出在 Module 列下显示 `iris_vpu` 的条目：

        Module    Size    Used by
        
        iris_vpu   585728    0Copy to clipboard

**方法 2：**
- 在设备 shell 上执行 `udevadm info -n /dev/video*` 命令，并验证输出针对 `ID_V4L_PRODUCT` 标签是否显示 `msm_vidc_decoder` 和 `msm_vidc_encoder`。

        udevadm info -n /dev/video*Copy to clipboard
- 下面是示例输出，可帮助您验证 VPU 是否已成功加载：

        P: /devices/platform/soc@0/aa00000.video-codec/video4linux/video32
        N: video32
        L: 0
        S: v4l/by-path/platform-aa00000.video-codec-video-index0
        E: DEVPATH=/devices/platform/soc@0/aa00000.video-codec/video4linux/video32
        E: DEVNAME=/dev/video32
        E: MAJOR=81
        E: MINOR=21
        E: SUBSYSTEM=video4linux
        E: USEC_INITIALIZED=6369466
        E: ID_V4L_VERSION=2
        E: ID_V4L_PRODUCT=msm_vidc_decoder
        E: ID_V4L_CAPABILITIES=:
        E: ID_PATH=platform-aa00000.video-codec
        E: ID_PATH_TAG=platform-aa00000_video-codec
        E: ID_FOR_SEAT=video4linux-platform-aa00000_video-codec
        E: DEVLINKS=/dev/v4l/by-path/platform-aa00000.video-codec-video-index0
        E: TAGS=:uaccess:seat:
        E: CURRENT_TAGS=:uaccess:seat:
         
        P: /devices/platform/soc@0/aa00000.video-codec/video4linux/video33
        N: video33
        L: 0
        S: v4l/by-path/platform-aa00000.video-codec-video-index1
        E: DEVPATH=/devices/platform/soc@0/aa00000.video-codec/video4linux/video33
        E: DEVNAME=/dev/video33
        E: MAJOR=81
        E: MINOR=22
        E: SUBSYSTEM=video4linux
        E: USEC_INITIALIZED=6363137
        E: ID_V4L_VERSION=2
        E: ID_V4L_PRODUCT=msm_vidc_encoder
        E: ID_V4L_CAPABILITIES=:
        E: ID_PATH=platform-aa00000.video-codec
        E: ID_PATH_TAG=platform-aa00000_video-codec
        E: ID_FOR_SEAT=video4linux-platform-aa00000_video-codec
        E: DEVLINKS=/dev/v4l/by-path/platform-aa00000.video-codec-video-index1
        E: TAGS=:uaccess:seat:
        E: CURRENT_TAGS=:uaccess:seat:Copy to clipboard

Note: 要了解设备节点，检查 `DEVNAME` 标签。在前面的示例中，`/dev/video32` 用于 VPU 解码器节点，`/dev/video33` 用于 VPU 编码器节点。

## 验证解码/编码是否已分载到 VPU

您可以通过执行以下操作来确认视频解码或编码是否已成功分载到 VPU：
- 以循环形式执行以下命令：

        cat /proc/interrupts | grep "msm-vidc"Copy to clipboard
- 下面是示例输出，可帮助您验证视频解码/编码是否已分载到 VPU。验证当用例运行时，来自 `msm-vidc` 的中断计数是否在任何 CPU 上增加：

        253: 4     0      0        0        0        0        0        0     GICv3 206 Level  msm-vidcCopy to clipboard

Last Published: Aug 22, 2024

[Previous Topic
软件](https://docs.qualcomm.com/bundle/publicresource/80-70014-20Y/topics/software.md) [Next Topic
配置](https://docs.qualcomm.com/bundle/publicresource/80-70014-20Y/topics/configure.md)