]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
drm: mali-dp: Add debugfs file for reporting internal errors
authorAlexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Tue, 15 May 2018 10:18:50 +0000 (11:18 +0100)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Thu, 5 Jul 2018 14:19:05 +0000 (15:19 +0100)
commit613c5c7fc8152866a798c52a5944e4b437b526f5
treecdffb8b07e8012cc3a2a76f669634041a91cfb1d
parent0735cfdf0af4d4ffc3743fb75b9ad929dfd37206
drm: mali-dp: Add debugfs file for reporting internal errors

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: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Acked-by: Liviu Dudau <liviu.dudau@arm.com>
Signed-off-by: Liviu Dudau <liviu.dudau@arm.com>
drivers/gpu/drm/arm/malidp_drv.c
drivers/gpu/drm/arm/malidp_drv.h
drivers/gpu/drm/arm/malidp_hw.c
drivers/gpu/drm/arm/malidp_hw.h
drivers/gpu/drm/arm/malidp_regs.h