| Message ID | 20261105-drm-no-more-config-reset-v1-47-763560c2cc3f@kernel.org (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27252-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id 12DF21C5113 for <noreply@patchwork.local>; Thu, 5 Nov 2026 15:19:43 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-27252-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-27252-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sea.lore.kernel.org (Postfix) with ESMTP id 6C09C36ED7 for <noreply@patchwork.local>; Thu, 5 Nov 2026 14:11:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1793887855; b=BztkH5s6hAj0tRDVcYDMMMeRjhZpFKGTdD2T7H4nwFe90RRASJZI9gsCDZtCoA4yuY8D 0cH81r+FoMLDWBRpFy1DxbqXMo7PT1gSktuvoiKwEhja8KwA6vTprvGCFpka61YqS1SOg TFZfht94XSnlO+7Bqt6WiaLb8PTgiLe0NqTVKhXSW99s49DiJhZdlSm2kpUJ3ODFHMmr2 +CGitWwmvO7mdMMdmsX9PzaM5D1f5E7ug40FP8B0LzfDH0XLA3W3nLNLcE59dKOs2XZRY ykeXTE/gQ7ZodcRKIh8VFDQwxSApBtuMaaBhuZkMcs47oj4ALvBvHvgK3ewfRBDd6wA== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793887855; h=X-Original-To:Received:Received:DKIM-Signature:From:Date:Subject: X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=VYcSzDYe2cCmMS9VwuuEsQBYsAyzZgoeL8e35MmNwKw=; b=QDYmJYI6m3GHU2Z0rHmnAjNgHTrRFFqrS01lyawGRwZHwmPwDuzXh6dofh4nkDsXPAwc YqevlKCVhSPPuqe7pNqUvATKSk57S4yfZ2ZDvq7mZ+PTq7CkornQ3nvUOvrNR8URx62+v ifQD3PqJj63G2tAXMJe5f1m99bhtLsFvIw0gXr+m2dcksRrRB+fybTJJyKa0LV/AE/K30 +COWWbqceUGXHGxUXOtmxp+FHq5nx4o2HF/zovU8qYQb2hD760SAJwhAMABs3nOvwRUm9 JWzfZtITcEX77tVVHbARocbOV5r8fewV55fT9tJJ3RXs4s/oNvgokBqXyYJVBoIM2mw== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=boR+fKLS; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 20DA3606A32F; Thu, 5 Nov 2026 14:10:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=boR+fKLS X-Original-To: linux-sunxi@lists.linux.dev Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793887855; b=eY5mIus0odqxluHcgbJOO1kGOTkyhvyow5vOat79WdQfKerDKDsbTdABrHMX3QdmV5T8 sn9PN/nuz+eSeHT2z56PBOOFyUmaCjriyw06yFoC+p3wwMJF8Afp2IfbyKEarkTkOM/2O 5MFnZY6v1kYAIAH7zPntnu61phpS6/URMcSL3llrlMcRPqaFhppOS7MyaJovDRLatdmdh RXdM9NuG7vXvPYX4R3xDBIXuuj+FIRoudq3dvgh5hIU13MCECx3RkBjl+C3lX+NaBF0Vz Zj5SeKNi6kjq7Ks3FO5eRyFMca1cx5ixiLbDUtHUhN+oh7twRqF0t3TitFcwB2HZLHQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793887855; h=Received:DKIM-Signature:From:Date:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:Message-Id:References:In-Reply-To:To:Cc: X-Mailer:X-Developer-Signature:X-Developer-Key; bh=VYcSzDYe2cCmMS9VwuuEsQBYsAyzZgoeL8e35MmNwKw=; b=FG1DfLATYn5SyZl+ytxom/rtFOifHi1+8ndZwiT1lya6eSKq4Q9Ul8adusBtzMRa/Uph dfQmBJxG0UrZAdNS0PyEOuBNeeCUCbKpKfRMPrD7mMYoZCDA2hzcF5jkucV9wUrHkLtyn Vdcv7oQZnJKzEwFGjvAx6RkJd0D+USozq8uRp2/ruRO6LOQAToBd1G2F6d+9panlWXfZX K75JNcpvqhVaV6Laok/t4qRFoX1OMXK5PMuAbfr/x3nCgfy37iX8H4FOnX1zpVkg5Hf9Y rMql9hzjTt/sz/1JOGXbVQu5V1JXKkKzdNVrCYQVjbRUS/GWUCqjQkxZ1GalKURYlzg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=boR+fKLS; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA6F1606A32D for <linux-sunxi@lists.linux.dev>; Thu, 5 Nov 2026 14:10:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1F75D1F00919; Thu, 5 Nov 2026 14:10:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793887854; bh=VYcSzDYe2cCmMS9VwuuEsQBYsAyzZgoeL8e35MmNwKw=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=boR+fKLSSPJG5ADEMzcTaXDOFXtpZfheE6ugTDWHy67B4361tV/Nfc7zUGv0G7N7z YZGUNDKNG1JgdmwI8KPSs5JrLdH/MWTnqeqMulz82a7+iV1UMkdxmkdJU8NEIdcSAt 0kO1CJpbpGuISlGFBROL+1Uh1vKC8ucem0DxzqteocoLRaKvXaUzbAybfuxUUITvAF TKYNmF2n+ZNewspUjir8CrkGRQKSu+eCsuz3BWdlx+NMjhjH+xA8pPbsch2x8kQeoO ZUQ4UTd9rsMXEYv58kV4yVTyNJ4aNLtFz4TNjdos0tYGZbyYgxKOInLOGJM33IfVpv d3aYeE5Vw9Njg== From: Maxime Ripard <mripard@kernel.org> Date: Thu, 05 Nov 2026 15:08:04 +0100 Subject: [PATCH 47/83] drm/sun4i: Switch to drm_mode_config_create_initial_state X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Post: <mailto:linux-sunxi@lists.linux.dev> List-Help: <mailto:linux-sunxi+help@lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev> Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261105-drm-no-more-config-reset-v1-47-763560c2cc3f@kernel.org> References: <20261105-drm-no-more-config-reset-v1-0-763560c2cc3f@kernel.org> In-Reply-To: <20261105-drm-no-more-config-reset-v1-0-763560c2cc3f@kernel.org> To: Maxime Ripard <mripard@kernel.org> Cc: Chen-Yu Tsai <wens@kernel.org>, Samuel Holland <samuel@sholland.org>, linux-sunxi@lists.linux.dev X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=1466; i=mripard@kernel.org; h=from:subject:message-id; bh=JVsRSfyjg+pxKH6555O56doMPhroT6uX2Lmd+IGrVQU=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFlvejck9Po2TXZY4ax/Zcql+bM28gTymR8qM7o4oUfW5 O6d1fPUO6ayMAhzMsiKKbI8kQk7vbx9cZWD/cofMHNYmUCGMHBxCsBEVtkzNhywMlRNslp4v6Hi x6Jr8TNXOe4N1OBec3lTluhZ9hVyrzKfaE7yebpLgHnVdBkXt+CwcsZa4eweXqNr71fM/uKsKXA rYuPMlp93dpf13kg+8qLjsuimv7cfhz1kVw0qY2yUr64qqf0MAA== X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [1.81 / 15.00]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; R_DKIM_ALLOW(0.00)[kernel.org:s=k20260515]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_NEQ_ENVFROM(0.00)[mripard@kernel.org,linux-sunxi@lists.linux.dev]; RCPT_COUNT_THREE(0.00)[4]; DBL_BLOCKED_OPENRESOLVER(0.00)[sea.lore.kernel.org:helo,sea.lore.kernel.org:rdns,linux.dev:email]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; TAGGED_FROM(0.00)[bounces-27252-noreply=patchwork.local]; MID_RHS_MATCH_FROM(0.00)[]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10]; DKIM_TRACE(0.00)[kernel.org:+]; TO_DN_SOME(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.103.45.18:received,100.77.114.92:received]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_ALLOW(0.00)[kernel.org,quarantine]; RCVD_TLS_LAST(0.00)[]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc20261015:i=2]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: 12DF21C5113 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX |
| Series |
drm: Switch drivers to drm_mode_config_create_initial_state
|
|
Commit Message
Maxime Ripard
Nov. 5, 2026, 2:08 p.m. UTC
drm_mode_config_reset() has a dual role: it creates the initial KMS
state at probe time, and resets hardware and software state during
suspend/resume cycles.
Since the two roles need different behaviors (notably for objects like
drm_private_obj that must persist across suspend/resume),
drm_mode_config_create_initial_state() was introduced to handle only
the initial state creation at probe time.
Switch to drm_mode_config_create_initial_state().
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Cc: Chen-Yu Tsai <wens@kernel.org>
Cc: Samuel Holland <samuel@sholland.org>
Cc: linux-sunxi@lists.linux.dev
---
drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On Thu, Nov 5, 2026 at 10:10 PM Maxime Ripard <mripard@kernel.org> wrote: > > drm_mode_config_reset() has a dual role: it creates the initial KMS > state at probe time, and resets hardware and software state during > suspend/resume cycles. > > Since the two roles need different behaviors (notably for objects like > drm_private_obj that must persist across suspend/resume), > drm_mode_config_create_initial_state() was introduced to handle only > the initial state creation at probe time. > > Switch to drm_mode_config_create_initial_state(). > > Signed-off-by: Maxime Ripard <mripard@kernel.org> Acked-by: Chen-Yu Tsai <wens@kernel.org>
diff --git a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c index fc822bc2c62b..0ce3691dedad 100644 --- a/drivers/gpu/drm/sun4i/sun4i_framebuffer.c +++ b/drivers/gpu/drm/sun4i/sun4i_framebuffer.c @@ -11,4 +11,5 @@ #include <drm/drm_blend.h> #include <drm/drm_gem_framebuffer_helper.h> +#include <drm/drm_print.h> #include "sun4i_drv.h" @@ -27,5 +28,6 @@ static const struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = void sun4i_framebuffer_init(struct drm_device *drm) { - drm_mode_config_reset(drm); + drm_WARN(drm, drm_mode_config_create_initial_state(drm), + "Failed to create state\n"); drm->mode_config.max_width = 8192;