Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp511446yba; Wed, 3 Apr 2019 13:15:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyk/FICC7axUYfqhVyyP5VuXqxaCEm8xwLlCcKgMftUHy7OIQ8bGXFgewidIW4DQ7jp+//D X-Received: by 2002:a65:6259:: with SMTP id q25mr1646868pgv.103.1554322551653; Wed, 03 Apr 2019 13:15:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554322551; cv=none; d=google.com; s=arc-20160816; b=qtghLfTxZOImNIJiOtPXIi811b14xUPhXvFXB/CmCOnjPRAfAvaGJSLjhAZMLPGrtq tD4DQLODyfJsB2jPNdpz1h/f3ZNEPFooWktKdN0Y3t4Ypc1nHGnuto4yP0TgyeESctoR 2MifzkkrX14zv0uFzljkV6UNIVCVcbfDGhaQV6az8kls80It/7IPCDlcBDH3Atcam9LH fVrZyzN2uu1ipfFp6izxHxWfagHmo9xYn0UKRnm+jBNn5gmHdEwQPiEUvQjdTl/Ih313 OyccCHesNGCRbVD3D/r3PlxGYdy/wMHxtHbtbIqzq+gjjGZewTFsmQLIvpG0hOAA1MZb 2N1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=xM9xtGjKRazp49snBb/x43Gj22ilnJY5YllaLuwOK2E=; b=wKKcl0VuovsX2EdxVL9dcFblrRuBFhYCj9v/LtWebeQcI/KP+zg+OjCouXt1HCb+jX ZRVec5QdC6l5uDpJY6hej5OXvsxlttlLufIi/GVcxT10ya1+lq6V5a/jpO1MDKCozvXF 2dqpJWLEKW1ufxcDvoHafXS3aNjwCNmppFbi/tFsasTnX9H5ftt+emN/euAGH/mpvCWu vFPKqJFMc9Yu1WR06tw6QlggEZJT0TzcsP58kPsk1rdaKSD9WU08NcZK6eudu3thuDeX lOGZJXTHmXGLycgp4LkMa6oTiBU00mo8KCsnMDZC4OI7iCENGWTn1bcWZ2QwkI6TKcZG 1hgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h35si15156239plb.180.2019.04.03.13.15.35; Wed, 03 Apr 2019 13:15:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbfDCUNm (ORCPT + 99 others); Wed, 3 Apr 2019 16:13:42 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52002 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbfDCUNk (ORCPT ); Wed, 3 Apr 2019 16:13:40 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id E46BC2827FC From: Sebastian Reichel To: Sebastian Reichel , Tomi Valkeinen , Tony Lindgren , Pavel Machek , Laurent Pinchart Cc: "H. Nikolaus Schaller" , dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com, Sebastian Reichel Subject: [PATCHv6 2/4] drm/omap: don't check dispc timings for DSI Date: Wed, 3 Apr 2019 22:13:24 +0200 Message-Id: <20190403201326.3127-3-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190403201326.3127-1-sebastian.reichel@collabora.com> References: <20190403195413.djfrgzuj7povdksi@earth.universe> <20190403201326.3127-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While most display types only forward their VM to the DISPC, this is not true for DSI. DSI calculates the VM for DISPC based on its own, but it's not identical. Actually the DSI VM is not even a valid DISPC VM making this check fail. Let's restore the old behaviour and avoid checking the DISPC VM for DSI here. Fixes: 7c27fa57ef31 ("drm/omap: Call dispc timings check operation directly") Acked-by: Pavel Machek Tested-by: Tony Lindgren Tested-by: Pavel Machek Signed-off-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/omap_crtc.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index 5a29bf01c0e8..86827a061b0b 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -395,10 +395,20 @@ static enum drm_mode_status omap_crtc_mode_valid(struct drm_crtc *crtc, int r; drm_display_mode_to_videomode(mode, &vm); - r = priv->dispc_ops->mgr_check_timings(priv->dispc, omap_crtc->channel, - &vm); - if (r) - return r; + + /* + * DSI might not call this, since the supplied mode is not a + * valid DISPC mode. DSI will calculate and configure the + * proper DISPC mode later. + */ + if (omap_crtc->pipe->output->next == NULL || + omap_crtc->pipe->output->next->type != OMAP_DISPLAY_TYPE_DSI) { + r = priv->dispc_ops->mgr_check_timings(priv->dispc, + omap_crtc->channel, + &vm); + if (r) + return r; + } /* Check for bandwidth limit */ if (priv->max_bandwidth) { -- 2.20.1