From patchwork Fri Oct 18 20:34:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13842384 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 25BEBD3F29B for ; Fri, 18 Oct 2024 20:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/m0kHi0t1totPQ3PzKzLk6eKNQU+IyYcKKk3sgyVyJI=; b=Vzi4IbYwV9osbn4+FCbx9Vcxka dGpZmjsddfgbkHk+5RH2vnwl1xW0miZ1ITR7rsqR9Go2PESuWg92GbGVdiJ1+Bqk3g0K3Ir/OvlEt GZVA4ff9mtv6WU4xbz2rsCzxB3qtmn876T/xB7TtyXCnUqJTvjq9vtiTSmkvJwgXiekhHh67Wn0f3 bnyJ1STpVukFM9Owy9oh/pIOWgn/wZWuzbphmtjZqmP9QSheUVcPmSeazkCXbsjD/L+ZYyLGpna/K M7OJrEheITEYuMX4Vcz4ehn28a8mLEzJ3kWOz0DxzLBY6pynLd38Z7w8fSHFk9fxPfifHsSo1+psK RUFVRkQA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t1tqE-0000000204W-2xnM; Fri, 18 Oct 2024 20:44:58 +0000 Received: from mail-lf1-x12d.google.com ([2a00:1450:4864:20::12d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t1tgD-00000001xd5-3WAV for linux-arm-kernel@lists.infradead.org; Fri, 18 Oct 2024 20:34:39 +0000 Received: by mail-lf1-x12d.google.com with SMTP id 2adb3069b0e04-539f7606199so3019766e87.0 for ; Fri, 18 Oct 2024 13:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1729283675; x=1729888475; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/m0kHi0t1totPQ3PzKzLk6eKNQU+IyYcKKk3sgyVyJI=; b=MhMY9c26EZ8tdlM/bMtRWNwoQr6M62BooOx2lmKCBEWmHMKDd0zt0zOx2dpPKT7Rad f/j5YIY1mi7wQDSOHAUK+BpRL7v4XARGU/ysua43/6eTPiPyj2/SWslk1r/M/y2WhkUR UXsNx1DD29sVP0zwIuze6qq+vAPx+mzKj+0ALHRt00OkR4R/PKTPw8TPc5HKMRLq0FEw VdoVidpy2exgxbCQt24ozGzE/TSs6yQvp5X5UJriqfpu2HE9niqv7GikJFsRxpfHT9Te z2KKjTC28Z66d0s9qrcTmqXiBZPFikAZyrw+j6D+mWppL2UBCSQkU3oYj1gFO41wxd5S T98g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729283675; x=1729888475; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/m0kHi0t1totPQ3PzKzLk6eKNQU+IyYcKKk3sgyVyJI=; b=VboVT83r2ZDCVyaVHobnwbakv4tuxxI0Kn41t3DXN+Mg1Qsb7f6cfHLNxW6y9IoxJf XUXjcEyqgzszZNKsphDF/ZsAoHCkzce+5rK5/dXegC7NPf1aq6jcCfPZDVjZ0/s9D9P1 RVI0TlnHOxlRW9IarWIj8wueOsx0/HpURy2WuK6qC9ou5ZjkuGGw+UWxub+wwOYWuAGH Vszf7O4w37LUJFiQ7F9toiEiA7EY7w1J63j4gez0efKeY9hMCkRadaDtV5Q3nF5cxmc9 gGpM7oEPBOeqMAYIBgR2pg6/bR4pvjbjokc+z7/9fIXWFzbukf7hKIR2G8H1t6Ks1Gp7 GYZg== X-Forwarded-Encrypted: i=1; AJvYcCUdIAo2fkYH4+bTW1JyKlPJfSfZZgB6rowrBhUoHYI8wKVJfYFFunL5vZVm4lF2QnfHOdEHXOUgBnP9QExm+xr3@lists.infradead.org X-Gm-Message-State: AOJu0Yw1TMTegnPQw0Ho+wFosS4El4trJFBwprKLU30iwgT/4YdGAyp2 jT+0IsF6IRIM5LQ3CrRMpEp0JrpBFGjdVmMY9AZSKxSAYTEXYu+0B7BuO7WzAhs= X-Google-Smtp-Source: AGHT+IE8teJd2ZASdpn1PLVXXJ8Z0lyW9kTdAysHgWEAGJu0SayFj+KAyRByYqJcMZXxWhWyPtS+1Q== X-Received: by 2002:a05:6512:692:b0:539:8f4d:a7dd with SMTP id 2adb3069b0e04-53a154436dbmr2588171e87.42.1729283675244; Fri, 18 Oct 2024 13:34:35 -0700 (PDT) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-53a151f0e09sm314047e87.146.2024.10.18.13.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 13:34:34 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 18 Oct 2024 23:34:20 +0300 Subject: [PATCH 2/6] drm/sun4i: use drm_hdmi_connector_mode_valid() MIME-Version: 1.0 Message-Id: <20241018-hdmi-mode-valid-v1-2-6e49ae4801f7@linaro.org> References: <20241018-hdmi-mode-valid-v1-0-6e49ae4801f7@linaro.org> In-Reply-To: <20241018-hdmi-mode-valid-v1-0-6e49ae4801f7@linaro.org> To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Cana?= =?utf-8?q?l?= , Raspberry Pi Kernel Maintenance , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1475; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=MtW4rEaw3z2JqlmFrdNRTkI3k9zk4GSQZjrxwP7bYGo=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnEsZWS7Xr6vqJfAnZJaxT8pE156T+ugvlMXDE3 cWVO2I31JaJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZxLGVgAKCRCLPIo+Aiko 1RStCACcZGiWbJ6rwl1Z7TfhmYAv6dtF23Ul2Ba84Yg6T1vuXwq/cb/4fJJgxp0DdL2C34giGeM OX7nDtrcBG8ZwXo0GOsmJqZxtWzIiBAyCVGTmz+yx2Y+tR5Nhnu2zkJeXVuxV0n5G5uT9maCxns NKuL0ICAxfeQ+ICDoNDqNkgABXsNpo03+AUcDftdjzQDqqcQeaKnK9f5YiWI/97U/5ABstMbZ+K ceX6ul8ImmiIFu67jcbEl347B72uAN/TLXdutztOSkElYtI5UwIj/Sl4fJOiQQwobFAbw1CoNCD wN2I8yrwr3Tn99ueCn+aeGGPbo7vTkfjtwCWzxrkVIR9jctY X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241018_133437_929931_190058AE X-CRM114-Status: GOOD ( 11.93 ) 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 Use new drm_hdmi_connector_mode_valid() helper instead of a module-specific copy. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c index b3649449de30..54b72fe220af 100644 --- a/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +++ b/drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c @@ -205,16 +205,6 @@ static int sun4i_hdmi_connector_atomic_check(struct drm_connector *connector, return 0; } -static enum drm_mode_status -sun4i_hdmi_connector_mode_valid(struct drm_connector *connector, - struct drm_display_mode *mode) -{ - unsigned long long rate = drm_hdmi_compute_mode_clock(mode, 8, - HDMI_COLORSPACE_RGB); - - return sun4i_hdmi_connector_clock_valid(connector, mode, rate); -} - static int sun4i_hdmi_get_modes(struct drm_connector *connector) { struct sun4i_hdmi *hdmi = drm_connector_to_sun4i_hdmi(connector); @@ -269,7 +259,7 @@ static const struct drm_connector_hdmi_funcs sun4i_hdmi_hdmi_connector_funcs = { static const struct drm_connector_helper_funcs sun4i_hdmi_connector_helper_funcs = { .atomic_check = sun4i_hdmi_connector_atomic_check, - .mode_valid = sun4i_hdmi_connector_mode_valid, + .mode_valid = drm_hdmi_connector_mode_valid, .get_modes = sun4i_hdmi_get_modes, };