* [PATCH 1/6] drm/amdgpu: add new asic callbacks for HDP flush/invalidation
@ 2017-09-06 22:04 Samuel Li
[not found] ` <1504735491-30920-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Li @ 2017-09-06 22:04 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher, Samuel Li
From: Alex Deucher <alexander.deucher@amd.com>
Needed to properly flush the HDP cache with the CPU from rather
than the GPU.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Samuel Li <Samuel.Li@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index d2aaad7..6f262ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -1279,6 +1279,10 @@ struct amdgpu_asic_funcs {
void (*set_pcie_lanes)(struct amdgpu_device *adev, int lanes);
/* get config memsize register */
u32 (*get_config_memsize)(struct amdgpu_device *adev);
+ /* flush hdp write queue */
+ void (*flush_hdp)(struct amdgpu_device *adev);
+ /* invalidate hdp read cache */
+ void (*invalidate_hdp)(struct amdgpu_device *adev);
};
/*
@@ -1737,6 +1741,8 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
#define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l))
#define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v)))
#define amdgpu_asic_get_config_memsize(adev) (adev)->asic_funcs->get_config_memsize((adev))
+#define amdgpu_asic_flush_hdp(adev) (adev)->asic_funcs->flush_hdp((adev))
+#define amdgpu_asic_invalidate_hdp(adev) (adev)->asic_funcs->invalidate_hdp((adev))
#define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid))
#define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags))
#define amdgpu_gart_get_vm_pde(adev, addr) (adev)->gart.gart_funcs->get_vm_pde((adev), (addr))
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/6] drm/amdgpu: add new asic callbacks for HDP flush/invalidation
[not found] ` <1504735491-30920-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
@ 2017-09-07 7:05 ` Christian König
0 siblings, 0 replies; 2+ messages in thread
From: Christian König @ 2017-09-07 7:05 UTC (permalink / raw)
To: Samuel Li, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Alex Deucher
Am 07.09.2017 um 00:04 schrieb Samuel Li:
> From: Alex Deucher <alexander.deucher@amd.com>
>
> Needed to properly flush the HDP cache with the CPU from rather
> than the GPU.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Samuel Li <Samuel.Li@amd.com>
Patches #1-#5 are unnecessary for gem_prime_mmap support() (but don't
completely drop them, we could use them for CPU based VM page table
updates).
Patch #6 looks pretty good to me, just a few notes about the HDP
flush/invalidate.
Regards,
Christian.
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index d2aaad7..6f262ce 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -1279,6 +1279,10 @@ struct amdgpu_asic_funcs {
> void (*set_pcie_lanes)(struct amdgpu_device *adev, int lanes);
> /* get config memsize register */
> u32 (*get_config_memsize)(struct amdgpu_device *adev);
> + /* flush hdp write queue */
> + void (*flush_hdp)(struct amdgpu_device *adev);
> + /* invalidate hdp read cache */
> + void (*invalidate_hdp)(struct amdgpu_device *adev);
> };
>
> /*
> @@ -1737,6 +1741,8 @@ amdgpu_get_sdma_instance(struct amdgpu_ring *ring)
> #define amdgpu_asic_read_bios_from_rom(adev, b, l) (adev)->asic_funcs->read_bios_from_rom((adev), (b), (l))
> #define amdgpu_asic_read_register(adev, se, sh, offset, v)((adev)->asic_funcs->read_register((adev), (se), (sh), (offset), (v)))
> #define amdgpu_asic_get_config_memsize(adev) (adev)->asic_funcs->get_config_memsize((adev))
> +#define amdgpu_asic_flush_hdp(adev) (adev)->asic_funcs->flush_hdp((adev))
> +#define amdgpu_asic_invalidate_hdp(adev) (adev)->asic_funcs->invalidate_hdp((adev))
> #define amdgpu_gart_flush_gpu_tlb(adev, vmid) (adev)->gart.gart_funcs->flush_gpu_tlb((adev), (vmid))
> #define amdgpu_gart_set_pte_pde(adev, pt, idx, addr, flags) (adev)->gart.gart_funcs->set_pte_pde((adev), (pt), (idx), (addr), (flags))
> #define amdgpu_gart_get_vm_pde(adev, addr) (adev)->gart.gart_funcs->get_vm_pde((adev), (addr))
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-07 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-06 22:04 [PATCH 1/6] drm/amdgpu: add new asic callbacks for HDP flush/invalidation Samuel Li
[not found] ` <1504735491-30920-1-git-send-email-Samuel.Li-5C7GfCeVMHo@public.gmane.org>
2017-09-07 7:05 ` Christian König
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.