From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796117220; b=nFz+XTQMueBeG8xyoKiCkM8/CAHgNd2Sr/tN54bTGeyNay3yI8Jr1Q3ESSJhoTUrbaB4 4z5zR1ZToIv95T1o6ZT4Qw1yWALD6gcvd1vgqfxjMMEO8xncWgckPg8ZQSLTGInBmZNPC xhEB9eJkamUujiSZrZ/1BVFKWtCuRO41JGJzZ8TkMMAIZwPsxHtlmn/qmzjRnBrYFFiWM 41kVWwDPCP620Y5E2c0RFkpgKQpO3ORV0QCvW6QfBLbJXVq07ejaOe0FDsuscxquty81S a/6y3FR0redlP5EJy20+zlJR8v9iTn8/CQkJj60NTqp3CLpAG+2GK6gfNH4+UJ4LIbw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796117220; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-Id:X-Mailer:MIME-Version:Content-Type: Content-Transfer-Encoding; bh=4l8yQooWeS4HaQzTbWh04ATpWgTvspePVjhqRd18KVA=; b=mragpEdaC5hkrIZ+3XmX/5Bghs69oiNvghTwIat0h+O/0TqN9OImZsycgz05couNkwMS BZV6kOu/ai1xZbmEFfvmJ1t6qMSROjLqD21TCOyZB18FiDK8vo3vqo+0TstptgVaJe3EU centiM8YpqcHvFJzobFUtewfBovSwsHatlg6A4bk0wn7N4uRbonIrF/gSbsBGXmxhCTj3 naeeG/CjpkUbUt763MXFBNoTvZR096+gfIs3SHGqH3r1SsgvugMLTirBYG+h+8i2m2nKp 2NpscwHwJzlTfcMPBJfOlo1LmeMcpM4xhoMR0IlxcWXgckvfe2lDZjmimoGUtcxYMFg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=jJZu1VMP; arc=none smtp.remote-ip=209.85.221.43 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B05C606A686 for ; Tue, 1 Dec 2026 09:26:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 4B05C606A686 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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=jJZu1VMP Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-492f0a1b685so8285488f8f.0 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=vger.kernel.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=jJZu1VMP5DAB+0P+tujnOg5sOXMrpLh/7CTXrUNXexUIevS0CztbxSv4YUmaNM0bv8 dbA63BRGliE1We4l7HVBp8WAoZyyJfaeAqp4PmFmy33WL0n5DVA6k/I1iZM5FoCrQBPB 7ITDbONL2J4OZWZuaYShHMx8jsS3i2sB1sclAHWG2JZikIPqcKqSMOXdUJxOgzLGJKMV AQ/M+xYrcek+n6BtKi4wp107LF+wRP28YBk/jLK6d6KJ47b83EAqDLTOjoTqk4mVEn8c K2t2gDW8yPAtJzwfClK2XYWcJJSOPZVtxZ3KL+ynjtcbfDHOg9E2zFmHPORvgTPD4Vln XH0g== 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=gsKvxGlecRFalZLfZrPHWyrl4znLneeDVh8nt06aMF02y5HWZ4xDIQ4rCPAjwnAaNQ 2KMVPAfBRZ1U5f9fIzYVt/jNObcgTGZ9r0B1uH7ZS//VRiihb1+LM16UxDIH3FWb4go9 IohewCsGBbjE8rEyLm/8C7ZAbZ6gryOBe+G373GhsaVL51NMihVOXPDKPwH40OMN3+6m nzSaJjbmghL8TYo0YNJkV4T3zHsF7Z3pzWxZU/IDdtHA3dxlw/W2ejAbKNv+0iqL4fep Krloq+Ky5oONujkbROR0pMv9MZG4kT7ukO/C/2Y6qa2pymPu6DsqGFvcHiDOmVvU4RaM KzRg== X-Forwarded-Encrypted: i=1; AL+hErEqoPBHvbkPvsgKoNBEjET6QeBICjngKMefgcZA3S3w2pEnwm4AJPSEVDQLqGE7YAnH+mOgCRTdxTAL2Fc=@vger.kernel.org X-Gm-Message-State: APuU4Z8CtBQH80uE7v+OW+FnQucHCmrEgnqru2989TRER3ku32agzwxQ MvXIOXq8nZdTlXhgM189S39fa9P5HiDZT02mBkHO7xvmuJJqp8rH3D35 X-Gm-Gg: AZFdTZcpTF4HcF+yGdMMa1CA3zm2kYAfdcO8N+8i8hwW7mmOAG4dqcPLS0pgM3rv/lQ Npafwp9XPglod+pTcuAz4E/pIVZsj5ItUDyT6gQhp4h57cZ1x0e/7g/rnWClGparQ5sOTu/0aXE AWph1hwLONawfKA7kl2yDeCYpWbID3R9LrG98L7Vkwn+TigKzS2pFycGLjxgGHiWR58UCin3Alt jQUq00JbUpQHDHr9WhHqjceQiP26mraloT9hBsppGppUZH36g6/YtMDpGa/pNkdtT+PJ6yjL83w ZyvhICrKynWdcKTdofcKe5/pX0HIGipEDP2rZRUxqsw0gmQCg7L4p6I6G2ed4EzRCWzSP8bdoYx 1r1+oqY4upQm81+Igfzm8bmrPuGMYOawECC8DAd08lky84bYx4exkn+5z9U0LDvZmxgdWMXC+iC CcXbvinSSmakgXEj9hLKEphRdUZdh9/pTYXKLuyhIbwdPAUCux/vrVViSGeCyN2PRouMQgwpwq4 weHq/UWxcbRRsqkjWLzD6aSQD5NfJfbAJq9v44NEGRzOhYvZ6vEdffyAG1jT/PKohmg0DVELWEJ aRBHo1U4OYOW5jlPB4iw9Lwq74qydQkFXz2kILq3Cr61Z2sXdCJ36Ki8 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-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 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