From: "Christian König" <christian.koenig@amd.com>
To: Paul Walmsley <pjw@kernel.org>
Cc: Icenowy Zheng <uwu@icenowy.me>, Huang Rui <ray.huang@amd.com>,
Matthew Auld <matthew.auld@intel.com>,
Matthew Brost <matthew.brost@intel.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Paul Walmsley <paul.walmsley@sifive.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-riscv@lists.infradead.org, Han Gao <rabenda.cn@gmail.com>,
Vivian Wang <wangruikang@iscas.ac.cn>,
Inochi Amaoto <inochiama@gmail.com>, Yao Zi <ziyao@disroot.org>
Subject: Re: [PATCH v2] drm/ttm: add pgprot handling for RISC-V
Date: Tue, 28 Oct 2025 09:20:51 +0100 [thread overview]
Message-ID: <f8e9766b-b813-42d1-b03b-563850130949@amd.com> (raw)
In-Reply-To: <5fed2297-4e51-6aa9-464a-6f8a2cf8fcc6@kernel.org>
On 10/27/25 17:41, Paul Walmsley wrote:
> On Mon, 27 Oct 2025, Christian König wrote:
>
>> On 10/20/25 07:35, Icenowy Zheng wrote:
>>> The RISC-V Svpbmt privileged extension provides support for overriding
>>> page memory coherency attributes, and, along with vendor extensions like
>>> Xtheadmae, supports pgprot_{writecombine,noncached} on RISC-V.
>>>
>>> Adapt the codepath that maps ttm_write_combined to pgprot_writecombine
>>> and ttm_noncached to pgprot_noncached to RISC-V, to allow proper page
>>> access attributes.
>
> [ ... ]
>
>>> diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
>>> index b3fffe7b5062a..aa137ead5cc59 100644
>>> --- a/drivers/gpu/drm/ttm/ttm_module.c
>>> +++ b/drivers/gpu/drm/ttm/ttm_module.c
>>> @@ -74,7 +74,8 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
>>> #endif /* CONFIG_UML */
>>> #endif /* __i386__ || __x86_64__ */
>>> #if defined(__ia64__) || defined(__arm__) || defined(__aarch64__) || \
>>> - defined(__powerpc__) || defined(__mips__) || defined(__loongarch__)
>>> + defined(__powerpc__) || defined(__mips__) || defined(__loongarch__) || \
>>> + defined(__riscv)
>>
>> Looks reasonable, but does that work on all RISC-V variants?
>
> From an RISC-V architectural perspective, yes.
>
> Of course there might be a hardware bug in some given manufacturer's
> implementation, but then again, that could happen on the other
> architectures as well.
I've added my acked-by and pushed it to drm-misc-next.
Regards,
Christian.
>
>
> - Paul
next prev parent reply other threads:[~2025-10-28 8:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 5:35 [PATCH v2] drm/ttm: add pgprot handling for RISC-V Icenowy Zheng
2025-10-27 7:56 ` Christian König
2025-10-27 16:41 ` Paul Walmsley
2025-10-28 8:20 ` Christian König [this message]
2025-10-27 17:10 ` Han Gao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f8e9766b-b813-42d1-b03b-563850130949@amd.com \
--to=christian.koenig@amd.com \
--cc=airlied@gmail.com \
--cc=alex@ghiti.fr \
--cc=aou@eecs.berkeley.edu \
--cc=dri-devel@lists.freedesktop.org \
--cc=inochiama@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.brost@intel.com \
--cc=mripard@kernel.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=pjw@kernel.org \
--cc=rabenda.cn@gmail.com \
--cc=ray.huang@amd.com \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
--cc=uwu@icenowy.me \
--cc=wangruikang@iscas.ac.cn \
--cc=ziyao@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox