Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2208892ybm; Thu, 23 May 2019 13:09:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc5qDjonLrOauBxIM2uIOFzKr5hJEjjnIXojttvW17SFp7yE3wmw83skT09ZIBDH/T8ZEC X-Received: by 2002:a17:90a:aa88:: with SMTP id l8mr3903623pjq.65.1558642177684; Thu, 23 May 2019 13:09:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558642177; cv=none; d=google.com; s=arc-20160816; b=r0Zoh14xiQL2EaZNUiUsAcbV2uHu+i8KdjNeuyaZpUOKkgcYcjL/1jWHeOiUFQXEdQ 28nFEyNV1Jw15HBTgtMNKEKRMm+93m3rdb5Qm6Q3zgVC7hNTgz97DR4/S9DRQ2LKPop6 3vtcGMDPVaTsFbsTP4zOdGbfwJllHvrIHFEXnHLxHDw2gf9IHQ5IKvzgrvKXVguISuUx EKsoF0Vl1ki4w1fa7tYGZJw13WGJXVbCy/0lAw1BjudYz40yzPEBIT1cXrfg1A8LVZGi SQsNA6Nqg4XWew0SHk2ni/4BbJtp+8fcGGqcmuNpElONbZzE2/hXUXf9T7eQQ6bTHnw5 NcSQ== 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=qkS72CGg4KxrQnK+WQ6O8obl+bNEX47V2/v9y+fh8ahLuOhnDhHrJDe2M29k12cc7d G4gvI0wblmMTZIP6HIJRmklHUtsIjQjyKoUHQ6WzZvqUgVzkNT2KlQNQvWrb6LQAcIif tDgFdt2r9ysSGkor2wDNZnaS6n8naV6umo02Mq0qSaLpV8SyYvrnwQ6WWvTSrRga7vcV sbEYhfs8jsCW+MrSJtTJduuZqfu1NI6x5i6XJM4ic8lMNHW+IcNV//ChXTUcPqlZx2eW Jw6E2cMzh2DufMEHKC7L+r+wgpHIfws+m0iGjcLofnY13yExko0qk9hKC0wAmLX/kHKj 4VFQ== 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 e4si849435plk.304.2019.05.23.13.09.21; Thu, 23 May 2019 13:09:37 -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 S2387928AbfEWUIN (ORCPT + 99 others); Thu, 23 May 2019 16:08:13 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:38654 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387504AbfEWUIM (ORCPT ); Thu, 23 May 2019 16:08:12 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id A73DC283E19 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: Thu, 23 May 2019 22:07:54 +0200 Message-Id: <20190523200756.25314-3-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190523200756.25314-1-sebastian.reichel@collabora.com> References: <20190523200756.25314-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