drm: atmel-hlcdc: actually disable scaling when no scaling is required
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 27 May 2016 14:09:25 +0000 (16:09 +0200)
committerBoris Brezillon <boris.brezillon@free-electrons.com>
Tue, 21 Jun 2016 12:15:11 +0000 (14:15 +0200)
The driver is only enabling scaling, but never disabling it, thus, if you
enable the scaling feature once it stays enabled forever.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Alex Vazquez <avazquez.dev@gmail.com>
Reviewed-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Fixes: 1a396789f65a ("drm: add Atmel HLCDC Display Controller support")
Cc: <stable@vger.kernel.org>
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c

index aef3ca8a81fae37c31c84ba13eb45ff374dab83c..016c191221f35db2246a3e014b8a4f7294d22649 100644 (file)
@@ -339,6 +339,8 @@ atmel_hlcdc_plane_update_pos_and_size(struct atmel_hlcdc_plane *plane,
 
                atmel_hlcdc_layer_update_cfg(&plane->layer, 13, 0xffffffff,
                                             factor_reg);
+       } else {
+               atmel_hlcdc_layer_update_cfg(&plane->layer, 13, 0xffffffff, 0);
        }
 }