Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp775275pxm; Thu, 3 Mar 2022 04:30:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDLL3ilVznainNcEK9BkZLyEEPxVukPsLmsF5HySqIigaMptc/sYMjgNYJVaQ4AC7vc3vl X-Received: by 2002:a17:90b:240e:b0:1b9:2963:d5a1 with SMTP id nr14-20020a17090b240e00b001b92963d5a1mr5024490pjb.227.1646310631822; Thu, 03 Mar 2022 04:30:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646310631; cv=none; d=google.com; s=arc-20160816; b=Bg9vM+Dj/RJY4NAkak93EdHFe51mQnYER98AOkrPnUEr2SAYnRmgOmLRVVksT9q+gU H4ZaK+FHs6KTvl500ezdzsVdyF4icKqAcWxKtDSRPV2AuQ011FPgl6Y5wwTpx10qNvVg ULrWtHxDt1V1pFeNev9bY0VnAoJBADogpAzTDyuh2uo1L6JtCVK30kGV2H6TZ5NhL783 SyjBqJLT8NMOB3aQ7vhjBSJM/6T0mUbWch2yPtQv4MRRkKhqjt1K4700Eew0HnUqYJ+o ZXV/+Rq+RDZfMUkjSqUAAI57UM2PTcJe29LWYwFdoCRFp2jPPKVuLpo9gyxer5iC0d83 rtVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to :organization:from:references:cc:to:content-language:subject :user-agent:mime-version:date:message-id:dkim-signature; bh=aEzdf5gv463ifntB9pNMOV327BmGIyfUeZ0T79eAJYk=; b=fxwrDGDoYtJRTdGofdufwG19/x6AFu3ONHFErO9hUELOdivxnsdl/pmxfuMVDRzkLF +l6flqZtNFXgJEQwMX+SBznd1AWl0N2pZRd/RdtKptxKHnL37sF6w8LbHIDrfKigSpgK Tp4d2P+orX3PHEk7h0ZQtsJbHFDfUqc4AVGIbVAKd+kCRUln7oPe+JEO36ZLQqNLecN0 0nW047r4FaYt5Hyp0krW/CcXTtihkkN0kA/nXcAyFbEjEizYqGG2j9KORNHnGwlNNJj/ 95E+ZXI2uBEMICe9g0fGRlhsqw6DVVovj/XvZDNkNykHx5+xc3Qk2kFsD6jf0Bd/pr/7 ZsDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=yh4D97eH; 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 ot17-20020a17090b3b5100b001bf0ccdad6asi1959018pjb.145.2022.03.03.04.30.16; Thu, 03 Mar 2022 04:30:31 -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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=yh4D97eH; 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 S232718AbiCCLnh (ORCPT + 99 others); Thu, 3 Mar 2022 06:43:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232901AbiCCLmx (ORCPT ); Thu, 3 Mar 2022 06:42:53 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F861E338D for ; Thu, 3 Mar 2022 03:42:06 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id bg31-20020a05600c3c9f00b00381590dbb33so3049443wmb.3 for ; Thu, 03 Mar 2022 03:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=aEzdf5gv463ifntB9pNMOV327BmGIyfUeZ0T79eAJYk=; b=yh4D97eHpgQbIZJ7v3fH+nPKsvPCjuGSzH0fOyqhmw0TgNUiISZeEhdKf+4q3rNnlO Q6JUCunbFyHajq9HQXb0Y3woTfTKtyb5qdihZ21O1GpAAuWxmCxB/5w2ZpSeG5gtuPP8 Z0o0Ci7JmQDS1bqdNazn2o/sLkei914vqOwdDiRu7j4wk0KXgUxJ90rZ+q0IoM/5v2tj Ujyqvr40OtJtviIdqVbMK5icVXk/W8hoJxyRBX3RhquSpk7nT34qgKcJPA/RssgGV4h/ pWeqqnmq2Km/69Z3VM216Fnb4TH2Uq/1dRcWOXwHC9JMcftk8JTF+39STCT8qjWIO2vq YkVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=aEzdf5gv463ifntB9pNMOV327BmGIyfUeZ0T79eAJYk=; b=OX/wKqcJthBXc3gPnYZfpndRSPdNVymjGZIQDd037tPv0s3qUu96bOf1sQHsI21sOe I2MSqFyivtSOg9LpNhBaHSn4NswLpzFFPrq/+DDEVyuJpVfOXozR4dib1/0Ws2jmDftI 7dmsQdNRkQgRDsXqJwu3hxOZW5+eApT70jYNQhREbnPx2ZFH29gqjuZCCSUSlCLNuyFr hPS1b5wrUaDDrGOAa7t8vN0ilihonI9dYlVjGCmb5KPdwbPexdzVQX7nXh0iQtXi6Mr9 4vlxMasQ1HyZgeZFEavlCjZWSLJhevVn3lnYsz8D5ok9pofnNfFY+QW0SlOZfWqYwMMl bmEQ== X-Gm-Message-State: AOAM5309kxspNiPbb34JtUX3fn9CqKXnZpQ1ZoiQJotUCaiDlr8nl4dr ejo3ZVMHh0im9ftilpDO/LbLI311PXFmr7Ld X-Received: by 2002:a1c:a186:0:b0:385:31c:4b2d with SMTP id k128-20020a1ca186000000b00385031c4b2dmr3368236wme.7.1646307724409; Thu, 03 Mar 2022 03:42:04 -0800 (PST) Received: from ?IPV6:2001:861:44c0:66c0:37d4:6d61:9015:27a5? ([2001:861:44c0:66c0:37d4:6d61:9015:27a5]) by smtp.gmail.com with ESMTPSA id j7-20020adff547000000b001e3241df64bsm1715867wrp.112.2022.03.03.03.42.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Mar 2022 03:42:03 -0800 (PST) Message-ID: Date: Thu, 3 Mar 2022 12:42:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes Content-Language: en-US To: "H. Nikolaus Schaller" Cc: Paul Boddie , Jonas Karlman , David Airlie , Robert Foss , linux-mips , dri-devel , linux-kernel , Paul Cercueil , Kieran Bingham , Laurent Pinchart , Andrzej Hajda , Discussions about the Letux Kernel , Jernej Skrabec , Maxime Ripard 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> From: Neil Armstrong Organization: Baylibre In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 On 03/03/2022 11:40, H. Nikolaus Schaller wrote: > Hi Neil, > >> Am 03.03.2022 um 09:35 schrieb Neil Armstrong : >> >> Hi, >> >> On 02/03/2022 23:24, H. Nikolaus Schaller wrote: >>> Hi Neil, >>>> Am 02.03.2022 um 15:34 schrieb Neil Armstrong : >>>> >>>> Hi, >>>> >>>>> (cross-checked: RGB mode still works if I force hdmi->sink_is_hdmi = false) >>>> >>>> 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 = false and replaced >>> /* Default 8bit RGB fallback */ >>> - output_fmts[i++] = MEDIA_BUS_FMT_RGB888_1X24; >>> + output_fmts[i++] = 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). >> >> Pretty sure they don't support YUV HDMI output. >> >> 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... > >> >>>> 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 = 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? >> >> 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. >> >> I wrote an initial support to disable CSC (only compile-tested), could you try on your platform with setting disable_csc = 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. You can add it in your v17 patchset with my authorship and my Signed-off-by tag + yours. As commit message something like : ==================== drm/bridge: dw-hdmi: handle unusable or non-configured CSC module The dw-hdmi integrates an optional Color Space Conversion feature used to handle color-space conversions. On some platforms, the CSC isn't built-in or non-functional. This adds the necessary code to disable the CSC functionality and limit the bus format negotiation to force using the same input bus format as the output bus format. ==================== Thanks, Neil > > BR and thanks, > Nikolaus >