From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj2-f40.google.com (mail-pj2-f40.google.com [74.125.227.168]) (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 278202E5B02 for ; Tue, 29 Sep 2026 01:45:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.227.168 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790646313; cv=none; b=dpF497D3OVNwyUSBIPYN/vp+kclIzZe6pZbUATuUoCshoyOc7wNGEIiHc3eUBHO8hPsgHJTNQDzk9BUq6W9+lzoUtHhCN3nNcXZ5MNP8kMv/MkwxCPngA9pRkF0XrPYQxoGc69A28MVXlcAyboYivT314v+AxTYVW/aDlioIvpc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790646313; c=relaxed/simple; bh=3zlm+JCPbgHhq7pDyIj5hTssujz2Hb4VbFqnyA8KWfE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=u2aa5IZLIgGj/nmMaqmTUpFto3s/z44EyJb6Byac6h7b9sc/YK3R3xWY79g1u6rSl5LvGY3LQIZ8GXr1NZWCZsld6WU2m8diI5clLk9j/7gqoj9VkibHEb1ZLQRw9/JPcfK3Tdz6W5vmKN1jMomkSFhiv4v6FXUdyGV91d0rNBM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=CCSXR79q; arc=none smtp.client-ip=74.125.227.168 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.b="CCSXR79q" Received: by mail-pj2-f40.google.com with SMTP id d9443c01a7336-2dfaf76605dso8660325ad.0 for ; Mon, 28 Sep 2026 18:45:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1790646311; x=1791251111; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=BbPZBkG6EW7o76TGvb+IbEd7phIKmf02Hwna+vyhxaI=; b=CCSXR79qrcSDPSn7XdxsGgbqCoXfr6javSUKO3GrGW+rCPgs49JAbZqr/+JHOEYxFV oSzsAzvsXJjngd9Urz2JUVHJLXWpqmj7FabizlApZebq97Iy6as0nu4cnFUUkGk4u0aM 7EADnfAWx1uP0+rTXJhE/8B6tmJO8gefwf2bAKpteeU/+zan/stah2nI+2hjmNV/if0p OVHsT96n4rxHN9A6fKkDeh8AZ553UY+pRc9216KMMzDL9zamUjI/wl0xbvsIaDqw2Qcm WRb3/j2dwAfPZBi8mopif4UaFV0W1Seh2yRc2gH78zKWLGE5XLp0VUnmeVJfhTK6fExo mkeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790646311; x=1791251111; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=BbPZBkG6EW7o76TGvb+IbEd7phIKmf02Hwna+vyhxaI=; b=eLS7up7r7Gb6s90YKOZuOsgDhsTX7+559eeQWufyOaocWqvxP9KU9Wv1O7dQqKzWBC I2wmaLJyW03d7t7nLpCncNZpDIWF21QihBzosUgGPEufp5gMyE4Zkn70w4HtudEVhY0U hQEYHOHd0WtqJQKF5+NiQQoDzWZHCoEmsucPb5JUdoNgNsnsz9ftN4kK1NNz/iU2wqKm HAij7cAjarsEs9/PfpLFQEF/XfQQjn8eP/2XtC7Go4BAG5+nC7YCdx8D3JRFVnxs+H5E BcP4CoIrLHTKbsLXDUrjzFc84XDzEQTzskOWhtUFzvzBG0zJ1JNq7gm/i9RbEW7rMG8z IPYg== X-Forwarded-Encrypted: i=1; AKwUvByU57ktpKen10VXTahlYKYATtjaOxHdVE2G3GOomNVgGmnZKLRidQeTGv0NuxPGZ/UXa0ClAwDj7b+d@vger.kernel.org X-Gm-Message-State: AFq9FYKv8VeEma6ePLZA9TPXRxkWb7ByEcXCg89tC+Mj4eygsY0JXir+ lpNNhsh31mJvLVMLpgp7eke73uuyHeErhQ06R2zpEIWRMH9BJzOKwJV4 X-Gm-Gg: AYBFou1xZt6Eko4RLxbiE/swXb4G2G2XOCVvqbo23jA3DSnqM/wkSLMsItJCIeakidl iJClbW88xEy3zaZAyN4Cdr4t94GiXJIa8us7vGB96eOLH1WCObiFbRzkYA01mRQ8bLSxD6e9DhQ HwbSmiB4n2231ONss9EPSv8bd5p9LBQlk2dOOhwYxYPH2eohf3+y7+SRWdFhRlfOCJ6dDGoNbZw RFhDqNCW+Kc8Nezfza22mC5JeaQPfEcpgQ4n36UcGqWielIxoBRu2W6pBLXh26+ivmIFO3YCRQF L145eNKz6cqTL2xV+ahotZz9kIbbyP70s1ztQiOP75z3u0Dr6oayDh2jFLbxQkEfguTHby3KEzs viZQQkab60Vwn5JqdBgh9Jde3bfYuxujk4oXQPQJs63h/mtmgxwTphMcKrwhtLbVbwCzkAdBUA2 VJDxFyUKA2optiximtp3xNfcQQvBE64vz4EeZvgOrmloHi6q5+xSIeb4eR262xMnG/5gGev3MoM A19xM96S8ugozq+ttTnGwfWvgIAtloSToQaTmGCuU5ZKX9uqTo040Y= X-Received: by 2002:a17:902:ebc7:b0:2df:9625:3ecd with SMTP id d9443c01a7336-2df9625400fmr82748415ad.8.1790646311363; Mon, 28 Sep 2026 18:45:11 -0700 (PDT) Received: from [192.168.0.100] (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2df913dd8d2sm48984825ad.20.2026.09.28.18.45.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 28 Sep 2026 18:45:10 -0700 (PDT) Message-ID: Date: Tue, 29 Sep 2026 09:45:06 +0800 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v7 7/7] drm/verisilicon: fix DC8200 primary plane disable clearing FB_EN To: Icenowy Zheng , maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org Cc: ychuang3@nuvoton.com, schung@nuvoton.com, yclu4@nuvoton.com, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: <20260918030125.315978-1-a0987203069@gmail.com> <20260918030125.315978-8-a0987203069@gmail.com> <4a7b271d2a90eff94c27dec3bf24114ce44df1fd.camel@iscas.ac.cn> <1d988dfb-c930-4c17-ae77-47b93ff9f159@gmail.com> Content-Language: en-US From: Joey Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Icenowy Zheng 於 2026/9/26 下午 12:48 寫道: > 在 2026-09-25五的 22:55 +0800,Icenowy Zheng写道: >> 在 2026-09-21一的 15:49 +0800,Joey Lu写道: >>> Icenowy Zheng 於 2026/9/21 下午 03:30 寫道: >>>> Maybe it's better to just make it the 2nd patch in this patchset, >>>> just >>>> after the binding change. >>>> >>>> Waiting for something into drm-misc-fixes again will need another >>>> fixes >>>> pull and another RC back merge, which can consume weeks and miss >>>> the >>>> current merging window. >>>> >>>> In addition, it's possible that `drm/verisilicon: introduce per- >>>> variant >>>> hardware ops table` also gets backported for a more clean primary >>>> plane >>>> atomic_update disabling fix. >>> Understood. I'll fold the FB_EN fix in as patch 2, right after the >> Should I just apply this revision of patch with this reorder? > Oh I think more fixes are coming. > > There's one more DC8200-specific problem (which might be problematic on > DC8000 but I am not sure): The vs_dc8200_panel_disable_ex sequence must > be executed before vs_dc8200_panel_enable_ex, because some timing > parameters seem to be latched when the value going from 0 to 1, and > when a stale state is programmed before the driver is loaded (e.g. a > firmware driving the display) and the timing isn't the same with the > timing of the first modeset, the modeset will fail. > > I'm thinking about sending a fix patchset first, which will pick the > FB_EN fix here, implement a fix for the stale state problem and maybe > implement fixes for the old state dereference problems for hidden > planes in their atomic_update callback (although this fix will > introduce a helper, which will then be moved and renamed in the DC8200 > ops patch). > > Thanks, > Icenowy Understood, happy to hold the DCUltraLite series until your fix patchset lands, and rebase the ops-table patch on top of it then. On DC8000: its panel enable/disable path just toggles a plain FB_CONFIG_RESET bit, not the staged PANEL_CONFIG/PANEL_START latch registers DC8200 uses, so it doesn't look like it shares this specific ordering hazard from the register layout alone. I'll run the tests again after applying our variant on top of it. >> Thanks, >> Icenowy >> >>> dt-bindings patch, targeting the current vs_primary_plane.c >>> directly, >>> so the ops-table patch just carries the already-corrected code >>> forward >>> into vs_dc8200.c. Agreed that's faster than round-tripping. >>> >>> On primary_plane_disable_ex - I'll keep the "_ex" suffix. DC8200 >>> still >>> has a real per-variant operation there (clearing FB_EN + commit), >>> while >>> DC8000 leaves it NULL and does nothing, so the suffix still >>> reflects >>> an actual per-variant difference, not just structure introduced by >>> the >>> refactor. >>> >>> While testing the cursor plane, I found the same class of bug >>> there: >>> the disable register write was being triggered from the plane's >>> atomic_update() invisible-branch using the old plane state to look >>> up >>> the CRTC/output, which can be stale or NULL on a plane's very first >>> commit if it's already invisible then. I've fixed it locally by >>> having >>> atomic_update() derive the CRTC/output from the state it already >>> holds >>> before checking visibility, instead of falling through to the >>> old-state-based disable path. Just flagging it here for now - >>> vs_cursor_plane.c isn't touched by any of my patches. >>> >>> Thanks.