[PATCH] drm/imagination: Explicitly set CACHED flag on META FW

Alexandru Dadu posted 1 patch 1 month, 4 weeks ago
There is a newer version of this series
drivers/gpu/drm/imagination/pvr_fw_meta.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
[PATCH] drm/imagination: Explicitly set CACHED flag on META FW
Posted by Alexandru Dadu 1 month, 4 weeks ago
From: Matt Coster <opensource@mtcoster.net>

For completeness, OR in the CACHED flags when we're not ORing in the
UNCACHED counterparts. One of these is probably zero, but (a) it isn't
evident just by reading these lines, and (b) the compiler will make it
disappear in that case.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_fw_meta.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c
index 9ff03bc60a08..b5837ba56e33 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_meta.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c
@@ -509,9 +509,13 @@ pvr_meta_get_fw_addr_with_offset(struct pvr_fw_object *fw_obj, u32 offset)
 	u32 fw_addr = fw_obj->fw_addr_offset + offset + ROGUE_FW_SEGMMU_DATA_BASE_ADDRESS;
 
 	/* META cacheability is determined by address. */
-	if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED)
+	if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED) {
 		fw_addr |= ROGUE_FW_SEGMMU_DATA_META_UNCACHED |
 			   ROGUE_FW_SEGMMU_DATA_VIVT_SLC_UNCACHED;
+	} else {
+		fw_addr |= ROGUE_FW_SEGMMU_DATA_META_CACHED |
+			   ROGUE_FW_SEGMMU_DATA_VIVT_SLC_CACHED;
+	}
 
 	return fw_addr;
 }

---
base-commit: e55fead22ff9ee047ab9f1903860c4b43043514e
change-id: 20260804-b4-cached-flag-on-meta-fw-b0fb2589ba72

Best regards,
-- 
Alexandru Dadu <alexandru.dadu@imgtec.com>
Re: [PATCH] drm/imagination: Explicitly set CACHED flag on META FW
Posted by Alessio Belle 1 month, 3 weeks ago
Hi Alex,

On Tue, 2026-08-04 at 16:45 +0300, Alexandru Dadu wrote:
> From: Matt Coster <opensource@mtcoster.net>

This should match the Signed-off-by line below.

Does git show --no-mailmap <Matt's commit> return the address below in the
Author field? If so, and b4 send --dry-run returns the address above in this
From line, can you try updating b4 to latest?

Thanks,
Alessio

> 
> For completeness, OR in the CACHED flags when we're not ORing in the
> UNCACHED counterparts. One of these is probably zero, but (a) it isn't
> evident just by reading these lines, and (b) the compiler will make it
> disappear in that case.
> 
> Signed-off-by: Matt Coster <matt.coster@imgtec.com>
> Signed-off-by: Alexandru Dadu <alexandru.dadu@imgtec.com>
> ---
>  drivers/gpu/drm/imagination/pvr_fw_meta.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_fw_meta.c b/drivers/gpu/drm/imagination/pvr_fw_meta.c
> index 9ff03bc60a08..b5837ba56e33 100644
> --- a/drivers/gpu/drm/imagination/pvr_fw_meta.c
> +++ b/drivers/gpu/drm/imagination/pvr_fw_meta.c
> @@ -509,9 +509,13 @@ pvr_meta_get_fw_addr_with_offset(struct pvr_fw_object *fw_obj, u32 offset)
>  	u32 fw_addr = fw_obj->fw_addr_offset + offset + ROGUE_FW_SEGMMU_DATA_BASE_ADDRESS;
>  
>  	/* META cacheability is determined by address. */
> -	if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED)
> +	if (fw_obj->gem->flags & PVR_BO_FW_FLAGS_DEVICE_UNCACHED) {
>  		fw_addr |= ROGUE_FW_SEGMMU_DATA_META_UNCACHED |
>  			   ROGUE_FW_SEGMMU_DATA_VIVT_SLC_UNCACHED;
> +	} else {
> +		fw_addr |= ROGUE_FW_SEGMMU_DATA_META_CACHED |
> +			   ROGUE_FW_SEGMMU_DATA_VIVT_SLC_CACHED;
> +	}
>  
>  	return fw_addr;
>  }
> 
> ---
> base-commit: e55fead22ff9ee047ab9f1903860c4b43043514e
> change-id: 20260804-b4-cached-flag-on-meta-fw-b0fb2589ba72
> 
> Best regards,