Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1068703pxm; Thu, 3 Mar 2022 09:41:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcA7OeFjE+bGtKNzgCDfmXPemaXyV9G5FM0lWYJHGYOZuUSuDOt6DSkB5BFtAujacJ/DVk X-Received: by 2002:a17:90b:4f83:b0:1bf:219:f364 with SMTP id qe3-20020a17090b4f8300b001bf0219f364mr6440523pjb.184.1646329269588; Thu, 03 Mar 2022 09:41:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646329269; cv=none; d=google.com; s=arc-20160816; b=R1dKIiBxi7E/VhGEmAFZqhqKxYw0vd17kh9g4yUtac7RidWblQ48y16Vfyh4CwLwi9 YP8EWPZR+N9sBoFELWtOexHg7PpVSEeRDUVuZG/9SaBk/9YHJiO44e6biGzcy1/JE91i Imf0vvvwWyQQ7TqCG5UHGgYZYXiTWiRPr8MUl8TEySsATDouKi/ewV10mz1ataLOhyF/ P8X3V8SXVWfrRAl1dVzZ3RNvgIU9j8SfWMRu/RxKLQ1My6IhLLN5IqjgW/09Mv/i/tIH OK2Tj4QzA9FVgcOGO/kxmjjbDYOOkX3grH+Wtf5AEEZbBORH0CQlF2VK0sHa9crSFkKh /m9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date; bh=oA5fIiTFHGCVZb1ydtY8IEApOu/2vZfx1i7mNlrWErE=; b=B7q1Y4UIKf5g1hYrtmx2geFZkAGxoQeCv3q05ryTglF5WkMeQcmi6xGGVxVOtR/NeA ppWPBenEvRXTSzG/GpabsEI3cRuv1gWlvwIe9FwxkVCEcMPUWtNtXxU5Gl1hYUOcLHhU fKLQFhrIQGZxZqLbUA3uyE7TyEYuV3LQHGNqmKWW0siFgUq9RfcIg9NQTKKqJbGBNfwV gW7NoDfURY/bw+71p1er6zvJP+wjK7h7yn2jneRUIdQFLD0Axx/HbF1Od6qYWXD6ZPib Opww5VhA1tEOlwyX3e/p4HvIg3Wew4zRynDjUsG30SNJiiNb70wQzWGapxEeOVT9jTGl PsYg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bj18-20020a056a02019200b00367957051d7si2745911pgb.401.2022.03.03.09.40.52; Thu, 03 Mar 2022 09:41:09 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231448AbiCCPQ7 convert rfc822-to-8bit (ORCPT + 99 others); Thu, 3 Mar 2022 10:16:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230094AbiCCPQ6 (ORCPT ); Thu, 3 Mar 2022 10:16:58 -0500 Received: from aposti.net (aposti.net [89.234.176.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 762CE190C30; Thu, 3 Mar 2022 07:16:12 -0800 (PST) Date: Thu, 03 Mar 2022 15:15:54 +0000 From: Paul Cercueil Subject: Re: [PATCH v16 4/4] drm/bridge: dw-hdmi: fix bus formats negotiation for 8 bit modes To: Neil Armstrong Cc: "H. Nikolaus Schaller" , Paul Boddie , Jonas Karlman , David Airlie , Robert Foss , linux-mips , dri-devel , linux-kernel , Kieran Bingham , Laurent Pinchart , Andrzej Hajda , Discussions about the Letux Kernel , Jernej Skrabec , Maxime Ripard Message-Id: In-Reply-To: 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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_PASS,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, Any feedback on the other patches? They look fine to me, but I still need an ack to merge them in drm-misc-next. Cheers, -Paul Le jeu., mars 3 2022 at 12:42:02 +0100, Neil Armstrong a ?crit : > 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 >> >