From patchwork Mon Jul 15 06:33:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 812680 Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (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 21AAD1836E1 for ; Mon, 15 Jul 2024 06:33:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721025200; cv=none; b=bfYnG4bqwwpVN0tOROkxFp3r9O6HOkGz8i+KImwQmsKNEZD2BAOMjIYHrb39EUECpQv7LDhEim9TKi+b8FB8xsEY9tD/dYiz8KQv0rJz3lNBb4gKhgaMPlKI07ULGCPcroup5yiG3dy4R7KXpfyQiTA0G8CUcR7mbMP5RYs58C0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1721025200; c=relaxed/simple; bh=ElUTEfRFQUeTMBsWyzbhEyDMF5jl1RThHLUf4PWNs3U=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MWMiiXzCmwNe4viKAzSG0IGAF/bwLAOw/VFgg0TbrEhrHFpnjsMDUuINc/9AL2A5ZiaGn+r4XRgWIdxsZQI4+YYWora0nDpl2RRcyyX8G3jaWnSnxP3qcguOERRiYtHYCZo08Qjoz9g+hOx97XBLNW8ODQQeqeVYV3UWJLTj8iQ= 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=PDo5cQfW; arc=none smtp.client-ip=209.85.167.45 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="PDo5cQfW" Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52ea929ea56so7226981e87.0 for ; Sun, 14 Jul 2024 23:33:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1721025196; x=1721629996; 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=7hD96SukkfsNyjNTVedgkKQiaViidlloIggj4cO+Fh4=; b=PDo5cQfWkWdbEUjAPGvxBFP4niuEFSCyI2REVrudOO5Xg6sTDyTbwc9j0l0phPVIT3 6lSMOXv9GR4Zue9M1yy7/WQPM6Vb0n3wvRMW/TEE5iNZIEZuUm+hLz0xI/1oKapckcUt AtHWr8cbnLOycmKs3WZi3S4AMsBqc1JGSUsE5TCSZWeo8BAL7HQzSFoZRM2jss0Gl/ih lu65E9Cg7RK79sjiVb9YfLbBEO/Xq/jOm4h63Q4efFYRMtNd53jJPhsjTiGOvTrfvyD7 4bViJIjRgRcR8Qi0ju9I7SWkBLls2nErtjRGnTLruHxoiUqncGCwFJxfkwkwQZxoATsF V7wA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721025196; x=1721629996; 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=7hD96SukkfsNyjNTVedgkKQiaViidlloIggj4cO+Fh4=; b=oHvR2Nf8otFd5X7TmYJnKUO2ERWw+ruMeBY70x5/cJeLGK0TT1LvqkXKTARZx8ahMd pwqJjLr4yoowbqB3uid3jdzmdO7MO+7S51dedfKkpQB54ov2xxIiMaW5+LvL7hBk26Ov CEi4dJMC6lW6R56vmiXl6wzPd8R/FEmckbY/HpFtwz34e5ocvzHmtSTx4jDFT3zBBpY3 +diCTZQ2kZKAbiz9umY/3zVrCFWuwx+DUM2qv/hwJESBc/ZNuOF5yks/Zk35uJe9DlDD Z+s41sAFwsQnp7kJMm6RJVbx/Mzhg5i06u56e2D+6CoRUB9rISwAmqvLMtr6hWyycbcE DUHg== X-Forwarded-Encrypted: i=1; AJvYcCUA05iTygXY4WRfXW54qMdU4YZ1Kx/ynZvRWzPMtPfGbY9L9FmRFqppAaiDttwykGce8ssPkd4HPRAukBL1v21A23H72vJL0aueiD41Eg== X-Gm-Message-State: AOJu0YzXv7NrV6GftX4iue/FzldOnXRi7ZGmH0dsnwpnzwDUebw+TaZv 4cr8Jj5BZ/Wo6S3SNmw+SEhv3uRDYQjZ9rOkg+Kv7T4Os7J9SpWX2XLb+0zoCfM= X-Google-Smtp-Source: AGHT+IFX0QH8GNKb6vSmUPAoENVWks4aXQTHoSfQhbwYfR/OvyXjXMYla/ZB9rPLdfgjOmPqGKpO/g== X-Received: by 2002:ac2:5544:0:b0:52e:751a:a172 with SMTP id 2adb3069b0e04-52eb99d288dmr13038205e87.49.1721025196342; Sun, 14 Jul 2024 23:33:16 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52ed24e188esm743543e87.47.2024.07.14.23.33.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Jul 2024 23:33:15 -0700 (PDT) From: Dmitry Baryshkov Date: Mon, 15 Jul 2024 09:33:02 +0300 Subject: [PATCH v4 2/5] drm/drm_property: require DRM_MODE_PROP_IMMUTABLE for single-value props Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-2-61e6417cfd99@linaro.org> References: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> In-Reply-To: <20240715-drm-bridge-connector-fix-hdmi-reset-v4-0-61e6417cfd99@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Dave Stevenson , Laurentiu Palcu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Paul Cercueil , Anitha Chrisanthus , Edmund Dea , Chun-Kuang Hu , Philipp Zabel , Kevin Hilman , Jerome Brunet , Martin Blumenstingl , Sean Paul , Marijn Suijten , Tomi Valkeinen , Kieran Bingham , Biju Das , Geert Uytterhoeven , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Jyri Sarha , Matthias Brugger , AngeloGioacchino Del Regno Cc: Rob Clark , Abhinav Kumar , Dmitry Baryshkov , dri-devel@lists.freedesktop.org, igt-dev@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-tegra@vger.kernel.org X-Mailer: b4 0.14.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1070; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ElUTEfRFQUeTMBsWyzbhEyDMF5jl1RThHLUf4PWNs3U=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmlMKovm5l+7A24sivlmJ0R0FXE9iAwNjDSrOKP WDSbfR6q0WJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZpTCqAAKCRCLPIo+Aiko 1e+8CACEJovL304bl9alKdbKAOnfEF/R08MCNCfeoeQl2+qtgfzhmRdNpjupcxELHKcsWM+QIMF y5SHMmA5MDdtTOnk1pk9JWqRfeB2hUSWYs3LYMmYEQy7Tz+BYPrK4ScYeUHR6+qj0oCHUZHBpWe jB29sogURM+xEeh1n0770SS5O7ZxzrOm+Hxi3UAo62YKLxcXGsWm6Lyx/3MtlyAPTJKZzM3T3ko biVZKcN3GeHZhA4YojTOl5G8riLQxBO1BmRwBev3679IUvrG/ciHfbmLdysd4FqK1H0pZF5YX4Y mYOPUHKTFUgJ8Z2ftC0dD6tj00ePMiHdUlm/pBEnIMFwUVaU X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Document that DRM_MODE_PROP_IMMUTABLE must be set for the properties that are immutable by definition - e.g. ranges with min == max or enums with a single value. This matches the behaviour of the IGT tests, see kms_properties.c / validate_range_prop(), validate_enum_prop(), validate_bitmask_prop(). Signed-off-by: Dmitry Baryshkov --- include/drm/drm_property.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h index 082f29156b3e..d78ec42de42f 100644 --- a/include/drm/drm_property.h +++ b/include/drm/drm_property.h @@ -162,6 +162,9 @@ struct drm_property { * userspace, e.g. the EDID, or the connector path property on DP * MST sinks. Kernel can update the value of an immutable property * by calling drm_object_property_set_value(). + * This flag MUST be set for all properties that have only a + * single value (e.g. min == max or if enum has only a single + * value). */ uint32_t flags;