Skip to content
  • Alyssa Rosenzweig's avatar
    pan/mdg: Fix spills to TLS · a89bc599
    Alyssa Rosenzweig authored
    LOCAL_STORAGE.zw is workgroup local memory, whereas LOCAL_STORAGE.xy is
    thread local memory. Likewise PC_SP.zw is the stack pointer, which is
    initialized to (LOCAL_STORAGE.zw + offset) but is modifiable by the
    shader. Panfrost doesn't modify the s tack pointer, and the register
    allocation logic assumes a zero offset, so let's always spill to thread
    local memory = LOCAL_STORAGE.xy, as was intended by Italo's cleanup.
    
    This is visible on any shader that spills. Compute shaders aren't
    advertised yet, so WLS will be null, causing a fault like the following
    (reproduced on Mali T860 with the glyphy trace):
    
    [15634.148873] panfrost ff9a0000.gpu: Unhandled Page fault in AS0 at VA 0x0000000000000000
              Reason: TODO
              raw fault status: 0x70003C2
              decoded fault status: SLAVE FAULT
              exception type 0xC2: TRANSLATION_FAULT_LEVEL2
              access type 0x3: WRITE
              source id 0x700
    [15634.658170] panfrost ff9a0000.gpu: gpu sched timeout, js=0, config=0x3300, status=0x8, head=0x31d4540,
    tail=0x31d4540, sched_job=00000000e8101b2e
    
    Fixes: 6a12ea02
    
     ("pan/mdg: properly encode/decode ldst instructions")
    Signed-off-by: default avatarAlyssa Rosenzweig <alyssa@collabora.com>
    Part-of: <!10866>
    a89bc599