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 F06E3C433EF for ; Tue, 28 Sep 2021 09:22:26 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 BD282610E5 for ; Tue, 28 Sep 2021 09:22:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BD282610E5 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.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=x1t5c2us4jxxLwRwQKff287Af5tkSWOEFnJcDdfuBvY=; b=L3GTfvRHPrrkwQ LqEWsjt+f2xaRT94d/5/h56lkex9SzuUNmbQQwfZV47ujq26eb5djvb2X4OIAgelD6TOw1SlXeLfR kRvfVNUN+w3rFkGZJxa4NChd40hXTlSr8JF0LYn1lWbo+XULHLjziL6wxRRxV/hMHCNwD192E9Tp3 8Pe4gd4dwjr9f++4D2yQjZ+SQzR6Nj3sJfbsqMKBl4cp1GDIkwb7YPJt5JGSOLet4l4kKExu9dNK8 kCDP7zTlmSsLm4w5jcKNoXwCKTdoG/CNulyWKTE32jV+hrXxByhw+FcaTZ8RhNcWtOAlHmG/Mafw4 jUB40q0VQAflHRvrCmsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV9Hn-006YKm-Dj; Tue, 28 Sep 2021 09:20:28 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mV9HD-006Y6v-6O for linux-arm-kernel@lists.infradead.org; Tue, 28 Sep 2021 09:19:53 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id BA55BFB03; Tue, 28 Sep 2021 11:19:48 +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 iNT9Un6UF8NA; Tue, 28 Sep 2021 11:19:47 +0200 (CEST) Date: Tue, 28 Sep 2021 11:19:46 +0200 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Marek Vasut Cc: Stefan Agner , David Airlie , Daniel Vetter , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Lucas Stach , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurent Pinchart Subject: Re: [PATCH] drm: mxsfb: Set proper default bus format when using a bridge Message-ID: References: <1fda3b80-7df2-2ce3-b049-6773e849e9dc@denx.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1fda3b80-7df2-2ce3-b049-6773e849e9dc@denx.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210928_021951_481789_55B1B0DA X-CRM114-Status: GOOD ( 24.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On Tue, Sep 28, 2021 at 11:08:58AM +0200, Marek Vasut wrote: > On 9/28/21 10:55 AM, Guido G=FCnther wrote: > > 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 bridg= e if present") > > = > > Signed-off-by: Guido G=FCnther > > --- > > = > > I'll look at what needs to be done in nwl separately but this also > > unbreaks other bridge seupts that don't to format negotiation yet. > > = > > drivers/gpu/drm/mxsfb/mxsfb_kms.c | 2 ++ > > 1 file changed, 2 insertions(+) > > = > > diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/= mxsfb_kms.c > > index af6c620adf6e..4ef94cf686b0 100644 > > --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c > > +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c > > @@ -369,6 +369,8 @@ static void mxsfb_crtc_atomic_enable(struct drm_crt= c *crtc, > > drm_atomic_get_new_bridge_state(state, > > mxsfb->bridge); > > bus_format =3D bridge_state->input_bus_cfg.format; > > + if (bus_format =3D=3D MEDIA_BUS_FMT_FIXED) > > + bus_format =3D MEDIA_BUS_FMT_RGB888_1X24; > = > Shouldn't the NWL bridge return the correct format ? Yes it should and I'll send a separate patch for that but we currently don't do anything meaningful at all if the bridge doesn't do format negotiation and then fail setup in mxsfb_set_formats(). I think we should at least preserve the status quo (as we do with the non bridge case in b776b0f00f24 too). We could have a warning to spot drivers that don't do that yet and hence the generic code returns MEDIA_BUS_FMT_FIXED. Cheers, -- Guido _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel