Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2160442ybl; Thu, 29 Aug 2019 04:31:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwtugDe3ilVTnKAmwa5GMJqHYzJJpDThahkjl8OwDgE8kUzBcKSpO/Ig1SRDmMlb7hn9tmH X-Received: by 2002:a17:902:41:: with SMTP id 59mr9652387pla.268.1567078304442; Thu, 29 Aug 2019 04:31:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567078304; cv=none; d=google.com; s=arc-20160816; b=qtL3Ehgg/mjcHebih77ydPETfsMvbOAzfx3/KR2tVauYqC86YctvRnvZJXhW6f3ig5 KblvrP4dIU3xEa+o0P+HZ0OrDrhFm2PWuuaMkT73kGanTNJEG4hAFooSYYu1BbvkE4Pr udD0/l0/MM8rMBuIEc80Y6Q1C/NsV/QPv4pEbyNnRP8pqN0UulvNCdBgghvXDoCkYr+4 srTmvIrF6aLl55kZLbib6dHpg89QsqKfz6dHF4kbcmeDyYjm/XMWaLwY/bS5ZLwYpzgt jYwIWHyq8T1BSDIcBRkYw+CDg0L2ViY6C0vSBXN4QCSPm2O4JXI8jNTqRwbhcQCp3yT9 wF3Q== 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=ip09h1qD0iz51IO2EBn7SETec+BSMojs6sinsmOBq6OQZGJxFDzVk30CNfCWH/Kq7b hEpJDcSok+8gS9TIEQTa2HEOvMmBieJ6CRUE1CmE+oVUyzVQOVLNAcEJv+dLGtuaU7Ud s14cUpdQKU2/lLQ7PATJ2AmfWeomRGARioZnnZxjSh23Pt37Rcyph/QrIx2s/fzuAlRb r8gjjGlBF7XgNfoLnAAYfy8qKx5M63fW61nsZwZj9j/HyId1FDn4K0FZpHQ9qzUxtVzH sEeByopLyz8ltJg2hD8GUDYiL42xTP9Rjp/03T/gaeZOe0pvt/V8Bjp8Ucfl+5VR58j4 bgnw== 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 n16si2284440pff.23.2019.08.29.04.31.28; Thu, 29 Aug 2019 04:31:44 -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 S1728161AbfH2La3 (ORCPT + 99 others); Thu, 29 Aug 2019 07:30:29 -0400 Received: from inva021.nxp.com ([92.121.34.21]:49282 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726283AbfH2LaW (ORCPT ); Thu, 29 Aug 2019 07:30:22 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 32D20200335; Thu, 29 Aug 2019 13:30:20 +0200 (CEST) Received: from inva024.eu-rdc02.nxp.com (inva024.eu-rdc02.nxp.com [134.27.226.22]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 24E73200073; Thu, 29 Aug 2019 13:30:20 +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 6CE6F20613; Thu, 29 Aug 2019 13:30:19 +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 v4 02/14] drm/mxsfb: Read bus flags from bridge if present Date: Thu, 29 Aug 2019 14:30:03 +0300 Message-Id: <1567078215-31601-3-git-send-email-robert.chiras@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1567078215-31601-1-git-send-email-robert.chiras@nxp.com> References: <1567078215-31601-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