Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3466969pxb; Fri, 4 Feb 2022 09:07:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJz7DBVoGY7x+vujzcYm9j7ahbvDJKYOHol9bu5Q5Z2DhCvl18u8UwgmNgr6cplCeT765Fvk X-Received: by 2002:a05:6402:718:: with SMTP id w24mr51399edx.35.1643994448184; Fri, 04 Feb 2022 09:07:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643994448; cv=none; d=google.com; s=arc-20160816; b=Tlfqplv7jFiLTAH0zFHpD9NtE0quljI/ud3RpnUEzuVdLTOXFMvzA+XvsyAUd5rQMF Bz4Agatp4PMYge7gqVFIH8AMwegvr8jAsAlXrrrWhXLj1OC3IJrRRqvXGjJGo4F4LYp3 i50fk2bSa5cxploQHSgBg9CUe5rA/PQSMMnbWmUPQ3GIlBCNhcvW4PAScUiCLP6mB8jg mcerM9A8i5CnwFzpyxc6BfRJUAVJrsP5X85naSpXcj3M0U9xnaBfC6MaQKhCN33EYkLn kbQQ/Bb8em7wtvLERi7Pc7aNvl10FYSJj9oHUCT7JVTIlKTMAvSTvTm+UT2ZxZ9pnZtJ UsvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=2qpcRyh+24qtP2VVaX3PS7mv2lf5IWfW1neqWFvhdxM=; b=C8OXC6B3quJeNetrSMiaP7U13Xg4TutRrAHQoa0Q2YolawnPvaycgn5N4PiRTS1i0/ hP5J41TA7YjQTaaNEtajiuxGftE1UGP0OYL0UeVrhUTOGELVdi2eJFd3c0YSjqtHRuxT lbuiYFs1WqsllVGPCrCyMVZee5+IQ0/6Rs+ClXw/EfRXpMpmIN5un3nhcOSEx+8ENIH+ hnmjdBiJb5JzaP9I2etn1IJy2H4CwHOHcC5CM104/sv62V7+DCXM/skKTyeRCvsaRO/P bt/d7DPakzWTx3yMutRh5Ca/gGGCsevauQtljBjnIJajej0LeXOgunjjkeY62gOYNT5u 8Kng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HjMI8iZL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dt16si1454193ejc.774.2022.02.04.09.07.02; Fri, 04 Feb 2022 09:07:28 -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=@linaro.org header.s=google header.b=HjMI8iZL; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354347AbiBDOFc (ORCPT + 99 others); Fri, 4 Feb 2022 09:05:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232992AbiBDOFb (ORCPT ); Fri, 4 Feb 2022 09:05:31 -0500 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8748BC061714 for ; Fri, 4 Feb 2022 06:05:30 -0800 (PST) Received: by mail-pj1-x1036.google.com with SMTP id q63so5661880pja.1 for ; Fri, 04 Feb 2022 06:05:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2qpcRyh+24qtP2VVaX3PS7mv2lf5IWfW1neqWFvhdxM=; b=HjMI8iZLqfdazRpmnpfZL//MzxxnWj63vgQoTMi7jsbHxH1ssKOVpsZzSZEQnOlY6E wZAWPbVnJ5++71gvc3WZRhn/63ZmQAyUB0jZiJOkwwNcPxWvUETM53K37Dcw2Fu/ATWn Jx0H11c+ls9yn0/KiuE9h4bDVdg6X+8QFjcbPYb5FjndjsGDzGDBLMsYL9kuE6BRizKQ B71ju3Tpo160s0fXVOw/ZkbOpWxe4Ay+f3W05T9OY6Uli045hEVr2rC0WRQgQ+ZNNgpx 3CfbNChebx1P8JuuOKOot8OtyCkJ3aK2q0Zy9HD1r5SdEDUGAvCLFWlABsXZBaN2MPio c/Cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2qpcRyh+24qtP2VVaX3PS7mv2lf5IWfW1neqWFvhdxM=; b=y30zduHFZGhSg4tNmMvy8lQ6G6xajyn82Hp6lkOKO7v7LTbVpygwWwBepuCc939wtp s76FFc+fqz2GVWMAWBg17gmeD1cBB0Z02tx6SoLX3vg9s306LMrbnOt/wvQnOoQpo5Zv NkWIYMxJZMHuIj+euQFSJfmMJRTeT1EEktPOEM8N80EKeKv9j2YWsYKpcE/sNh/L2+oF SrIjNgElA/xmyUzLRRLsCxs4x0vNh0Ls5DzYAhZVlOxsirazQGqxmyU4hL384bD8OI7Q 1FKxBxSOc3Up217vTbf3Qhij+33HAQrQT6p7pyY/ePvBAr7m9UTLvSWHjEXJz4tq+06G SY4A== X-Gm-Message-State: AOAM530kYAEJUBvtgW+1Uy2g84JUU2iZMcX+7TsV615KOGMPWiC37Rn8 rYhJfZSUqzoymwLaHlTpn3D1mgTzZuL8rIXkom1oeg== X-Received: by 2002:a17:90b:4a86:: with SMTP id lp6mr3334875pjb.152.1643983529997; Fri, 04 Feb 2022 06:05:29 -0800 (PST) MIME-Version: 1.0 References: <20220119122843.1455611-1-narmstrong@baylibre.com> In-Reply-To: <20220119122843.1455611-1-narmstrong@baylibre.com> From: Robert Foss Date: Fri, 4 Feb 2022 15:05:16 +0100 Message-ID: Subject: Re: [PATCH v2] drm/bridge: dw-hdmi: use safe format when first in bridge chain To: Neil Armstrong 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Jan 2022 at 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") I think this is the wrong hash. Is 7cd70656d128 the actual hash? > 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"). This hash too. > 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; > > -- > 2.25.1 > There are two checkstyle issues apart from the above mentioned hash issues, and I think we can ignore those. With the above mentioned issue fixed, feel free to add my r-b. Reviewed-by: Robert Foss