Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2156049yba; Wed, 3 Apr 2019 02:26:43 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqbRNTEkvOQYceyuXC1Ehsnlo1R0+2q0jeiBLxcUDX1LliXwKlLF7Y0JxVm8VQ6dFtPjfV X-Received: by 2002:aa7:8d17:: with SMTP id j23mr4540624pfe.62.1554283603378; Wed, 03 Apr 2019 02:26:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554283603; cv=none; d=google.com; s=arc-20160816; b=MDu8d5o8y4c/hIMkSvE/NkHUp1kYLL27TEoU+jVDiqMrs5DYqOjbelrWGGayLR2bNz nh6p7LBsBbZb3WgM326zrogc9j+hMwcDs2IQxjBjqMOsywg590GZ5anvLQ6EDo3Ns63W hAk+1foBvYfZf9w27EPMUksfpZro8MczvclYMkM95Oznqfk03x5pURFTjkKb0p9vILni SdeitOyfPHx3nX+MX3TlOIzzj+W1lPYufEoiNxJ8hnOazG2AEmKEXlZFQ9ur+3orBgD1 V6GESg1P7KZKInr4LW/3ndcdaTNCX0O5F1p4RiZDEPYcWZ583V1daGYfPf51E78tkg21 UQmw== 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=MYSsevqjQLyWfrb42edWKgbfrG0UXTXJR5go7zC1a4U=; b=yDXILxsbELGB/A9LgtMrP2CMoxM+lekj7vE8H80bBhcwYC59NzWUm+NPS4hIhlKMy6 5nKddi75TyUx1ww6mNkGcDvAIn93qU9K+9o9jSxGNtbhj7H+DQPPaLJ2YEGfI0srnTpG hAjZXYJyh65i+UhmuA1dIp/cOc54JkcjlBL4CZv5JMBqf7lD3kN6UXYXlOTmffwAOpF5 QqdXxumcRUiQkh65n1qrc0QknPOCwlpSVR8ofDwxAL4SHRx2lQH92W7iGrWCK0WMe5k0 s6nJSiEvr/OA7ZFo2m67c/0YkPPRU9czkmwzW/xMKAZif4QB6qUGY6HAwwT8v2LDVYOA rFrw== 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 n11si13205325pgq.131.2019.04.03.02.26.28; Wed, 03 Apr 2019 02:26:43 -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 S1726425AbfDCJYa (ORCPT + 99 others); Wed, 3 Apr 2019 05:24:30 -0400 Received: from mx07-00178001.pphosted.com ([62.209.51.94]:22852 "EHLO mx07-00178001.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725954AbfDCJYa (ORCPT ); Wed, 3 Apr 2019 05:24:30 -0400 Received: from pps.filterd (m0046668.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x339L3vM025652; Wed, 3 Apr 2019 11:24:19 +0200 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 2rmgmx2wjn-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 03 Apr 2019 11:24:19 +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 12A0434; Wed, 3 Apr 2019 09:24:19 +0000 (GMT) Received: from Webmail-eu.st.com (Safex1hubcas24.st.com [10.75.90.94]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id E4BB71AE1; Wed, 3 Apr 2019 09:24:18 +0000 (GMT) Received: from SAFEX1HUBCAS23.st.com (10.75.90.47) by Safex1hubcas24.st.com (10.75.90.94) with Microsoft SMTP Server (TLS) id 14.3.435.0; Wed, 3 Apr 2019 11:24:19 +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; Wed, 3 Apr 2019 11:24:18 +0200 From: =?UTF-8?q?Yannick=20Fertr=C3=A9?= To: Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Vincent Abriou , David Airlie , Daniel Vetter , Maxime Coquelin , Alexandre Torgue , , , , Subject: [PATCH] drm/stm: ltdc: reset controller to avoid partial refresh Date: Wed, 3 Apr 2019 11:24:13 +0200 Message-ID: <1554283453-2879-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-03_05:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Display controller reset must be done as soon as possible after enable the clock to avoid partial refresh on screen. Signed-off-by: Yannick Fertré --- drivers/gpu/drm/stm/ltdc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c index 32fd6a3..7bbe61c 100644 --- a/drivers/gpu/drm/stm/ltdc.c +++ b/drivers/gpu/drm/stm/ltdc.c @@ -1134,6 +1134,12 @@ int ltdc_load(struct drm_device *ddev) return -ENODEV; } + if (!IS_ERR(rstc)) { + reset_control_assert(rstc); + usleep_range(10, 20); + reset_control_deassert(rstc); + } + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); ldev->regs = devm_ioremap_resource(dev, res); if (IS_ERR(ldev->regs)) { @@ -1156,12 +1162,6 @@ int ltdc_load(struct drm_device *ddev) } } - if (!IS_ERR(rstc)) { - reset_control_assert(rstc); - usleep_range(10, 20); - reset_control_deassert(rstc); - } - /* Disable interrupts */ reg_clear(ldev->regs, LTDC_IER, IER_LIE | IER_RRIE | IER_FUIE | IER_TERRIE); -- 2.7.4