From patchwork Mon Feb 12 09:44:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 127977 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3041361ljc; Mon, 12 Feb 2018 01:47:26 -0800 (PST) X-Google-Smtp-Source: AH8x227Ot71RW5Kf8Hp1FIUKWvOB9M6O3Haa2J9uokjFUD1DZ7PeGpoPbAATfo7+0yng+Lh0gViT X-Received: by 10.98.55.66 with SMTP id e63mr11325820pfa.102.1518428846257; Mon, 12 Feb 2018 01:47:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518428846; cv=none; d=google.com; s=arc-20160816; b=ADTRaC/L5K2vvVpagS5/jIFxGof8fAzyf9YLKKkPwuhiXADeQ1KDlqBJtU+zfo7/+d SE5o/AfcY2uxpESPZYnIuXUB6o/ENYE2eNxyP7te1s61nO+AdwYznlW+jVzlKy/jcQqt XluTpszjJIKsl9cLokQbBcuAxnUr/Rz0wD11+CzZFzZnqpgBw6xJY7QhKYqW14Fh3cxm qKIvuAcQ3jWZOCMMdiAPltGIc5trJj1DYIFgLCSvmfoQPFsEOhnnykPCXBc6tMhn/H+P 2KypwUHgnXJQmp7zdF3sGVAmZ6oUnh2L4AZlDorHrQk0U0o7zwkbwKMtaSAtOdon/8AV MDwA== 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=qcl8YJHruGHJKG7wLZr3GlcfWnXfJROaDRNtnei/jHs=; b=dLA5ri5k0gnhbEaKNRxbzUIDvkFFmn4B77N/IZ2vDyEfdlTh86pnBOR2oaa9FQ1K4y IDtEijmtM80T4Q6Wy+FLXFf/83rUhZniK1dl3jBZUxv5NUd8W+Yru1IJoqtnMijSevrU b+JCmxjDhUQ+z4FXb3P/mCxfhXb7L18wdK3C/LbYSddasCoMv/9Zk+J+csgZ8ZdRJyYc tADwtqSYRY2T4SyzoGsr2ZrxrFz2KzdOfO39PBclcbqnkfON6OK4sHKNkxsdoYBgzMTq GbmSQtBx4PxtBq6gJOFa/hWwgRYjrHq+P5FNiwEMkAvCxzT+AfezYHDrO5MlqW0FLCE6 pzkQ== 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=yjEY/5Wp; 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 v85si3828509pfk.237.2018.02.12.01.47.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 01:47:26 -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=yjEY/5Wp; 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 283796E14B; Mon, 12 Feb 2018 09:45:48 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from lelnx194.ext.ti.com (lelnx194.ext.ti.com [198.47.27.80]) by gabe.freedesktop.org (Postfix) with ESMTPS id 186356E0EA for ; Mon, 12 Feb 2018 09:45:40 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx194.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1C9jbqI007876; Mon, 12 Feb 2018 03:45:37 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518428737; bh=PB0h0cUg1oqmi5P5GC2aEbibXnXUpoIHnk6aGgkx7/c=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=yjEY/5Wpz8vcq5+pjnWs7mNkfqxhXtK7SHg7212CMtCV8aBwHR/kwJM5DqujwAGKB g8yGJx1sRuaDTt4bzfJyzFSrzr4ogV80FicKzWsz9p5BIpUYiM+hZR9rFOzEsiMRz6 C4HpmJrBxbOg1L/FlKgZXus6Cwcwl3RlA/IWW0aQ= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9jbNt019460; Mon, 12 Feb 2018 03:45:37 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 12 Feb 2018 03:45:34 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 12 Feb 2018 03:45:34 -0600 Received: from deskari.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9j0NE003439; Mon, 12 Feb 2018 03:45:32 -0600 From: Tomi Valkeinen To: , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCH 17/24] drm/omap: fix WBDELAYCOUNT for HDMI Date: Mon, 12 Feb 2018 11:44:47 +0200 Message-ID: <1518428694-18018-18-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1518428694-18018-1-git-send-email-tomi.valkeinen@ti.com> References: <1518428694-18018-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: Tomi Valkeinen 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 7f9186894bd5..669ee9df224b 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2712,8 +2712,12 @@ int dispc_wb_setup(const struct omap_dss_writeback_info *wi, } 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_OVL_ATTRIBUTES2(plane), wbdelay, 7, 0);