From 3dabdf3e6d703ffdb4549ab54cf5bca34460706b Mon Sep 17 00:00:00 2001 From: Sourab Gupta Date: Sun, 29 Apr 2018 14:37:32 +0530 Subject: gpu: nvgpu: add conversion function for poll masks In order to enable the movement of clk arbitrator to common code, we need to remove the linux specific POLL* defines and instead use NVGPU defines. Add a conversion function for the same. Also remove debugfs include, while at it. Jira VQRM-3741 Change-Id: I3c367625f9fa5fb8480d01bdaf6233df8cc2c722 Signed-off-by: Sourab Gupta Reviewed-on: https://git-master.nvidia.com/r/1704885 Reviewed-by: svc-mobile-coverity Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/linux/clk_arb.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/clk_arb.c') diff --git a/drivers/gpu/nvgpu/common/linux/clk_arb.c b/drivers/gpu/nvgpu/common/linux/clk_arb.c index 3ec7fd54..39763f14 100644 --- a/drivers/gpu/nvgpu/common/linux/clk_arb.c +++ b/drivers/gpu/nvgpu/common/linux/clk_arb.c @@ -20,10 +20,6 @@ #include #include #include -#include -#ifdef CONFIG_DEBUG_FS -#include -#endif #include #include @@ -678,7 +674,7 @@ static u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev, if ((target->gpc2clk < session->target->gpc2clk) || (target->mclk < session->target->mclk)) { - poll_mask |= (POLLIN | POLLPRI); + poll_mask |= (NVGPU_POLLIN | NVGPU_POLLPRI); nvgpu_clk_arb_queue_notification(arb->g, &dev->queue, EVENT(ALARM_LOCAL_TARGET_VF_NOT_POSSIBLE)); } @@ -686,7 +682,7 @@ static u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev, /* Check if there is a new VF update */ if (queue_alarm_mask & EVENT(VF_UPDATE)) - poll_mask |= (POLLIN | POLLRDNORM); + poll_mask |= (NVGPU_POLLIN | NVGPU_POLLRDNORM); /* Notify sticky alarms that were not reported on previous run*/ new_alarms_reported = (queue_alarm_mask | @@ -695,9 +691,9 @@ static u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev, if (new_alarms_reported & ~LOCAL_ALARM_MASK) { /* check that we are not re-reporting */ if (new_alarms_reported & EVENT(ALARM_GPU_LOST)) - poll_mask |= POLLHUP; + poll_mask |= NVGPU_POLLHUP; - poll_mask |= (POLLIN | POLLPRI); + poll_mask |= (NVGPU_POLLIN | NVGPU_POLLPRI); /* On next run do not report global alarms that were already * reported, but report SHUTDOWN always */ @@ -1016,7 +1012,7 @@ exit_arb: /* notify completion for all requests */ head = llist_del_all(&arb->requests); llist_for_each_entry_safe(dev, tmp, head, node) { - nvgpu_atomic_set(&dev->poll_mask, POLLIN | POLLRDNORM); + nvgpu_atomic_set(&dev->poll_mask, NVGPU_POLLIN | NVGPU_POLLRDNORM); nvgpu_cond_signal_interruptible(&dev->readout_wq); nvgpu_ref_put(&dev->refcount, nvgpu_clk_arb_free_fd); } -- cgit v1.2.2