]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm: mali-dp: Clear CVAL when leaving config mode
authorBrian Starkey <brian.starkey@arm.com>
Tue, 8 Nov 2016 11:36:14 +0000 (11:36 +0000)
committerLiviu Dudau <Liviu.Dudau@arm.com>
Tue, 8 Nov 2016 11:40:02 +0000 (11:40 +0000)
It's possible for CVAL to get set whilst we are in config mode. If this
happens, afer we leave config mode the HW will latch whatever
configuration is in the registers at the next vsync. Most likely this
will be a partial configuration, as we'll be racing against the ongoing
atomic_commit.

To avoid this, clear CVAL before leaving config mode.

Signed-off-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
drivers/gpu/drm/arm/malidp_hw.c

index 18c476605c0c82f56cde4791351167f0cc4ea10b..4bdf531f78440fa8f124017dd4517c1aaf488333 100644 (file)
@@ -125,6 +125,7 @@ static void malidp500_leave_config_mode(struct malidp_hw_device *hwdev)
 {
        u32 status, count = 100;
 
+       malidp_hw_clearbits(hwdev, MALIDP_CFG_VALID, MALIDP500_CONFIG_VALID);
        malidp_hw_clearbits(hwdev, MALIDP500_DC_CONFIG_REQ, MALIDP500_DC_CONTROL);
        while (count) {
                status = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_REG_STATUS);
@@ -266,6 +267,7 @@ static void malidp550_leave_config_mode(struct malidp_hw_device *hwdev)
 {
        u32 status, count = 100;
 
+       malidp_hw_clearbits(hwdev, MALIDP_CFG_VALID, MALIDP550_CONFIG_VALID);
        malidp_hw_clearbits(hwdev, MALIDP550_DC_CONFIG_REQ, MALIDP550_DC_CONTROL);
        while (count) {
                status = malidp_hw_read(hwdev, hwdev->map.dc_base + MALIDP_REG_STATUS);