Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp6804334rwd; Tue, 6 Jun 2023 02:04:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ71cKtLmfSL5DQCbnbZmCSCODNLJodQxGVic3+EUc78dJdhS/RMbtsl7WAxZynPyKQyV6KJ X-Received: by 2002:a17:902:d4c3:b0:1b0:348f:c48c with SMTP id o3-20020a170902d4c300b001b0348fc48cmr1237381plg.2.1686042252143; Tue, 06 Jun 2023 02:04:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686042252; cv=none; d=google.com; s=arc-20160816; b=y9iSeDNyduBo323A9lPcdOxFzLdmxScShblK217ryeDMHLe1ZCM6pkzIrn1Qmdshut uA+xYzjcuYfuECCYoFVXNKAknY9pAyKvDgHcOV0MK3pauPFhyyfAS2RYLe/esRyAZvqF HTN69rRuELpB8r5kQMg2UbI1KpkKxfI2TlAr5cbiMDIYXXRJTH4DDqyG0ZM3v4nqTfZA yEnELHo0aksWqKDwt1/SABEZ/gecbgJsIeyL7WVlgPTgp9C6JcypwLxRbl3/2/fTEOC1 bIpwQ7tO/SCjCyIobrg6aAFgMvUYPsYLQqFCq9+t7j5SwMpZnFqWAMeYv7bmCaqZBzRS zx+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U9ozOmsuQQic6oaJc3ZfjadaTi3g2owitvvLoaNCHAI=; b=NiqhWKZkGJVhCrs+/psqD473Gb8br7SdMxrmH5sObPo0/BuPMjbS9/OBrL/CjXNuwK Gj4gGSpGYnowK3Y+UMjmEMmVLEri/oKlyVDZrrIhEBUnnerCUlpm7DzefA1LXN5aS+Kr /f11dHtBbFlUQOwY3yq4cZ62Jx0BgmXsdFooWfiVKAAU9iNx4/jFOqK1mlEB0qaeAelx 6t9Yg/rE9/d9zOn5uhignjYLnLNUeZbWElQL+L4L7GCB4VqyYPEd+KRdhArUuW1sG+zF 3ZlHbBfbykD05XQUZP7+L22PVuZ6Kn5sdllLAbK6O7FCREqXqICgKK8ZrOvw3hCmPAmC BifQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gAoYblKj; 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 e7-20020a17090301c700b001ac307c4ef4si7055500plh.301.2023.06.06.02.03.59; Tue, 06 Jun 2023 02:04:12 -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=gAoYblKj; 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 S236409AbjFFIWw (ORCPT + 99 others); Tue, 6 Jun 2023 04:22:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236374AbjFFIWW (ORCPT ); Tue, 6 Jun 2023 04:22:22 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13C23E47 for ; Tue, 6 Jun 2023 01:22:19 -0700 (PDT) Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3568Lq7A013077; Tue, 6 Jun 2023 03:21:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1686039712; bh=U9ozOmsuQQic6oaJc3ZfjadaTi3g2owitvvLoaNCHAI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gAoYblKjLuSvwiziQGi4ic7D6Lp/hXIwVzpbQ8F7bdElNuoKpESljRKCsDKjB0qPp 2rZtbp0lQizqofxFY5sMyazpVVtkQmPDX8gO6liOf3cKrRTUFB/kQJ3CKkufKJfAQL 8uZpIqspe0s+xjZLK92xb9X7uIRJxpdEL7Q1mrrY= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3568Lq0R012376 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 6 Jun 2023 03:21:52 -0500 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 6 Jun 2023 03:21:52 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE112.ent.ti.com (157.170.170.23) 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, 6 Jun 2023 03:21:52 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3568Lp6w019614; Tue, 6 Jun 2023 03:21:52 -0500 From: Aradhya Bhatia To: Tomi Valkeinen , Jyri Sarha , David Airlie , Daniel Vetter , Laurent Pinchart , Andrzej Hajda , Neil Armstrong , Robert Foss , Jonas Karlman , Jernej Skrabec , Swapnil Jakhade , Boris Brezillon , Francesco Dolcini CC: DRI Development List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Rahul T R , Devarsh Thakkar , Jayesh Choudhary , Aradhya Bhatia Subject: [PATCH v7 6/8] drm/bridge: sii902x: Set input_bus_flags in atomic_check Date: Tue, 6 Jun 2023 13:51:40 +0530 Message-ID: <20230606082142.23760-7-a-bhatia1@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230606082142.23760-1-a-bhatia1@ti.com> References: <20230606082142.23760-1-a-bhatia1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 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. Implement atomic_check hook for the same. Signed-off-by: Aradhya Bhatia Reviewed-by: Neil Armstrong --- Notes: changes from v6: * Add Neil Armstrong's R-b tag. drivers/gpu/drm/bridge/sii902x.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c index 70aeb04b7f77..8f1ec526863a 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -494,6 +494,20 @@ static u32 *sii902x_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge, return input_fmts; } +static int sii902x_bridge_atomic_check(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + /* + * There might be flags negotiation supported in future but + * set the bus flags in atomic_check statically for now. + */ + bridge_state->input_bus_cfg.flags = bridge->timings->input_bus_flags; + + return 0; +} + static const struct drm_bridge_funcs sii902x_bridge_funcs = { .attach = sii902x_bridge_attach, .mode_set = sii902x_bridge_mode_set, @@ -505,6 +519,7 @@ static const struct drm_bridge_funcs sii902x_bridge_funcs = { .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, .atomic_get_input_bus_fmts = sii902x_bridge_atomic_get_input_bus_fmts, + .atomic_check = sii902x_bridge_atomic_check, }; static int sii902x_mute(struct sii902x *sii902x, bool mute) -- 2.40.1