Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp3418130pxb; Tue, 19 Apr 2022 01:55:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz5u0v1semXbO06X43yzVfQ9LHgx0RXH9d0mxBbJvQv26PkKkenKA16Q9Y27+XmG/mqr+9c X-Received: by 2002:a63:350e:0:b0:3a9:fb92:85b8 with SMTP id c14-20020a63350e000000b003a9fb9285b8mr7443389pga.328.1650358558992; Tue, 19 Apr 2022 01:55:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1650358558; cv=pass; d=google.com; s=arc-20160816; b=iqPa+9IkRM8d7MKJH6MoHiPvIZ78897vxlJzJEGtNb9nOPdgN72vGMp7e9TrY0kIW2 9S43SfKeNoZvjMntTxYCCPN/1OcKHhg1SUwOKwJSvUcx7/CnX713zTIHagCDBLGwS6uY /rslDwAk0u+oqkvktjb3Iu51HRl7M8GnKzNR0N0jonOhDaEN3sorZShHdbmGcKcfDiFt 2W6ndWgxDC24Y11Gld+oe7iLwH1ZJTC/hy3zjzF4BZhSXZqGDGiEPiDW8UQcbHWTOjQg JaWC3XAbWW+XTTM7TW5VmHxugxxC30yMdz48spPsJxuhm8Mzhqu1C2HihAVQOCF1GBXC zhUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Wc+Zj0l90rxrWHuWqUCpymP5ydXp2rJHMH2DYeU2WBA=; b=ZH2/+UBOGNp3+2MZCiNumLWyfBTBH+Nobxpkf+THbZraHazE7JcsR8eEisfvbZx9Mb 5U8436+y5BuuxIMH5zrwlNuUnF8R6BiwTsyJOboc5aiirlFtwO/VKDaySBkhTJ5hTwVa rzkMgATlSgj08sE17HliadhUTQSNJJPdXprrs6DUIY2SihEJh9hlK1isRkMakdRj2aJT slHcuxc4+jEw1p0oXgEWWdlQ5q0LSYzcC5dQFrKnR0DGmPkNfBPus6mAsDikXMy9Wacj Ou302W+gk+XWQL+JvXR3IiHP9J4HgMI5y50sWxDoc7fumkNyX/peYxe+m7ADJKygNQIQ TJIw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=sjSwf8bj; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x35-20020a631723000000b0039e45222007si11624045pgl.227.2022.04.19.01.55.44; Tue, 19 Apr 2022 01:55:58 -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=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=sjSwf8bj; arc=pass (i=1 spf=pass spfdomain=analogixsemi.com dkim=pass dkdomain=analogixsemi.com dmarc=pass fromdomain=analogixsemi.com); 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=fail (p=NONE sp=NONE dis=NONE) header.from=analogixsemi.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344916AbiDSCcn (ORCPT + 99 others); Mon, 18 Apr 2022 22:32:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345407AbiDSCc2 (ORCPT ); Mon, 18 Apr 2022 22:32:28 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2105.outbound.protection.outlook.com [40.107.237.105]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 18AF8B14 for ; Mon, 18 Apr 2022 19:29:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=no381V2+rvEvax4YNAyr/XVteTwHzYPErIod9nBRAJ6PNW4qs/q1MDuFXBdEaC/nPxo6KGw0Xocz2xd7uS2WL+YIy6jcdpYXQpqVMKtE6ElHHdnXij0rsvFQFs9rZWrglrTecwZ8i/yLIcAQxSYP3YDs6f9yez1Y5/MTj7Tey6DLjw9pHUsZ87an4Gj7u45UBs/JFe8oVcyzFWbfJB9jDccm/DGLfdHr1FKl79x7Td0y4sm6dX0oZ2ETpYi2D1mzs4MVRICALrHo1hraJWkRExpOIuneYXTKOwIsDdHwXIkqMsWN1dn+LI6Kq4Gv6mSO8S8kBwttA8fbPf/jmT2uXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Wc+Zj0l90rxrWHuWqUCpymP5ydXp2rJHMH2DYeU2WBA=; b=IvFAIwOgS6DHpoM/03wxCAruNl1QObd6x4o1q1yws8xtKfhaUtzptGC/4WUuGtn2/pcyIKUa9S892kuoAsz0a8FMsIlDu5wV1aALYclHY2WAVWHe9WA+lTt8v9cK7Xc3yAa/38Bo+P5jfCYPsN6eqSbFU6h+VZ6mYbJyqwINXvnyBRxGq6szjqNDj9HnHNjvVj99HWU9k8TRcnO/3wFoDoKlXlMkpsryYROTbVRhUCWFJ9oNGhPF6r7VDJngorMT3Jr7pEF3L6pPswnzssvMAMWpywaNfJ0R823dLzbvNQIpk7vhIMwc0osug4FJWMGNf1ufBmP6Gon9olr/71DG4g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=analogixsemi.com; dmarc=pass action=none header.from=analogixsemi.com; dkim=pass header.d=analogixsemi.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Analogixsemi.onmicrosoft.com; s=selector2-Analogixsemi-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Wc+Zj0l90rxrWHuWqUCpymP5ydXp2rJHMH2DYeU2WBA=; b=sjSwf8bjaBrA6M7xFijIzqhTUWuHo653OPWgwFey2wjI/adM7hzjNJp2LQllBEJRpMsAYnuGKso7SJum4yiqLJlXcUb+r0d8lFz3O0NlGJJ5aIOyzZe1h87PTfZLBJofGm9r5QpinQOg4dZHnbIjw5L+RnPkVOTk2ecxuOr4vns= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=analogixsemi.com; Received: from BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) by SN6PR04MB5198.namprd04.prod.outlook.com (2603:10b6:805:f7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5164.20; Tue, 19 Apr 2022 02:29:41 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::e9ba:4c90:6e9c:39f]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::e9ba:4c90:6e9c:39f%3]) with mapi id 15.20.5164.025; Tue, 19 Apr 2022 02:29:41 +0000 Date: Tue, 19 Apr 2022 10:29:32 +0800 From: Xin Ji To: Hsin-Yi Wang Cc: Robert Foss , 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 Subject: Re: [PATCH] drm/bridge: anx7625: Fill in empty ELD when no connector Message-ID: <20220419022932.GA629745@anxtwsw-Precision-3640-Tower> References: <20220414090003.1806535-1-hsinyi@chromium.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220414090003.1806535-1-hsinyi@chromium.org> X-ClientProxiedBy: HK2PR0401CA0022.apcprd04.prod.outlook.com (2603:1096:202:2::32) To BY5PR04MB6739.namprd04.prod.outlook.com (2603:10b6:a03:229::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ce4e6d90-12f0-4818-ebc6-08da21ac752a X-MS-TrafficTypeDiagnostic: SN6PR04MB5198:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ggcwma0IiwM6Kp3kqtGjjorV63cd2OR6MIaNU6HAyTLgQtvvYU2EtfjBWXwE3vIaK6u9zHFiuigmNDSSKSWe4rLo900FNgNrHNz9STxJ2DwrVqSwqanjMNO2rQpZBrqsgVQXBYl7y9Qy3qmbG1LNtc58FuIb/i/obn1FyKdhnRf/3cvlERgNLkjTrjXfZJ2w/CpzdxsjLBvzxiz0vodxewcxXFo4RhqytV9qiSIGxKJJZO/1ti+1slu2hnqyTOldmh3oyeJQlKughcZJV318vd/u8xshSypsGZ9IjkuDxDkBNGe1C6kh7alO0pHIap8JG1jqvBLWxFJfr7GuWP3CTksjtHb52BB6LeNjcmPL07SQiOwgy1txV5zK/diPHFLF4F+WaX90905VYYfspWS+AEqo9VjcA56l3ycmGZ3S12vST9isCZKIpQFHKcFD6n+M/buKiSpvULlInJKgvtiicv21eNJ1CiM+PN3qVtXqnW6RLAwLePkm+9qBUCm8ru2hpf2ebyeE52Of0dEOA+lTLLXKca84DDTevGJOHinFFC0iekZuu40jWIgDwgOZZzm9GLXUiHoo77ZNA0VxabU2K1SDevC7mFnVmnjknhqJHiedmschbR7l9LvA0R1X756VXA02Mlzp2EHAvjJSMY7pHDRr41td1WT+KYlY1fB9j9QCuqWvwnAVRzjpqcWmuWXGPpUCrrKGaK3hAQ1lJdCcjw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR04MB6739.namprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(7916004)(366004)(33716001)(8676002)(4326008)(5660300002)(52116002)(9686003)(2906002)(26005)(38350700002)(86362001)(38100700002)(6512007)(6506007)(6666004)(55236004)(66946007)(66556008)(66476007)(508600001)(33656002)(1076003)(6916009)(83380400001)(316002)(186003)(54906003)(6486002)(8936002)(7416002);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?exvY9+BnNtSciqfN2o06tsEa9KxCThbGfbOzYesGpvuOOf40LZ6IWZHM1YXy?= =?us-ascii?Q?Cv3MCIi6351F+mltHiyi92Kv83G9hHaj+xKgFSjNcdnZn1jKzcUWK8vMawzc?= =?us-ascii?Q?cXIZr4tg162wib0FpXBMpUVLnayqDi5CBGVW/iGJ7+8swzP1hhuHJ4YqgQVa?= =?us-ascii?Q?3HlrTe6teekGeUUssFPfZknRYbpasB+c3kQgVWbtZ8coqh5Nv8b0hPRbGccF?= =?us-ascii?Q?CV3B1sRVI9RjPUztKWT35IS3nMKFTsjB+o9X5PS97D8TQ4GYPRDSHZMno5AM?= =?us-ascii?Q?xT4DBCI3W/Lkj7SEM+zSJA/8Pvv80sUVdTfMPUzc1GkIMynMA5NqR0mQWFH5?= =?us-ascii?Q?Mo69Y1yFU5jEQIn4UBXKRya7bJ7IK2QavnuDs09+hXZYcqH6Rrp54jQ1qkeu?= =?us-ascii?Q?p0vN7mWphEGPF4qQqMuJ6FbxfLmWES2UQqpPSRaIFN0PgVAm3pTGMwYmVlvz?= =?us-asc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fP1S78UI90Wpdlp6ZS6Inw/E?= =?us-ascii?Q?18VS9fb8HgwZhEf3Iqk60yxmjy9ecgqGRSf6otwH4ZX1UDGqzv8fE5HIOUu5?= =?us-ascii?Q?mvEwGfMevaPobJA1EjdL+zOQa8tlcFl61iR7CLGyuBL+eOa9QfOc7pvmIbCi?= =?us-ascii?Q?f7KHLAqQ0ZdTZT3YnMhq/eo0zHRrNRFQXE2jwnuc1oCIPMbwFeWpvT36mqEI?= =?us-ascii?Q?Hoqil0uVJMRpqIMir1JE+cpVFZexr4BrrkSa+Guz0zmnOZ9NwsT+D5CQi96X?= =?us-ascii?Q?3PAgbF3oisWx8EqCZqjBu80Ah9Yz+U1qyx6GHSR5MZKvJebi6KFTfEYPueKG?= =?us-ascii?Q?TkRBaBn2BV+vv7NsSlSd8BmXiWK3ROxkZ2Pg0ygN2IVpsPWSFdDl/nJN0nyd?= =?us-ascii?Q?AlEh3T3hYg=3D=3D?= X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce4e6d90-12f0-4818-ebc6-08da21ac752a X-MS-Exchange-CrossTenant-AuthSource: BY5PR04MB6739.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2022 02:29:41.3934 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b099b0b4-f26c-4cf5-9a0f-d5be9acab205 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 62Yzxnnfr+NW2/uiQR/ExsC8a1RBhYxmtaE/E0GL2qiRyrYu+3Jy2MAqeulIfOmfeJK/UJVDlZgqqYFN8mO1aw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR04MB5198 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 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 Thanks, Xin > } > > -- > 2.35.1.1178.g4f1659d476-goog