From patchwork Fri Nov 15 21:09:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 13876868 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 B659FD68BDA for ; Fri, 15 Nov 2024 21:09:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B77A10E8DB; Fri, 15 Nov 2024 21:09:50 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="uxE4gs+3"; dkim-atps=neutral Received: from mail-ej1-f49.google.com (mail-ej1-f49.google.com [209.85.218.49]) by gabe.freedesktop.org (Postfix) with ESMTPS id C0D5F10E8DE for ; Fri, 15 Nov 2024 21:09:48 +0000 (UTC) Received: by mail-ej1-f49.google.com with SMTP id a640c23a62f3a-a9a4031f69fso342800166b.0 for ; Fri, 15 Nov 2024 13:09:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1731704987; x=1732309787; darn=lists.freedesktop.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=JsYKkvhpGxYN/nsXndcDcczu/pyOBha9maYVfqCaIuo=; b=uxE4gs+3g7re6PR9jpvBWsyjne8EBjbSFWQ29fuUM8rLOBXzD+he3kv+aN4TWNHevR sbryMygQinxI0x0SK/TO4vIZBQ1FNZ7m62yRx9A3H8nY1zLk4ATLKDsDDJKRUUnDzG8+ H02Bnxoi4onnk4xYcbQuRTMQqHTOnSbqKPG8+4YvdTZqSKNDbvCLBs7/7FhVO/HM4esV 32JXxXEDpKc9gQ3TClE1pH0th0LYAx8O8vdY+BySJAn1yvkl2aYgyEpJUe+JSUXcppxc JkNU+ZVtsFACqzw/dSz35YEQ/rwMLWLdln3Q+xMYifMGw0I/23aCLWgG7SpmCs8Sl0gB tM1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731704987; x=1732309787; 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=JsYKkvhpGxYN/nsXndcDcczu/pyOBha9maYVfqCaIuo=; b=OOz6VWo4+6iRfvWXj/19xJMFSXxj4RMhb7d+Hr/takglh7RWQczu3NdieYcSMdCfhw xGTPKSZb7shkJNcjPbgHvb3UlxFVMHPEnqeauCUQzt7hOQsZ/YpS2osYlxw5qsBpuP/J qdgRKm+V/aF5bcgZROn2M+ZNg2CJIyOQwbiaWKNjaseidVX1EZBsljoHWO3CNudNb3dC RuIXtc9x38SG0B0uEis05fp0YczabTpz07D8iKhcIspIooz3dT8QxuoSU4p+pQLl2EsD xEOL5lkgV1OruKSNJII68PGg8lgOfjCLlJgZs46hk3qnFpt8DBq/ETTBupHdoVWXLPZ7 n+KQ== X-Gm-Message-State: AOJu0Yxksl/ek8pp5GoK7/JQlHibv8iOSvRBspAfjoDMZGxLGrvcgjps RtFjz37Ae/u+/CIuFSteVXb05cmprL9y1dWIBzsP0qvWWDQUYQpNnbnX0jIRBqA= X-Google-Smtp-Source: AGHT+IFDdo4Ez6qAhnttBnH0913iVcsIQD4O+jaLTiUgGyLyyVbk2JIgfGuTK7H0cxIlhnYIHXnI6A== X-Received: by 2002:a17:907:3f8c:b0:a99:f1aa:a71f with SMTP id a640c23a62f3a-aa4833f7487mr324293366b.11.1731704986921; Fri, 15 Nov 2024 13:09:46 -0800 (PST) Received: from umbar.lan ([192.130.178.90]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa20df51648sm219626366b.62.2024.11.15.13.09.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Nov 2024 13:09:46 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 15 Nov 2024 23:09:29 +0200 Subject: [PATCH 4/5] drm/connector: make mode_valid_ctx accept const struct drm_display_mode MIME-Version: 1.0 Message-Id: <20241115-drm-connector-mode-valid-const-v1-4-b1b523156f71@linaro.org> References: <20241115-drm-connector-mode-valid-const-v1-0-b1b523156f71@linaro.org> In-Reply-To: <20241115-drm-connector-mode-valid-const-v1-0-b1b523156f71@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 X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1695; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=oLY7+gEEQX5y+IrkZsspi4uhz4i0DjMFBoH6fdvMkJw=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBnN7iIEAveRWXmQWe1stGwllWWTGsdTdE1s1iig 2BzWZCF0MOJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZze4iAAKCRCLPIo+Aiko 1VHTCACzeIvQM2U7UstBpUccYyFqIL0ngRGXT9/4FmsiQcx0+H2ouTVyisjg/LLZ/vRZ+Sy9Dap CcwztsrQ/32zb6SYfgOsdyQRoOBbTT5d4lzTS3Pe9PABuei6dm0lj3mJUX/Od2xwaIJT3Zqa/Du JVKMw0vQvye08hlE3x6j/j8rF64zNh4t+0I5ejSfX+SAor0P0cJvSZQSJyi541ezhAuP0uOH1Mr rZ4A7KbZFucqd4yp5jfQ5ttsyivo13fQRvEsVxt7dLMmFxP7HQgPei8s2hZj530wtj+eTAExRFs NJFXe4LNfD5wLcUeRZiZMoWytSAqd5NxU3rpWQDXs06KLhfd X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" The mode_valid() callbacks of drm_encoder, drm_crtc and drm_bridge accept const struct drm_display_mode argument. Change the mode_valid_ctx callback of drm_connector to also accept const argument. Signed-off-by: Dmitry Baryshkov Reviewed-by: Laurent Pinchart Acked-by: Jani Nikula --- 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 7be8fb047b6c17cb37b9021a2dbf430f0aaecfa2..cfefd89209ca864e19771c538ca00016f9322e74 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -1432,7 +1432,7 @@ static int intel_dp_mst_get_modes(struct drm_connector *connector) static int intel_dp_mst_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);