Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5936558pxb; Mon, 14 Feb 2022 11:07:54 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN4iqVQqcSfIGuDTVUgbackuHGFWP5t/rwayHjMveSYVCWwPhsbgp/hhDEJpEiL39U7rRp X-Received: by 2002:a17:903:2443:: with SMTP id l3mr303466pls.146.1644865674472; Mon, 14 Feb 2022 11:07:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644865674; cv=none; d=google.com; s=arc-20160816; b=V3UWCdVpqPOG2NwR21dJ9LgAeSk9vGXPyrRbJqAZ/7WAfTw5iQxgJrsZpavUiISwtk J/6FJftmXHX0nGFPTk0Wnv1fzbTzNH7nIoJYnP66eCFoZTNDjYZr3fEedQ6RiIAxXK5H pD+bAX26/PQqrxwY3A+29siGagwCPsloVAZ8KyatITuEjPPGDzjSaPALBtgkhiP850ID yz8/MaH0VAPQuhlMFtEix9t0tV5oT1MyQ+1KnFy8AvsW6kh10a+1U3rj5vXhO/vMWT3z igYYFrNCUHje+afg7zEWq1fA/GbpuXunAjsJYMhreBR8Scjg4ahZXCVzqWVINMbV9ebn nuDw== 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:date:subject:cc:to:from :dkim-signature; bh=76+TPRGf0MB6hHRwPaUxmX8Eixo5outKfV374UIYYws=; b=KkVzT+4+gA5H8MAbPrptpvqxS/WDPv4yySnDXRCDxApTTz/c8Di07nOFgn2eQ611ul 2x3OUOZXC+rEGAjXk4WqHoGNDrTouisyQWEsmhGqIyjGIltDCk3U6gXsk+OhWB4ShT1K clN1mJ8BeGgWbN4GRLpeuM6gmm73M9B7azkosioDozGaNXSb+im6IbLHN5+I9d6T0YxN MtGfD8YFNcSDZ2+Gmg9KIlfgNwHwOP0wj7Ot9/z6lj9mbg6VpOxGGP21EGaLZA43ANMu qZ357pGwsyFSjANekJKx+L+wj4/InBZS9jQpgJsWD4fQTLxg6MbqRBUEV8nt8C89DeLj DtNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=LvEEe3IC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h191si458417pge.504.2022.02.14.11.07.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:07:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@goldelico.com header.s=strato-dkim-0002 header.b=LvEEe3IC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D47358BF66; Mon, 14 Feb 2022 11:03:50 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236680AbiBLPvT (ORCPT + 99 others); Sat, 12 Feb 2022 10:51:19 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:54906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236633AbiBLPvO (ORCPT ); Sat, 12 Feb 2022 10:51:14 -0500 Received: from mo4-p04-ob.smtp.rzone.de (mo4-p04-ob.smtp.rzone.de [85.215.255.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95D7324595; Sat, 12 Feb 2022 07:51:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1644681058; s=strato-dkim-0002; d=goldelico.com; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Cc:Date: From:Subject:Sender; bh=76+TPRGf0MB6hHRwPaUxmX8Eixo5outKfV374UIYYws=; b=LvEEe3IC5nz76IfJV1W88t/7Ocuh9kCtYx3c14vnXvIqBDw1b3N9u9eac8nJO5T2eK WVeiSE0Rs4qBACVGAxqtZQdLgPTKVXI/yrZ++qB/GOwevgN9wHOPQJrI+PjnN30oN+RI jV67BzU0HYNLY6pyYToaIcSPMMXTbpfQVX8XaaCnznPRDNi4wEbiKaTEAnPge8DBeoE8 bqXm0NSvTavqMRwy05iEVsJs+HKIVk9EoSjfDEOcv6H3H//oW7vcRLr4yxqtxxiJb75H FuwOurb6X3lXTpJez67EGCcQoeBZvxPmKEudc4Fn0w3TA03iAOKv5bNjf66/FYW3u9M0 AMIA== Authentication-Results: strato.com; dkim=none X-RZG-AUTH: ":JGIXVUS7cutRB/49FwqZ7WcJeFKiMhflhwDubTJ9o1OAA2UMf2MwPVblcdY=" X-RZG-CLASS-ID: mo00 Received: from iMac.fritz.box by smtp.strato.de (RZmta 47.39.0 DYNA|AUTH) with ESMTPSA id L29417y1CFovswr (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Sat, 12 Feb 2022 16:50:57 +0100 (CET) From: "H. Nikolaus Schaller" To: Andrzej Hajda , Neil Armstrong , Robert Foss , Paul Boddie , Laurent Pinchart , Jernej Skrabec , David Airlie , Daniel Vetter , Paul Cercueil , Maxime Ripard , Harry Wentland , "H. Nikolaus Schaller" , Kieran Bingham Cc: Jonas Karlman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, letux-kernel@openphoenux.org Subject: [PATCH v15 4/7] drm/bridge: dw-hdmi: repair interworking with hdmi-connector for jz4780 Date: Sat, 12 Feb 2022 16:50:52 +0100 Message-Id: X-Mailer: git-send-email 2.33.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 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 = 0 when running this function while info->bpc = 8. Since the formats checks before this always test for max_bpc >= info->pbc indirectly my assumption is that we must check it here as well. 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 b0d8110dd412c..826a055a7a273 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++] = MEDIA_BUS_FMT_RGB101010_1X30; } - if (info->color_formats & DRM_COLOR_FORMAT_YCBCR422) + if (max_bpc >= info->bpc && info->color_formats & DRM_COLOR_FORMAT_YCBCR422) output_fmts[i++] = MEDIA_BUS_FMT_UYVY8_1X16; - if (info->color_formats & DRM_COLOR_FORMAT_YCBCR444) + if (max_bpc >= info->bpc && info->color_formats & DRM_COLOR_FORMAT_YCBCR444) output_fmts[i++] = MEDIA_BUS_FMT_YUV8_1X24; /* Default 8bit RGB fallback */ -- 2.33.0