From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 B4AA2606A69A for ; Tue, 1 Dec 2026 09:27:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=h2wXpDbh Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E38C10F6ED; Tue, 1 Dec 2026 09:27:01 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6347710E94D for ; Tue, 1 Dec 2026 09:26:55 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-491846221ffso10112076f8f.3 for ; Tue, 01 Dec 2026 01:26:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1796117214; x=1796722014; darn=lists.freedesktop.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=4l8yQooWeS4HaQzTbWh04ATpWgTvspePVjhqRd18KVA=; b=h2wXpDbhW7MTqMdBNinrgbRY9hcG44lhlJPl3plHaLWDwAiFIEF8PcVmvRSGQRpyB/ Mr+o4BPzDgsfhKy696nnBr+WsMkz949NYVlPLZKE+FX3p0uyxmhoQRtgcZZyL2zuVfqo e3q2+xtjOLChhgAmVJM2wm52VYoFtiArwwfq+kfh1C8t8KP0XQn9RBPJVB4usj0FeP8l SmuQvEyzwOzGfXaw/RGEMT4RTIcFHPPaSwZB7fJPVp7ZKKBAodYRwYiYARtypN3yDRU4 kdWjgQAQSSrpnULS5YRs1sfHRNfNqrIiyUs2U9WhZzTfx2IfQsfEyd1IvdQX9QyjgGxt WrDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796117214; x=1796722014; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=4l8yQooWeS4HaQzTbWh04ATpWgTvspePVjhqRd18KVA=; b=1tEtGka9FdA9FMyZD4BCM6o79+eDh6OE7iEbaiSjSWnRHbxnfyeEYi5j3gcH0C0qR+ ZM2ylBqPOGyIkFwfS5C76cuCxrCzggzyj5ohE4Q3b3PhsSJt+mfbg851dGYmMPHR8AUy gLnchmv6tO+Ygs7fL1GgMN5lWGDk625oOZPI59EmAiPSJhgmEuzp5HECoIvAIjV3SB/v L1k7j2GAiwvd9RGAymR2gyD4b1BVx1HoHFfduba7+mSqGVUZ8sBgpBavNYU3bTWEdK3d oFYN965tsAYoH4nGBSMEyMdoZE90Wc3naRyoOixxzc0FATmnUHJfgrjFzMeWmmCo9jk4 5LUg== X-Forwarded-Encrypted: i=1; AL+hErGuX8X8OQuUHJfnIGb3qeh6KGrLlFdD4G98jpaECdt1kM8q9kQgiXwR1Kz2Ui6SU6EnOpKAW5V60oQ=@lists.freedesktop.org X-Gm-Message-State: APuU4Z+8eAoSuMDFj44cWDkTnwu4bI63Oclk/38AJVUSfdeozRbwUGph 5npZU3oY2Cm0lV9fo9w6KBqk5WWQIqiT11b8erDJZpkz6Ai2s0Gvsn6z X-Gm-Gg: AZFdTZfXvVbqt2qLrYO7mc1WhWoeRIqW9P3ZVtfNxxrzoSFPXVp4DDR83kXez370ZVS SYHBXIeGDXG9gHKFikwv1uAZZuajQPRLD3ZpCHycBxUtruRRs9we9OE5Z+OZPtR7EnVB3T1OK91 3+xCYFOGQFTztVQ35eNidKyc3uBgEN3SLqcVZqIOi6hGICkIYkea5lquMjHQ3QjJ9Pp3hl5pFzX f15FXQuutkKvopfPkYcK3RkvVxSd6CZ81EZbluBpFF2lrT3RTjEFcu0+0FLQR0SAzNYfyMTYa/A 0BCAPvXQlnQUUdIwFs7fcC67+3S2S9rIXotZTl6cXTO7pTItMLXemX3pMoa8jYfRfU4WKXLcMZt VoJCPBDsx4TaOUWQqwMH0hgnbUKnNw9I5pwZCmtXXBCqTnONG1dZ+aAisXP2QglFTm9x5oAh2SK nMizHsEqj0VfEvuMtlILEPul6paA926YhXWzzzpdHEjxqKfPxb2IU7dlMC5g4XcES+nLRMLu2rS EWzkI7cUJ0pudPLjzLYC6Bw1NI+aRFLZz1T10UMm6jvA1hLOfjzxqdNrzb60if5QRxBCOqlYzws ElGnX26XlFIqqTwLCbgrr6B38cygXM9zm8D8G1rpUlEWHEIr5XINEUhY X-Received: by 2002:a5d:584f:0:b0:4b9:8ac3:f5fa with SMTP id ffacd0b85a97d-4b98ac3f6d5mr39584187f8f.48.1796117213464; Tue, 01 Dec 2026 01:26:53 -0800 (PST) Received: from ingenieria31.oficinasStQ.local ([79.116.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab6bc8ce06sm66497083f8f.47.2026.12.01.01.26.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 01:26:53 -0800 (PST) From: =?UTF-8?q?M=C3=A0xim=20Pedraza=20Padilla?= To: Maxime Ripard Cc: Neil Armstrong , Jessica Zhang , Jyri Sarha , Tomi Valkeinen , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH v3 0/2] drm/tilcdc: Implement state readout Date: Tue, 1 Dec 2026 10:26:49 +0100 Message-Id: <20261201092651.240295-1-maximpedraza@gmail.com> X-Mailer: git-send-email 2.39.5 X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "dri-devel" X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FORGED_GMAIL_RCVD,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi, This implements hardware state readout for tilcdc, so that the kernel takes over the display as the bootloader left it and a boot logo stays on screen, with no blanking or flicker, until userspace replaces it. It applies on top of Maxime's state readout series v10 and his patch switching tilcdc to drm_mode_config_create_initial_state(), from the no-more-config-reset series: https://lore.kernel.org/r/20261127-drm-state-readout-v10-0-0259582d45a8@kernel.org https://lore.kernel.org/r/20261116-drm-no-more-config-reset-v2-43-0bb471f4d1e0@kernel.org Patch 1 is the tilcdc readout itself. Patch 2 keeps panel-simple from turning the panel off at probe by driving its enable GPIO low. For the backlight, the pwm-tiecap .get_state() is now in Uwe's pwm/for-next. Tested on an AM335x board (out-of-tree DT) with U-Boot leaving an 800x480 RGB565 logo, programmed with the panel mode from the DT at exactly 60 Hz (33.264 MHz): - The logo stays on screen, untouched, from U-Boot to userspace, and the mode is read back exactly, with no state comparison warning and no WARN or oops. - First commits from userspace: a framebuffer flip without modeset, a commit with the panel mode that doesn't trigger a modeset, and ACTIVE=0 then 1, which scans the adopted framebuffer out again. - The SGX530 driver and a Qt EGLFS application take over from the adopted logo without a modeset. - Without video set up by U-Boot nothing is adopted, and the first commit does a regular modeset. - Suspend and resume with pm_test=devices bring the adopted logo back. This needs a tilcdc fix sent separately, unrelated to this series: https://lore.kernel.org/r/20261201091036.230021-1-maximpedraza@gmail.com About the pixel clock, now read back with drm_atomic_helper_sro_find_refresh_from_clk(): modesets at 20 pixel clocks between 16.9 and 45 MHz give no warning, except at 33.3 and 33.333 MHz, close to but not exactly 60 Hz. The readout reports them as 33.264 MHz and the state comparison complains about the mode clock. With a DT mode at an exact standard rate, as on this board, there's no such mismatch. The DT needs a reserved-memory node for the U-Boot framebuffer, and ti,no-reset-on-init on the GPIO banks and the PWMSS so that ti-sysc doesn't reset the panel enable and backlight lines. The panel timings must describe the VSYNC polarity, and a panel needing an active low HSYNC has to leave hsync-active out, because of tilcdc_crtc_mode_fixup(). Changes in v3: - Rebase on v10. - Read the pixel clock back with drm_atomic_helper_sro_find_refresh_from_clk(), and drop the custom state comparison with a 1% pixel clock tolerance. - Back the adopted framebuffer with a GEM object from drm_atomic_helper_sro_create_gem_dma_object(), since v10 drops framebuffers without one. - Initialize the adopted mode with drm_mode_init(), and shut the adopted CRTC down if the probe fails after the readout (sashiko). - Link to v2: https://lore.kernel.org/r/20261124141908.443764-1-maximpedraza@gmail.com Thanks, Màxim Màxim Pedraza Padilla (2): drm/tilcdc: Implement state readout support drm/panel: simple: Keep the enable GPIO as left by the bootloader drivers/gpu/drm/panel/panel-simple.c | 4 +- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 182 ++++++++++++++++++++++++ drivers/gpu/drm/tilcdc/tilcdc_drv.c | 12 ++ drivers/gpu/drm/tilcdc/tilcdc_encoder.c | 29 +++- drivers/gpu/drm/tilcdc/tilcdc_plane.c | 133 +++++++++++++++++ 5 files changed, 355 insertions(+), 5 deletions(-) base-commit: 5ce32a0c94a827ff44ee60898c28060714dcff75 prerequisite-message-id: <20261127-drm-state-readout-v10-0-0259582d45a8@kernel.org> prerequisite-message-id: <20261116-drm-no-more-config-reset-v2-43-0bb471f4d1e0@kernel.org> prerequisite-patch-id: 0b49abc230751bbc8235b4f23e5b2f5bc154f807 prerequisite-patch-id: cb32051331d83506b8e6fd512f93595724905a9f prerequisite-patch-id: 72acc5f5b50b767484ff995256e7fb155c05f6eb prerequisite-patch-id: cf8b32c78f343143906b208946b82c5975cad22f prerequisite-patch-id: 1a6e113d6f412d798052a924269a7dc876d91ded prerequisite-patch-id: 81f93bf511a83182db2358e0779ab6f455cd4f8a prerequisite-patch-id: e55453981968570dc5994174f615f0996ad7adf0 prerequisite-patch-id: e89c26a662f6fa1996675b0e40e27be09fce9ddf prerequisite-patch-id: 8d11298411f0ac5aac955e01a94ec127d29dbdc1 prerequisite-patch-id: 91a42599fcc7bdb50016e3e91352ac7b5d14bdc3 prerequisite-patch-id: 3459ea8c4e46c2e87bce3a79af06e19bd24c5f0a prerequisite-patch-id: 2b97b25f6be119eac52a1bb726b9a8cd9c8a17e9 prerequisite-patch-id: 2dfe6357a636b3662dbd8db80bc29bd36a0329ad prerequisite-patch-id: a6261679a50cb9f18f0a47d8f519939e1a414acb prerequisite-patch-id: d4425072933d272b80572f5309851afcbac6f984 prerequisite-patch-id: dd9a285884e7f3bb96e4950f6f473f7ed18a865b prerequisite-patch-id: fa9e31271f79e3e9103135bc2e8efd252e18af99 prerequisite-patch-id: 563c77055b805b0d640cd8517627a8c491bce385 prerequisite-patch-id: c15cdbb845bbd252a037d410f806a910c0831917 prerequisite-patch-id: e3362ce0dbcc48a39f1cc14de6098d8ac68431c7 prerequisite-patch-id: 4fafee08b92675ea8a6f7fb5e27ff5a769325208 prerequisite-patch-id: 6c0369731a723fdef00863dfb1d083ecf4de5d10 prerequisite-patch-id: c2ac26af16bce3d138ec2946ddaa0e57d53b529a prerequisite-patch-id: 1830e22c10c8af8a7c9884d3a91c3a35dfa68543 prerequisite-patch-id: 52f7fe449e4812a1aef27bd1182e537002e1f9b4 prerequisite-patch-id: 0889a5c6a812cf2cc675ac64d66c8a241dad9b05 prerequisite-patch-id: ab15a09bb9e176330cd6f9991e841513315f07dc prerequisite-patch-id: 402669fd5f97dfc3c3577a104cd8fdb14462cc90 prerequisite-patch-id: e0eb2c02c507fffa786135636227a5cda60f9d3d prerequisite-patch-id: 19ae36e5a132726669496c36f11d22ab2cd677da prerequisite-patch-id: 0c8a54b1f9bf053b817e949eb82538e7a0630d01 prerequisite-patch-id: ed873cdcbb8a12ab5ea8b33878dd5112d5e284d5 prerequisite-patch-id: 76b67bf5eab8683095aa758a46efbcb4f0be297b prerequisite-patch-id: b878fee755a682f5af5f89b74f0ef2cd4eeb9ff8 prerequisite-patch-id: 4de5c8ffb89150dc1475f0ad8eb5ba05102d7022 prerequisite-patch-id: b41f34105087422cbb9386e311033b486a66859d prerequisite-patch-id: 9e54b77c687ec32b156c2af70d62c2ac24859478 -- 2.39.5