diff options
author | Rob Clark <robdclark@gmail.com> | 2016-11-05 09:04:31 -0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2016-11-27 11:32:35 -0500 |
commit | e8406b6132a0ca513df3c2b837fb3ec708260641 (patch) | |
tree | cd7aac87849e433708ccac1977972e3a489b1daa /drivers | |
parent | bc5289eed4817604d0fb709bd53b2e3bf1dcb73a (diff) | |
download | linux-e8406b6132a0ca513df3c2b837fb3ec708260641.tar.bz2 |
drm/msm/mdp5: dump smp state on errors too
If the dumpstate modparam is enabled, for debugging error irq's, also
dump SMP state.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c index 5c5940db898e..3ce8b9dec9c1 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_irq.c @@ -41,6 +41,8 @@ static void mdp5_irq_error_handler(struct mdp_irq *irq, uint32_t irqstatus) if (dumpstate && __ratelimit(&rs)) { struct drm_printer p = drm_info_printer(mdp5_kms->dev->dev); drm_state_dump(mdp5_kms->dev, &p); + if (mdp5_kms->smp) + mdp5_smp_dump(mdp5_kms->smp, &p); } } diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c index 4398f8dc5cec..58f712d37e7f 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_smp.c @@ -302,7 +302,8 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p) drm_printf(p, "name\tinuse\tplane\n"); drm_printf(p, "----\t-----\t-----\n"); - drm_modeset_lock(&mdp5_kms->state_lock, NULL); + if (drm_can_sleep()) + drm_modeset_lock(&mdp5_kms->state_lock, NULL); /* grab these *after* we hold the state_lock */ hwpstate = &mdp5_kms->state->hwpipe; @@ -329,7 +330,8 @@ void mdp5_smp_dump(struct mdp5_smp *smp, struct drm_printer *p) drm_printf(p, "AVAIL:\t%d\n", smp->blk_cnt - bitmap_weight(state->state, smp->blk_cnt)); - drm_modeset_unlock(&mdp5_kms->state_lock); + if (drm_can_sleep()) + drm_modeset_unlock(&mdp5_kms->state_lock); } void mdp5_smp_destroy(struct mdp5_smp *smp) |