Commit 06d9f56f authored by Rob Clark's avatar Rob Clark Committed by Sean Paul
parent dd701ae9
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
* this program. If not, see <http://www.gnu.org/licenses/>. * this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <drm/drm_print.h>
#include "msm_drv.h" #include "msm_drv.h"
#include "mdp4_kms.h" #include "mdp4_kms.h"
...@@ -29,7 +30,16 @@ void mdp4_set_irqmask(struct mdp_kms *mdp_kms, uint32_t irqmask, ...@@ -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) 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); 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) void mdp4_irq_preinstall(struct msm_kms *kms)
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
#include <linux/irq.h> #include <linux/irq.h>
#include <drm/drm_print.h>
#include "msm_drv.h" #include "msm_drv.h"
#include "mdp5_kms.h" #include "mdp5_kms.h"
...@@ -30,7 +32,16 @@ void mdp5_set_irqmask(struct mdp_kms *mdp_kms, uint32_t irqmask, ...@@ -30,7 +32,16 @@ void mdp5_set_irqmask(struct mdp_kms *mdp_kms, uint32_t irqmask,
static void mdp5_irq_error_handler(struct mdp_irq *irq, uint32_t irqstatus) static void mdp5_irq_error_handler(struct mdp_irq *irq, uint32_t irqstatus)
{ {
struct mdp5_kms *mdp5_kms = container_of(irq, struct mdp5_kms, error_handler);
static DEFINE_RATELIMIT_STATE(rs, 5*HZ, 1);
extern bool dumpstate;
DRM_ERROR_RATELIMITED("errors: %08x\n", irqstatus); DRM_ERROR_RATELIMITED("errors: %08x\n", irqstatus);
if (dumpstate && __ratelimit(&rs)) {
struct drm_printer p = drm_info_printer(mdp5_kms->dev->dev);
drm_state_dump(mdp5_kms->dev, &p);
}
} }
void mdp5_irq_preinstall(struct msm_kms *kms) void mdp5_irq_preinstall(struct msm_kms *kms)
......
...@@ -79,6 +79,10 @@ static char *vram = "16m"; ...@@ -79,6 +79,10 @@ static char *vram = "16m";
MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)"); MODULE_PARM_DESC(vram, "Configure VRAM size (for devices without IOMMU/GPUMMU)");
module_param(vram, charp, 0); module_param(vram, charp, 0);
bool dumpstate = false;
MODULE_PARM_DESC(dumpstate, "Dump KMS state on errors");
module_param(dumpstate, bool, 0600);
/* /*
* Util/helpers: * Util/helpers:
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment