diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-09-08 19:08:43 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-09-08 19:11:38 +0100 |
commit | 98d7f6cf13fc8fedb644dd978c6ba27e1fcc73ca (patch) | |
tree | 68a339e0c3c592eb3a80304ff5a119895040f881 | |
parent | 71af65daad0f0c19e6a221ff43bb8369894f5312 (diff) |
drm: hdlcd: Make sure hardware is in a safe reset state at startup
If hardware is already initialised (e.g. by UEFI) then that seems to
cause us problems.
Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r-- | drivers/gpu/drm/arm/hdlcd_drv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/arm/hdlcd_drv.c b/drivers/gpu/drm/arm/hdlcd_drv.c index 54fb313816b6..140eb3f234cf 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -115,6 +115,12 @@ static int hdlcd_load(struct drm_device *dev, unsigned long flags) (version & HDLCD_VERSION_MAJOR_MASK) >> 8, version & HDLCD_VERSION_MINOR_MASK); + /* Make sure hardware is in a safe reset state */ + hdlcd_write(hdlcd, HDLCD_REG_COMMAND, 0); + hdlcd_write(hdlcd, HDLCD_REG_INT_MASK, 0); + hdlcd_write(hdlcd, HDLCD_REG_INT_CLEAR,~0); + hdlcd_write(hdlcd, HDLCD_REG_INT_RAWSTAT, 0); + /* Get the optional coherent memory resource */ res = platform_get_resource(pdev, IORESOURCE_MEM, 1); if (res) { |