From patchwork Tue Dec 1 12:18:27 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikhil Devshatwar X-Patchwork-Id: 11942793 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88AB4C64E7A for ; Tue, 1 Dec 2020 12:19:10 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A30A20663 for ; Tue, 1 Dec 2020 12:19:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ti.com header.i=@ti.com header.b="v6jtbUlL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A30A20663 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=ti.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6EAAC6E52F; Tue, 1 Dec 2020 12:19:09 +0000 (UTC) Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by gabe.freedesktop.org (Postfix) with ESMTPS id E7EC56E52F for ; Tue, 1 Dec 2020 12:19:07 +0000 (UTC) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0B1CJ3Up082278; Tue, 1 Dec 2020 06:19:03 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1606825143; bh=3Qr3bHa5cJqaiRnyvYkT2ee/Z+lSIEIOl+t8UP0Cc64=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=v6jtbUlL6oolFXGKrZFZ8kNR/mzw3Kw5o19SfYlzbV9EI7Mzbo0lcNEj0FxVMY4Cz PNsAZL9UBxj2BniK/G4Xmhh10cXp1CX8jI/lQw/kW9EO0Mmdcl1nWFq6+1WegsPw4J OX2ysjzOINEl1Dhufx5F97DPuIa2eppQ4pCfB1Rc= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0B1CJ2gI128116 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Dec 2020 06:19:03 -0600 Received: from DFLE101.ent.ti.com (10.64.6.22) 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.1979.3; Tue, 1 Dec 2020 06:19:03 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE101.ent.ti.com (10.64.6.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 1 Dec 2020 06:19:03 -0600 Received: from NiksLab.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0B1CIn3P118162; Tue, 1 Dec 2020 06:19:00 -0600 From: Nikhil Devshatwar To: , Tomi Valkeinen , Laurent Pinchart , Boris Brezillon Subject: [PATCH v4 4/7] drm/bridge: mhdp8546: Set input_bus_flags from atomic_check Date: Tue, 1 Dec 2020 17:48:27 +0530 Message-ID: <20201201121830.29704-5-nikhil.nd@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201201121830.29704-1-nikhil.nd@ti.com> References: <20201201121830.29704-1-nikhil.nd@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sekhar Nori , Yuti Amonkar , Swapnil Jakhade Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c | 6 ++++++ drivers/gpu/drm/bridge/ti-tfp410.c | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c index 2cd809eed827..9c17e4bb517e 100644 --- a/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c +++ b/drivers/gpu/drm/bridge/cadence/cdns-mhdp8546-core.c @@ -2121,6 +2121,12 @@ 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 + */ + bridge_state->input_bus_cfg.flags = bridge->timings->input_bus_flags; + mutex_unlock(&mhdp->link_mutex); return 0; } diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c index 4c536df003c8..9035d2145a28 100644 --- a/drivers/gpu/drm/bridge/ti-tfp410.c +++ b/drivers/gpu/drm/bridge/ti-tfp410.c @@ -245,6 +245,7 @@ int tfp410_atomic_check(struct drm_bridge *bridge, * 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 = {