Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp701842pxb; Thu, 17 Feb 2022 12:48:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmuy+hrC07X1ZuvsyTs1YXb6k3sBgISpZiyfX775Ny2x61xT61sWiunT1BLWXikZHEETDi X-Received: by 2002:a63:10a:0:b0:372:e458:e707 with SMTP id 10-20020a63010a000000b00372e458e707mr3734631pgb.39.1645130887581; Thu, 17 Feb 2022 12:48:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645130887; cv=pass; d=google.com; s=arc-20160816; b=0e8lsel02X4Ed5MvvxYTSgdKeTzLR/ham6bZNgq+ncj1CclyZY2WUx3folBTe48gbI OU6nGyHFf+PR1WfFcDyuvgWiiVsSo8MT3+RcKVc38zbANBHogTxR4FlklPMRFmTLUFMM b25Ee44hkAaDL0bWc4MM/m3picyehE82krtvEb+TPNYVoOt5vkrIWbCc7Pjv/19QJSnY DcAewUzaiYdv6qGXwnbMgQsePhjf0oFAGFv20pyhbkXV2BS82MTEV8Iq7Y+3B2q6rzM5 hAHMY23WfbLzVaGmkpzPepUsJGXO62WzSX++QtI9Gbj6baXwv2ngRGIBh0VOgKRHzkkM cQIA== 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=q9Fjbh9JIHv+FK38T2CLcKvUjK68V4R4ZZSD5skhbCc=; b=m5hFhNXxAwYBe1XpFigESVUSTX6qYgmLF0xS+30JJKhMk83OSKreR+hU6vu8pL20jX xQnZSCXp9yUXLR0ht5+coPulVFRGeVqNetxmIgWNW3hGp0bBSeV8+3P8Rb/BXxjpeLUw P9mu0j2hnfSbl3YCR3baVUgeuK/GmGpeHXTaqwa5egafqgDBoaJeEZZGJ1scMLXL9LNM mqUE8bL+NwRWb9cVcWHtRb4dKU5XTK1xXfrfGs3iCigZgW4jo5zpCHXAiKP/lGLfBqkN 02/kpCLFfow6JwfgnNG77Dz4+Q0OvdOboLiIi9nzuYipB+s+CRLhK6G7PKZKXMKlPWKS THlQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=3vWr09H1; arc=pass (i=1); 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 j3si24646544plx.441.2022.02.17.12.47.50; Thu, 17 Feb 2022 12:48:07 -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=@Analogixsemi.onmicrosoft.com header.s=selector2-Analogixsemi-onmicrosoft-com header.b=3vWr09H1; arc=pass (i=1); 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 S233518AbiBQIbs (ORCPT + 99 others); Thu, 17 Feb 2022 03:31:48 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:43544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230322AbiBQIbp (ORCPT ); Thu, 17 Feb 2022 03:31:45 -0500 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2123.outbound.protection.outlook.com [40.107.244.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB88A62CE for ; Thu, 17 Feb 2022 00:31:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a9lPLHGbfW5b4NjkHP8uPEprwM5/G3El3jmhTATw/UxhLLk1hrlmmediy6vhECwfdZOGufvjpSGMe2H/WYXnauPyvlHY6ga6SQ/tRLr5Z5f5uNBRhrinArcKTd+V4Kilu0at55/+VTOO4O4jPwm4qyqkEL/BlG3h1g4eB/Ka0r7GL6MUe88oT9PRmC3ORBBmpK407jUbjHTMtTFwtVL1yW1TxZOOWcZMt4drkkRUCNEEhpK3Sek3NLdetCNYL6X6H6cqrfhVh/mpAkK4ZikuXwSTUZqc3XsPOWdxBUygOOpdQs+SP0/nMgkRkrQRoKsNUzJUknMukdhZxyEaxE0O0g== 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=q9Fjbh9JIHv+FK38T2CLcKvUjK68V4R4ZZSD5skhbCc=; b=cEWkxcfS1jQktvsSXHj1Gx0OpiC0rNbZJBgqnqenDOtQ4jy6XxakypWpFd/KdLgzwLMNr64T/q79vx0usitPk9jToG06IA7bBPJ3zTefZkueJcD6V0tAleDEM4kTVnmz+s82zOCIw60xuAwJQk6ncp+7DdG9SFLXvfN+5GJ+AX+yW9C+b0okwFjFQKrq9hkOuzVnVtq8pC9sIPy3C8BlIUU4nvPR3SF9pyDX+nMQJ0SDi1gZ50hS06wQGSyr4xqYyFOu5xZHMtryziBtkvDimfrK05FxRwcDPnC+3C8NkSwfi5G/Clyml7JaTGy2Jqavf7FUcefmQCHSK6JffZFpIg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; 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=q9Fjbh9JIHv+FK38T2CLcKvUjK68V4R4ZZSD5skhbCc=; b=3vWr09H1pdGNPMgggZTWyj9MKYf1AV1E2jm3EwEFgSDDqNq1V0+G5UKTPkrWJHG6Z+5uhEf7WkueQIXLzdoHY1lFz7x567XBLvbg0MfhWMyayiYLWWnoZmfX2uy3cqE9LEGQbxCX3hOeZDFd0SdizKqL/bCYRx5+kKnia6Qc7Hw= 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 CY4PR0401MB3697.namprd04.prod.outlook.com (2603:10b6:910:8a::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4975.15; Thu, 17 Feb 2022 08:31:25 +0000 Received: from BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142]) by BY5PR04MB6739.namprd04.prod.outlook.com ([fe80::a865:6d10:c4a9:1142%7]) with mapi id 15.20.4995.015; Thu, 17 Feb 2022 08:31:24 +0000 Date: Thu, 17 Feb 2022 16:31:19 +0800 From: Xin Ji To: Hsin-Yi Wang Cc: Robert Foss , Neil Armstrong , Jernej Skrabec , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter , Andrzej Hajda Subject: Re: [PATCH v2] drm/bridge: Clear the DP_AUX_I2C_MOT bit passed in aux read command. Message-ID: <20220217083119.GA3781632@anxtwsw-Precision-3640-Tower> References: <20220217082224.1823916-1-hsinyi@chromium.org> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220217082224.1823916-1-hsinyi@chromium.org> X-ClientProxiedBy: HK2PR04CA0086.apcprd04.prod.outlook.com (2603:1096:202:15::30) 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: 31049ef0-5f24-4211-6451-08d9f1efe21f X-MS-TrafficTypeDiagnostic: CY4PR0401MB3697:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LESsctow/xH+9lIMqkXWIigupe7invfhuCNXYjjMFqvjMqQRk/mF/BV7iOnFB8tb71x7Qt4bXi1T6965/NhmgLqNYEwWD5v6w42WFsFnL1YL88Hqi8DV68FpNfPjxvu5uqkXFwR490MhxKBkuZjTy2ETzgPiboQXaVd92B1Q6YQeqnLyOx4CJaewOGm3FtDuT+0VicbVeDuCpQmYyq0t7v6+W9x+8V2kzFQlB1lRDgbCtqL72U3rJ2ZaqtcO2FBBNfFct3uxYnhnB5sjJOVsYDyyIkw8NfuO7ZYLpjGok9JELnvLJGj48A/hTHDmGCe9cLdIPpM0wAsr6jk+ju/sFx0LkV6qn4GQGGUr/J7lDVEVjDFPBxYyowKNiF7v+9vvrPEshlvAlomzgZlNNVnm9u3O1oXTlfu+x0fph3xbP87nDCGH0Fm90AlMsV3TDFsdD41QvF283n4CW+byS51GyTqHQZsEYXxuVxFxufjQKpA1xQ3yTPENYxUdKhhG2Xkh0OOuc4lgW0XAIP1sdjNeKIkFvLmPcy8BNX+D8KSRcY90gZHXi0AKikfaYcpSyxzqiqc4GB5uUS7DMhxhbj+RuYka9/zYYeKK8VYWR3xqwDFW2ChDcMovK1U0S5tMXAf88vU+hzbA5vjBNEmso9g2B2FGDpycFPzN57BCgeZN15uijLPOWM+cALLZlCiKFPVpQQDocVMG5h/Ab7BOTK55ylJzgcTKPbFmzf9z3CR0Fh4= 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)(1076003)(6916009)(26005)(6666004)(186003)(55236004)(6506007)(52116002)(6512007)(8676002)(9686003)(316002)(66476007)(66946007)(8936002)(66556008)(33716001)(508600001)(86362001)(6486002)(54906003)(83380400001)(4326008)(38350700002)(38100700002)(2906002)(33656002)(5660300002)(70780200001);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bvNxYgzE8YMT/qAhi/AQpf2eyME6hxtwN+c29MJ5l30m6f2lmomVGPVEopa9?= =?us-ascii?Q?hCaEm0SemZlcFnKhf04KwJvo+Jy+YlZjXdwsLBGqHbRkxjp3zMRrsTZM0aKa?= =?us-ascii?Q?yxioy1UqA/+rdrmzueTfC3iGbQhVuGS2al/y35I2vT/kubFtq2kqw5y44iOC?= =?us-ascii?Q?Ei5LHjgdmH0xPhdjBIGTERlLXl+aOuW1Nb8AWtpYTbxwW9AglkYdJf1XddP1?= =?us-ascii?Q?58yP+cGt2yrARida70/OVnWyHZKO8EVwPfFs1XiGEYjlZRCajkWdtVvhUgo4?= =?us-ascii?Q?Dspl0IvOwGpqr6xomrUR5VdEq2RY95jKE7ac1RkAWeFl0yzHrotcrNtnuR/i?= =?us-ascii?Q?JmVLvzLEPijHQEF1P1+CZ/PaWgmzL95I/hyZaIbguyiCl8M1IaDVFsrZXPsN?= =?us-ascii?Q?5QW9q1RPeKUvEu8pFcAGPteXv+znE2zztxihprLMmEgDSf380HWwaxCWU47Z?= =?us-ascii?Q?VMjQcPir3BgyfzauvK+6ys7K6rJFC5eB6mahzW4NRgdjivaZMeSNJRucYg6H?= =?us-ascii?Q?ptFMZ0Py4LK6sFITuO7KTl7GTKBggCwL8mxUovG2x8IBehGxKsWgaxSdDOQP?= =?us-ascii?Q?zDWdsAeXxRes0XSEvh3TmBSTahy3H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Q?cLDzf6/s7L1c0a3rnIYI/6IHlr2hC0A2Z9GDRjXRA3T/IyCbPv9FU+GZgj1k?= =?us-ascii?Q?Z7mdhgltCyZ2lTG6dpclBFVT7vSyHv69ocy4utZP3oSZb9AP1ZBiGEQE7LeY?= =?us-ascii?Q?b/h4hCjT6MCOhh1t4mm5QZ4=3D?= X-OriginatorOrg: analogixsemi.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31049ef0-5f24-4211-6451-08d9f1efe21f X-MS-Exchange-CrossTenant-AuthSource: BY5PR04MB6739.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2022 08:31:24.5945 (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: LpSr51ToepN4SNsGt/UH2GjjZ/wVE2Ce5h+ttmh5F8zeZj6EKVKIyGMMTlGUEAmw/HJAMQQVqh7sxztMXZRv3g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0401MB3697 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, Feb 17, 2022 at 04:22:25PM +0800, Hsin-Yi Wang wrote: > If the previous transfer didn't end with a command without DP_AUX_I2C_MOT, > the next read trasnfer will miss the first byte. But if the command in > previous transfer is requested with length 0, it's a no-op to anx7625 > since it can't process this command. anx7625 requires the last command > to be read command with length > 0. > > It's observed that if we clear the DP_AUX_I2C_MOT in read transfer, we > can still get correct data. Clear the read commands with DP_AUX_I2C_MOT > bit to fix this issue. Hi Hsin-Yi, thanks for the patch! Reviewed-by: Xin Ji Thanks, Xin > > Fixes: adca62ec370c ("drm/bridge: anx7625: Support reading edid through aux channel") > Signed-off-by: Hsin-Yi Wang > --- > v1->v2: Offline discussed with Xin Ji, it's better to clear the bit on > read commands only. > --- > drivers/gpu/drm/bridge/analogix/anx7625.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c > index 633618bafd75d3..2805e9bed2c2f4 100644 > --- a/drivers/gpu/drm/bridge/analogix/anx7625.c > +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c > @@ -253,6 +253,8 @@ static int anx7625_aux_trans(struct anx7625_data *ctx, u8 op, u32 address, > addrm = (address >> 8) & 0xFF; > addrh = (address >> 16) & 0xFF; > > + if (!is_write) > + op &= ~DP_AUX_I2C_MOT; > cmd = DPCD_CMD(len, op); > > /* Set command and length */ > -- > 2.35.1.265.g69c8d7142f-goog