diff options
author | Rob Clark <robdclark@gmail.com> | 2016-11-05 16:08:12 +0100 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2016-11-08 22:38:03 +0100 |
commit | 06d9f56f1d9aed065c18ffb48ea51901886afba9 (patch) | |
tree | 48782de152d8628779a8a77e86de86445d3b8000 /drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c | |
parent | drm/msm/mdp5: add atomic_print_state support (diff) | |
download | linux-06d9f56f1d9aed065c18ffb48ea51901886afba9.tar.xz linux-06d9f56f1d9aed065c18ffb48ea51901886afba9.zip |
drm/msm: module param to dump state on error irq
Signed-off-by: Rob Clark <robdclark@gmail.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1478358492-30738-8-git-send-email-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c')
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c index a521207db8a1..b764d7f10312 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_irq.c @@ -15,6 +15,7 @@ * this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <drm/drm_print.h> #include "msm_drv.h" #include "mdp4_kms.h" @@ -29,7 +30,16 @@ void mdp4_set_irqmask(struct mdp_kms *mdp_kms, uint32_t irqmask, static void mdp4_irq_error_handler(struct mdp_irq *irq, uint32_t irqstatus) { + struct mdp4_kms *mdp4_kms = container_of(irq, struct mdp4_kms, error_handler); + static DEFINE_RATELIMIT_STATE(rs, 5*HZ, 1); + extern bool dumpstate; + DRM_ERROR_RATELIMITED("errors: %08x\n", irqstatus); + + if (dumpstate && __ratelimit(&rs)) { + struct drm_printer p = drm_info_printer(mdp4_kms->dev->dev); + drm_state_dump(mdp4_kms->dev, &p); + } } void mdp4_irq_preinstall(struct msm_kms *kms) |