Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2095860pxb; Wed, 9 Feb 2022 10:43:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJyAk2zg5Cn7p3xLSObjC+N644rE/bcf+AmGG5OSzvqrNAjBEDP5nWNygOf7wCBUPqyeMSns X-Received: by 2002:a17:902:b414:: with SMTP id x20mr3861042plr.76.1644432234184; Wed, 09 Feb 2022 10:43:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644432234; cv=none; d=google.com; s=arc-20160816; b=lzM1nX9Nu4hP3YowwPF9XG2Ela+jZ25kxXJxe/XWU0GhQPUbT73urWNxJ/ElhBJvRj oNeS9eBK1mRe4w8Wy8VJBgJMoLQEhbu40tBWjRnXahutMIJrw5/R8+Vx4ZZ3S12+lLm9 sHLAvOENi7Sy4PMDomtu1Urco3qTv86AIA4sJTaDTetq2SvAlC2H9gxZtuw7w/BQOPhS VBp/ueg7IsANKCk4qiQpbBX2JAGc5XemcRV9Cr+/eWDnVz3VPTKnbb+XAbZwgVTOS3A7 2QYEQxt05hbxWoOsM7Gh6pIjQuFKbFb+hKGvJr2fKubDo/8ePqXFxscXwzO4CHjGL/wv BZpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version:dkim-signature; bh=tvGj33EBatPgN7fdgNMT5Uwzep9OEE1oZXhb92nFpC0=; b=rSJq196PiwG/cHLlfJh+TbndsS6Kvrkfs168W41QU0xcGPVrdRrAO2fJGdWo3dqehN ElbQ4i9xImiLTlU8R6ScO6wbd+B0Jz9yZdbPEQ2Q/hMnik62lfYHYBEWxPbgadWvOi8D vD21q9jQmvd+fdNDWuKG72v9JmqjqUc1eCiYlTCD5J2AmHod2pT13SiglvhfoInjYuZ2 BVr+dvxF7szLiqNzrZYCtAQJEsivlAEaElaGzCo5lI2KGGlglL5TCI4yr03clTjLyilJ cNV2MpzbzOGNhNyP5g8JNrMFN9MfskG1JqHp4j1KhUE8h4Z6GlnTNHko6Af89cgFt17w U+Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=M+b+B2eR; 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 y191si5854607pgd.179.2022.02.09.10.43.41; Wed, 09 Feb 2022 10:43:54 -0800 (PST) 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; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=M+b+B2eR; 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 S234536AbiBINyR (ORCPT + 99 others); Wed, 9 Feb 2022 08:54:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234516AbiBINyO (ORCPT ); Wed, 9 Feb 2022 08:54:14 -0500 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6A613C0613CA; Wed, 9 Feb 2022 05:54:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1644414678; s=strato-dkim-0002; d=goldelico.com; h=To:References:Message-Id:Cc:Date:In-Reply-To:From:Subject:Cc:Date: From:Subject:Sender; bh=tvGj33EBatPgN7fdgNMT5Uwzep9OEE1oZXhb92nFpC0=; b=M+b+B2eRZJtmNi+t+MYTpNrmc59i+XJFTVkzdWj3EENACd1/5TTXKY+OqXR5XyxmwT TAI578t9ilOZQU5S2BKANWK7+i8xQtAEZb5ARAi0raMtajkq2a7RuQd4bi+cna+eQhN6 656boM9hWJ0Ffhiv+YMsdLnG+5E/RuDMyWtV7/KQsNWfEe0AXvsOXN65jSBC+HwX8+TW 9n9h0EPlv96CD7D/7O5/4L8eNyz25by47IPa9Z+pLfUFqQ1Z0t4NdTdjGmp0JAgq34gj giOrg6vJKOkCDv5U9HP0R6bzmQBAXB6Bhum0alyjzB1Cy2ff/7NKJbVQI1N26tCGnk5K efJg== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj7gpw91N5y2S3iMYawg==" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.39.0 DYNA|AUTH) with ESMTPSA id L29417y19DpHguM (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (curve X9_62_prime256v1 with 256 ECDH bits, eq. 3072 bits RSA)) (Client did not present a certificate); Wed, 9 Feb 2022 14:51:17 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v13 6/9] dw-hdmi/ingenic-dw-hdmi: repair interworking with hdmi-connector From: "H. Nikolaus Schaller" In-Reply-To: Date: Wed, 9 Feb 2022 14:51:17 +0100 Cc: Rob Herring , Mark Rutland , Thomas Bogendoerfer , Geert Uytterhoeven , Kees Cook , "Eric W. Biederman" , Miquel Raynal , David Airlie , Daniel Vetter , Neil Armstrong , Robert Foss , Laurent Pinchart , Jernej Skrabec , Harry Wentland , Sam Ravnborg , Maxime Ripard , Hans Verkuil , Liam Girdwood , Mark Brown , Paul Boddie , Andrzej Hajda , Kieran Bingham , devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, letux-kernel@openphoenux.org, Jonas Karlman , dri-devel@lists.freedesktop.org Content-Transfer-Encoding: quoted-printable Message-Id: <987D3DDA-FA93-4EDB-ABCB-6973DB7FD943@goldelico.com> References: <866f84621974992f4831bd471ae5a53414de9255.1643819482.git.hns@goldelico.com> To: Paul Cercueil X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Paul, > Am 09.02.2022 um 13:18 schrieb Paul Cercueil : >=20 > Hi Nikolaus, >=20 > Le mer., f=C3=A9vr. 2 2022 at 17:31:20 +0100, H. Nikolaus Schaller = a =C3=A9crit : >> Commit 7cd70656d1285b ("drm/bridge: display-connector: implement bus = fmts callbacks") >> introduced a new mechanism to negotiate bus formats between hdmi = connector >> and the synopsys hdmi driver inside the jz4780. >> By this, the dw-hdmi is no longer the only bridge and sets up a list >> of formats in dw_hdmi_bridge_atomic_get_output_bus_fmts(). >> This includes MEDIA_BUS_FMT_UYVY8_1X16 which is chosen for the jz4780 = but only >> produces a black screen. >> This fix is based on the observation that max_bpc =3D 0 when running = this >> function while info->bpc =3D 8. Since the formats checks before this = always test >> for max_bpc >=3D info->pbc indirectly my assumption is that we must = check it >> here as well. >=20 > This fix looks really strange to me, so I'll let the DRM experts = comment. Well, yes. We should maybe look for comments by the synopsys/dw-hdmi = specialists. >=20 > It would still be better to move the patch before the introduction of = dw-ingenic-hdmi.c, so that once this one is introduced, everything = works. This also enables bisectability. Ok, good. BR and thanks, Nikolaus >=20 > Cheers, > -Paul >=20 >=20 >> Adding the proposed patch makes the CI20/jz4780 panel work again in >> MEDIA_BUS_FMT_RGB888_1X24 mode. >> Fixes: 7cd70656d1285b ("drm/bridge: display-connector: implement bus = fmts callbacks") >> Signed-off-by: H. Nikolaus Schaller >> --- >> drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c = b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> index 52e7cd2e020d3..34703a15ee4ff 100644 >> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c >> @@ -2620,10 +2620,10 @@ static u32 = *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, >> output_fmts[i++] =3D MEDIA_BUS_FMT_RGB101010_1X30; >> } >> - if (info->color_formats & DRM_COLOR_FORMAT_YCRCB422) >> + if (max_bpc >=3D info->bpc && info->color_formats & = DRM_COLOR_FORMAT_YCRCB422) >> output_fmts[i++] =3D MEDIA_BUS_FMT_UYVY8_1X16; >> - if (info->color_formats & DRM_COLOR_FORMAT_YCRCB444) >> + if (max_bpc >=3D info->bpc && info->color_formats & = DRM_COLOR_FORMAT_YCRCB444) >> output_fmts[i++] =3D MEDIA_BUS_FMT_YUV8_1X24; >> /* Default 8bit RGB fallback */ >> -- >> 2.33.0 >=20 >=20