From patchwork Sat Dec 18 21:50:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Borneo X-Patchwork-Id: 12696781 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0C505C433F5 for ; Sat, 18 Dec 2021 21:53:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ZSCZSBKDUuZczgIys68CWNNk8SAAcbvr70ItdT0H1Yk=; b=O7mABqivx3BoD6 em60OpqmnW/NVV3FeOlHgg/ABkp/w6OArJQ60d3NYI919BHVSL6q7YVwYcsS3gOAurLkjsx+zXA7q N7/aE/8NUI18OlTj4UQhyBILi5iplTFj1D250H//yvcKkeFSlXTd9996iSB71szr+Gi6A7wvZ1jzl pwFzUTKLwjgNhmmCxzHu1X51HpLuaVJSTBDBeDH1nMjfplFJXoDpugSbxUd8DvzPBqW1APEeKrIrY aOjyI77TjlSjMc+GAxzS7PJGT8q5e2yC11rrh3YtO7RmbVVi7QP3r71Av5iqy4vkKO90RcJGvViSp U8g+qUakAv8lnmPxq1iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1myhcg-00EpRa-GZ; Sat, 18 Dec 2021 21:52:10 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1myhcH-00EpIz-Nc for linux-arm-kernel@lists.infradead.org; Sat, 18 Dec 2021 21:51:48 +0000 Received: from pps.filterd (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 1BILIYdR016168; Sat, 18 Dec 2021 22:51:19 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=selector1; bh=nSPGt6I8VV7/YSD60i8l6RqPpL6L3XSfjxlu2Bgb9HU=; b=26aqrgVJgTxA/05sCb3QwUGEBuf7Ebn/h1VcHDH7/HR5RFrzBMaHcd1JAx1AfgFwuAia Zkqi4rVpNe8aFkMd8L/5IqSOxViynybqULtd4FcnDA34qYsnT9HQWI28eGxXzbxELayv MQRMOs+svl3SRPCUEUgwEP3IpO4MR4BJoWtcM201/L9wDUN81ToAY/bg+8+MGv766wbx 8ADcoHMeVCEhSr5cy5pV9er3Owgg11ulscWkEnWsSFMQ5G5dw574MBkBdMahrbWwPeH5 2dSe+LJTYoPm9o2Mg2f82l86aYhR161oa9Owgf0Tv7QWKZ9TjxehQ1yRp3Bvbq6G8L/E 6w== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3d15xmaqj2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 18 Dec 2021 22:51:19 +0100 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 30B6D100034; Sat, 18 Dec 2021 22:51:16 +0100 (CET) Received: from Webmail-eu.st.com (sfhdag2node2.st.com [10.75.127.5]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 25173209F5E; Sat, 18 Dec 2021 22:51:16 +0100 (CET) Received: from localhost (10.75.127.47) by SFHDAG2NODE2.st.com (10.75.127.5) with Microsoft SMTP Server (TLS) id 15.0.1497.26; Sat, 18 Dec 2021 22:51:15 +0100 From: Antonio Borneo To: David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Yannick Fertre , Philippe Cornu , Benjamin Gaignard , Maxime Coquelin , Alexandre Torgue , Philipp Zabel , , , CC: Antonio Borneo , Subject: [PATCH 2/3] drm/bridge/synopsys: dsi: extend the prototype of mode_valid() Date: Sat, 18 Dec 2021 22:50:53 +0100 Message-ID: <20211218215055.212421-2-antonio.borneo@foss.st.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211218215055.212421-1-antonio.borneo@foss.st.com> References: <20211218215055.212421-1-antonio.borneo@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.75.127.47] X-ClientProxiedBy: SFHDAG2NODE2.st.com (10.75.127.5) To SFHDAG2NODE2.st.com (10.75.127.5) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.790,Hydra:6.0.425,FMLib:17.11.62.513 definitions=2021-12-18_08,2021-12-16_01,2021-12-02_01 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211218_135146_120704_84B28652 X-CRM114-Status: GOOD ( 18.19 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org To evaluate the validity of a video mode, some additional internal value has to be passed to the platform implementation. Extend the prototype of mode_valid(). Signed-off-by: Antonio Borneo Reviewed-by: Philippe Cornu --- To: David Airlie To: Daniel Vetter To: Andrzej Hajda To: Neil Armstrong To: Robert Foss To: Laurent Pinchart To: Jonas Karlman To: Jernej Skrabec To: Yannick Fertre To: Philippe Cornu To: Benjamin Gaignard To: Maxime Coquelin To: Alexandre Torgue To: Philipp Zabel To: dri-devel@lists.freedesktop.org To: linux-stm32@st-md-mailman.stormreply.com To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 5 ++++- include/drm/bridge/dw_mipi_dsi.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index e44e18a0112a..3f6564762e24 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -998,7 +998,10 @@ dw_mipi_dsi_bridge_mode_valid(struct drm_bridge *bridge, enum drm_mode_status mode_status = MODE_OK; if (pdata->mode_valid) - mode_status = pdata->mode_valid(pdata->priv_data, mode); + mode_status = pdata->mode_valid(pdata->priv_data, mode, + dsi->mode_flags, + dw_mipi_dsi_get_lanes(dsi), + dsi->format); return mode_status; } diff --git a/include/drm/bridge/dw_mipi_dsi.h b/include/drm/bridge/dw_mipi_dsi.h index bda8aa7c2280..5286a53a1875 100644 --- a/include/drm/bridge/dw_mipi_dsi.h +++ b/include/drm/bridge/dw_mipi_dsi.h @@ -51,7 +51,9 @@ struct dw_mipi_dsi_plat_data { unsigned int max_data_lanes; enum drm_mode_status (*mode_valid)(void *priv_data, - const struct drm_display_mode *mode); + const struct drm_display_mode *mode, + unsigned long mode_flags, + u32 lanes, u32 format); const struct dw_mipi_dsi_phy_ops *phy_ops; const struct dw_mipi_dsi_host_ops *host_ops;