From patchwork Tue Jun 13 09:02:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 9783379 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9669160325 for ; Tue, 13 Jun 2017 09:02:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BE55274D1 for ; Tue, 13 Jun 2017 09:02:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 80DA827F92; Tue, 13 Jun 2017 09:02:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E6AAA274D1 for ; Tue, 13 Jun 2017 09:02:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C8F8B6E26C; Tue, 13 Jun 2017 09:02:47 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx193.ext.ti.com (lelnx193.ext.ti.com [198.47.27.77]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1B116E26C for ; Tue, 13 Jun 2017 09:02:46 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id v5D92IHd032320; Tue, 13 Jun 2017 04:02:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1497344538; bh=mYfCLWSC/Fvcu+ZYPiYWQLy2t83e5efCi1iaOhkoaiI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=VLuGu71Jo993l3Dv6RoF+GN4qtFdarASbjByQC6DEtWeoePEYhiV6i2llzHTEXufL 0SW+U9W3TNj1FuVWqaWfELOCLCiQuxhL5Ic8IbKnWPDaX7CecxCFfOd7oTsJb4gp5N ICV7jkpCezRZrH+p1F7tyPPLQBv7IcKk53+I24nY= Received: from DLEE70.ent.ti.com (dlemailx.itg.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5D92ImQ025294; Tue, 13 Jun 2017 04:02:18 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.294.0; Tue, 13 Jun 2017 04:02:17 -0500 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v5D92DWT030855; Tue, 13 Jun 2017 04:02:16 -0500 From: Tomi Valkeinen To: , Laurent Pinchart , "H . Nikolaus Schaller" , Aaro Koskinen , Tony Lindgren Subject: [PATCH 1/3] drm/omap: work-around for omap3 display enable Date: Tue, 13 Jun 2017 12:02:08 +0300 Message-ID: <1497344530-19940-2-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497344530-19940-1-git-send-email-tomi.valkeinen@ti.com> References: <1497344530-19940-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Cc: Tomi Valkeinen , Jyri Sarha X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Seems that on omap3 enabling a crtc without any planes causes a sync lost flood. This only happens on the first enable, and after that it works. This looks like an HW issue. It's unclear why this is happening or how to fix it, but as a quick work-around, this patch enables i734 errata work-around for omap2 and omap3 too. The errata work-around enables and disables the LCD output with a plane once when waking up the DSS IP, and it seems to resolve the omap3 problem too. It is unclear if omap2 has the same issue, but it probably has and the WA should have no side effects so it should be safe to enable on omap2 too. Signed-off-by: Tomi Valkeinen Tested-by: Aaro Koskinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 5ac0145fbae6..75e89707a70a 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -4004,6 +4004,11 @@ static const struct dispc_features omap24xx_dispc_feats = { .no_framedone_tv = true, .set_max_preload = false, .last_pixel_inc_missing = true, + /* + * HACK: see comment in omap34xx_rev1_0_dispc_feats. OMAP2 probably + * has the same issue. + */ + .has_gamma_i734_bug = true, }; static const struct dispc_features omap34xx_rev1_0_dispc_feats = { @@ -4025,6 +4030,13 @@ static const struct dispc_features omap34xx_rev1_0_dispc_feats = { .no_framedone_tv = true, .set_max_preload = false, .last_pixel_inc_missing = true, + /* + * HACK: OMAP3 doesn't have i734, but enabling the lcd output without + * planes causes synclost flood. This only happens on initial enable, + * not after that. + * Piggyback on i734 flag until we understand this better. + */ + .has_gamma_i734_bug = true, }; static const struct dispc_features omap34xx_rev3_0_dispc_feats = { @@ -4046,6 +4058,8 @@ static const struct dispc_features omap34xx_rev3_0_dispc_feats = { .no_framedone_tv = true, .set_max_preload = false, .last_pixel_inc_missing = true, + /* HACK: see comment in omap34xx_rev1_0_dispc_feats */ + .has_gamma_i734_bug = true, }; static const struct dispc_features omap44xx_dispc_feats = {