Skip to content

Decode and Encode Debug Tool and surface dump

Sherry Lin edited this page May 8, 2023 · 4 revisions

Overview

There are some tools could help us to collect driver and hardware information to debug issues, like Codechal dump as below.

Driver version

It's required to use Media driver release-internal or debug version for Codechal dump. Release version driver can not support this debug tool for performance and efficiency.

How to dump Codechal Dump?

  1. Firstly create a codechal dump file folder as below. Please make sure this folder is writable. The logs will be dumped into this file folder.

    $mkdir -p /data/codechal_dump
    
  2. Put CodecDbgSetting.cfg under /data/codechal_dump. The content of CodecDbgSetting.cfg can be set like below:

    @mode ALL
    @Frame ALL
    
    # DDI input dump
    PicParams:1
    SlcParams:1
    SegmentParams:1
    
    # surface dump
    ReferenceSurfaces:1
    EncodeRawInputSurface:1
    ReconstructedSurface:1
    
    # settings
    DumpBufferInBinary:1
    DumpToThreadFolder:1
    DumpCmdBufInBinary:0
    
  3. Run test cases, then collect data under /data/codechal_dump.

How to dump driver log?

  1. Firstly create a dump file folder. Please make sure this folder is writable. The logs will be dumped into this file folder. You can create this folder anywhere you want.

    $mkdir -p /data/driver_dump
    
  2. Set registry keys. For platforms befor DG2, please set below registry key in /etc/igfx_user_feature.txt.

    [KEY]
        0x00000001
        UFKEY_INTERNAL\LibVa
            [VALUE]
                Mos Message Tags
                4
                7
            [VALUE]
                Mos Tags By Sub Component
                4
                0
            [VALUE]
                Mhw Message Tags
                4
                7
            [VALUE]
                Mhw Tags By Sub Component
                4
                0
            [VALUE]
                Codec Message Tags
                4
                7
            [VALUE]
                Codec Tags By Sub Component
                4
                0
            [VALUE]
                DDI Message Tags
                4
                7
            [VALUE]
                DDI Tags By Sub Component
                4
                0
            [VALUE]
                Message Print Enabled
                4
                0
            [VALUE]
                Message HLT Enabled
                4
                1
            [VALUE]
                Message HLT Output Directory
                1
                /data/driver_dump
    

    For platforms after DG2(including DG2), please set below registry key in /etc/igfx_user_feature_next.txt.

    [config]
    CM Message Tags=7
    CP Message Tags=7
    Codec Message Tags=7
    DDI Message Tags=7
    Message HLT Enabled=1
    Message HLT Output Directory=/data/driver_dump
    Message Print Enabled=1
    Mhw Message Tags=7
    Mos Message Tags=7
    VP Message Tags=7
    [report]
    
  3. Run test cases, then collect data under your folder.

Clone this wiki locally