summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-10-18 18:23:44 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-12-19 18:39:58 -0500
commit28fce3e72bd5231da0e648fb940e04b0ef49ca22 (patch)
tree7e53a771b6d5d25123c27bd9ba7942d917d10398 /drivers/gpu/nvgpu/gk20a/channel_gk20a.h
parentca2c4995278f42835d4667cc486172e38e0186d6 (diff)
gpu: nvgpu: Use struct to hold gk20a pointer
The private_data field in the file pointer passed to release() for channels originally pointed directly to the referenced channel. The problem with this is that when the driver is killed and the channel mmeory is freed that pointer becomes invalid. The necessity of that channel is to get access to the gk20a struct that owns the channel. This can instead be accomplished by making a new private data struct that has a pointer to the gk20a struct directly instead of requiring the channel to be valid. This lets the release() function work even if the channels are gone (though in such cases the release function doesn't do very much). Change-Id: I5e50bb5b6dd08d38974f8e7b46ba125e9a3f1922 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1246586 (cherry picked from commit 14b7c380c74d2caeb04c47ad3e33332a423a84bb) Reviewed-on: http://git-master/r/1261913 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
index 66052950..0ad1bbaa 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.h
@@ -39,6 +39,7 @@ struct gk20a_fence;
39#include "fence_gk20a.h" 39#include "fence_gk20a.h"
40 40
41extern const struct file_operations gk20a_event_id_ops; 41extern const struct file_operations gk20a_event_id_ops;
42extern const struct file_operations gk20a_channel_ops;
42 43
43struct notification { 44struct notification {
44 struct { 45 struct {