From patchwork Thu Nov 15 23:06:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 10685287 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id BB85913B5 for ; Thu, 15 Nov 2018 23:07:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC6752D5B9 for ; Thu, 15 Nov 2018 23:07:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A03412D5C3; Thu, 15 Nov 2018 23:07:20 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4BA932D4D2 for ; Thu, 15 Nov 2018 23:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725916AbeKPJRE (ORCPT ); Fri, 16 Nov 2018 04:17:04 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:47492 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725860AbeKPJRE (ORCPT ); Fri, 16 Nov 2018 04:17:04 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 0BF4B27E6BC 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: [PATCHv4 3/6] drm/omap: don't check dispc timings for DSI Date: Fri, 16 Nov 2018 00:06:42 +0100 Message-Id: <20181115230645.15748-4-sebastian.reichel@collabora.com> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181115230645.15748-1-sebastian.reichel@collabora.com> References: <20181115230645.15748-1-sebastian.reichel@collabora.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP While all 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 its 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") Signed-off-by: Sebastian Reichel Acked-by: Pavel Machek --- drivers/gpu/drm/omapdrm/omap_connector.c | 8 +++++--- drivers/gpu/drm/omapdrm/omap_encoder.c | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c index b81302c4bf9e..5c776d6211e1 100644 --- a/drivers/gpu/drm/omapdrm/omap_connector.c +++ b/drivers/gpu/drm/omapdrm/omap_connector.c @@ -280,9 +280,11 @@ static int omap_connector_mode_valid(struct drm_connector *connector, drm_display_mode_to_videomode(mode, &vm); mode->vrefresh = drm_mode_vrefresh(mode); - r = priv->dispc_ops->mgr_check_timings(priv->dispc, channel, &vm); - if (r) - goto done; + if (omap_connector->display->type != OMAP_DISPLAY_TYPE_DSI) { + r = priv->dispc_ops->mgr_check_timings(priv->dispc, channel, &vm); + if (r) + goto done; + } for (dssdev = omap_connector->output; dssdev; dssdev = dssdev->next) { if (!dssdev->ops->check_timings) diff --git a/drivers/gpu/drm/omapdrm/omap_encoder.c b/drivers/gpu/drm/omapdrm/omap_encoder.c index 452e625f6ce3..32bbe3a80e7d 100644 --- a/drivers/gpu/drm/omapdrm/omap_encoder.c +++ b/drivers/gpu/drm/omapdrm/omap_encoder.c @@ -170,9 +170,11 @@ static int omap_encoder_atomic_check(struct drm_encoder *encoder, drm_display_mode_to_videomode(&crtc_state->mode, &vm); - ret = priv->dispc_ops->mgr_check_timings(priv->dispc, channel, &vm); - if (ret) - goto done; + if (omap_encoder->display->type != OMAP_DISPLAY_TYPE_DSI) { + ret = priv->dispc_ops->mgr_check_timings(priv->dispc, channel, &vm); + if (ret) + goto done; + } for (dssdev = omap_encoder->output; dssdev; dssdev = dssdev->next) { if (!dssdev->ops->check_timings)