From patchwork Wed Feb 28 11:26:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 129962 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp909246lja; Wed, 28 Feb 2018 03:28:30 -0800 (PST) X-Google-Smtp-Source: AG47ELu3ibfFCfrXGMNit50ClEO3ELDXLTJbEVEMHtlMhyoYnivGcEEN+ZOq5fjh3Nwd76mddN6S X-Received: by 2002:a17:902:b416:: with SMTP id x22-v6mr5404524plr.279.1519817310696; Wed, 28 Feb 2018 03:28:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519817310; cv=none; d=google.com; s=arc-20160816; b=hJ+iloFGl1c82a/Ze8jz6xmZvbAS3Vpep3xKNnAr8ra+UnIUwS0CXyycO7+3NHtJdi 7wpbO5iFGhlVYGACnFs4HHnUNIAzTN80z4NY7jsXGw9Q0pV7lDaY+IrltgRPD/ARcmZK u2wg8TWIyibxWJIcblz0kCADt7Rjbzr0V8sPamN3i7Wf6w5vQNxGUIs7XPrSs15n0Xj2 67gsAs042K9EoUzPhXn2vdaXrIEQTlJ9TsOzQhusZeJcvUp2vfvjGrmPxHO7hXmXrMvA 09VUP/OaLeZpjijQq5tdUgnecwp/qWMintdbqV0ooXupuNJbo/LGcVTTcTRwNMGYiCbs TVTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:references:in-reply-to:message-id:date :subject:to:from:dkim-signature:delivered-to :arc-authentication-results; bh=QL/1WuhL7BGELRP0lzjfrJK72qm79rBK59qTJxvFbQg=; b=fAJO/HZDMWcbb7eC55Jp9OpcNyU+k+/4YJ+Bj50soMWqU4TXjzNBGBPTk3IrHeYbiR sW/yvHHFgErEn1rOtRRQ0K6eyCCbQuB6iru705DrTVosvSxDz3EW06NVWwVVYIakzWHc jUpogL4Ub+sgs0lgL2hpSIWZ1RwuH5vafF9BaX+B2UoRfQjCzpAhMI40NxRJU/3XqBGR EbanEDFFA3HmxWajN9X4RgOlx1G0tGrIu02RqwM4oCbfXsVWHUND5o+g741tOBrI7eqZ 5Iod+2WN6sjR7lu1edaj0xTIkrL4M2kDshYXC3/wr5fHuabg0ojbqbin4EYlxDaSPsU2 EZXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=wHM/Ax4N; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id 2-v6si1163484plc.205.2018.02.28.03.28.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 03:28:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=wHM/Ax4N; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C14056E960; Wed, 28 Feb 2018 11:27:35 +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 321996E95B for ; Wed, 28 Feb 2018 11:27:34 +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 w1SBRVNg008395; Wed, 28 Feb 2018 05:27:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519817251; bh=HmfYTLzcsrx6qgcYNmy04+XOWBV+xi/owlwv3z+Hei0=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=wHM/Ax4NlI3ZxZ5mClZrYgqMY9M0mIlaPCxA+RKnX6FPgGX0hj9HBBmYiwTczlG/O ifh6rcVCMAIqm7D0VMJcxr1mws57cVYXBhVQ18pQfmEWzUetxssF12vQsTuSL+k4tf S8oCaGiVFBs/ldx92dCLRY7RAhsi4pTnA9I2aD80= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SBRVPx031508; Wed, 28 Feb 2018 05:27:31 -0600 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Wed, 28 Feb 2018 05:27:31 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Wed, 28 Feb 2018 05:27:31 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SBRAfT024563; Wed, 28 Feb 2018 05:27:30 -0600 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 10/17] drm/omap: fix WBDELAYCOUNT for HDMI Date: Wed, 28 Feb 2018 13:26:07 +0200 Message-ID: <1519817174-20714-11-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519817174-20714-1-git-send-email-tomi.valkeinen@ti.com> References: <1519817174-20714-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Ujfalusi , Tomi Valkeinen , Jyri Sarha Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" For HDMI, WBDELAYCOUNT starts counting at the start of vsync, not at the start of vfp. This patch adjusts the wbdelay for HDMI accordingly. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index ccfafce1ea89..7398039954a5 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2816,8 +2816,12 @@ int dispc_wb_setup(struct dispc_device *dispc, } else { int wbdelay; - wbdelay = min(vm->vfront_porch + - vm->vsync_len + vm->vback_porch, (u32)255); + if (channel_in == DSS_WB_TV_MGR) + wbdelay = min(vm->vsync_len + vm->vback_porch, + (u32)255); + else + wbdelay = min(vm->vfront_porch + + vm->vsync_len + vm->vback_porch, (u32)255); /* WBDELAYCOUNT */ REG_FLD_MOD(dispc, DISPC_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);