Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11982309ybi; Fri, 26 Jul 2019 02:51:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqx34WhVjX72QQdpG1hu9IPZfhSgqvG5UTDYLYvP0xuvOnu7PH+N6/yNbibuLASeQvCHg/lp X-Received: by 2002:a63:6d6:: with SMTP id 205mr92916746pgg.262.1564134706388; Fri, 26 Jul 2019 02:51:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564134706; cv=none; d=google.com; s=arc-20160816; b=ZCEIwX/zjsyDta2ICTOIRyAe1xLBkabwuEpKLYEiLvneHYsQd4m2zddQmSpvDzs8Lv QEropiuet6tbvN2gcVvY52l7bhzudxHnLc52s8ripkHVHe1/9GYNIR6DnFEj8VEkOLW0 eHGwo4zuZ9wY3icpeqjj0bNUwtS73CAZjcxPDqVB61UCVZCxpSQNicMjNNXEWIRtJRKB R/CF8w+89DFSNDS50eOVwpoIVJNeqGc9rynbQcgyrZCKsWSAtOQTpq+xoFTDi8hJLkli H3UhbeBd43GbEw9WNmpO8gpRPZrUhFmvdoz0VxsIzyuvwhsL2n3tUdqVdQvwxnxXWLpC I8kQ== 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:to:from; bh=h7C+jciwk2YbnZkvyEnnVl4LvwHa6qivVkSkHehJZEY=; b=b+U0RwQASdNnLqNK7ich7z9k4zD/JvaA+xNhsQnl/x3dpgw5m5InMwnd0yVo746ZyU ov6zp4WxQ5SWzfuu+sNAoU7ILm3zMFGFFjE82FS0ROGy3gtk+Bvpmnk2BqrcIZVrozwe P/AG7wBLHbcohhTN1k5y0vpaJ4CeRU9Fb5dlBc0BP0mYBhpd54Hq8vT1xK/7yQnaImnh bNj0iT3kOr7jR2NRo/+BhHDcu3Gta2djAvOgGNLX7sLKNPERrMdd92oF66YJ/4LLqhW2 jS4TZOgiLa+dLPfbe+riQPL00DnhxhEqwOo/43E9+8dq9VbGOzT+Nx3+31SlfRChEgBI KTjw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a64si20806001pfb.60.2019.07.26.02.51.31; Fri, 26 Jul 2019 02:51:46 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726271AbfGZJtV (ORCPT + 99 others); Fri, 26 Jul 2019 05:49:21 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:60040 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbfGZJtS (ORCPT ); Fri, 26 Jul 2019 05:49:18 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id E25F2FB02; Fri, 26 Jul 2019 11:49:15 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TtfFpcmoz3Q8; Fri, 26 Jul 2019 11:49:13 +0200 (CEST) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id 0D36F46AA0; Fri, 26 Jul 2019 11:49:12 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Robert Chiras , Marek Vasut , Stefan Agner , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] drm/mxsfb: Read bus flags from bridge if present Date: Fri, 26 Jul 2019 11:49:12 +0200 Message-Id: <9390060f65f94722cb13101d4835d9048037f7a0.1564134488.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 e84bac3a541d..3b8eb3ac13b6 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_crtc.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_crtc.c @@ -215,7 +215,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; @@ -239,6 +239,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.20.1