All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: [PATCH 1/2] pmu/gk20a: add dummy func
Date: Thu, 3 Sep 2015 15:32:34 +0900	[thread overview]
Message-ID: <1441261955-3577-2-git-send-email-acourbot@nvidia.com> (raw)
In-Reply-To: <1441261955-3577-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Some parts of the driver expect the PMU to have a func member, so set
one for GK20A to avoid NULL pointer derefences.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drm/nouveau/nvkm/subdev/pmu/gk20a.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drm/nouveau/nvkm/subdev/pmu/gk20a.c b/drm/nouveau/nvkm/subdev/pmu/gk20a.c
index 6689d0290a7e..f46e3310e21a 100644
--- a/drm/nouveau/nvkm/subdev/pmu/gk20a.c
+++ b/drm/nouveau/nvkm/subdev/pmu/gk20a.c
@@ -202,6 +202,10 @@ gk20a_dvfs_data= {
 	.p_smooth = 1,
 };
 
+static const struct nvkm_pmu_func
+gk20a_pmu_func = {
+};
+
 static const struct nvkm_subdev_func
 gk20a_pmu = {
 	.init = gk20a_pmu_init,
@@ -221,6 +225,7 @@ gk20a_pmu_new(struct nvkm_device *device, int index, struct nvkm_pmu **ppmu)
 	*ppmu = &pmu->base;
 
 	nvkm_subdev_ctor(&gk20a_pmu, device, index, 0, &pmu->base.subdev);
+	pmu->base.func = &gk20a_pmu_func;
 	pmu->data = &gk20a_dvfs_data;
 	nvkm_alarm_init(&pmu->alarm, gk20a_pmu_dvfs_work);
 	return 0;
-- 
2.5.1

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

  parent reply	other threads:[~2015-09-03  6:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-03  6:32 [PATCH 0/2] two trivial PMU fixes Alexandre Courbot
     [not found] ` <1441261955-3577-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-03  6:32   ` Alexandre Courbot [this message]
     [not found]     ` <1441261955-3577-2-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-03  7:07       ` [PATCH 1/2] pmu/gk20a: add dummy func Ben Skeggs
     [not found]         ` <CACAvsv76bsij+UsXAe7-icM9NU9O9zBrjpT6h7e5E-8t847-Yg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-03  7:09           ` Alexandre Courbot
2015-09-03  6:32   ` [PATCH 2/2] gr/gf100: do not assume a PMU is present Alexandre Courbot
     [not found]     ` <1441261955-3577-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-09-03  7:08       ` Ben Skeggs
     [not found]         ` <CACAvsv4GYEy--Byi5zOphW1V2BLyJnfHMAnmXDkGPqks=63w7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-03  7:11           ` Alexandre Courbot
     [not found]             ` <CAAVeFu+y6XkTKNx+W+kxc_oe0XhFC-9FODck5fKTa=2GzOZuKg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-03  7:16               ` Ben Skeggs
     [not found]                 ` <CACAvsv70qg2ScfAhHAq-dcsXFoS+N_1JzMKP5Os5Br8gf3NWSg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-03  7:18                   ` Alexandre Courbot
     [not found]                     ` <CAAVeFuJZ3beF-9bY2L8Knd-qv6fCMHeA5A_8wCbJ29myEmiMJA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-09-03  7:21                       ` Ben Skeggs
2015-09-03  6:34   ` [PATCH 0/2] two trivial PMU fixes Alexandre Courbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1441261955-3577-2-git-send-email-acourbot@nvidia.com \
    --to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.