From patchwork Mon Feb 12 09:44:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 127972 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp3040949ljc; Mon, 12 Feb 2018 01:46:54 -0800 (PST) X-Google-Smtp-Source: AH8x227CrA4oGTSOanFJu9/I1t8gDLV8VZyjm3JfBuVhTaUgRTovOntzGIZDp0xbi2QJm5iYvzw4 X-Received: by 2002:a17:902:5793:: with SMTP id l19-v6mr9797340pli.56.1518428814817; Mon, 12 Feb 2018 01:46:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518428814; cv=none; d=google.com; s=arc-20160816; b=pSehMCkMgLG/G+tPVMvQl63z7W1wYSpCbiNu+1YwacFTRxn12vM2gWE5cylcX74QDh Uq5aTr/J6vgDrJbeuohDb3EZuZKw4oEGlj2suiv8c2B7h6S/5BYOd8NQnFTfchG6wLi4 DLOIgfpsyGbgKK6zhgwrUcQXAsygGjxYG+fsEHXyMVnaxOufVtqQFBMVCwH/psO+rxfj qSCWL+4OMcawpxovoOdI3/WLewFKz93vQrAQYMvSlk2nXsOUTY0MxzXZE1JoPUkdwPth AFuGBV3dK0mlnuozlfQyz/K600wM4ueOywD6muOE+XNU4hj7KGJo2sHlVS5Wdo4ozsbj G3jQ== 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=A3JNKvpSzBZa1iJyPNrwoZZ8KT0Bsr1GDxSduG81Xyw=; b=fO0TwaxmWC7hnwLmGrxrp5fYQCt81ifDCxxra1KBRXVuIMq9WB4GqAM+G5KVFc9fij gCqbCRXGYHdRz/6Fo2dqZOR35NyTrPQGVhT+GmvWHfpA171Prupsz+J2uHg0xlmSjWlN ukZxvANalG6EyahY9qZWWB6qnGWVysq9yHP46GelCr4eyqTJ0a1qvau8SVYeVrPoKwy+ VlUnCBQ4pAF4gjU9qIXWrqWRmBHq2xPbc7XPDgqN7I5GvLuoHdakkhgf29TEEZHEB/pn QXEBt+tDYYWM5aaqWV85eRvSGx/5G2hZY8HRMFZFYy1+xSn5KIGyhfrVIfJR+D0PfsLY BhvA== 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=v+z1a7Ug; 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 v11si2071066pgr.172.2018.02.12.01.46.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Feb 2018 01:46:54 -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=v+z1a7Ug; 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 857E06E1DB; Mon, 12 Feb 2018 09:45:34 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from fllnx209.ext.ti.com (fllnx209.ext.ti.com [198.47.19.16]) by gabe.freedesktop.org (Postfix) with ESMTPS id E3C566E1CD for ; Mon, 12 Feb 2018 09:45:32 +0000 (UTC) Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w1C9jUJo018989; Mon, 12 Feb 2018 03:45:30 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1518428730; bh=4hllIcgJd93IoXhcJ69Y70nbcN/Un4F9ZcuRCzbpqXo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=v+z1a7Ugn/VEVOsz4GV5U1yu0fXivqAk6y/4oYjxrZHSOyve3+TBeK3FPLc6IcWz9 v8xtjeGk9ZiHYtPLBslEPnCleSBQxCzJAw6wGkBNya9j+oBdlFbld9M1CXawTrp5JK FGtcO7dlUhYxy2P5VNVjNxHOjyA4LLBNqirM8sZI= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w1C9jUs8019057; Mon, 12 Feb 2018 03:45:30 -0600 Received: from DFLE109.ent.ti.com (10.64.6.30) by DFLE100.ent.ti.com (10.64.6.21) 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:30 -0600 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE109.ent.ti.com (10.64.6.30) 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:30 -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 w1C9j0NC003439; Mon, 12 Feb 2018 03:45:28 -0600 From: Tomi Valkeinen To: , Laurent Pinchart , Peter Ujfalusi , Jyri Sarha , Benoit Parrot Subject: [PATCH 15/24] drm/omap: Add pclk setting case when channel is DSS_WB Date: Mon, 12 Feb 2018 11:44:45 +0200 Message-ID: <1518428694-18018-16-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" 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 30bcee6580f5..5e7bdff2821d 100644 --- a/drivers/gpu/drm/omapdrm/dss/dispc.c +++ b/drivers/gpu/drm/omapdrm/dss/dispc.c @@ -2488,6 +2488,10 @@ static int dispc_ovl_setup_common(enum omap_plane_id plane, unsigned long pclk = dispc_plane_pclk_rate(plane); unsigned long lclk = dispc_plane_lclk_rate(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;