Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3116173pxb; Fri, 4 Feb 2022 01:29:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJwVPnlPAO2qE8aGgV5Wg/f58kAg+M7gmOs02zP1BR9pZxJeK9R5DWWqjk4xeYGL52BRrdGy X-Received: by 2002:a17:907:d0b:: with SMTP id gn11mr1679015ejc.63.1643966944583; Fri, 04 Feb 2022 01:29:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643966944; cv=none; d=google.com; s=arc-20160816; b=Gt7Ghl5/8N+Xyt62tN/vSi7v7cKZWkCrCScYJRDko84caH3ecQ3crj43fSVQ2P+qix AoaJsovZHcTJdpX9EBtkS5G/Pdug3W18i/HM4xUS8O4nrqvlF9eVHQW2WKgAXxy9aAtj N+3UhqX3+lz94JffQil4lC/swEKgm9ktekvgomrxAxAgnNGYa6Q1aH9OYpQdI1wTHyZm RH4Y7mM9nTXHD8Avw2sM0qbiP6SkeJOLzwP9r3COhbQBrYl3VMFVVhRLnjwThHdP/7s5 xkmaeLR6mQHmPBIimvRdR+/FM9RRExoyRsX+CEpDlH2VYWfWw7YW6pBkosaL5ctxvD+z O3cQ== 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=g4ZJpPhwpQl7h33ISIyrKDAF+HsmMexwbuW8LO0FMoY=; b=Wu+F0IBrI2J/9iyB6HuIsMEj7Zj0agQCgL98L2/7gxjCyHp5v7lbsmvdeZvLfuUNWg VJ/b7z7H3iDcMC7keA9030a6OBUHfh+aPUAO/1S+fATnrj0LOD0fr77hI3+NO4hvpfZa gMOoKJWjT7SQhHQnWY4XUhVJzZtG2empXbidHgk1Q8CYmr0meNcLHrVozuVZwhY+RZBn irRlZEqvUYfh7nS+5dsqfWPjp3/Tny8LdSUEuzPLCeksutAtdzo6rBEfrLimaRlekhGo BolRXdLDhHlZjbFD8/KAzFGp3gTQlvWdqY32jYnBbKlqDI1X+SEI3vjyUqkoQwAzPjlE 5FuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=VDoZ3k7Y; 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 cw10si836417ejc.733.2022.02.04.01.28.39; Fri, 04 Feb 2022 01:29:04 -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=VDoZ3k7Y; 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 S1356924AbiBDIcf (ORCPT + 99 others); Fri, 4 Feb 2022 03:32:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49218 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231459AbiBDIcd (ORCPT ); Fri, 4 Feb 2022 03:32:33 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C65D6C061714 for ; Fri, 4 Feb 2022 00:32:32 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id w11so9884371wra.4 for ; Fri, 04 Feb 2022 00:32:32 -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=g4ZJpPhwpQl7h33ISIyrKDAF+HsmMexwbuW8LO0FMoY=; b=VDoZ3k7YLzFp9sL16l3v+G5LmlEOh5BNTxqlRWLSmAzAq0WBt6qiZ06KtVy8Z1oUZz XYWuYCEWI8n9h/KeueJZnWf5PArPrmOUz9URbT5DnW833vVMkZ5LmRB3mtLZzyQvI8nt M/+nNivfNV8QOhjLBKo+4WSnKp1nz/NFAoLjzqcLDe24mz0U/9jq+0Exfzu1vz916Us6 h2haOl203RDvJg92e76mIsrZ8aB2NCHVYJF7i0RvpmccrkXgEBphEGbUVBxgSPO8Ilg8 nUEzaH9sLZFliEaLykulK4Lansxj6kZUJtfUk/9WwFfmfO8nLn1FkFUJIZTUabmQRsju +xLQ== 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=g4ZJpPhwpQl7h33ISIyrKDAF+HsmMexwbuW8LO0FMoY=; b=1XsCXfozRsqFBiVgfMyCG6d1Al4+CwFfiHBQv+oqR7h6FTwxQJzJ6tbAqQxPhJY1AE GBUcQMUhmLtU3CicjE9wAhsAe3T6p92/As2qvLJAB9bIA6HurwHsId9do+tKSihLh141 IHVmn1rOkMgfwADVrsSL22G4kBqiatFIsbtiYtGFGDcm8OcED5f3jiQik7Hb7vIV65OJ Jiz3prE7ebrHeOX4HGBntjFAaMzHfLOoHy6LAOAHI7kgn1E9wh5ZHUmuJqq5wkGoimVo C20TLhtaf5/DXoFXFTj5+WP89MB086Zs4mA/G6qym1o1VGLEgvFI5e7YYaGq4I/jHTLk R19w== X-Gm-Message-State: AOAM5332+TY/N75E8FZ2LUdAlFdRDUTaWJ5qe/usZYNo6OdfGZpSqMq3 GPjhoHK2palDABeMn1xVLMV/0w== X-Received: by 2002:a5d:5103:: with SMTP id s3mr1523764wrt.360.1643963551226; Fri, 04 Feb 2022 00:32:31 -0800 (PST) Received: from ?IPV6:2001:861:44c0:66c0:3fbe:ff10:110:739? ([2001:861:44c0:66c0:3fbe:ff10:110:739]) by smtp.gmail.com with ESMTPSA id j13sm1245036wrw.116.2022.02.04.00.32.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Feb 2022 00:32:30 -0800 (PST) Message-ID: <9b98f2be-ed07-c956-adc8-51251b3432ee@baylibre.com> Date: Fri, 4 Feb 2022 09:32:30 +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 v2] drm/bridge: dw-hdmi: use safe format when first in bridge chain Content-Language: en-US To: robert.foss@linaro.org Cc: Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, kieran.bingham@ideasonboard.com, biju.das.jz@bp.renesas.com, Kieran Bingham References: <20220119122843.1455611-1-narmstrong@baylibre.com> From: Neil Armstrong Organization: Baylibre In-Reply-To: <20220119122843.1455611-1-narmstrong@baylibre.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 19/01/2022 13:28, Neil Armstrong wrote: > When the dw-hdmi bridge is in first place of the bridge chain, this > means there is no way to select an input format of the dw-hdmi HW > component. > > Since introduction of display-connector, negotiation was broken since > the dw-hdmi negotiation code only worked when the dw-hdmi bridge was > in last position of the bridge chain or behind another bridge also > supporting input & output format negotiation. > > Commit 0656d1285b79 ("drm/bridge: display-connector: implement bus fmts callbacks") > was introduced to make negotiation work again by making display-connector > act as a pass-through concerning input & output format negotiation. > > But in the case where the dw-hdmi is single in the bridge chain, for > example on Renesas SoCs, with the display-connector bridge the dw-hdmi > is no more single, breaking output format. > > Reported-by: Biju Das > Bisected-by: Kieran Bingham > Tested-by: Kieran Bingham > Fixes: 0656d1285b79 ("drm/bridge: display-connector: implement bus fmts callbacks"). > Signed-off-by: Neil Armstrong > --- > Changes since v1: > - Remove bad fix in dw_hdmi_bridge_atomic_get_input_bus_fmts > - Fix typos in commit message > > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index 54d8fdad395f..97cdc61b57f6 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2551,8 +2551,9 @@ static u32 *dw_hdmi_bridge_atomic_get_output_bus_fmts(struct drm_bridge *bridge, > if (!output_fmts) > return NULL; > > - /* If dw-hdmi is the only bridge, avoid negociating with ourselves */ > - if (list_is_singular(&bridge->encoder->bridge_chain)) { > + /* If dw-hdmi is the first or only bridge, avoid negociating with ourselves */ > + if (list_is_singular(&bridge->encoder->bridge_chain) || > + list_is_first(&bridge->chain_node, &bridge->encoder->bridge_chain)) { > *num_output_fmts = 1; > output_fmts[0] = MEDIA_BUS_FMT_FIXED; > Can a bridge reviewer get an eye on this ? this actually solves an issue reported on a Renesas platform. Neil