Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3257072rwo; Fri, 4 Aug 2023 01:47:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPiyNqlawpidBrTwKycQFbCBuDGvEHKqk8gRFqcF6jCpe50Mo5etEf6M445ASQcZx5FXbU X-Received: by 2002:a17:90b:350:b0:267:faf1:21bb with SMTP id fh16-20020a17090b035000b00267faf121bbmr861035pjb.15.1691138867458; Fri, 04 Aug 2023 01:47:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691138867; cv=none; d=google.com; s=arc-20160816; b=D9YXKjFIZib7qJ2lrqTelUvHvvZaQvsNNvd9YMaB6Ps434VmrrCCFpPE/sQmV4w6yI etMs9S0fmywohhCD+6D0Cng+SPIHKvBqW4w8lMPK70xMZ6/gwGrO/CzVcmRq9ukoEzRE N64hnRCPLeHz7xFcwrYSuRYfCeQXmHSP+dIQhdRBESm7uJzv4RHpNr565hiUGDYoxRRZ DG2TnTeQINXFpvSyxZnkU+eBDFQa+BH9vxTAKoRo/1cRRfihZNlZbwoLokxLehCYhoOl AG1TOxYuAMFPY8lbJuvvWkl7dZq2u/TUUxcowQl9WTxzhP7tbBIsApuEusvTyORs3ph5 oBCg== 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:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=gqxlgcpfhwpFaXOSuUXztrVkPV/filJ7HPI5vUJFn3E=; fh=SIQVdi7oGjEB1eCNNbnm8g0cvxjunnZJ2sLehne39yw=; b=IcN8i88FQPyC+kn1wo3V8HdPjbewE3hTeRIjEx/ehhgew6LiyD9IIYCH9P21b/URIF iMCOCXFBoO8cqwkl/eA1tQYo/e7QJ2UlPScCs+w7kwNaurjXCK6x1JUoEvyFmoa3hPBl T4vpuq133HFFK0sA1OKSbC6uTRcfFX8RmarJPuPJa5KrxIznqqC/p8ud1+9ly2A99hGC Og/iJO/FYaeqcQTODHhDZi2P6N+RfhHuHJ+Sc4ADW7cjt5Hgpb3PllQZ/EOq4hUoN082 x+7RiTe6DjFuy2x4QE/A4+1p1PiX0+Bw72OFxyYSQTqexcxdeNj8/hOnzaeD51xjoegA 8wcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=la56hkmB; 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 v18-20020a17090ac91200b00268149f78fdsi1501222pjt.147.2023.08.04.01.47.35; Fri, 04 Aug 2023 01:47:47 -0700 (PDT) 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=la56hkmB; 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 S231916AbjHDIXL (ORCPT + 99 others); Fri, 4 Aug 2023 04:23:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233967AbjHDIXA (ORCPT ); Fri, 4 Aug 2023 04:23:00 -0400 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 CA507AC for ; Fri, 4 Aug 2023 01:22:58 -0700 (PDT) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-3fe2fb9b4d7so17709945e9.1 for ; Fri, 04 Aug 2023 01:22:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1691137377; x=1691742177; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=gqxlgcpfhwpFaXOSuUXztrVkPV/filJ7HPI5vUJFn3E=; b=la56hkmB5KE/vOZuUxcRaQmvZ9MPF1D/ZT7jq21xwwgHzFLMD4dPW5/wJdduQftQwQ NMa883gmLxCK3Lya0Fb1kEgjoxoAb5MehiBui6PLmTFKp4gD8hhFUIWi2K1HcGEea1Cr vXkv6la4FfyMKuPogb6rVlOJqZdHZaIFRxqVMHDWs/tdOgVsLZe0ZmXERhgVDQreNyhp 8R5xi2VL809H4dHkjecL0tCJCTtYKs7af13o8yoncFirEPjET66BiNeALHjgit16amwL e9B4WL7jZSs/paDR8b1lIAvUMgvgfABlMUFoYYwji/kzjOQ87Y52KPQGv/XLli4dPEz6 qZIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691137377; x=1691742177; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=gqxlgcpfhwpFaXOSuUXztrVkPV/filJ7HPI5vUJFn3E=; b=TD+06KYxRfa/ddxkHCrnxN1QUQkFVd7iEBh7fRxOeLjOoTrLZBl5oIyqJg6hegEeNe zf8C6xtr/eI0ewwJV1H3stLaSo/Uvme4dtXnlPqnPLw1onW+MPbyk8j61KNqpvclWJ6p ctd90OO3qxkbwLt77F8LKszoASA2GJWvUX2H5DZFajgaAQxltYT2NHvJtVpcYUkm7WOx frScC30Cl/pAlkwA3vleaFby4SjMo7z21Z9RthPTqZUcgd7dBN+lTCHgjgphJ6F+LltC walvnTBEL4stffdbMbkdasYBvsI5X5DUSG4LH5b0wY6i7pjPe5dY0FHL37Jx+gN3Pnt6 cJBg== X-Gm-Message-State: AOJu0YzNhcMU5VwqJuNUvUCzIpC3I87hzFeUxWZvSgOpFWLTFFIPGevj UKGtA6f7AvK0PNl4H/BXii1tWw== X-Received: by 2002:a7b:c7cc:0:b0:3fb:ffa8:6d78 with SMTP id z12-20020a7bc7cc000000b003fbffa86d78mr945295wmk.36.1691137377113; Fri, 04 Aug 2023 01:22:57 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:b526:9083:f5a6:4af1? ([2a01:e0a:982:cbb0:b526:9083:f5a6:4af1]) by smtp.gmail.com with ESMTPSA id h6-20020a5d6e06000000b0031435731dfasm1884500wrz.35.2023.08.04.01.22.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Aug 2023 01:22:56 -0700 (PDT) Message-ID: <4912be5e-99c8-588c-9fb4-0d8a404c4b62@linaro.org> Date: Fri, 4 Aug 2023 10:22:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: neil.armstrong@linaro.org Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v2] drm: bridge: dw_hdmi: Fix ELD is not updated issue Content-Language: en-US To: Sandor Yu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Cc: andrzej.hajda@intel.com, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, adrian.larumbe@collabora.com, treding@nvidia.com, the.cheaterman@gmail.com, l.stach@pengutronix.de, ville.syrjala@linux.intel.com, cychiang@chromium.org, shengjiu.wang@nxp.com References: <20230804061145.2824843-1-Sandor.yu@nxp.com> Organization: Linaro Developer Services In-Reply-To: <20230804061145.2824843-1-Sandor.yu@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 On 04/08/2023 08:11, Sandor Yu wrote: > The ELD (EDID-Like Data) is not updated when the HDMI cable > is plugged into different HDMI monitors. > This is because the EDID is not updated in the HDMI HPD function. > As a result, the ELD data remains unchanged and may not reflect > the capabilities of the newly connected HDMI sink device. > > To address this issue, the handle_plugged_change function should move to > the bridge_atomic_enable and bridge_atomic_disable functions. > Make sure the EDID is properly updated before updating ELD. > > Signed-off-by: Sandor Yu > > --- > v2: > - Add the variable of last_connector_result back to driver. > It will only be used to initialize audio codec jack status when audio codec driver probe. > > --- > drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > index aa51c61a78c7..963050de42c3 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c > @@ -2463,15 +2463,7 @@ static enum drm_connector_status dw_hdmi_detect(struct dw_hdmi *hdmi) > enum drm_connector_status result; > > result = hdmi->phy.ops->read_hpd(hdmi, hdmi->phy.data); > - > - mutex_lock(&hdmi->mutex); > - if (result != hdmi->last_connector_result) { > - dev_dbg(hdmi->dev, "read_hpd result: %d", result); > - handle_plugged_change(hdmi, > - result == connector_status_connected); > - hdmi->last_connector_result = result; > - } > - mutex_unlock(&hdmi->mutex); > + hdmi->last_connector_result = result; > > return result; > } > @@ -2971,6 +2963,7 @@ static void dw_hdmi_bridge_atomic_disable(struct drm_bridge *bridge, > hdmi->curr_conn = NULL; > dw_hdmi_update_power(hdmi); > dw_hdmi_update_phy_mask(hdmi); > + handle_plugged_change(hdmi, false); > mutex_unlock(&hdmi->mutex); > } > > @@ -2989,6 +2982,7 @@ static void dw_hdmi_bridge_atomic_enable(struct drm_bridge *bridge, > hdmi->curr_conn = connector; > dw_hdmi_update_power(hdmi); > dw_hdmi_update_phy_mask(hdmi); > + handle_plugged_change(hdmi, true); > mutex_unlock(&hdmi->mutex); > } > Reviewed-by: Neil Armstrong