Message ID | 20230509093036.3303-3-a-bhatia1@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2747773vqo; Tue, 9 May 2023 02:47:28 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ70LcMQ4IZB5mgIYd7pVZaxw0EvmrrVrpuWO7m/5z3821tMCmE1SZFcmZgORq+dzyK0Sj68 X-Received: by 2002:a17:903:32c7:b0:1ac:820e:c348 with SMTP id i7-20020a17090332c700b001ac820ec348mr6660468plr.0.1683625648718; Tue, 09 May 2023 02:47:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683625648; cv=none; d=google.com; s=arc-20160816; b=OtdGWk1dIBqzOHWtp9jceR1tp0x21JyYHx8Bq4rt3zA0mQ4kIh4uc1kwa84hJYsnVk lf0XkCnz3w3hEpsZBkx1M7dX/7KfMzOMZdwkWeRBUqclflby5cpW4pTfjrUKzWY2HXzl OHdZr6IJdWljL8yZZI9feK8WqiiyCUWCYwBEgFlNt9w3Tpi2mDzV4JJx7ifjjpuDNKgO Z7lIfYx1DPXt9Aq9cvpxFg5xMzP5wmQCHvGl8KmaFRucBkXAzjMzccd0ysulI/7rrZWA d+94lLdvibz7As5LL7dJ3gywgf/qx7bW5z2ed3cEa8nGDckazK++i+lFNOTq2pxxL15P O71Q== 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=3Q3ciKVeqIMyoHoDpCtW7XsVd4ZVGVikacZK0eWJmZU=; b=cEYd8jWqVsi9Ec2lVXy/EoODHf7iIFhIChhiB2BQYoqJ/ieyigfDzooqC61QcAz0/h FwH0P5kwdhIJLSNwBBti/sU6dCGdKwQvKKIu8zJtMKdzNqkb08OvQ6Kco9N10yB9Capo D0yq78rM410p9l08gFgMzKqhKIbwrfYTCUAW53DbURS4yFKpZEoGIGst7f4iu9wQbjtL KTCb9oxFWycjynMy5fg8iw82BjuWc+dAGeWJcXUv7RnsV2se4E3Il670yVwQuut+rj7f +d8M2b59IsaFm9tJi3SgE+Er5HQ8Ho+mARepivCogH+dSBK8bz3CxLKPo4q8/eql7tzO 8j8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=FIffJWXW; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b5-20020a170902d88500b001ac7ea55768si1112610plz.499.2023.05.09.02.47.10; Tue, 09 May 2023 02:47:28 -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=FIffJWXW; 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 S235173AbjEIJcZ (ORCPT <rfc822;baris.duru.linux@gmail.com> + 99 others); Tue, 9 May 2023 05:32:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50922 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234962AbjEIJcI (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 9 May 2023 05:32:08 -0400 Received: from lelv0143.ext.ti.com (lelv0143.ext.ti.com [198.47.23.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E4E010E42 for <linux-kernel@vger.kernel.org>; Tue, 9 May 2023 02:31:40 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 3499UeCa022677; Tue, 9 May 2023 04:30:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683624640; bh=3Q3ciKVeqIMyoHoDpCtW7XsVd4ZVGVikacZK0eWJmZU=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=FIffJWXWvbgSz+vxJUrj1X+Gkc4uXJiten1ggPhUU0QfHafMGNdxyrjmMl6L2OqcS dm7+Yyqz3JWBMGCdGvIvaBHpex6S8EN3cMEN6hh7mddWVB2w9aJavhuJ4RJQZFcWRI uDpesr4O4J+vJVyhssXe4+ydUjaA2ODgy0nIsg3k= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 3499Uejs022235 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 9 May 2023 04:30:40 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) by DLEE104.ent.ti.com (157.170.170.34) 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:40 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) 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:40 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 3499UdkR084935; Tue, 9 May 2023 04:30:39 -0500 From: Aradhya Bhatia <a-bhatia1@ti.com> To: Tomi Valkeinen <tomba@kernel.org>, Jyri Sarha <jyri.sarha@iki.fi>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Laurent Pinchart <laurent.pinchart@ideasonboard.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Rahul T R <r-ravikumar@ti.com>, Swapnil Jakhade <sjakhade@cadence.com>, Boris Brezillon <boris.brezillon@collabora.com>, Francesco Dolcini <francesco@dolcini.it> CC: DRI Development List <dri-devel@lists.freedesktop.org>, Linux Kernel List <linux-kernel@vger.kernel.org>, Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>, Devarsh Thakkar <devarsht@ti.com>, Jayesh Choudhary <j-choudhary@ti.com>, Aradhya Bhatia <a-bhatia1@ti.com> Subject: [PATCH v6 2/8] drm/bridge: tfp410: Set input_bus_flags in atomic_check Date: Tue, 9 May 2023 15:00:30 +0530 Message-ID: <20230509093036.3303-3-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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765409448337994181?= X-GMAIL-MSGID: =?utf-8?q?1765409448337994181?= |
Series |
drm/tidss: Use new connector model for tidss
|
|
Commit Message
Aradhya Bhatia
May 9, 2023, 9:30 a.m. UTC
From: Nikhil Devshatwar <nikhil.nd@ti.com> 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: Nikhil Devshatwar <nikhil.nd@ti.com> --- Notes: changes from v4: * fix a warning Reported-by: kernel test robot <lkp@intel.com> changes from v5: * Moved the return statement here from patch 4 (where it was added by mistake). drivers/gpu/drm/bridge/ti-tfp410.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
Comments
On 09/05/2023 11:30, Aradhya Bhatia wrote: > From: Nikhil Devshatwar <nikhil.nd@ti.com> > > 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: Nikhil Devshatwar <nikhil.nd@ti.com> > --- > > Notes: > changes from v4: > * fix a warning Reported-by: kernel test robot <lkp@intel.com> > > changes from v5: > * Moved the return statement here from patch 4 (where it was added > by mistake). > > drivers/gpu/drm/bridge/ti-tfp410.c | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c > index 7dacc7e03eee..631ae8f11a77 100644 > --- a/drivers/gpu/drm/bridge/ti-tfp410.c > +++ b/drivers/gpu/drm/bridge/ti-tfp410.c > @@ -228,6 +228,21 @@ static u32 *tfp410_get_input_bus_fmts(struct drm_bridge *bridge, > return input_fmts; > } > > +static int tfp410_atomic_check(struct drm_bridge *bridge, > + struct drm_bridge_state *bridge_state, > + struct drm_crtc_state *crtc_state, > + struct drm_connector_state *conn_state) > +{ > + struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); > + > + /* > + * There might be flags negotiation supported in future. > + * Set the bus flags in atomic_check statically for now. > + */ > + bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags; A newline here before return would look better > + return 0; > +} > + > static const struct drm_bridge_funcs tfp410_bridge_funcs = { > .attach = tfp410_attach, > .detach = tfp410_detach, > @@ -238,6 +253,7 @@ static const struct drm_bridge_funcs tfp410_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 = tfp410_get_input_bus_fmts, > + .atomic_check = tfp410_atomic_check, > }; > > static const struct drm_bridge_timings tfp410_default_timings = { With that fixed: Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Hi Neil, On 16-May-23 12:55, Neil Armstrong wrote: > On 09/05/2023 11:30, Aradhya Bhatia wrote: >> From: Nikhil Devshatwar <nikhil.nd@ti.com> >> >> 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: Nikhil Devshatwar <nikhil.nd@ti.com> >> --- >> >> Notes: >> changes from v4: >> * fix a warning Reported-by: kernel test robot <lkp@intel.com> >> >> changes from v5: >> * Moved the return statement here from patch 4 (where it was added >> by mistake). >> >> drivers/gpu/drm/bridge/ti-tfp410.c | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c >> b/drivers/gpu/drm/bridge/ti-tfp410.c >> index 7dacc7e03eee..631ae8f11a77 100644 >> --- a/drivers/gpu/drm/bridge/ti-tfp410.c >> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c >> @@ -228,6 +228,21 @@ static u32 *tfp410_get_input_bus_fmts(struct >> drm_bridge *bridge, >> return input_fmts; >> } >> +static int tfp410_atomic_check(struct drm_bridge *bridge, >> + struct drm_bridge_state *bridge_state, >> + struct drm_crtc_state *crtc_state, >> + struct drm_connector_state *conn_state) >> +{ >> + struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); >> + >> + /* >> + * There might be flags negotiation supported in future. >> + * Set the bus flags in atomic_check statically for now. >> + */ >> + bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags; > > A newline here before return would look better Yup! Will add one. > >> + return 0; >> +} >> + >> static const struct drm_bridge_funcs tfp410_bridge_funcs = { >> .attach = tfp410_attach, >> .detach = tfp410_detach, >> @@ -238,6 +253,7 @@ static const struct drm_bridge_funcs >> tfp410_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 = tfp410_get_input_bus_fmts, >> + .atomic_check = tfp410_atomic_check, >> }; >> static const struct drm_bridge_timings tfp410_default_timings = { > > With that fixed: > > Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Thank you! Regards Aradhya
diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index 7dacc7e03eee..631ae8f11a77 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -228,6 +228,21 @@ static u32 *tfp410_get_input_bus_fmts(struct drm_bridge *bridge, return input_fmts; } +static int tfp410_atomic_check(struct drm_bridge *bridge, + struct drm_bridge_state *bridge_state, + struct drm_crtc_state *crtc_state, + struct drm_connector_state *conn_state) +{ + struct tfp410 *dvi = drm_bridge_to_tfp410(bridge); + + /* + * There might be flags negotiation supported in future. + * Set the bus flags in atomic_check statically for now. + */ + bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags; + return 0; +} + static const struct drm_bridge_funcs tfp410_bridge_funcs = { .attach = tfp410_attach, .detach = tfp410_detach, @@ -238,6 +253,7 @@ static const struct drm_bridge_funcs tfp410_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 = tfp410_get_input_bus_fmts, + .atomic_check = tfp410_atomic_check, }; static const struct drm_bridge_timings tfp410_default_timings = {