Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3133407ybi; Thu, 18 Jul 2019 21:41:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqzFqg04hKI5UpTGBnGToSvmysHYZ5SpEduC1UJntaYfcCM2UJkWeKezP6Ma1KJv4Fr7edKn X-Received: by 2002:a17:90a:3544:: with SMTP id q62mr55959560pjb.53.1563511263196; Thu, 18 Jul 2019 21:41:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563511263; cv=none; d=google.com; s=arc-20160816; b=v6Y4y4EaKlBwRqDT/rH4W2JwWLuvV2zoXGfnFVGVRoHvMfA4X+o9MkccPhQpve8GuW qPfdBdHi+VScysaOMg0Bhq22Q+X2l9BOqxFgfd3lfXTZgEwugJg9gUQRg4OFyi0dm6QE Za5rxr8Lxhjj+ykXb1Ix1Ga5gK8nB5ieEgnUWu2PZHakqD9MExffYIYtSk8hK7f4HafY LYH6UOmrgqtnkVSPknbfGo0c2ZNlpTeKTk4d4xzJJ7GTidxjSFiPAejsO9k39lU7vWUb 9lbW7Qpbunuftmelf3BRQhaYTeLr4dpJopEEfUD9mU87y69b5eb/LxJxa5gVy+xmvpOj S//g== 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 :dkim-signature; bh=DNACsE36yOuAbKGdzYM1Unj4uGDif+l6N2yajcH4CUg=; b=JM40O5ZjbYB9CAC8GhYUTfPBpMJGnsrEux9E2cx0OG+pq9joLfzncN77M6s4CmdIYq Fsn/G4v9CqI4UGtRI/pn4fSrs+712cWDKRFIcYMtG+G3D/6ifCP1atDPIdGIpLcMtk6x x7GX3sY9mI5UMoVIKlOm3rl1Lof7/mkHuaCaPF5m8AcRcQbLVXN/8cKt+74oAKe7jw3d Brkn2zeniZH5xIVFXCprlXuIJmDwqFlyWuGXa4WvxTfRe2UZnuw5tgWHu4qVjzYBHpgi 0e7/iwJQwXRMD0//BDQ6RKzEvioASSjLlzoArqG/KaN+uBwDkycISuCyZU+kjBoEodgW vW7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=IfK1L2aR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si332972pfn.32.2019.07.18.21.40.47; Thu, 18 Jul 2019 21:41:03 -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; dkim=pass header.i=@kernel.org header.s=default header.b=IfK1L2aR; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728871AbfGSEjs (ORCPT + 99 others); Fri, 19 Jul 2019 00:39:48 -0400 Received: from mail.kernel.org ([198.145.29.99]:57854 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728096AbfGSD63 (ORCPT ); Thu, 18 Jul 2019 23:58:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EE8BD21883; Fri, 19 Jul 2019 03:58:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563508708; bh=8VpvaTC8NGBlITD/Wn03BWKljQg/sjAOb1QSXenJhhk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IfK1L2aRPJe+SmVnxRY49Xs2fzSDSxdvqCpQkZFwgRXW+K/RZWjVId929XL0kBDFH kbAiib1D+ZsPOJkucTqsZzXaSiaLGNPDfm/YHdtGOoepdsv6jPHh/I0ZzZ7wUdTOKG 1rEfanwEktf19MQ0NZp+2/ggmPIKyAE5lphUcXmk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sebastian Reichel , Pavel Machek , Tony Lindgren , Tomi Valkeinen , Sasha Levin , dri-devel@lists.freedesktop.org Subject: [PATCH AUTOSEL 5.2 046/171] drm/omap: don't check dispc timings for DSI Date: Thu, 18 Jul 2019 23:54:37 -0400 Message-Id: <20190719035643.14300-46-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190719035643.14300-1-sashal@kernel.org> References: <20190719035643.14300-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sebastian Reichel [ Upstream commit ad9df7d91b4a6e8f4b20c2bf539ac09b3b2ad6eb ] 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 Signed-off-by: Tomi Valkeinen Signed-off-by: Sasha Levin --- 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 8712af79a49c..4c43dd282acc 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -384,10 +384,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