linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Sebastian Reichel <sre@kernel.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Tony Lindgren <tony@atomide.com>, Pavel Machek <pavel@ucw.cz>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: "H. Nikolaus Schaller" <hns@goldelico.com>,
	dri-devel@lists.freedesktop.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel@collabora.com,
	Sebastian Reichel <sebastian.reichel@collabora.com>
Subject: [PATCHv6 2/4] drm/omap: don't check dispc timings for DSI
Date: Thu, 23 May 2019 22:07:54 +0200	[thread overview]
Message-ID: <20190523200756.25314-3-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20190523200756.25314-1-sebastian.reichel@collabora.com>

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 <pavel@ucw.cz>
Tested-by: Tony Lindgren <tony@atomide.com>
Tested-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 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


  parent reply	other threads:[~2019-05-23 20:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-23 20:07 [PATCHv6 0/4] omapdrm: DSI command mode panel support Sebastian Reichel
2019-05-23 20:07 ` [PATCHv6 1/4] drm/omap: use DRM_DEBUG_DRIVER instead of CORE Sebastian Reichel
2019-05-23 20:19   ` Joe Perches
2019-05-23 20:07 ` Sebastian Reichel [this message]
2019-05-23 20:07 ` [PATCHv6 3/4] drm/omap: add framedone interrupt support Sebastian Reichel
2019-05-28 10:19   ` Tomi Valkeinen
2019-05-29 21:55     ` Sebastian Reichel
2019-05-31 12:23       ` Tomi Valkeinen
2019-05-23 20:07 ` [PATCHv6 4/4] drm/omap: add support for manually updated displays Sebastian Reichel
2019-05-27 10:51 ` [PATCHv6 0/4] omapdrm: DSI command mode panel support Tomi Valkeinen
2019-05-27 11:21   ` Tony Lindgren
2019-05-28  9:19     ` Tomi Valkeinen
2019-05-28  9:39       ` Tony Lindgren
2019-05-28  9:51         ` Keerthy
2019-05-28 10:05         ` Tomi Valkeinen
2019-05-28 10:18           ` Tony Lindgren
2019-05-28 10:32             ` Tomi Valkeinen
2019-05-29  9:33               ` Peter Ujfalusi
2019-05-29  7:06             ` Tomi Valkeinen
2019-05-29  8:10               ` Tony Lindgren
2019-05-30  5:46                 ` Tony Lindgren
2019-05-30  7:02                   ` Tony Lindgren
2019-06-03  8:29     ` Pavel Machek
  -- strict thread matches above, loose matches on Subject: below --
2019-04-03 19:54 [PATCHv5 0/6] " Sebastian Reichel
2019-04-03 20:13 ` [PATCHv6 0/4] " Sebastian Reichel
2019-04-03 20:13   ` [PATCHv6 2/4] drm/omap: don't check dispc timings for DSI Sebastian Reichel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190523200756.25314-3-sebastian.reichel@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=kernel@collabora.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=sre@kernel.org \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).