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: 13908467 Received: from mail-lj1-f171.google.com (mail-lj1-f171.google.com [209.85.208.171]) (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 6251A1A8F6D for ; Sat, 14 Dec 2024 13:37:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734183445; cv=none; b=N2P8l5HB8B+ZzCvRrXkvfRrCr7dPNO6YSg+oH4iaf0E6HJmyAJOZMwKDWzGTh9H3LVnAcz5AkKykxDgB8RbsFGuG/NDCO7WATAgGh0J8JfhZZlX06v+GD95bOaZwjwFZiwYO61fQEL1zHBZJE9RNqJwOK2Plu3pKzhSCjpzqZxI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734183445; c=relaxed/simple; bh=fIH1atGQEvkLWi04AIEXYETQz0o/iNjqyQIeIWP3jdk=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EXRV57R/aBSoAr4AbbfTiGjbyuCXOiuRi4ve5mmpAnLOZ/1zLKMuSkDTx1iYY+lghDwn+PlPbRPy0kgQehwIViIPA1y0cVQACiX8OhJS2oNUzXGWfrN0Mf5u94G2DTTUeWfa0xnlUKB6fEsDPwIPtn94eSQ7a1IqQtLp+zBk4WY= 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=l4k56QPD; arc=none smtp.client-ip=209.85.208.171 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="l4k56QPD" Received: by mail-lj1-f171.google.com with SMTP id 38308e7fff4ca-30229d5b21cso23047941fa.1 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=vger.kernel.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=kfAoBNlarjV9Kr0yPdaLHtIo2MYFINu9J4XNO2CCrRg=; b=l4k56QPDs0bosHBWb7R6GiyRkpdvyPOO0C/JotKStmeBxwlnf2AZJKq1t710dIobxH SyqkD6+szAAX70hRnU/udzNag3+ltPExROmB+8z2biZSTpC4qLG466IE+tAfdFRhGYA0 zkHVofpPQkQULJcz7y/q/ICBnX5B4fjggqbpGi+0uLDcokxAOLkCPTjCM3t6e++A0JlX SNgRdZsuCFEQONBDKN6nIMs/FEqeIqwQY15kIGC7wA5E0chtg7lxz59BIfvntrolCL3d S4kiUc5u3I2LQ1bmGwEyF/iTKlG00DoYE3vrV3pqlfFSqhH7AxlkJGXAPbzQuCwCXJYq gmsw== 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=A0VjjfhGxtLQDayELQ5egKmYcplpPEdVT4Il1Njxjt0W3Ha70Bh3IBvEjv0l7eLJm2 MtJW+2jSKtsbfpTf45dKoJIrErSVLwh1m7UKvABpeIdAHuU2ImTHzg81l5F9P7wdofFa KnOzY8HThamBLrrqbIYHDxJfmWwbn/w+dXLT0T8d6RPlKpChNUZ2vUoRssgZjXUrxYAp prvdeMsJwPSimd74Ji5XDkMMpDaYrgCXHZbjqyNWAKKz6p1nbElCDc9UXAayPgWij6GD ZL0T2poy3+48ERzLtgh15bXRN+tsHeLzhJDUbPZ0FIBuQMIpFsUH53FiQqFlC0wtJTMV jDbw== X-Forwarded-Encrypted: i=1; AJvYcCUd7cDV56WPQmbDfknHnGrrbfgXBEXFQ+idYw/pnL7IEMUoHVOtDsicUT71cW4UayZMnPKy7Cn0gMGvdGPD@vger.kernel.org X-Gm-Message-State: AOJu0YwRW4fflTCQkkMbDTJrpzpz/agUnwzdbFh7qFv/OewmFt1YtN/Q 5jMMEO4nEiMzXWyOXJUay4Rd0r0bO/kCH4tdxOD1GemH4hW90B2uj46maCczs0c= X-Gm-Gg: ASbGnctxag3cDOFGmlOP2iYMGzWlydv3D9Ctyi3fQuL5c8TQGevih+GGgVYFpgU6zx/ zrQ7k3PoghMSNFfjWmRP9ReLjk52m1AQIt4eE7RqC64nB9jO5U8ME2qgzE7i42pvz6QqrFIomfC tvPOAA17cWKTAcabndqcml6hNymY8LFCnPN/m6O+qPjxbpjfQ/JpPqk0rXOwkm0VTK3etPdeTgk rzpqxRDEAgMV8FUc/0ZZxjfEsxFxWXAaCwVlnFPNXVsRhKxLZ+Z9Sj9ZefiaKZV 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: linux-arm-msm@vger.kernel.org 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);