Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5526773rwr; Tue, 9 May 2023 02:47:22 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6oGEE3AByRr29R+552o2di6C+ex+FqqR7SgCS0wkpLUJ+gSo+oB7VhF/dj0NwKk6Ws/9/p X-Received: by 2002:a05:6a20:244d:b0:101:7761:ad2a with SMTP id t13-20020a056a20244d00b001017761ad2amr678921pzc.5.1683625642090; Tue, 09 May 2023 02:47:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683625642; cv=none; d=google.com; s=arc-20160816; b=qcYPuGHL/oxNs90+wAdeLBQPqYh1oz4dl2sd55vDjSBW6AkeP65+VxEdDm2/29ioe9 Nbg6/OTe/3Z9kZ0R/Po67NV0DGcLU7D0xHZCWp1lfJWO0wcTjnyW0Zg5PniPM1TfMn7S SZv2/lRyX+oHxiNQx3d5RyTrjNMjghs6g1O4CFkmLQr6PsLDVzvoxdLucverxyWtlSG1 EfThU6YPJgpjDP1JsHNsdEqA80Ob3yFP3BGUcI43C/8+W31iak9LAb1UwOI/VYa+6WCe xVNZAZ/yckvLcdjFx8oliD70InudX7c+PA5fW4PL1qd6EVuh2xvWxQvevtFghD68kvx3 /hvA== 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=QxtvhK8W40hctV3hPFsZ3fKHSmpeqUJ/FdzCKSSQfhY=; b=YMuP/AnHBiSGlL3J8kx/ZtylJuqF8nXeE85zVgNiXkH9CD8TOA0r/cIKRhK1K5BVuT AA9q231DzD5O+PZImiRE07ezRnUC5NbibdtMLks1vOMYQzOApaLRlTkhUf/oOEvXOLZK +aROMa1of9hR+YeD1E5LcL6nFCuSXkaQw/Y2pnEVLr32GxIRrnGfbN1OWHeQG3KLLAbB mihXW0fThtlmew9e0OSrOSDLuHTBJ20gffwmcr+IyZJqYxUrrT9Cn+GBnnk+IS7Cn9IZ 7T0++Y2idfxYCl0/+1dE+Le8x5CHVx3pi5pHnTNnszE51H4oOyMxWKjCfHbSmEr8G854 biwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=L2+LejUX; 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 a191-20020a6390c8000000b0051b930ef84bsi1228317pge.140.2023.05.09.02.47.10; Tue, 09 May 2023 02:47:22 -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=L2+LejUX; 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 S234927AbjEIJbx (ORCPT + 99 others); Tue, 9 May 2023 05:31:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235106AbjEIJbr (ORCPT ); Tue, 9 May 2023 05:31:47 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02C99E72B for ; Tue, 9 May 2023 02:31:22 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3499UkDp030787; Tue, 9 May 2023 04:30:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683624646; bh=QxtvhK8W40hctV3hPFsZ3fKHSmpeqUJ/FdzCKSSQfhY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=L2+LejUXXrh49fmEqLxmNz1nQDCXu36jSxGjroeTUEpS/lFn2vHCfYSWecKya9f15 WQEESh/hyY8eed5X17zDXwY7SGK4tLdC3YRU3KuhDPdQDUr6ieooFU/Q8+BrmN8ijz yS0uyweWUu4RSN1+SK9H1aEupTWmbbFJzp9xf+yI= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3499UkII111946 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 May 2023 04:30:46 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Tue, 9 May 2023 04:30:46 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) 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, 9 May 2023 04:30:46 -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 3499UjhW100387; Tue, 9 May 2023 04:30:45 -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 , Rahul T R , Swapnil Jakhade , Boris Brezillon , Francesco Dolcini CC: DRI Development List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Devarsh Thakkar , Jayesh Choudhary , Aradhya Bhatia Subject: [PATCH v6 6/8] drm/bridge: sii902x: Set input_bus_flags in atomic_check Date: Tue, 9 May 2023 15:00:34 +0530 Message-ID: <20230509093036.3303-7-a-bhatia1@ti.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230509093036.3303-1-a-bhatia1@ti.com> References: <20230509093036.3303-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 --- 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 662b6cb4aa62..4d1f10532fa6 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -495,6 +495,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, @@ -506,6 +520,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