From patchwork Sat Dec 14 13:37:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13908479 Received: from mail-lj1-f178.google.com (mail-lj1-f178.google.com [209.85.208.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4FF611A76B5 for ; Sat, 14 Dec 2024 13:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734183446; cv=none; b=Lnou8XEVCj2kL4d562JXrUsKORvvvbseTuzJ98MykJx2uABGlClrqVqudHmH6o0RrBkT4sT9MSV6o2KbdCu0VXtArJO1dBySQhzFod7bzjR3ap5hlC9dounZazGx0u9w+Xic8V9nVKk7n/0ApAkabMFgVXZXVTXbSgVbktqYmew= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734183446; c=relaxed/simple; bh=fIH1atGQEvkLWi04AIEXYETQz0o/iNjqyQIeIWP3jdk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=tq9L3qcra09PG9ECEF9m+gQWDpj7654kEb3qGx+ARqGZ4jjF/vuf/88rcK+53gDEBl2F5/PgY0S35SUS7NUtaArc8BdepztCXI80dh2ywMuPDIZqt1XAUzu6SXeRQfSuTkT057B19tXaZB6fKFXmkP9J7vlAv+pSNA2c7SLluEo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=lf6mHmnN; arc=none smtp.client-ip=209.85.208.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="lf6mHmnN" Received: by mail-lj1-f178.google.com with SMTP id 38308e7fff4ca-30167f4c1e3so27460271fa.3 for ; Sat, 14 Dec 2024 05:37:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1734183441; x=1734788241; darn=lists.linux.dev; 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=kfAoBNlarjV9Kr0yPdaLHtIo2MYFINu9J4XNO2CCrRg=; b=lf6mHmnN72npEiQp8cRwvRY19UtUMXmnc2rsfQqrLD/Vkikj98nwt3TWcqCkUursHz DVkQdubN252LQ3r7JIC0Yu5kjy7txhIs3p4ggBvWsZeOY2Nv+mZw1UGajzU2CcV6edrM JmvybhQ6eK0c5wRbmT8U1+CEPlIsQqhSWQ4Poi+zDDZpXCoMeSWaVfzKsFP7Vaaq/G93 hapdiGAY194IsrxohI++8mAYLYwgFoMe6HrUJAvDu97y6Cte/Ys4ad0vBm/6pUN01KsV F3kiBO5hWiCzq64/KIH1whPgKGUuxvvA41PAZG7hN4VtU9AFelR1Lzthk7CUtw7wmQAs Txzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734183441; x=1734788241; 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=kfAoBNlarjV9Kr0yPdaLHtIo2MYFINu9J4XNO2CCrRg=; b=Izumh1fH2ZjkRo6gwQ/hGI1P5I+uP2xa7uN133Ru56Me+6lPWKF4v8GxyzMWvKAxWQ 9ic2V0qoDmpOzTJGj17yrJH+quCGw2DtqFDXZUvyt6HN4WroRAXJ0KPz4td3chItnBAK iMmyfZ3N74igWx7eccoLjL2UUgODBgqVcr+vJiOXJQoji0UNe5kqpMXf3nhV8pnAMyvr ydeVLagJtiTGzsj7tPNwEVNSexs9CT5mxNeJZjKs5BpEYDoi0uoAgPj0U2+yIHsKznKV j0hQ22ygL8MfHI5UfNB9/LDhne5sN6fshtrKZ7NGhK24HMfRyTyefRxUyQpjZDK49K2e ezyA== X-Forwarded-Encrypted: i=1; AJvYcCWxoOWYkkGd0iJoevH934RZeazWhvQ0X6A6yohdYJ6EcYm0J+zu1vIVjGgcYGBjGhvRf30=@lists.linux.dev X-Gm-Message-State: AOJu0YwataIS1Nz4FRaFYwUWL3sA0x/AeN6yWvdLANYdChBvSkg+u9Z5 J4ZGCfvFdTOiFga52mzr3H8OZELOqEfCRst6VV/3hNZyxKiS7X3KucX6+033/wk= X-Gm-Gg: ASbGnctdaPOv9LQKKo4dNHe6psFMjzAnlC1rG7zxR3UbsdshE16JtayCzi/mWsPB01p JCh/FaCmhT9SKA+I/l72+670raVd07ZdDzXkaYjhp2WMCl3gE3IZ9PGu+EtXnym5FDQYNMeYdky yIvwBxZsCzWHR5G8nlY/vY9EHTBKivvYJ3ZcPIOH/xJwZ8zx4shANvHXrZMQe3dI5Glkuo3hoio gPBFkcHYt/Azk4+716T7n1DhAivcP1ypn9wqaFj+aRHSKnNpqZl+1/XvfyDATag X-Google-Smtp-Source: AGHT+IFSZO4bNy8AjxBG8Wtyvs2G2G0moKCebZ7Bi6AnMIS81nyzk1n5ZS+J4Ko1Sbkn2pNNU644nw== X-Received: by 2002:a05:651c:1541:b0:2ff:d2e4:8dd9 with SMTP id 38308e7fff4ca-302544b11d6mr24876241fa.32.1734183441395; Sat, 14 Dec 2024 05:37:21 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54120baa474sm220131e87.90.2024.12.14.05.37.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2024 05:37:20 -0800 (PST) From: Dmitry Baryshkov Date: Sat, 14 Dec 2024 15:37:08 +0200 Subject: [PATCH v2 4/5] drm/connector: make mode_valid_ctx take a const struct drm_display_mode Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241214-drm-connector-mode-valid-const-v2-4-4f9498a4c822@linaro.org> References: <20241214-drm-connector-mode-valid-const-v2-0-4f9498a4c822@linaro.org> In-Reply-To: <20241214-drm-connector-mode-valid-const-v2-0-4f9498a4c822@linaro.org> To: Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Karol Herbst , Lyude Paul , Danilo Krummrich , Harry Wentland , Leo Li , Rodrigo Siqueira , Alex Deucher , =?utf-8?q?Christian_K=C3=B6nig?= , Xinhui Pan , Alain Volmat , Raphael Gallais-Pou , Liviu Dudau , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Peter Senna Tschudin , Ian Ray , Martyn Welch , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , Stefan Agner , Alison Wang , Patrik Jakobsson , Philipp Zabel , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , Dave Airlie , Gerd Hoffmann , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Chen-Yu Tsai , Samuel Holland , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Cana?= =?utf-8?q?l?= , Raspberry Pi Kernel Maintenance , Gurchetan Singh , Chia-I Wu , Zack Rusin , Broadcom internal kernel review list Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, nouveau@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, virtualization@lists.linux.dev, spice-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, Jani Nikula , Laurent Pinchart X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1823; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=fIH1atGQEvkLWi04AIEXYETQz0o/iNjqyQIeIWP3jdk=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnXYoElMfelOPEJNjs+G1Yj9xgEcdTdcLAHLPa0 1XczK3Ryz2JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ12KBAAKCRCLPIo+Aiko 1TNjCACQzndFYYYqNzhLedAqKs7VfOsz2ZEbJAu4qQr0caK2HF+hvtR+VUIlYwQ0jcqqWXJmXLM +4HlPR43bEtxaoe4QpWwccR/sQYlEGLTcuF7/jlXw42WpNdOY6WhxbDnr23gMEQXuLD2NuXBTyB XubcAVl2e73ZHfh1LpZ35luOaheCBIz8zL33f8d5nxxFyCEqHaY5q6zARwkPBAoe852c0K3chfm oDoop8CfLRyNhvoGEF/YGoigASSuk7/jucbCfOlAXSz1JpttbSHzvLiZtgMdHVwI2RHxPySD27A yiEIP9OceoguE2oL2gaLonv3bIozOrfBbnj0xVgmnNavKUi8 X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge take a const struct drm_display_mode argument. Change the mode_valid_ctx callback of drm_connector to also take a const argument. Acked-by: Jani Nikula Reviewed-by: Laurent Pinchart Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/i915/display/intel_dp_mst.c | 2 +- include/drm/drm_modeset_helper_vtables.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 123c4ece626883bd2fde997d5752611bb82018ac..87e3e178df6e642da89e81ec92328735e477230a 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -1445,7 +1445,7 @@ static int mst_connector_get_modes(struct drm_connector *connector) static int mst_connector_mode_valid_ctx(struct drm_connector *connector, - struct drm_display_mode *mode, + const struct drm_display_mode *mode, struct drm_modeset_acquire_ctx *ctx, enum drm_mode_status *status) { diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h index ec59015aec3cf3ba01510031c55df8c0b3e0b382..fa9ee6a128bec0205f501df6f7634757f5fcb9ee 100644 --- a/include/drm/drm_modeset_helper_vtables.h +++ b/include/drm/drm_modeset_helper_vtables.h @@ -1006,7 +1006,7 @@ struct drm_connector_helper_funcs { * */ int (*mode_valid_ctx)(struct drm_connector *connector, - struct drm_display_mode *mode, + const struct drm_display_mode *mode, struct drm_modeset_acquire_ctx *ctx, enum drm_mode_status *status);