[Openpvrsgx-devgroup] [PATCH 1/2] pvrsrv: 1.17: osfunc: use dma-direct unconditionally
H. Nikolaus Schaller
hns at goldelico.com
Thu Sep 8 17:15:36 CEST 2022
Hi Anthoine,
thanks for your patch set.
It seems to be a little in conflict with:
https://git.goldelico.com/?p=letux-kernel.git;a=blobdiff;f=drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/env/linux/osfunc.c;h=363563867ea93929fac82a994125152915b17062;hp=703ebe16395841183df6289e4ae4caa5d906e903;hb=063ffd2f333104dcd6ee8ed8e060274ba81015a5;hpb=27b24edbb990a4ec337a54939560e6749951a743
but is certainly an improvement since it adds the correct LINUX_VERSION_CODE check.
So we have to think about making the best out of the two commits... E.g. include my rationale for the patch ("arm_dma_ops. are no longer accessible.")
Doing the same for the DDK 1.14 (your PATCH 2/2) seems to be correct. I just did not compile that one and therefore have missed it.
BR and thanks,
Nikolaus
> Am 08.09.2022 um 17:01 schrieb Anthoine Bourgeois <anthoine.bourgeois at gmail.com>:
>
> Signed-off-by: Anthoine Bourgeois <anthoine.bourgeois at gmail.com>
> ---
> .../eurasia_km/services4/srvkm/env/linux/osfunc.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/env/linux/osfunc.c b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/env/linux/osfunc.c
> index 703ebe163958..c6c1b1f43155 100644
> --- a/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/env/linux/osfunc.c
> +++ b/drivers/gpu/drm/pvrsgx/1.17.4948957/eurasia_km/services4/srvkm/env/linux/osfunc.c
> @@ -4563,7 +4563,7 @@ static void pvr_dmac_clean_range(const void *pvStart, const void *pvEnd)
>
> static void pvr_flush_range(phys_addr_t pStart, phys_addr_t pEnd)
> {
> -#if defined(__aarch64__)
> +#if defined(__aarch64__) || (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
> struct device *dev = PVRLDMGetDevice();
> dma_sync_single_for_device(dev, pStart, pEnd - pStart, DMA_TO_DEVICE);
> dma_sync_single_for_cpu(dev, pStart, pEnd - pStart, DMA_FROM_DEVICE);
> @@ -4575,7 +4575,7 @@ static void pvr_flush_range(phys_addr_t pStart, phys_addr_t pEnd)
>
> static void pvr_clean_range(phys_addr_t pStart, phys_addr_t pEnd)
> {
> -#if defined(__aarch64__)
> +#if defined(__aarch64__) || (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
> struct device *dev = PVRLDMGetDevice();
> dma_sync_single_for_device(dev, pStart, pEnd - pStart, DMA_TO_DEVICE);
> #else
> @@ -4586,7 +4586,7 @@ static void pvr_clean_range(phys_addr_t pStart, phys_addr_t pEnd)
>
> static void pvr_invalidate_range(phys_addr_t pStart, phys_addr_t pEnd)
> {
> -#if defined(__aarch64__)
> +#if defined(__aarch64__) || (LINUX_VERSION_CODE >= KERNEL_VERSION(6,0,0))
> struct device *dev = PVRLDMGetDevice();
> dma_sync_single_for_cpu(dev, pStart, pEnd - pStart, DMA_FROM_DEVICE);
> #else
> --
> 2.35.1
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.goldelico.com/pipermail/openpvrsgx-devgroup/attachments/20220908/8f0c2fa6/attachment.htm>
More information about the openpvrsgx-devgroup
mailing list