From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69EF9C433F5 for ; Mon, 4 Oct 2021 08:27:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0FAAF61130 for ; Mon, 4 Oct 2021 08:27:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 0FAAF61130 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 67B6B6E959; Mon, 4 Oct 2021 08:27:43 +0000 (UTC) Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id 066A86E959 for ; Mon, 4 Oct 2021 08:27:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 6A4E6FB03; Mon, 4 Oct 2021 10:27:39 +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 yGsjUS830b5p; Mon, 4 Oct 2021 10:27:38 +0200 (CEST) Date: Mon, 4 Oct 2021 10:27:27 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Lucas Stach Cc: 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 Subject: Re: [PATCH v2 5/5] drm: mxsfb: Set proper default bus format when using a bridge Message-ID: References: <15afbcb04dea432867bb9f8b0e47205decd4bd6e.1633332399.git.agx@sigxcpu.org> <3b557e62ad8f313d8fdfb352730cb9a0c5c2eb57.camel@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <3b557e62ad8f313d8fdfb352730cb9a0c5c2eb57.camel@pengutronix.de> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, On Mon, Oct 04, 2021 at 09:58:37AM +0200, Lucas Stach wrote: > 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: Adjusted for v3 (which I'll hold off a bit in case there are more comments) and dropped the Fixes: tag which is on the nwl driver only now. thanks! -- Guido > > 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 */ > >