From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cstnet.cn (smtp21.cstnet.cn [159.226.251.21]) (using TLSv1.2 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 72A974B8DE9 for ; Wed, 6 May 2026 18:00:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.226.251.21 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778090436; cv=none; b=daV9a3K2ptIudHtL+PnGIhSqT9aglhE2wTJQhYQJAZou5UsWvA5ZCoGinwitdDfI4bB9mzBE7bQlJWbXMcx2Sf1gYjlN16ZJCkwPRJhP2Ithzayq8bRUBiWmTAzxTvwAZUOZ3CSaKi3nxwAPv5J9AjHl/VC1/dXHMyexkS00OQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778090436; c=relaxed/simple; bh=+Dcmzbqt00ppOBY1Ps+5mIGBi5MHRnbOsJpppjwCRPY=; h=Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:MIME-Version; b=GW3cPQn/Zl187Q5TUWIM60G6MIeY2lipFpHl7nzuh8hPSoWCpR/Pw5JtYJtqezw2Uv4/D5f1ip+fwU6pyy8xyQT7lKQJ230+QPlmzlQkxMJJtG7Prioh2OdG//z4h6crDWuKCPZoVfaRfP3pWcid7//UnM2VFF+pmuVtpyPhXxw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn; spf=pass smtp.mailfrom=iscas.ac.cn; arc=none smtp.client-ip=159.226.251.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iscas.ac.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iscas.ac.cn Received: from edelgard.fodlan.icenowy.me (unknown [112.94.100.82]) by APP-01 (Coremail) with SMTP id qwCowAA33Gevgftp9QJ0Dw--.26398S2; Thu, 07 May 2026 02:00:16 +0800 (CST) Message-ID: <02da4b80a80e2ed9e90af8469f3c3ffb6f2f42a1.camel@iscas.ac.cn> Subject: Re: [PATCH] drm: verisilicon: support non-coherent DMA framebuffers From: Icenowy Zheng To: Dominique Belhachemi Cc: Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Paul Cercueil , Michal Wilczynski , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Date: Thu, 07 May 2026 02:00:15 +0800 In-Reply-To: References: <20260505042631.1916555-1-domibel@debian.org> <9f7eaea02c2cb52afac4f59fb78224e9acc1f160.camel@iscas.ac.cn> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.58.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID:qwCowAA33Gevgftp9QJ0Dw--.26398S2 X-Coremail-Antispam: 1UD129KBjvJXoW7tr13KFWUJF4UKF4fAr18Zrb_yoW8Kw13pF WDKF4YgF4DJr97Zws2gw1YkF4Fy395JFy5Xwn5Xw1xXrZ0vF18ZF47JrW5uFnFqryv9F4a v3WFvas3Xa4DGaDanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvlb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWxJVW8Jr1l84ACjcxK6I 8E87Iv6xkF7I0E14v26r4UJVWxJr1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xv F2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_JrI_JrylYx0Ex4A2jsIE14v26r1j6r 4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwACI402YVCY1x02628vn2kIc2xK xwCY1x0262kKe7AKxVWUtVW8ZwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJV W8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF 1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6x IIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0xvE x4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvj DU0xZFpf9x07b0SoAUUUUU= X-CM-SenderInfo: x2kh0wp0lqwv3d6l2u1dvotugofq/ =E5=9C=A8 2026-05-06=E4=B8=89=E7=9A=84 13:38 -0400=EF=BC=8CDominique Belhac= hemi=E5=86=99=E9=81=93=EF=BC=9A > On Wed, May 6, 2026 at 1:14=E2=80=AFPM Icenowy Zheng > wrote: > >=20 > > =E5=9C=A8 2026-05-05=E4=BA=8C=E7=9A=84 18:25 -0400=EF=BC=8CDominique Be= lhachemi=E5=86=99=E9=81=93=EF=BC=9A > > > On Tue, May 5, 2026 at 5:03=E2=80=AFAM Icenowy Zheng > > > wrote: > > > >=20 > > > > =E5=9C=A8 2026-05-05=E4=BA=8C=E7=9A=84 04:26 +0000=EF=BC=8CDominiqu= e Belhachemi=E5=86=99=E9=81=93=EF=BC=9A > > > > > Wire up the standard non-coherent path matching the ingenic > > > > > DRM > > > > > driver. > > > > >=20 > > > > > Tested on StarFive JH7110 (VisionFive 2 v1.3B). > > > >=20 > > > > Interesting, I am curious about other patches added to test > > > > this. > > > >=20 > > > Hi, > > >=20 > > > I tested this on Debian unstable with a slightly patched 7.0.3 > > > kernel > > > [1]. > > > The test branch contains your verisilicon series, Michal's JH7110 > > > display series [2], > > > and a JH7110 ccache change [3], which was also required to > > > communicate > > > with the BXE-4-32 firmware [4]. > >=20 > > BTW did you run any rendering? I think the way currently powervr > > open > > source driver works requires "coherent memory" (although it's > > usually > > implemented as uncached memory). >=20 > Yes, GPU dispatches run with [4]. > Compute shaders run fine, but rendering crashes after a few frames. >=20 > > >=20 > > > This change here is only used to remove the ugly framebuffer > > > stripes > > > on the console and in the desktop environment. > >=20 > > But I still think it'd be better to implement proper uncached > > memory > > support instead of flushing caches with dirty tracking. >=20 > Maybe, this patch is just a working alternative. I wonder whether it's possible to detect the availability of uncached memory. At least detecting using `of_dma_is_coherent()` isn't enough because it will only be true when the device is fully coherent with the CPU (snooping CPU cache). Thanks, Icenowy >=20 > Dominique >=20 > > >=20 > > > [1] > > > https://github.com/domibel/linux/tree/jh7110_dc8200_hdmi_v7.0.3 > > > [2] > > > https://lore.kernel.org/lkml/20251108-jh7110-clean-send-v1-0-06bf43bb= 76b1@samsung.com/ > > > [3] > > > https://lore.kernel.org/lkml/20260430035259.3402954-1-domibel@debian.= org/ > > > [4] > > > https://github.com/domibel/linux/tree/powervr_on_jh7110_visionfive2_v= 7.0.3 > >=20 > > The POW_RASCALDUST thing looks quite interesting, maybe I should > > investigate it further. > >=20 > > Thanks, > > Icenowy > > >=20 > > > Dominique > >=20 > >=20