Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp642331ybl; Wed, 14 Aug 2019 03:49:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqlnA8QgV2WzFJ6ocSj5YuCLe+R57odyl8JdHdRwjnzff9/NvTVqExEwpRBzktPSJ4si0T X-Received: by 2002:a17:902:f217:: with SMTP id gn23mr6117459plb.21.1565779789053; Wed, 14 Aug 2019 03:49:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565779789; cv=none; d=google.com; s=arc-20160816; b=wUxozY9NH/SizbMoPrAzjRFywh4c/2lwFPsxUjdmdroXzRuzWuQT8zWjFb+3r458/E 0iZ2LwG0G42AbhgJ52aOhqRbIKIICkedAoAyf1c9e+TzVWSdQFKZVvwLxcqRkMiLeDhl p0NDTsAJ1t5Ni61ybMOqcBKqoFMcWq1DmYIUw7CdHfKLfi6MV+OXZ9b9XEq7T1NHJV27 DmSqp0oiCrvVe/0E4A6gLQ4WswWY/jdiBTYlcZ3JUw864O0WTr/Jn4hf6hwO2yhw3COV L+pwdRDD1LA7ekM9UIWavgHv9hwo68GzZZTShYv0DsHridVVh6LBU0/gEM0gIjn7N0+E yJmg== 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=RGFzqlfR0VbAN4OrBEJptvJ0gbs2BVwQhJo4My2l6+0=; b=y9DI5rPVRaRDZqNw4Jdov3pD/QDXP8x+pGRl+BDeDayt6DsaiH4btr5quL9cBtD5ub rezlsBalZxIddc2Pr9RKrgvxtOh4D0zePwjumo0WVepMUk5ikAZo80TQrlEGW44UKU2+ oNtsmiaKixHWN7ZHn9Npfr8ecWsve6W2n1UhpX4zmwGGqalGzctwIoAMjEBHO0rU4p2V gXexH4FpaNGXAYGnAcAYIZQwbVXa0Yp8ko+G6rNP3NRw9w1vRyyCTklZqHIaaJTY0Xgb 4Msyj2s3JL1U0XKcF4wOEp51mQxXIw6LCZoEIVWPlKz1L0HA9lyIpdS+sGKPp1zgeQVT enOg== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14si2787577pjf.45.2019.08.14.03.49.33; Wed, 14 Aug 2019 03:49:49 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727781AbfHNKtC (ORCPT + 99 others); Wed, 14 Aug 2019 06:49:02 -0400 Received: from inva020.nxp.com ([92.121.34.13]:55028 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727650AbfHNKtA (ORCPT ); Wed, 14 Aug 2019 06:49:00 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 3DAD21A037B; Wed, 14 Aug 2019 12:48:58 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 30A621A038F; Wed, 14 Aug 2019 12:48:58 +0200 (CEST) Received: from fsr-ub1664-120.ea.freescale.net (fsr-ub1664-120.ea.freescale.net [10.171.82.81]) by inva024.eu-rdc02.nxp.com (Postfix) with ESMTP id 382DA2060E; Wed, 14 Aug 2019 12:48:57 +0200 (CEST) From: Robert Chiras To: =?UTF-8?q?Guido=20G=C3=BCnther?= , Marek Vasut , Stefan Agner , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Shawn Guo , Sascha Hauer , Fabio Estevam Cc: Pengutronix Kernel Team , NXP Linux Team , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 02/15] drm/mxsfb: Read bus flags from bridge if present Date: Wed, 14 Aug 2019 13:48:38 +0300 Message-Id: <1565779731-1300-3-git-send-email-robert.chiras@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565779731-1300-1-git-send-email-robert.chiras@nxp.com> References: <1565779731-1300-1-git-send-email-robert.chiras@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guido Günther The bridge might have special requirmentes on the input bus. This is e.g. used by the imx-nwl bridge. Signed-off-by: Guido Günther Reviewed-by: Stefan Agner --- drivers/gpu/drm/mxsfb/mxsfb_crtc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c index de09b93..b69ace8 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c @@ -209,7 +209,7 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) { struct drm_device *drm = mxsfb->pipe.crtc.dev; struct drm_display_mode *m = &mxsfb->pipe.crtc.state->adjusted_mode; - const u32 bus_flags = mxsfb->connector->display_info.bus_flags; + u32 bus_flags = mxsfb->connector->display_info.bus_flags; u32 vdctrl0, vsync_pulse_len, hsync_pulse_len; int err; @@ -233,6 +233,9 @@ static void mxsfb_crtc_mode_set_nofb(struct mxsfb_drm_private *mxsfb) clk_set_rate(mxsfb->clk, m->crtc_clock * 1000); + if (mxsfb->bridge && mxsfb->bridge->timings) + bus_flags = mxsfb->bridge->timings->input_bus_flags; + DRM_DEV_DEBUG_DRIVER(drm->dev, "Pixel clock: %dkHz (actual: %dkHz)\n", m->crtc_clock, (int)(clk_get_rate(mxsfb->clk) / 1000)); -- 2.7.4