• Alexandru Gheorghe's avatar
    drm: mali-dp: Add debugfs file for reporting internal errors · 613c5c7f
    Alexandru Gheorghe authored
    Status register contains a lot of bits for reporting internal errors
    inside Mali DP. Currently, we just silently ignore all of the errors,
    that doesn't help when we are investigating different bugs, especially
    on the FPGA models which have a lot of constraints, so we could easily
    end up in AXI or underrun errors.
    
    Add a new file called debug that contains an aggregate of the
    errors reported by the Mali DP hardware.
    
    E.g:
    [root@alarm ~]# cat /sys/kernel/debug/dri/1/debug
    [DE] num_errors : 167
    [DE] last_error_status  : 0x00000001
    [DE] last_error_vblank : 385
    [SE] num_errors : 3
    [SE] last_error_status  : 0x00e23001
    [SE] last_error_vblank : 201
    
    Changes since v2:
    - Add lock to protect the errors stats.
    - Add possibility to reset the error stats by writing anything to the
      debug file.
    Signed-off-by: default avatarAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
    Acked-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
    Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
    613c5c7f
malidp_hw.c 38 KB