Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp785893pxm; Thu, 3 Mar 2022 04:45:27 -0800 (PST) X-Google-Smtp-Source: ABdhPJx81qb79VdgsptgdWvAdVZLvN+vL6FVuIQhmj9DW5Nqv7rj6TXwy30/EJAa6Vg9VR7yTAqE X-Received: by 2002:a05:6a00:1747:b0:4f3:e449:4416 with SMTP id j7-20020a056a00174700b004f3e4494416mr29837800pfc.5.1646311526731; Thu, 03 Mar 2022 04:45:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646311526; cv=none; d=google.com; s=arc-20160816; b=xUp43a7+6VP86+s0z+XMnbxkFif6XXWsrRB+6ofbyySnE44wJmXVsTjwGWWgk0uMOg 8K4Y+bygMhNnbzeFbhaBd0oNTskB6724XdFqbj3RjJe8W7fXOBOlli7KaSXaC11QZj15 egEx1OHP7xRZW3wpcRE1eSAW90SdprORRFS4oAO7elL+m6x/3Ijt0wcrcmqrAUMMcYig L8SOnswDuaSc0GvNRQXOsTgyV7h+j9i836qm0d/3Vscdz0zUbLCsWGKdg5FvUOkpU0jd 4oFToke+XhPYfeKdsP/12tllOfhD6Otj7hkepK+8/ml1rDvvsMu1vuMqBrCL4WlKxTVu t7Pg== 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=7GEbjt4JfU2T8Ng+HXpX8Hxi4KzusCJjclOQL/eDmL8=; b=Mp/kMLHL91HSIQSxwgcn4fsDMOS1yEs9yTvk0Ax8lpmtGzkc8byZcA5QIL0u87i5sO x+2vEw6rSfdksMow0dr/Yzz8A0DGgiDd8tqyJzpsQ2Q0Vy/S7pjhaS12XSiYNXXIzsKk VtA/Nq2pBrAbNuqWONZkxplJNlISQfHLpdmI9q02OoyR21fTgDlpPvWORtmQi4bo1zdF WfYPADg06jC+u5etZML08uwrhzqaRX8kjHA9xWk8WrEweKlDRPhejSSlGFv5ErUspFim OQKrBAtjC4AWn2nQHUMhK6sGYT8D00zuLvEirT5aF1nHhN/DBIeTpup9at3fboASF0PN xaUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=ZB2KiwaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b9-20020a170902650900b0015004066257si2024611plk.495.2022.03.03.04.45.10; Thu, 03 Mar 2022 04:45:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=ZB2KiwaY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232431AbiCCKlj (ORCPT + 99 others); Thu, 3 Mar 2022 05:41:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbiCCKli (ORCPT ); Thu, 3 Mar 2022 05:41:38 -0500 Received: from mo4-p01-ob.smtp.rzone.de (mo4-p01-ob.smtp.rzone.de [85.215.255.53]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 504D610E564; Thu, 3 Mar 2022 02:40:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1646304022; 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=7GEbjt4JfU2T8Ng+HXpX8Hxi4KzusCJjclOQL/eDmL8=; b=ZB2KiwaYpugrKhLdLc8oeqOfYctCNodFglAwNuntcKKCAl8NcQdoDZnvioF9Y48R2G AsSdLaC+7cB1DtnRqq1tR7qGpekQdBvAmYnb5ucBrDn72btVSojqyWNTo3x9r77wZ5a8 wKe/spZZtMKytpPJfjG0RVe00+I0C24kHvr3YiQMcN5XSz62NwbnjJp0KGXkqB9Tqbpy AWL/nXovyg4tjrapn0EQLxF2GwWI6mAEoiB3mSTn8IMj/Eax1K7YFIWft+tQ3N8Ek+Qg F84I9wvgsX109AXx9/9jICQa0pbs/6CztdqEhBe91MVYPJ2+CBfWB5D0vapx4hbIAMGu h4eQ== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMgPgp8VKxflSZ1P34KBj4Qpw9iZeHWElw47tT+k=" X-RZG-CLASS-ID: mo00 Received: from imac.fritz.box by smtp.strato.de (RZmta 47.40.1 DYNA|AUTH) with ESMTPSA id V41e6fy23AeLYR4 (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); Thu, 3 Mar 2022 11:40:21 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes From: "H. Nikolaus Schaller" In-Reply-To: <3625b23b-9718-640a-1aac-0b30773a26ab@baylibre.com> Date: Thu, 3 Mar 2022 11:40:20 +0100 Cc: Paul Boddie , Laurent Pinchart , Jonas Karlman , David Airlie , linux-mips , dri-devel , linux-kernel , Paul Cercueil , Kieran Bingham , Robert Foss , Andrzej Hajda , Discussions about the Letux Kernel , Jernej Skrabec , Maxime Ripard Content-Transfer-Encoding: quoted-printable Message-Id: References: <169afe64b4985c3f420177cd6f4e1e72feeb2449.1645895582.git.hns@goldelico.com> <5da069b6-8a99-79c2-109c-c85715165857@baylibre.com> <75CBD357-577A-402D-9E3B-DBE82A84BC43@goldelico.com> <4cb08b5d-c1ec-f2b4-a107-63a771146ec0@baylibre.com> <598F3A49-9CE2-4C59-95D4-CDA888A3B3BF@goldelico.com> <3625b23b-9718-640a-1aac-0b30773a26ab@baylibre.com> To: Neil Armstrong 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_H5,RCVD_IN_MSPIKE_WL,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 Neil, > Am 03.03.2022 um 09:35 schrieb Neil Armstrong = : >=20 > Hi, >=20 > On 02/03/2022 23:24, H. Nikolaus Schaller wrote: >> Hi Neil, >>> Am 02.03.2022 um 15:34 schrieb Neil Armstrong = : >>>=20 >>> Hi, >>>=20 >>>> (cross-checked: RGB mode still works if I force hdmi->sink_is_hdmi = =3D false) >>>=20 >>> I don't understand what's wrong, can you try to make the logic = select MEDIA_BUS_FMT_YUV8_1X24 instead of DRM_COLOR_FORMAT_YCBCR422 ? >> I have forced hdmi->sink_is_hdmi =3D false and replaced >> /* Default 8bit RGB fallback */ >> - output_fmts[i++] =3D MEDIA_BUS_FMT_RGB888_1X24; >> + output_fmts[i++] =3D MEDIA_BUS_FMT_YUV8_1X24; >> And then screen remains black. MEDIA_BUS_FMT_RGB888_1X24 works. >> (MEDIA_BUS_FMT_VUY8_1X24 doesn't work either). >> So this indicates that YUV conversion is not working properly. Maybe = missing some special >> setup. >> What I have to test if it works on a different monitor. Same effect on a Xiaomi monitor (user manual just telling HDMI1,4 = compatible), an older Acer video projector and a Sharp TV set. The Xiaomi monitor does not say "No signal" but shows a black screen. = The others do not even report any HDMI signals. All work well with = MEDIA_BUS_FMT_RGB888_1X24. This means the transcoding to YUV does not work properly on the jz4780 = SoC setup. So it looks as if we have to disable it (at least unless someone finds a = fix). >> Not that this specific panel >> (a 7 inch waveshare touch with HDMIinput) is buggy and reports YUV = capabilities >> but does not handle them... >> On the other hand this panel works on RasPi and OMAP5 (where I admit = I do not know in >> which mode). >=20 > Pretty sure they don't support YUV HDMI output. >=20 > If you can try on a certified HDMI devices like a TV, it would here = figuring out where comes the issue. I am not sure if the Sharp TV is fully certified but would assume... >=20 >>> If your CSC is broken, we'll need to disable it on your platform. >> Indeed. >> So it seems as if we need a mechanism to overwrite = dw_hdmi_bridge_atomic_get_output_bus_fmts() >> in our ingenic-dw-hdmi platform specialization [1] to always return = MEDIA_BUS_FMT_RGB888_1X24. >> Or alternatively set sink_is_hdmi =3D false there (unfortunately = there is no direct access to >> struct dw_hdmi in a specialization drivers). >> Is this already possible or how can it be done? >=20 > It's not handled yet, but we may add the logic to handle the lack of = CSC config bit and > add a glue config bit to override this like we already did for CEC. >=20 > I wrote an initial support to disable CSC (only compile-tested), could = you try on your platform with setting disable_csc =3D 1 in your dw-hdmi = glue code ? This works! So how can we get that merged? IMHO your proposal should be before we = add ingenic-dw-hdmi. If you have a version with proper commit message I can add it to the = beginning of my seried and include it in a v17. Or if you get yours merged to = drm-misc/drm-misc-next I can build on top. BR and thanks, Nikolaus