summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDebarshi Dutta <ddutta@nvidia.com>2018-06-19 03:27:36 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-06-28 03:25:29 -0400
commit1bc1ff2e92c0638935b911057ef60fa57af76948 (patch)
tree9898c70be51fadf265a4884ea57d442cd93437c9 /drivers
parent74d786dd1327bafa18b21310ac8d67db4a5614cb (diff)
gpu: nvgpu: remove use of struct fence type.
struct fence and fence* APIs have changed to struct dma_fence and dma_fence* respectively. This patch makes the required changes that avoids using the struct fence type to prevent making API changes in nvgpu. Bug 200417423 Change-Id: I566de58a3659cbc2495670136dc2fc65862b46e7 Signed-off-by: Debarshi Dutta <ddutta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1754164 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-by: Bitan Biswas <bbiswas@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c4
-rw-r--r--drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c4
-rw-r--r--drivers/gpu/nvgpu/os/linux/sync_sema_android.c4
3 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
index 25832417..e7070612 100644
--- a/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
+++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_sema.c
@@ -58,8 +58,8 @@ int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s,
58 } 58 }
59 59
60 for (i = 0; i < num_wait_cmds; i++) { 60 for (i = 0; i < num_wait_cmds; i++) {
61 struct fence *f = sync_fence->cbs[i].sync_pt; 61 struct sync_pt *pt = sync_pt_from_fence(
62 struct sync_pt *pt = sync_pt_from_fence(f); 62 sync_fence->cbs[i].sync_pt);
63 63
64 sema = gk20a_sync_pt_sema(pt); 64 sema = gk20a_sync_pt_sema(pt);
65 gk20a_channel_gen_sema_wait_cmd(c, sema, wait_cmd, 65 gk20a_channel_gen_sema_wait_cmd(c, sema, wait_cmd,
diff --git a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
index d7a72fcd..dc340f1a 100644
--- a/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
+++ b/drivers/gpu/nvgpu/os/linux/os_fence_android_syncpt.c
@@ -70,8 +70,8 @@ int nvgpu_os_fence_syncpt_wait_gen_cmd(struct nvgpu_os_fence *s,
70 } 70 }
71 71
72 for (i = 0; i < sync_fence->num_fences; i++) { 72 for (i = 0; i < sync_fence->num_fences; i++) {
73 struct fence *f = sync_fence->cbs[i].sync_pt; 73 struct sync_pt *pt = sync_pt_from_fence(
74 struct sync_pt *pt = sync_pt_from_fence(f); 74 sync_fence->cbs[i].sync_pt);
75 u32 wait_id = nvgpu_nvhost_sync_pt_id(pt); 75 u32 wait_id = nvgpu_nvhost_sync_pt_id(pt);
76 u32 wait_value = nvgpu_nvhost_sync_pt_thresh(pt); 76 u32 wait_value = nvgpu_nvhost_sync_pt_thresh(pt);
77 77
diff --git a/drivers/gpu/nvgpu/os/linux/sync_sema_android.c b/drivers/gpu/nvgpu/os/linux/sync_sema_android.c
index 4dd10e6e..9598f2df 100644
--- a/drivers/gpu/nvgpu/os/linux/sync_sema_android.c
+++ b/drivers/gpu/nvgpu/os/linux/sync_sema_android.c
@@ -15,7 +15,6 @@
15 * You should have received a copy of the GNU General Public License 15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */ 17 */
18
19#include <linux/file.h> 18#include <linux/file.h>
20#include <linux/fs.h> 19#include <linux/fs.h>
21#include <linux/hrtimer.h> 20#include <linux/hrtimer.h>
@@ -324,8 +323,7 @@ struct sync_fence *gk20a_sync_fence_fdget(int fd)
324 return NULL; 323 return NULL;
325 324
326 for (i = 0; i < fence->num_fences; i++) { 325 for (i = 0; i < fence->num_fences; i++) {
327 struct fence *pt = fence->cbs[i].sync_pt; 326 struct sync_pt *spt = sync_pt_from_fence(fence->cbs[i].sync_pt);
328 struct sync_pt *spt = sync_pt_from_fence(pt);
329 struct sync_timeline *t; 327 struct sync_timeline *t;
330 328
331 if (spt == NULL) { 329 if (spt == NULL) {