From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.171.202.116 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795692606; b=rpn4CnUOMvY1HDouDFQFVFWYBGk7FGwzoHu0+1wYxjQxsghVpKMT1YHYl+NQ7wwOTZRv mV1bxuV1vKdg2sNUKBHY0fkh7vt+wu+kXp6oAbpvVbMUI98KPReLSFG0zTTMjyobjV8lT AuIjUD73EQRnc6YQEgqIQrNzL3sAjUYQbfgR9C+b1SSNNvcxRdzEi/Yz1WWsuUdgCoKVy oZWx2P7Tr/Ar/ttMAFXoYRjzAhvRfbYfHpG0GJjT+GdlqY2H5F8LJG/ZBZKeFTyYlIENO HZg1cSJLISQjSi7XoYlCpBjo8hQ34zrFSK/ZoVJ9h5Pozp9ik91CEOnqxgOOX2eNXOg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795692606; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Last-TLS-Session-Version; bh=S0F01oKQlokKIS/TDepIlDEvNv6YynhZXJ/ynQCSvIA=; b=5YdVF21Fiz3yQLg4KNBYsVyoKQHp7iWQ6/K/0PbKSrc3uaOonazFPj3T1cKCBWF0DH4w mkCHB24cAfi9jez7w71A+dTuKbps+RseaWkbu6vpihAjZh4LuQEmbn+X0C2tdKu28Z7to cCyIjhObPjYPmn+hUNJPYnrs2qGDc2K72Xl0aSlH2zow1+I+dlsyoK+lel+jWRAgEHdxd mqRHxPv483AuhmXME0TSBjBFQxt9PhbQcc49854Tw6Wqx1Qu25uWstrvibkKnHV/1LdSf 8KH5jCdPzgWKWoBcXquC8ks+kRTh2YUENlG795iptbBoIudWw0rDMjt3EGIlr0rKjSg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=zvdMqCus; arc=none smtp.remote-ip=185.171.202.116 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 76491606A32A for ; Thu, 26 Nov 2026 11:30:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 76491606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=zvdMqCus Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 0FB49C2B9C9; Thu, 26 Nov 2026 11:30:12 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id B704A60237; Thu, 26 Nov 2026 11:30:03 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id ACE7F11E6B370; Thu, 26 Nov 2026 12:29:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1795692596; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=S0F01oKQlokKIS/TDepIlDEvNv6YynhZXJ/ynQCSvIA=; b=zvdMqCusOyaXAFtExAGAqJVmzUYpuYp/Y8/PCjuOqV/6yNx5qUhmH9APMixcy3q3wqbFtA MWUi9Ca+uwY6AfgwKgMbDQ7IlYcwqsnjq61RK2hb44X1sureh47ObpYUN7BmooAqZY0/Wf 7ozli583KyRI31YUxlcULIHXf55xjs8LFSJJ5O+bsockoKhFm9RIRKUM6HxLHnsZQCJXWz sHU1MLJ0nPjca+UsH7618c3Tlu7dNyH1HdbWvAJLy9jJgZbMA51M3vWHp1J5cBumvYKKI0 lYsKwm/h0g/LnkyXrUdCEnVtfDTelTdg1wJFiQlCOjJGyhrezJTSZgmAa572EQ== From: Louis Chauvet Date: Thu, 26 Nov 2026 12:28:51 +0100 Subject: [PATCH v7 08/43] drm/drm_atomic_state_helper: Properly load default value for rotation X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20261126-vkms-all-config-v7-8-21194cda2468@bootlin.com> References: <20261126-vkms-all-config-v7-0-21194cda2468@bootlin.com> In-Reply-To: <20261126-vkms-all-config-v7-0-21194cda2468@bootlin.com> To: Haneen Mohammed , Simona Vetter , Melissa Wen , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , jose.exposito89@gmail.com, Jonathan Corbet , Oarora Etimis , Harry Wentland , Lucas De Marchi , =?utf-8?q?Ville_Syrj=C3=A4l=C3=A4?= , Randy Dunlap , Nick Desaulniers , Louis Chauvet , Shuah Khan , Miguel Ojeda , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt Cc: Luca Ceresoli , Kory Maincent , sebastian.wick@redhat.com, victoria@system76.com, thomas.petazzoni@bootlin.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, llvm@lists.linux.dev X-Mailer: b4 0.17-dev X-Last-TLS-Session-Version: TLSv1.3 Currently, the default rotation is always DRM_MODE_ROTATE_0 for all planes. Some planes may have a rotation property, and the property may specify a different default value and supported values. This is not an issue for "fixed" configurations, but with the introduction of VKMS configuration, some plane may only support 90° and 180° rotations, so the reset state of the plane was wrong (forced to 0°). Fixes: ab2dd990f4ab ("drm: Add __drm_atomic_helper_crtc_state_reset() & co.") Reviewed-by: Oarora Etimis Signed-off-by: Louis Chauvet --- drivers/gpu/drm/drm_atomic_state_helper.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c index 267f44330629..13e848abb33c 100644 --- a/drivers/gpu/drm/drm_atomic_state_helper.c +++ b/drivers/gpu/drm/drm_atomic_state_helper.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -231,6 +232,11 @@ void __drm_atomic_helper_plane_state_init(struct drm_plane_state *plane_state, plane_state->plane = plane; plane_state->rotation = DRM_MODE_ROTATE_0; + if (plane->rotation_property && + !drm_object_property_get_default_value(&plane->base, + plane->rotation_property, + &val)) + plane_state->rotation = val; plane_state->alpha = DRM_BLEND_ALPHA_OPAQUE; -- 2.56.0