From patchwork Wed Feb 28 11:26:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 129958 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp909115lja; Wed, 28 Feb 2018 03:28:21 -0800 (PST) X-Google-Smtp-Source: AH8x225SiPQS1QydUOpH46KFBFvnjWYaHe9d7apiRRC4VHbC4n/8EKszwk/zubKKSF+Y2F2GSph8 X-Received: by 10.99.179.77 with SMTP id x13mr14076589pgt.148.1519817301070; Wed, 28 Feb 2018 03:28:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519817301; cv=none; d=google.com; s=arc-20160816; b=hPfigSZWww//0sZg72F4saiCGlOjW/NR8riiIcTsD6cbfgD6kvBROB7vVLg9Tukjr9 IVyKIQGiXuT6g1V0VdRH0xGGYVh3Hhr0FRAqcjOpGfRUIrqPxQLPdNGKz64pLfOuMgUP T0qiq4CzTXLtkw1BGdx5Rf9JS0uJw/2lowbA1lzdphcXEnQVOuZ653qdBG6OWoH/pPkS 65Clo1JrMVEfiAoNnPPVQqM7GUoPvpxw/e5gZmKSy7NWBhiaXMi+1bf9hvmXqbiOyFCR Ith0ExyvNZRbd4C5rOZ0ZD3XPgWDVb2HpZbRPfpncJ5LDiMiF+3n8QbCOYEYG7g/IaEI LZIQ== 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=12YLMq0R+QxBArZPwFWjOX5M8SlY8LPhKykbmwOBanQ=; b=qeSICVc0KM052F251lGetHPpoALzeHsoHCClYAeDIL9sYoQxd4YHTBqzQFPquas3/e z12pLbLLlV03NyYwO/dJP0pDEN89/Aw2XvvZLF1HJttI3ksKC8y8aAwq9YyhFOC/Xu0W e1HpI6SnzDbTfHEw3C2SnYaud1PaCVN6DGM0MbNpPSXOTtMm/5S3TTRniO3lFlHkAmpq tF8pMtn3LRHX3T5neGgO7QJ0xZS5oNm4we5Y2g4gVUZ8HE1GFZYpTkyyAH8OsSkFm+YR 2KJTK8+sUOpaQV/bCj5ZHO454lnmkwPKly1ir4BG+FGCHoCqGecfPVMi4wujSKIl31ca qNKg== 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=jhrqyVXI; 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 i4-v6si1152600plk.771.2018.02.28.03.28.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 28 Feb 2018 03:28:21 -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=jhrqyVXI; 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 5AE7D6E95C; Wed, 28 Feb 2018 11:27:34 +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 8AA8E6E958 for ; Wed, 28 Feb 2018 11:27:30 +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 w1SBRStE008373; Wed, 28 Feb 2018 05:27:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1519817248; bh=5PPcMp5sE8vXit39QkFgBEd4RhvO8OSO8wEK6L6VMZs=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jhrqyVXIvpxb21Vqx6/jrWCDTBy8YTlHPhUhWgPZP+QUpMV8XhbSlltSpbVzGkE2g o7b7KDgfLZxii6XCFfHKu5jdPlJou5tOXLphSyf7l8Gqv8MliNSSF804M/cnrHLCtl CVgiLj8nMDzshNsVUtC7eMu8/8LOtdkjiIFuVZsg= Received: from DFLE112.ent.ti.com (dfle112.ent.ti.com [10.64.6.33]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1SBRSeM031475; Wed, 28 Feb 2018 05:27:28 -0600 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE112.ent.ti.com (10.64.6.33) 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:27 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE113.ent.ti.com (10.64.6.34) 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:27 -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 w1SBRAfR024563; Wed, 28 Feb 2018 05:27:26 -0600 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCHv2 08/17] drm/omap: Add pclk setting case when channel is DSS_WB Date: Wed, 28 Feb 2018 13:26:05 +0200 Message-ID: <1519817174-20714-9-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" From: Benoit Parrot In dispc_set_ovl_common() we need to initialize pclk to a valid value when we use WB in capture mode (i.e. mem_2_mem is false). Otherwise dispc_ovl_calc_scaling() fails. Signed-off-by: Benoit Parrot Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index f0f729fc4ca2..3ad56b30c90a 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2590,6 +2590,10 @@ static int dispc_ovl_setup_common(struct dispc_device *dispc, unsigned long pclk = dispc_plane_pclk_rate(dispc, plane); unsigned long lclk = dispc_plane_lclk_rate(dispc, plane); + /* when setting up WB, dispc_plane_pclk_rate() returns 0 */ + if (plane == OMAP_DSS_WB) + pclk = vm->pixelclock; + if (paddr == 0 && rotation_type != OMAP_DSS_ROT_TILER) return -EINVAL;