Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp4835082pxb; Tue, 28 Sep 2021 05:18:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyXaq1IJ5DaKEFxBVOmdBIVjrmNoIj0NTgZ4yMJSQypHB44hOH1SVf+1FKZMALUu/XxMqIv X-Received: by 2002:a05:600c:198e:: with SMTP id t14mr4509102wmq.124.1632831502356; Tue, 28 Sep 2021 05:18:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632831502; cv=none; d=google.com; s=arc-20160816; b=Eh6nYhOv+8SFxJPVjaicYBLOjgCiVSKEgY+K5Zr8WhpWzvHe3bNw6qdJ+kZnq7eSdK 62MiH60OM39K2nFs5nnRNmsb4NfEdX19Re3t7pUXNtuwdz1lDYbhuFf0ZPHVu9WE+Eoz xPI4+ghZwfTESTJR3/stM8Y8kwM7MisbSE+pwWzQxZoxpQFPCTOT6jn/QYS/SPuw+KbH ZWs/fKvGOwH+W6STPOLYuS23W2xEBqY3Atl1Wk8JMaBrhgESPeuP3B7V0tuwlOQ3gmjW KuZebkTs7trGvzco6bcAE8XKJ859jdVuh0wVZg6zZdqVeTIrHmoJcKps3cSVe7gOFII2 EcSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from; bh=OUUu/32vCloHbTs7NU7xYoprkOcYGKs5UNdI4DtS4f0=; b=tnPCFFnNWqPRdlWvkfw2lPW79ENGzMNAMJvbwJBePUxgz9XiVeQMDG9rL/35N7DWsi It2VRhf0xKB7CBwPjX1NHKF6TjNr8cVFzBvqyqbadfOo6hXSgzBI/ydn1uwM+J2/UtFs WJ2q7AeB/GisTnOxLlmVZjzlOKMnkE51Lnd9V7414c3dKs270TfHhzb1eST6fJg7lnAu Pmw15D/fO4tXqo3etwEPMd9Y3p0PIr6thniegbBI/Vk3sbTMeke7isnpkahPT5GKjzaL b7XE0EUWiRj10cGfZ9W9B2weupocGK3spX9t6lmdg3ng/ofNTpVhhmQ8SLpKU6Xv8WL1 fcew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v13si4710730edr.596.2021.09.28.05.17.57; Tue, 28 Sep 2021 05:18:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240534AbhI1MSN (ORCPT + 99 others); Tue, 28 Sep 2021 08:18:13 -0400 Received: from honk.sigxcpu.org ([24.134.29.49]:46234 "EHLO honk.sigxcpu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240488AbhI1MSG (ORCPT ); Tue, 28 Sep 2021 08:18:06 -0400 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 537FAFB02; Tue, 28 Sep 2021 14:16:22 +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 cX-S9izAcfpU; Tue, 28 Sep 2021 14:16:21 +0200 (CEST) From: =?UTF-8?q?Guido=20G=C3=BCnther?= To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Marek Vasut , Stefan Agner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Thierry Reding , Sam Ravnborg , Ondrej Jirman , Lucas Stach , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v1 2/5] drm: mxsfb: Set proper default bus format when using a bridge Date: Tue, 28 Sep 2021 14:16:09 +0200 Message-Id: <1fd5457b925249bce77315663adabecdd29ec0f3.1632828477.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If a bridge doesn't do any bus format handling MEDIA_BUS_FMT_FIXED is returned. Fallback to a reasonable default (MEDIA_BUS_FMT_RGB888_1X24) in that case. This unbreaks e.g. using mxsfb with the nwl bridge and mipi panels. Fixes: b776b0f00f24 ("drm: mxsfb: Use bus_format from the nearest bridge if present") Reported-by: Martin Kepplinger Signed-off-by: Guido Günther --- drivers/gpu/drm/mxsfb/mxsfb_kms.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index d6abd2077114..f4be16f5c20b 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -369,6 +369,11 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc, drm_atomic_get_new_bridge_state(state, mxsfb->bridge); bus_format = bridge_state->input_bus_cfg.format; + if (bus_format == MEDIA_BUS_FMT_FIXED) { + dev_warn_once(drm->dev, + "Bridge does not provide bus format. Please fix."); + bus_format = MEDIA_BUS_FMT_RGB888_1X24; + } } /* If there is no bridge, use bus format from connector */ -- 2.33.0