diff options
author | Jon Medhurst <tixy@linaro.org> | 2015-09-08 19:08:43 +0100 |
---|---|---|
committer | Jon Medhurst <tixy@linaro.org> | 2015-11-02 09:40:57 +0000 |
commit | 02115102558f5e79a6b1887cbe5666a3ba5b5045 (patch) | |
tree | 989844e0ce39d575e589fbae992a5971fe128331 /drivers/gpu/drm | |
parent | 1bc1f790eb34b42c494a1e5b105f77c440d3cd28 (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>
Diffstat (limited to 'drivers/gpu/drm')
-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 9eaf184d3b5b..22bf366d6e38 100644 --- a/drivers/gpu/drm/arm/hdlcd_drv.c +++ b/drivers/gpu/drm/arm/hdlcd_drv.c @@ -117,6 +117,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) { |