Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp376698lqb; Fri, 24 May 2024 00:33:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWmifSyRYOMX7TAqzvWM3ofN3rTQX1aYpkZ2wudUj0geR6uqy+qe/dVWvCkfOqj7PpzxyUPJjRILTPS4DPg4IEIlS7ogBJXXwoov9STZQ== X-Google-Smtp-Source: AGHT+IFJi9tQV2RCSTHaC/Mum7QpeWo5xqb6aUG+j6QaJbAT8OnJfv0gYKtcqCzwocaL+gzPjtIY X-Received: by 2002:a50:d5d2:0:b0:572:719f:b430 with SMTP id 4fb4d7f45d1cf-578519aa424mr1340901a12.32.1716536011137; Fri, 24 May 2024 00:33:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716536011; cv=pass; d=google.com; s=arc-20160816; b=EllT39PNmZtg5dx8sfjtE9HiVfvlH7WaDXcq2kRSJ/QcikHaUtcafrZhJdOhsxSYMF /5mS/+sXX+sxUNLz001bKtW8E6te7WMidFb1nHsixw6njzOiy26zT1S2k0s9jDiCXbXd 5G6k0UNCDXH2Zsady7V9UcBizIZMBk/RsIfFuY07lgguhizqW7wvy1yaF5RLDzCwk0A6 Yot3ZwNk+wV/EvXggVr/uJwTjEj31HVtFqqQpeIlQFq7EgUToz7WpUHJ0dXO2N5EmN1y W4MntRJFkU2/1/FtQiVHniEsMqXC8vGN7wONM11EAiW1/XJFP0DDcvMnjcuQdffo+zlx sbkw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Hs5v3WOjE+iyvTaBgZAItEGIUyDtSVd+UbScrF+yyFo=; fh=4PZpdvD3NlEdHQwbOtwYg9G87uLcgk5bCTHVCswGtMw=; b=VWHlE/pSQfJpTrNCLR3pgl7FbWQM1cYsx2/njWpm3EKMm92MzzzkPIl1E6dlcStQXh EqYHDvU6u+KJpGnzFLKD2d1sqsSgMbmcg310scgpHV87JzjzlxUTLHdrubcSIL5Sgb0/ dwPJI+f042/FfFAWgynlC/NFvyOo6xiaWDmZXBHDeLNQFANaPE8ADl/5RbqxFygp0oPU Jt7au/Tmrgm8xbDcPa1yHwa98K1sUnIOIYGuKcBgP4jQrHJSSidgXisqAPsH7B/QKylg +v38MzoCReuoB2BkQGL+1RObggH7O64BZOUXIwjwirOw5xTcHa63tAC5iShwp3XmHVs0 bbcw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hjOwmlws; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-188399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578524b1790si544604a12.490.2024.05.24.00.33.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 May 2024 00:33:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-188399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hjOwmlws; arc=pass (i=1 spf=pass spfdomain=ti.com dkim=pass dkdomain=ti.com dmarc=pass fromdomain=ti.com); spf=pass (google.com: domain of linux-kernel+bounces-188399-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-188399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B48D51F21C51 for ; Fri, 24 May 2024 07:33:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 30E4F127E18; Fri, 24 May 2024 07:33:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="hjOwmlws" Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 016328625C for ; Fri, 24 May 2024 07:33:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.142 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716536003; cv=none; b=f6m5gILYC1mCjttg1qQhIjBMeaHa+z/46sXVMtah/Wz8lyslxUL/QCFHyUAKMt60kPwRKLojJCJzLLj9vZr/y/tOPxd+0uwwZZsF9kK0vHKFyfk7EftbpS8MJM6LXwFPmGyMAuAQO3o0GLf6ZIRfltanGEvx4CplxRzpy7iIt0k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716536003; c=relaxed/simple; bh=DMe70+xhBoIO89Uo3abpqRhb+WCdKaNqWLH49X38skM=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=mIan78ZGBrEHDhYxqQxprD6wAtNys0cAWKGNLNa+gQMqkygW7kTFshLTBmGRZGCjhb0KDX1zyW6GQPiLQcF/AnSQyhcqwdq6GWbbELrUofo9ECAOu3MHFLlSqpRS6xcMNV3Jfwb6xNW++k4mMFJBhFA2JGdjW3Y8FuFRNvqUTu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com; spf=pass smtp.mailfrom=ti.com; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b=hjOwmlws; arc=none smtp.client-ip=198.47.19.142 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ti.com Received: from fllv0035.itg.ti.com ([10.64.41.0]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 44O7X650044481; Fri, 24 May 2024 02:33:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1716535986; bh=Hs5v3WOjE+iyvTaBgZAItEGIUyDtSVd+UbScrF+yyFo=; h=From:To:CC:Subject:Date; b=hjOwmlwsqoOvz4PMf3lUoISgg6iNhBpghqEDsuG0/DLqjVl7jRx5LTat5RlPyXKrP gROW5h4v3Vw5bKX+HjAGQmKgIBJyXGJ5gZ7Zal657T2hvwB4Bu4SnXt4MSApltCnm+ 8V+k3hUeSKbXQgx69AVi5WteQCMcz6KteCHoZHwk= Received: from DFLE108.ent.ti.com (dfle108.ent.ti.com [10.64.6.29]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 44O7X6Tq033554 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 24 May 2024 02:33:06 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Fri, 24 May 2024 02:33:06 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) by DFLE100.ent.ti.com (10.64.6.21) 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; Fri, 24 May 2024 02:33:06 -0500 Received: from localhost (jayesh-hp-probook-440-g8-notebook-pc.dhcp.ti.com [172.24.227.102] (may be forged)) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 44O7X5dq121659; Fri, 24 May 2024 02:33:06 -0500 From: Jayesh Choudhary To: , , , , , , , CC: , , , , , , Subject: [PATCH v2 0/2] Add mode_valid hook for sii902x bridge Date: Fri, 24 May 2024 13:03:03 +0530 Message-ID: <20240524073305.107293-1-j-choudhary@ti.com> X-Mailer: git-send-email 2.25.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Currently, there are no check to validate the modes in the bridge. Add pixel clock check to validate the modes that the bridge can support. Also add the mode_valid hook in drm_bridge_funcs structure to take care of the case when the encoder attaches the bridge chain with the DRM_BRIDGE_ATTACH_NO_CONNECTOR flag in which case, the connector is not initialized in the bridge's attach call. Also add this check to the atomic_check call as suggested by Maxime in v1 patch. Changelog v1->v2: - Add KHZ suffix in the macros to be more clear - Add the hook for drm_bridge_funcs as well - Add check in atomic_check dunction call (in a separate patch) v1 patch: Jayesh Choudhary (2): drm/bridge: sii902x: Fix mode_valid hook drm/bridge: Add pixel clock check in atomic_check drivers/gpu/drm/bridge/sii902x.c | 43 ++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) -- 2.25.1