Received: by 2002:a05:7208:c250:b0:86:f851:443 with SMTP id w16csp942595rbd; Thu, 13 Jun 2024 01:57:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUWnVLTG8uuzPMfLWcf2plwFoDNTNJfpYrrBQXcuBvPA0pbNigvBIqAPX/pZMKbP+YwaEfERS9b089guGhMJaom1y4szMUQpwBf/De5hw== X-Google-Smtp-Source: AGHT+IHRt3Ubv6qhXt1SAe4tMsihtrPXPQwK9Is1T5XjziIyfvanNW2QksSLlD1Dlbubyki5DFSt X-Received: by 2002:a05:6358:618c:b0:19f:73f3:410d with SMTP id e5c5f4694b2df-19f73f3417cmr244128055d.16.1718269046169; Thu, 13 Jun 2024 01:57:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718269046; cv=pass; d=google.com; s=arc-20160816; b=I2EKwDu2JTQOrWhsxbe/L6DXBpclYe09ujqju+ZzhxojNvYnaJZVma+OrAH3OgRpye aybJytSRRKIH/ON9crhlFA9262b5lMrMKS5yAzudOiai2FeLzi2KUBtTolXr5fKgPm3Q /zK4KNZseSyXtnT8GsWTHLsV6sa5N6f73c27T0SnFmKZdt+531ERGEmJBhzqg7DE8hb9 c9JsMgg91jUzUbpcSItmJ8UrHKpyvNvnynGDopaprAmTIg1fYf6csInh+J7mIgtSOL/D h6O8FZzhrW6Q4et32zNGy4dICPjfZ7PweCLbULy2B8/9+46d+MBDgMs5xuj08zERZBZQ rqRQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=7kkBMQaDoeYNzDsRgMfJgiGjbnPVFl+KEhsMxEZwPWY=; fh=ciz97why7jCcCkI9QVpzHdXwfWu+K+1+W2pjM8O3knA=; b=NKnuntaiw2ahTVF54eERhjfQSGTLWYbG3GUB1P0WvyyNEzAf76Jul3+v0/EvYaPQ7N NrHlCp1c3aoBkiYeylo3c78yWPOusmqIr3GGOcczJh1lFgVRMwYbS6H/d7Q5iizYF3ep grsiRlYd7VoS6F9r5vQ5imMDa6Q8j4kmyOTmDWoY5K+086jlJW6AqHqdhrd8rOf0r4o5 n/vs6MsjpJpC7JMLTuKFkdsR+zFBJjUGn3SQNKlcJoWjCwdFJoVtaSNItE8vFp8vHIIZ twx07Tr+O1QJt21b1d4IXgo2NlRbbRb0Mw8UrupDSfkMec47rqC/9U39tlDB2bYC3Qco curw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ndQ8oFuS; 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-212891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212891-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-6fee64da6c9si888683a12.792.2024.06.13.01.57.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 01:57:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-212891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ndQ8oFuS; 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-212891-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-212891-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 60D8828902C for ; Thu, 13 Jun 2024 08:56:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B6E6313FD60; Thu, 13 Jun 2024 08:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="ndQ8oFuS" Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 2784613E036 for ; Thu, 13 Jun 2024 08:55:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.47.19.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718268903; cv=none; b=mKWQpcm6ycj+E+xdRYfahhTp0ytSAjbAufwNYvSKmOdJDV9Wx0CvIoBIMMtEl/YNQrwR0XLZzm7dgKHBz/3ayfEPvdbuFP3LExrDCfC3+InzD/ixhnHuf81g2Nhj2+1mjGBw7kxZAiYLJbbS95W0+y9TIFmfnxcI/KMzOrrm11o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718268903; c=relaxed/simple; bh=6Dp5z9ju75aH+FsH4apNpldKWYtpIrXAlWNsBFc7nBU=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=UpgBO8lvc9cunZ7iiEt2iQJDvXsPxwYdRKa+UYx54taPPKuPIF5LFPQaIdsuWVVUHRCfX0bKsb1Ea6wQ2VSmTmfhCfBSYZqZxgOXSjFE3kLDVLvzBt17O3wZcajhH1T+wfoUqgvH38E7/66p0fPuUjAO+CHrAqzs8bh5IeJfH8g= 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=ndQ8oFuS; arc=none smtp.client-ip=198.47.19.141 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 fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 45D8sBjH026475; Thu, 13 Jun 2024 03:54:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1718268852; bh=7kkBMQaDoeYNzDsRgMfJgiGjbnPVFl+KEhsMxEZwPWY=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=ndQ8oFuSNEgyU9+O5CrbuDsQgtS1wMbvYEp7/hJEalFISshugd2BiIVI5GONrtid1 of9bejvvcUYkbR/FdokdLT8v08nZgbwzmkjQrh1jANU7txBr8papTo+BgVMp00e02/ CvGkJadgG5XtPU+keiWigbeBfUfSzd+QZ07bHB7I= Received: from DFLE106.ent.ti.com (dfle106.ent.ti.com [10.64.6.27]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 45D8sBwV094870 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Jun 2024 03:54:11 -0500 Received: from DFLE114.ent.ti.com (10.64.6.35) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Thu, 13 Jun 2024 03:54:11 -0500 Received: from lelvsmtp5.itg.ti.com (10.180.75.250) 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.2507.23 via Frontend Transport; Thu, 13 Jun 2024 03:54:11 -0500 Received: from [10.249.129.248] ([10.249.129.248]) by lelvsmtp5.itg.ti.com (8.15.2/8.15.2) with ESMTP id 45D8s5Db095270; Thu, 13 Jun 2024 03:54:05 -0500 Message-ID: <11b01dd4-79f7-432b-8a43-ec653d60a87b@ti.com> Date: Thu, 13 Jun 2024 14:24:04 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v5 3/3] drm/bridge: sii902x: Add pixel clock check in atomic_check Content-Language: en-US To: Jayesh Choudhary , , , , , , , , , CC: , , , , , , References: <20240613083805.439337-1-j-choudhary@ti.com> <20240613083805.439337-4-j-choudhary@ti.com> From: Aradhya Bhatia In-Reply-To: <20240613083805.439337-4-j-choudhary@ti.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 On 13-Jun-24 14:08, Jayesh Choudhary wrote: > Check the pixel clock for the mode in atomic_check and ensure that > it is within the range supported by the bridge. > > Signed-off-by: Jayesh Choudhary > --- > drivers/gpu/drm/bridge/sii902x.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c > index 00a8c469f553..7f91b0db161e 100644 > --- a/drivers/gpu/drm/bridge/sii902x.c > +++ b/drivers/gpu/drm/bridge/sii902x.c > @@ -496,6 +496,10 @@ static int sii902x_bridge_atomic_check(struct drm_bridge *bridge, > struct drm_crtc_state *crtc_state, > struct drm_connector_state *conn_state) > { > + if (crtc_state->mode.clock < SII902X_MIN_PIXEL_CLOCK_KHZ || > + crtc_state->mode.clock > SII902X_MAX_PIXEL_CLOCK_KHZ) > + return -EINVAL; > + > /* > * There might be flags negotiation supported in future but > * set the bus flags in atomic_check statically for now. Reviewed-by: Aradhya Bhatia -- Regards Aradhya