Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3877346rwd; Mon, 22 May 2023 23:02:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5vFc4n7VqrczW6MgC0OKjfCqTp/Y9So5NGvCemdNAYVN/P5llqGiUFxEvMBUXE+dr3Bq1V X-Received: by 2002:a05:6a00:2405:b0:640:f313:efba with SMTP id z5-20020a056a00240500b00640f313efbamr15467096pfh.19.1684821762193; Mon, 22 May 2023 23:02:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684821762; cv=none; d=google.com; s=arc-20160816; b=BYEi8IM6sXHsXtrgh0JqnfO9Rmyh2wtlhFTr3QTIrkS/E7swpQKCjxCHCsplb71FBu ThezXGTYP/7F9/rxHihy4edH7E+cVk61nO45Dp4IPo/X7T02k2b1SlQ37rU0k+6lhK2+ 7QZUrxUF3pl6nabuARdbIuNyEivL9evd1KuJeKeyZ8fn9EIeqMGsnw1QGXmn0vcmRj/p xYqyT9DMjtMaQafaNe3djlIhDPbiWPvIr5YVLC8RC6/BPIlQEtV7oo2AJ6p5Hu/IwrJc jtvxKhhcyW5FNolfQxiPeC79Vohkd1JkBV+gYY2A/Y1zxOYUEaW4628mzlGrg5g+wnM2 vhOg== 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 :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=fLhXm7MAl34Q5I5NLYYhvJbO/6H/V++mvuilVVfegw0=; b=L3ZEhpn1IfvLSTLH13erTOuf/h7Lx6kd0ONHvN71mNJ1WifETuEwM4Qc0P4Ju2it5U ig9BbJ8T+GoVLPFnUNSTPMG3DsvE0FjrJOwn4FUk6hVQL8qyKq2fj/KFdg/JUXp8803Z 9YtKtnOShV3uuLQ5Vw0UyZlmN6z4LFttZK+DZc+JInSC/rrALrqKSEMvF9806pHgb9sr xwXgzdXf61lvHTg2lD5YPS5ZAu1avZw8y8L+Is082UAApPlLTyOJ5Umh7h1I9rUjiQBa 46b340xIqD1yBYgxZL2v2mEcCTo5Br4Y44410KmU+TwMc8SZ5X7ElWkgx3XwnzEh2GqE 8fxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=pROeYgfc; 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 g11-20020aa796ab000000b00625559a78a2si590804pfk.107.2023.05.22.23.02.28; Mon, 22 May 2023 23:02:42 -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=pROeYgfc; 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 S232812AbjEWF6J (ORCPT + 99 others); Tue, 23 May 2023 01:58:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229459AbjEWF6G (ORCPT ); Tue, 23 May 2023 01:58:06 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 00215109 for ; Mon, 22 May 2023 22:58:03 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34N5vQws007257; Tue, 23 May 2023 00:57:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1684821446; bh=fLhXm7MAl34Q5I5NLYYhvJbO/6H/V++mvuilVVfegw0=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=pROeYgfcgxo3Bu9JRW2d6n+sF3OiEyAxL+5H4Qy8iilHxdcbnEx+d9hz8E8aOvcbc 5ewFdv5TRX1cc9bqt+BaBYuoL+kZ7+qu5YEgUhqjdfXBCI0B2/5QqaJmepUpCkOonf HL1eHqnEs2yb0Z0cu1SIx9+beBXb6vQM3tvJaPRQ= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34N5vQOX027712 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 23 May 2023 00:57:26 -0500 Received: from DLEE101.ent.ti.com (157.170.170.31) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 23 May 2023 00:57:26 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) 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 via Frontend Transport; Tue, 23 May 2023 00:57:26 -0500 Received: from [172.24.216.116] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34N5vJpd018318; Tue, 23 May 2023 00:57:20 -0500 Message-ID: <1eb4b838-4f9c-6e95-925a-69487060ec55@ti.com> Date: Tue, 23 May 2023 11:27:19 +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 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> <1b95b75d-1b81-806b-7b7f-34cd93c9d0ec@ti.com> Content-Language: en-US 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=-4.5 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 22-May-23 13:35, neil.armstrong@linaro.org wrote: > On 17/05/2023 07:48, Aradhya Bhatia wrote: >> 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. > > OK thanks, then: > > Reviewed-by: Neil Armstrong > > if you resend a new version, please add this info in the commit message. Thank you! Will do so. Regards Aradhya > > Neil > >> >> >> 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 */ >>> >