From patchwork Wed Nov 30 11:17:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 9454055 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 2C4BD60585 for ; Wed, 30 Nov 2016 11:22:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12D972835B for ; Wed, 30 Nov 2016 11:22:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0738328365; Wed, 30 Nov 2016 11:22:32 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 1045C2835B for ; Wed, 30 Nov 2016 11:22:30 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7DD7C6E293; Wed, 30 Nov 2016 11:22:28 +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 578246E077 for ; Wed, 30 Nov 2016 11:18:27 +0000 (UTC) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id uAUBIOV9021255; Wed, 30 Nov 2016 05:18:24 -0600 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id uAUBIOb7019602; Wed, 30 Nov 2016 05:18:24 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Wed, 30 Nov 2016 05:18:24 -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 uAUBHnVG013328; Wed, 30 Nov 2016 05:18:23 -0600 From: Tomi Valkeinen To: , Laurent Pinchart Subject: [PATCH 26/36] drm/omap: fix plane update warning when crtc is disabled Date: Wed, 30 Nov 2016 13:17:28 +0200 Message-ID: <1480504658-11775-27-git-send-email-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480504658-11775-1-git-send-email-tomi.valkeinen@ti.com> References: <1480504658-11775-1-git-send-email-tomi.valkeinen@ti.com> MIME-Version: 1.0 Cc: Tomi Valkeinen 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 If omap_plane_atomic_update() is called when the crtc is disabled, and the timings are zero, we'll see the following warning: omapdss DISPC error: cannot calculate scaling settings: pclk is zero omapdrm omapdrm.0: Failed to setup plane vid2 It shouldn't cause any issues, as the crtc is disabled so the plane is not used by the HW. To remove the warning, check whether the crtc is enabled at the beginning of omap_plane_atomic_update(), and bail out if not. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_plane.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index 278d079b77da..b3e55496d180 100644 --- a/drivers/gpu/drm/omapdrm/omap_plane.c +++ b/drivers/gpu/drm/omapdrm/omap_plane.c @@ -88,6 +88,11 @@ static void omap_plane_atomic_update(struct drm_plane *plane, DBG("%s, crtc=%p fb=%p", omap_plane->name, state->crtc, state->fb); + if (!state->crtc->state->enable) { + priv->dispc_ops->ovl_enable(omap_plane->id, false); + return; + } + memset(&info, 0, sizeof(info)); info.rotation_type = OMAP_DSS_ROT_DMA; info.rotation = OMAP_DSS_ROT_0;