diff options
author | Alexey Skidanov <Alexey.Skidanov@amd.com> | 2014-11-18 14:00:04 +0200 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-09 22:25:58 +0200 |
commit | 093c7d8cfd2a26ff05e3bdff63d371147df1951c (patch) | |
tree | a308fb36ec1d2d18480c5b0547d87160d52c1441 /drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | |
parent | f7c826ad380b59baff190044c024b62091128145 (diff) | |
download | linux-093c7d8cfd2a26ff05e3bdff63d371147df1951c.tar.gz linux-093c7d8cfd2a26ff05e3bdff63d371147df1951c.tar.bz2 linux-093c7d8cfd2a26ff05e3bdff63d371147df1951c.zip |
drm/amdkfd: Process-device data creation and lookup split
This patch splits the current kfd_get_process_device_data() to two
functions, one that specifically creates a pdd and another one which
just do lookup.
This is done to enhance the readability and maintainability of the code.
Signed-off-by: Alexey Skidanov <Alexey.Skidanov@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c index e64aa99e5e41..35b987574633 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_flat_memory.c @@ -303,10 +303,11 @@ int kfd_init_apertures(struct kfd_process *process) while ((dev = kfd_topology_enum_kfd_devices(id)) != NULL && id < NUM_OF_SUPPORTED_GPUS) { - pdd = kfd_get_process_device_data(dev, process, 1); - if (!pdd) + pdd = kfd_create_process_device_data(dev, process); + if (pdd == NULL) { + pr_err("Failed to create process device data\n"); return -1; - + } /* * For 64 bit process aperture will be statically reserved in * the x86_64 non canonical process address space |