Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp15146yba; Mon, 1 Apr 2019 00:26:22 -0700 (PDT) X-Google-Smtp-Source: APXvYqwjXPdAUKEMxbFePYa+cogJ9Xw0Sl40e7y6/FRQZGqM0pV4EpJhUZu+fW6sbJ+cckFx4/xe X-Received: by 2002:a63:330e:: with SMTP id z14mr11475816pgz.4.1554103582859; Mon, 01 Apr 2019 00:26:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554103582; cv=none; d=google.com; s=arc-20160816; b=mZNT6C0cnC1X4HjCs4zsmTbCzhAgWBQ549HKk0SZK1u1TArewkrbsE5uYglWBED3dB zub75eCuVkD8jVTduxSRaQwjAApAguqSaIfz3dSjKss/0mNbOizrFRpW65Cy7cxhcw0M JuCCg0NxOzekbMqaqQmU9+apflMtIdLduMLNMppEctFB6ko2LnPAeJ9cgAVztNHwpA1a 25eSW4QV32hXTLLQYOGF4/NHZ7gczh+jh7KIW/tsZEqvvDnSCMehJGhGBTfXVE49BNk4 XcevV7zism0XXknL7SyDBGrjgqcm4WkJHBFjM5Cv6wiRMB2VH3I/8fKP4yNcz3sJdTZE raYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=SMn0YUW/u56VqMwXDpotZxz9N17LUaFBBHXssHl9rr4=; b=stuZqe3xfIz2yE3ozqBVV51PPJ0rOQYq10YWWpN7kqwX3aM4iNnBHAoi6eOrcnyBPs Hl+ZlffLlhlHOuBZy4DnGY8Icwt//+SIWaNp9y6smSDHWPn9984wF8S0eRQz3bt7wUI6 aJ+RDQxiTVW4beLUN1a62/r9HLeK+yH5w5x63TxgM7/C+f9cE+wVHqvb/taOtJvPLCqm JozltmVX/0lHgMg4JE9uqt1PAMi5KmCpxuTRdxID8YhpkovyaYHjRtIESnzkOuNaMDjw J1L4jHBVROGVgbSaKgXDf3k69dWecWtUiNAcpCJVT+MqTCXX498eAemB+g98acGgtxRp fZKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 31si8303644plg.364.2019.04.01.00.26.06; Mon, 01 Apr 2019 00:26:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731921AbfDAHZL (ORCPT + 99 others); Mon, 1 Apr 2019 03:25:11 -0400 Received: from mx08-00178001.pphosted.com ([91.207.212.93]:40351 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725867AbfDAHZK (ORCPT ); Mon, 1 Apr 2019 03:25:10 -0400 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x317MOWc003283; Mon, 1 Apr 2019 09:24:57 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 2rjee26eqq-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 01 Apr 2019 09:24:57 +0200 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 0BA1143; Mon, 1 Apr 2019 07:24:55 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas22.st.com [10.75.90.92]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id A8A6013A5; Mon, 1 Apr 2019 07:24:55 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas22.st.com (10.75.90.92) with Microsoft SMTP Server (TLS) id 14.3.361.1; Mon, 1 Apr 2019 09:24:55 +0200 Received: from localhost (10.201.23.97) by webmail-ga.st.com (10.75.90.48) with Microsoft SMTP Server (TLS) id 14.3.435.0; Mon, 1 Apr 2019 09:24:54 +0200 From: =?UTF-8?q?Yannick=20Fertr=C3=A9?= To: Yannick Fertre , Philippe Cornu , Vincent Abriou , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] drm/stm: ltdc: update planes at next vblank to avoid partial refresh Date: Mon, 1 Apr 2019 09:24:17 +0200 Message-ID: <1554103457-29595-1-git-send-email-yannick.fertre@st.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.201.23.97] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-01_04:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Plane updates must be synchronized on vblank with the shadow register mechanism to avoid partial refresh on screen. Signed-off-by: Yannick Fertré --- drivers/gpu/drm/stm/ltdc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index b1741a9..c2d0800 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -426,8 +426,8 @@ static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc, /* Enable IRQ */ reg_set(ldev->regs, LTDC_IER, IER_RRIE | IER_FUIE | IER_TERRIE); - /* Immediately commit the planes */ - reg_set(ldev->regs, LTDC_SRCR, SRCR_IMR); + /* Commit shadow registers = update planes at next vblank */ + reg_set(ldev->regs, LTDC_SRCR, SRCR_VBR); /* Enable LTDC */ reg_set(ldev->regs, LTDC_GCR, GCR_LTDCEN); -- 2.7.4