]> git.baikalelectronics.ru Git - 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)
commit0d9224e37eaf3cef02de33af777fea954aa5cc66
treecdffb8b07e8012cc3a2a76f669634041a91cfb1d
parente870ea1b812a495c94924a9f8f3bc05687937418
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