Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1678838rwd; Tue, 16 May 2023 23:00:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Z+FvoQ68akF2NbeEG5KjUD+C1w5UqL8ny/KUMXLOXDEgxvHOTJ/NVtDDgufk6TdRM6I48 X-Received: by 2002:a17:902:e9d5:b0:1aa:e736:3beb with SMTP id 21-20020a170902e9d500b001aae7363bebmr40771361plk.25.1684303224913; Tue, 16 May 2023 23:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684303224; cv=none; d=google.com; s=arc-20160816; b=XAjkZd2nxVYHM0UwLPgPTR/UCYeiW6V2mI4XpYzgqjWDnujeIeEXh6pCTRgSsJJ9ih txyYDt+aAsO6p1frKprz4FAZQqxUBJpaX1TjbY0NlcLhGJKOQZL3dzoFcw3CIOhpCgBy EkpOWJW7N6KbfVqkzU/oXdKN5KR4nSUGa8K+OjQw429lELi9heSvYbc6G7rerWbakvJo c5gY1c4L3HhLJoCVNVBufTY56SSgXUVPX6KTpFsFXst99IXfokW66x6pjcYf2QQccVwh InnJFCNROgTSxg8m+90O49Xfq+ll5Mqbiu39XoHBjBJEMMkdzAyN0kBFzuQoFPuzVhpZ h3Gw== 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:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eNrolphY6yk67IJIelraK50kaxoNQrZkHDoM8K/Tsc8=; b=tlR1zGvx60TRmdaoewacqRPrIBn/TjOtul/s8AfHq72Y2x3FFnfdovMnk7WktMiyoP HjIN4j5WKenk/J+h5HwrAoc5RfBpUPhhikQSrvp2Yfxa+LuZ0AZ88dkV49r8uHvVZYqZ Cl7YLMs+KBJdYNoq1wXsGZ7s/K8WV/qArqL7pteqfrrgb+X1dRpEv/c3XR0cbwTXU5ta Jj/xI1YMC5SVQWoin8qin1NBfjAgLjedgCC8P1D2P/0kelA84DmInMUaknDpbD3+cygj Q43XMYLaiN6jId3lW8Zx5nD6vxcPNNehJcgvoKz7tehzyMoOhkwXxOhkMzId1r16Ommm DI1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=HgcZ4703; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n11-20020a170902e54b00b001acb03ca5aasi20526814plf.612.2023.05.16.23.00.09; Tue, 16 May 2023 23:00:24 -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=@ti.com header.s=ti-com-17Q1 header.b=HgcZ4703; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232526AbjEQFtg (ORCPT + 99 others); Wed, 17 May 2023 01:49:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232528AbjEQFtf (ORCPT ); Wed, 17 May 2023 01:49:35 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1DF0440EF for ; Tue, 16 May 2023 22:49:33 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34H5n0gn091258; Wed, 17 May 2023 00:49:00 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684302540; bh=eNrolphY6yk67IJIelraK50kaxoNQrZkHDoM8K/Tsc8=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=HgcZ4703Eq2e1z6I5DbXOxHQafDbSgseThsDnnFFUw8aJUIaW1q/cMa339wLSqhv/ IiBEM1amhxnTt42QQMLRd355NKsJP1qXacYQBB4iBqVIUE278LsAiby1bKmDf/aUKZ nfqjM/NtCNwY457b+iMX3AiL+4T1XX1VEJxm4QHk= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34H5n0vG091236 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 May 2023 00:49:00 -0500 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 17 May 2023 00:48:58 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 17 May 2023 00:48:58 -0500 Received: from [172.24.217.121] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34H5mqD2013298; Wed, 17 May 2023 00:48:53 -0500 Message-ID: <1b95b75d-1b81-806b-7b7f-34cd93c9d0ec@ti.com> Date: Wed, 17 May 2023 11:18:52 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v6 4/8] drm/bridge: mhdp8546: Set input_bus_flags from atomic_check Content-Language: en-US To: , Tomi Valkeinen , Jyri Sarha , David Airlie , Daniel Vetter , Laurent Pinchart , Andrzej Hajda , Robert Foss , Jonas Karlman , Jernej Skrabec , Rahul T R , Swapnil Jakhade , Boris Brezillon , Francesco Dolcini CC: DRI Development List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jayesh Choudhary References: <20230509093036.3303-1-a-bhatia1@ti.com> <20230509093036.3303-5-a-bhatia1@ti.com> From: Aradhya Bhatia In-Reply-To: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, 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 Hi Neil, On 16-May-23 12:54, Neil Armstrong wrote: > On 09/05/2023 11:30, Aradhya Bhatia wrote: >> From: Nikhil Devshatwar >> >> input_bus_flags are specified in drm_bridge_timings (legacy) as well >> as drm_bridge_state->input_bus_cfg.flags >> >> The flags from the timings will be deprecated. Bridges are supposed >> to validate and set the bridge state flags from atomic_check. >> >> Signed-off-by: Nikhil Devshatwar >> [a-bhatia1: replace timings in cdns_mhdp_platform_info by >> input_bus_flags] >> Signed-off-by: Aradhya Bhatia >> --- >> >> Notes: >> >>      changes from v5: >>      * removed the wrongly addded return statement in tfp410 driver. >>      * replaced the timings field in cdns_mhdp_platform_info by >>        input_bus_flags field, in order to get rid of bridge->timings >>        altogether. >> >>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c  | 11 ++++++++--- >>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h  |  2 +- >>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c |  9 ++++----- >>   drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h |  2 +- >>   4 files changed, 14 insertions(+), 10 deletions(-) >> >> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c >> b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c >> index 623e4235c94f..a677b1267525 100644 >> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c >> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c >> @@ -2189,6 +2189,13 @@ static int cdns_mhdp_atomic_check(struct >> drm_bridge *bridge, >>           return -EINVAL; >>       } >>   +    /* >> +     * There might be flags negotiation supported in future. >> +     * Set the bus flags in atomic_check statically for now. >> +     */ >> +    if (mhdp->info) >> +        bridge_state->input_bus_cfg.flags = >> *mhdp->info->input_bus_flags; >> + >>       mutex_unlock(&mhdp->link_mutex); >>       return 0; >>   } >> @@ -2554,8 +2561,6 @@ static int cdns_mhdp_probe(struct >> platform_device *pdev) >>       mhdp->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID | >>                  DRM_BRIDGE_OP_HPD; >>       mhdp->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; >> -    if (mhdp->info) >> -        mhdp->bridge.timings = mhdp->info->timings; > > Won't this cause a breakage because at this point in time > bridge.timings->input_bus_flags > seems to be still used by tidss right ? > tidss was using the bridge.timings->input_bus_flags before the 7th patch[1] in this series. After the patch, it only relies on bridge_state and display_info for bus flags and formats. Regards Aradhya [1]: https://lore.kernel.org/all/20230509093036.3303-8-a-bhatia1@ti.com/ > >>         ret = phy_init(mhdp->phy); >>       if (ret) { >> @@ -2642,7 +2647,7 @@ static const struct of_device_id mhdp_ids[] = { >>   #ifdef CONFIG_DRM_CDNS_MHDP8546_J721E >>       { .compatible = "ti,j721e-mhdp8546", >>         .data = &(const struct cdns_mhdp_platform_info) { >> -          .timings = &mhdp_ti_j721e_bridge_timings, >> +          .input_bus_flags = &mhdp_ti_j721e_bridge_input_bus_flags, >>             .ops = &mhdp_ti_j721e_ops, >>         }, >>       }, >> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h >> b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h >> index bedddd510d17..bad2fc0c7306 100644 >> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h >> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.h >> @@ -336,7 +336,7 @@ struct cdns_mhdp_bridge_state { >>   }; >>     struct cdns_mhdp_platform_info { >> -    const struct drm_bridge_timings *timings; >> +    const u32 *input_bus_flags; >>       const struct mhdp_platform_ops *ops; >>   }; >>   diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c >> b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c >> index dfe1b59514f7..12d04be4e242 100644 >> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c >> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.c >> @@ -71,8 +71,7 @@ const struct mhdp_platform_ops mhdp_ti_j721e_ops = { >>       .disable = cdns_mhdp_j721e_disable, >>   }; >>   -const struct drm_bridge_timings mhdp_ti_j721e_bridge_timings = { >> -    .input_bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | >> -               DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE | >> -               DRM_BUS_FLAG_DE_HIGH, >> -}; >> +const u32 >> +mhdp_ti_j721e_bridge_input_bus_flags = >> DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE | >> +                       DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE | >> +                       DRM_BUS_FLAG_DE_HIGH; >> diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h >> b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h >> index 97d20d115a24..5ddca07a4255 100644 >> --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h >> +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-j721e.h >> @@ -14,6 +14,6 @@ >>   struct mhdp_platform_ops; >>     extern const struct mhdp_platform_ops mhdp_ti_j721e_ops; >> -extern const struct drm_bridge_timings mhdp_ti_j721e_bridge_timings; >> +extern const u32 mhdp_ti_j721e_bridge_input_bus_flags; >>     #endif /* !CDNS_MHDP8546_J721E_H */ >