Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp3443072pxb; Mon, 4 Oct 2021 02:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXd+Z8JhZeM//j5wJiS3ab1JJ/PIkQKi4WUG2mbhDwWM9xZwRuhfPKhnK5fR+fdKINxYOQ X-Received: by 2002:a50:bf05:: with SMTP id f5mr16692635edk.156.1633339461419; Mon, 04 Oct 2021 02:24:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633339461; cv=none; d=google.com; s=arc-20160816; b=sTdDMGwcGyBST1PJQD0sdKScciIWbcTqANHJoatX60tScPNBWNfVMgPPUOI4CmRAKo DRApNIS/Z8p8OLTrIzuJOi+Q8JEi/bXey2bG43QbWuYC9CqKulf8hZUsTznS3nft6/hm YHkQE98ljLga2mxloS+WTv76w4ulAJaXWTNqHmKolI2CFrhYlXC43elDSTveEGrWSOmr DpkrlHzruUvfIYeOmeIyY6zS/bbVX3g85XKy2iv0bTE5pzcliV7099ELrD1u1jhYHNu8 A9rbYnKRssW196VKIWaaRNeaGem2Os1k74EEbMfHkKG2Tuk7KCUSk++GrGulunMuTcrY EY1g== 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 :user-agent:references:in-reply-to:date:to:from:subject:message-id; bh=fLgxjT/krZ8Mbvz9ex5nRBvPts1X2lOraFqcngdd4L0=; b=IFWxs1Ejhebcu2ULu31rugBI0ySVq7NV1SSdh6/4d56HcemkpzZ9jW/BOlGcG0N2BX Qu4d89VyRmoaa/gYDzT8ig6MFB+iIUJWgpvXuHINC0kVzxObvhj5sL5NT3S8SJpPEmQJ pcnLCJawYD0jgTSW7n5eodgDN6B0BsXpmXSR6nBc4Kc6HyXryHot9HttYDRvS87y9ttB XaBNBufj4Gmcn03ktrCXWPr07u3Gh3oqGVgyvvnmamHAh765+ZXJssma1xH2qvTLbBAm SpkEmYgwWV7EXrD8Gwsfb+CYF+fAai051Jt18EtRNGdi3BViah7TcDeJ64GHeaq1CPJN 53Ew== 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 y97si17037364ede.520.2021.10.04.02.23.58; Mon, 04 Oct 2021 02:24:21 -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 S229545AbhJDIAx (ORCPT + 99 others); Mon, 4 Oct 2021 04:00:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229618AbhJDIAw (ORCPT ); Mon, 4 Oct 2021 04:00:52 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD86FC061745 for ; Mon, 4 Oct 2021 00:59:03 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXIrv-0001ht-O5; Mon, 04 Oct 2021 09:58:39 +0200 Message-ID: <3b557e62ad8f313d8fdfb352730cb9a0c5c2eb57.camel@pengutronix.de> Subject: Re: [PATCH v2 5/5] drm: mxsfb: Set proper default bus format when using a bridge From: Lucas Stach To: Guido =?ISO-8859-1?Q?G=FCnther?= , 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 , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Date: Mon, 04 Oct 2021 09:58:37 +0200 In-Reply-To: <15afbcb04dea432867bb9f8b0e47205decd4bd6e.1633332399.git.agx@sigxcpu.org> References: <15afbcb04dea432867bb9f8b0e47205decd4bd6e.1633332399.git.agx@sigxcpu.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, dem 04.10.2021 um 09:27 +0200 schrieb Guido Günther: > 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") > I don't think this qualifies for stable, so I would drop this tag, as the stable maintainers are quite trigger happy to pull in patches with a fixes tag. Also the subject isn't quite correct, this isn't setting a "proper" bus format, but rather adds a fallback. Other than that: Reviewed-by: Lucas Stach Regards, Lucas > Reported-by: Martin Kepplinger > Signed-off-by: Guido Günther > --- > drivers/gpu/drm/mxsfb/mxsfb_kms.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c > index d6abd2077114..e3fbb8b58d5d 100644 > --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c > +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c > @@ -369,6 +369,12 @@ 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, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" > + "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); > + bus_format = MEDIA_BUS_FMT_RGB888_1X24; > + } > } > > /* If there is no bridge, use bus format from connector */