Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp296474rwd; Tue, 16 May 2023 00:52:42 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5oTVUZxfw36grE3zv33xP0cT7EhZJ0BbCI25ybTke441fXlvk2cxt2p6obN2zytI926NbG X-Received: by 2002:a05:6a20:1443:b0:101:41f8:7a17 with SMTP id a3-20020a056a20144300b0010141f87a17mr27681638pzi.20.1684223562354; Tue, 16 May 2023 00:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684223562; cv=none; d=google.com; s=arc-20160816; b=dk56c41qw+xbOyu8W1/OmuZhMcIyEKYvK7MDTmEhazaQCv8Bal1CcCrvtky4OgptUB Sba1NCN79qNez5N1ELyrnDDHdgEoRi4RhfIDsZvrrhipicoXwF17ktmxTJfCjEq4QBm/ hmr+B6PO2XLzWkrNANfkDXiyu/uYeaY3QFVH6GoNcr3CgqhTemkdK9j7JNDUDBWlyipd E97semQx1NNtcf8ezKhigdVvwWHUSmXWzTg1+Y6JKg1k1RacjKsy3NaOsFYmNAfu50wA MIrkWoR1l+E4DcYdZDEvGM4EynfqfJ0sldONd7Q7KG5HuDBgLkaawjHJoDMH5n2Cr5Wm tfVw== 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 :organization:references:cc:to:content-language:subject:reply-to :from:user-agent:mime-version:date:message-id:dkim-signature; bh=pnhqna47FEfmgaZcCMi7qszbbpjiASdlwelf324+/oM=; b=X1P6Ca32tmaUPvCWhiVu0MsHzA1nB4GQXHvViEtaxg+Xy/0KHR/R2EPds0eIDR5uui rJ5OhCJ4f/1IIAIECSBl0zUUsxKuEoc5DgGcG29P5Gf0xhOQxqqgrO4Vi97gx+FpNyEb zdKwxrg8up74hwtX1NIx1HljBY/zd+QF/RYTpKaiCOsgNaMZYW/uFOE+muTDP9n7+l75 TpRvaWfLZNaBIWQ4oEX4RoLtvd2TY5dkmDNnHCM1Qnhnxvvd1wAondBy/yfR34SPKpm9 979c+Xqx8JPN304MRFFBSkeinI0FdwXLUVj2WQHj1O8ApgQ88xujvnMH0UolbsG1HnS6 zy3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CGlyIw+a; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q200-20020a632ad1000000b0052ca7192669si18660171pgq.657.2023.05.16.00.52.29; Tue, 16 May 2023 00:52: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=@linaro.org header.s=google header.b=CGlyIw+a; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231192AbjEPHZg (ORCPT + 99 others); Tue, 16 May 2023 03:25:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231283AbjEPHZe (ORCPT ); Tue, 16 May 2023 03:25:34 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E594448D for ; Tue, 16 May 2023 00:25:31 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-3f42c865535so79331315e9.1 for ; Tue, 16 May 2023 00:25:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1684221929; x=1686813929; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=pnhqna47FEfmgaZcCMi7qszbbpjiASdlwelf324+/oM=; b=CGlyIw+aik9ZmayNRudjVITZUDS2G5AKQSVtYkNmMDET8BX1pwOnD4lX/NUfGfhEZc 2TSdvz8IZ7y/SgLmMoi0c6i0LB7ZGQ9dHu6nG8KVlyoYAXsLx+JuJLPwOxAYcSel1S27 MalVwszNUHTDScCNSkEuS6je3SfzpPvA1fCC2sG00+0cpOH9ggp88YHsaGI3RUXVQ7AA Tk6Wu8yjebU4D59Y8x2hP2NxIVY1KiQOSlyfpm6IEkxJIpbg8T1vHZbxrMN8jWparao9 6Y+k7OXTu0iQu8TEmlKU1vfYPpbcbLmKQ2SStDYIPTpEnnCyrGopMI7kbdzFHOazxxNT F7UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684221929; x=1686813929; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=pnhqna47FEfmgaZcCMi7qszbbpjiASdlwelf324+/oM=; b=NGFjVykQ4wS+sH0w5CZaznycZBcU5oSAsAu7kGBO1oPniblfgnVSAldJQp1pN46HoM QNGxqADUJOrlCGQ4+j8ylh1H1paXHAZr47JVUGQCLTAK6TLw5Vr8jifJ4jv2a8OH+SUT BjLGmjKeqv2CURbr6qzEoeq9Q0rjT521JJKEaXXfiZhwgvb19xeYi4h7U2vgosDrZ8m4 jipeO7KL3yZW0a0Rd5Bh5lWT5yIJKtcNMCDgICvd24UuTjUJh5IhvUrO1zHzYbkpmfxH De/Q5ORlWjQaSh/9BTacmJMdA7mvpG01+tZKPVr3h+lT8tOJwgyTr42NyZXZ7Oc19ng7 HI+Q== X-Gm-Message-State: AC+VfDxSIL5G5N7pCtHpK7BYAXH7Vrf0Gryi1vH+p+Z6cW8/vnGghDr4 1f4m3dPX2G/zKOtsbPkS1f4CVQ== X-Received: by 2002:a05:600c:2056:b0:3f4:2bbf:40a with SMTP id p22-20020a05600c205600b003f42bbf040amr16533461wmg.37.1684221929643; Tue, 16 May 2023 00:25:29 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:86be:97a:a043:77a8? ([2a01:e0a:982:cbb0:86be:97a:a043:77a8]) by smtp.gmail.com with ESMTPSA id j3-20020a5d6043000000b0030630de6fbdsm1569719wrt.13.2023.05.16.00.25.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 16 May 2023 00:25:29 -0700 (PDT) Message-ID: <3045292e-5801-74c5-5a6b-6e4c5802a035@linaro.org> Date: Tue, 16 May 2023 09:25:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v6 2/8] drm/bridge: tfp410: Set input_bus_flags in atomic_check Content-Language: en-US To: Aradhya Bhatia , 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-3-a-bhatia1@ti.com> Organization: Linaro Developer Services In-Reply-To: <20230509093036.3303-3-a-bhatia1@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,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 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. > > Implement atomic_check hook for the same. > > Signed-off-by: Nikhil Devshatwar > --- > > Notes: > changes from v4: > * fix a warning Reported-by: kernel test robot > > 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