Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4022364pxb; Tue, 19 Apr 2022 15:11:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyxGPpiIUGtgF3Yq8RgOcww9+7xnxA9y3VNqMlGnRMPY1iFVxp3DZKpQmVaRaZYjyB1y0e2 X-Received: by 2002:a17:902:70cc:b0:154:1cc8:9df8 with SMTP id l12-20020a17090270cc00b001541cc89df8mr17838965plt.32.1650406278011; Tue, 19 Apr 2022 15:11:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650406278; cv=none; d=google.com; s=arc-20160816; b=c0Vd2z7qL0rFrJojWR2NzaDah6MBjHj1P4Win9N+iAAwvG+HGzePd+mSLYLqbtjso1 esE5OzZSoliRCK48eDSB7ewq3ym1dK/AnoF0yuXMKg00EudWiL0kWZ6UcxXmEvq0WBZR 6ej9xXLoOLWcryjqCy7Wu4Lz88j0HyMKGV2qYV8smsggs+5/sjyN5Ko/qLQkEu6fGtrL NlHouvK/9l/+a0MXiT8Pq3w68P/kbAi+1WnOgdp+hJIqayd9vRvGBI3RdfeN1rzSJZJh mOCRugc9vmWbkAWD/vGstaohpCCYh4SiM5v9CqnoN9FndHWfQKSfJJ1cst0UUyEBLuot o5qA== 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=Rw5QjY021RyzTeQ4xpVG99hTPF+Ij7oZl3AemnBjCL8=; b=eaBTWAcAw4Dqy0Q/5K2gL+ZYhdnJz9tmD5+UPbceQzdS6imEOAbuznoJJubaKQ4ek9 MrTXV0Lf4yt16/fJ/YIzg3EWw+O5PGZhrrMkMkHleOFmawArQ+jD4vfTjDA0/PAKqf/a LZpfqb6ti/qNc/KFWSUkgXoeo+13h1IqjciO2w3h1g/uy7eGz7ACzTC2caN8DRm9Hhzz aCib/f60nzCndZzwAitNxvylTaLo+st9dC70zTXY6zSQv3Tbg7Cwp3eGIOhKsnwe9p2F aZEPQA6o2IiS9yAv7/rBgBNhPy7cdIndhqu26Zm0Wdr4t6Gtw5Wjhk7A+bK3tFlqV+Zt /N+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KKbhPDuG; 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 r38-20020a63fc66000000b0039d3f493fb0si451413pgk.851.2022.04.19.15.11.01; Tue, 19 Apr 2022 15:11:17 -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=KKbhPDuG; 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 S1344626AbiDSN7p (ORCPT + 99 others); Tue, 19 Apr 2022 09:59:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344491AbiDSN73 (ORCPT ); Tue, 19 Apr 2022 09:59:29 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABFC638BF6 for ; Tue, 19 Apr 2022 06:56:46 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id c12so15823118plr.6 for ; Tue, 19 Apr 2022 06:56:46 -0700 (PDT) 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=Rw5QjY021RyzTeQ4xpVG99hTPF+Ij7oZl3AemnBjCL8=; b=KKbhPDuGJRNq+DSB9QxKIKwy8Tbd6ZArY094PBzD0N6dhwyeuB5UYs1cnDu9zNtHdD lgVXMlIhfl9h8fIW5SONAlLGncVvHUerMBgd+XthiBeXtwyG/PYlHIUCZoPW4xLuY/M9 /XBtqGUMjQ/poMaTuf5nPSxu1y1M0NVcE1IFw4sINmE6FPN5wte3AWBMiIJLwmIESjeY ghnam4GhIHcgxzlMHO5ais+I1k6ySIPePgiIIkTIF/Aawv1LLiKbQMasGbq022GUtPNb uXPN/3tvtINHCvtKCvHmrKGcgysOkCwuEH1uhwzOuWrGtrC8ngqQzJXDQM2YjpI71e5D C4qw== 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=Rw5QjY021RyzTeQ4xpVG99hTPF+Ij7oZl3AemnBjCL8=; b=7d6e2sDaRyGu9pMyZSR7yHV66Z7quKsRWpOdTcXTS0tyBMc3bVmhfrE/KLqDv9hCna CAjv5xiANgHvXSmfCVkYd5EhnsFyO9DKDi7Zb/CgCayss6QjAJ9Y7XwM9w1GL5rvoh5S fAgme6yB14l9hycytPV+nV6+ggaUFqY45iXFGtm4QqOq/kQZxy4oOBIMBCD1wOxDLNf2 ke6KwvNGCKzxeHw+5RcB2q46vkFF9OZrNQ7QnjTi2nc9iRGlIMRgvO/3ymwGIEaIHGI8 ELIzvALHZQu44BAK5JnuMuQ8QlfdoTKQOijpWzIm5Nk1HTUWrnH6KI1Mh85KyhliNSov aFfQ== X-Gm-Message-State: AOAM531o6Ub+pH8T+8p3G02jssh1xX5WOCXKnLpbRiMzYAXPRN5QVXRM DXCN+7Mlx5C45LanQbr8ebgMGLFtFF3ogWCHj7xeeaV2msQ= X-Received: by 2002:a17:90b:3e84:b0:1d2:c015:2182 with SMTP id rj4-20020a17090b3e8400b001d2c0152182mr6322697pjb.232.1650376606210; Tue, 19 Apr 2022 06:56:46 -0700 (PDT) MIME-Version: 1.0 References: <20220414090003.1806535-1-hsinyi@chromium.org> <20220419022932.GA629745@anxtwsw-Precision-3640-Tower> In-Reply-To: <20220419022932.GA629745@anxtwsw-Precision-3640-Tower> From: Robert Foss Date: Tue, 19 Apr 2022 15:56:35 +0200 Message-ID: Subject: Re: [PATCH] drm/bridge: anx7625: Fill in empty ELD when no connector To: Xin Ji Cc: Hsin-Yi Wang , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , David Airlie , Daniel Vetter , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 On Tue, 19 Apr 2022 at 04:29, Xin Ji wrote: > > On Thu, Apr 14, 2022 at 05:00:04PM +0800, Hsin-Yi Wang wrote: > > Speaker may share I2S with DP and .get_eld callback will be called when > > speaker is playing. When HDMI wans't connected, the connector will be > > null. Instead of return an error, fill in empty ELD. > > > > Signed-off-by: Hsin-Yi Wang > > --- > > drivers/gpu/drm/bridge/analogix/anx7625.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > > index 6516f9570b86..f2bc30c98c77 100644 > > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > > @@ -1932,14 +1932,14 @@ static int anx7625_audio_get_eld(struct device *dev, void *data, > > struct anx7625_data *ctx = dev_get_drvdata(dev); > > > > if (!ctx->connector) { > > - dev_err(dev, "connector not initial\n"); > > - return -EINVAL; > > + /* Pass en empty ELD if connector not available */ > > + memset(buf, 0, len); > > + } else { > > + dev_dbg(dev, "audio copy eld\n"); > > + memcpy(buf, ctx->connector->eld, > > + min(sizeof(ctx->connector->eld), len)); > > } > > > > - dev_dbg(dev, "audio copy eld\n"); > > - memcpy(buf, ctx->connector->eld, > > - min(sizeof(ctx->connector->eld), len)); > > - > > return 0; > Hi Hsin-Yi, it's OK for me. > Reviewed-by: Xin Ji Applied to drm-misc-next