All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Deucher, Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>
To: 'Samuel Pitoiset'
	<samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"StDenis, Tom" <Tom.StDenis-5C7GfCeVMHo@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: RE: [PATCH] drm/amdgpu: expose amdgpu_sensors on pre-powerplay chips
Date: Tue, 14 Feb 2017 16:17:40 +0000	[thread overview]
Message-ID: <BN6PR12MB1652DD1BE92DB032AEC64C76F7580@BN6PR12MB1652.namprd12.prod.outlook.com> (raw)
In-Reply-To: <34e0230b-2ccb-b2bd-63d9-c2477dd33bfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Samuel Pitoiset
> Sent: Tuesday, February 14, 2017 9:45 AM
> To: StDenis, Tom; amd-gfx@lists.freedesktop.org
> Subject: Re: [PATCH] drm/amdgpu: expose amdgpu_sensors on pre-
> powerplay chips
> 
> 
> 
> On 02/14/2017 03:04 PM, Tom St Denis wrote:
> > On 13/02/17 07:23 PM, Samuel Pitoiset wrote:
> >> Totally untested but as long as read_sensor() has been recently
> >> implemented for dpm based boards, amdgpu_sensors can now be
> >> exposed.
> >>
> >> Cc: Tom St Denis <tom.stdenis@amd.com>
> >> Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
> >> ---
> >>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +----
> >>  1 file changed, 1 insertion(+), 4 deletions(-)
> >>
> >> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> index 6f021e70f15f..1a8e3b9a2268 100644
> >> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> >> @@ -3202,10 +3202,7 @@ static ssize_t
> >> amdgpu_debugfs_sensor_read(struct file *f, char __user *buf,
> >>      idx = *pos >> 2;
> >>
> >>      valuesize = sizeof(values);
> >> -    if (adev->powerplay.pp_funcs &&
> >> adev->powerplay.pp_funcs->read_sensor)
> >> -        r =
> >> adev->powerplay.pp_funcs->read_sensor(adev->powerplay.pp_handle,
> idx,
> >> &values[0], &valuesize);
> >> -    else
> >> -        return -EINVAL;
> >> +    r = amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize);
> >>
> >>      if (size > valuesize)
> >>          return -EINVAL;
> >>
> >
> > NAK, this will oops the kernel if amdgpu.dpm=0 and on powerplay systems
> > if powerplay=0.
> >
> 
> The powerplay parameter has been removed recently.
> 
> commit a48203f576e7f708093f7a9d9dcc9ff7b067e559
> Author: Rex Zhu <Rex.Zhu@amd.com>
> Date:   Tue Dec 27 15:51:45 2016 +0800
> 
>      drm/amdgpu: delete dead module parameter:amdgpu_powerplay.
> 
>      Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>      Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
>      Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> 
> But I do agree for pre-powerplay chips.
> 
> > Otherwise, it seems to work though the GPU_TEMP reads as "5000" on my
> > Kaveri (meaning temp of 5C which isn't true).
> >
> > I suspect the dpm code is reading the wrong register to get the temp but
> > we can fix that in another change later on.
> 
> No idea. It was just a copy-n-paste. Maybe the initial code is buggy?

I don’t know that the GPU temp sensor on CI based APUs actually works properly.  I think the package temperature is exposed via the CPU thermals.

Alex

> 
> >
> > Tom
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-02-14 16:17 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-14  0:23 [PATCH] drm/amdgpu: expose amdgpu_sensors on pre-powerplay chips Samuel Pitoiset
     [not found] ` <20170214002301.6686-1-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 14:04   ` Tom St Denis
     [not found]     ` <cc9720c0-653d-f56d-e68e-032454baf324-5C7GfCeVMHo@public.gmane.org>
2017-02-14 14:44       ` Samuel Pitoiset
     [not found]         ` <34e0230b-2ccb-b2bd-63d9-c2477dd33bfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 16:17           ` Deucher, Alexander [this message]
     [not found]             ` <BN6PR12MB1652DD1BE92DB032AEC64C76F7580-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-15  2:51               ` Michel Dänzer
     [not found]                 ` <35369b6f-b008-543a-fc0d-aa51fd0abe85-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-02-15  2:56                   ` Deucher, Alexander
     [not found]                     ` <BN6PR12MB1652DB3969E0524B6CFB01EEF75B0-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-15 15:01                       ` Tom St Denis
     [not found]                         ` <1ef8a2b2-9591-64dc-b924-e4b274ab0745-5C7GfCeVMHo@public.gmane.org>
2017-02-15 15:55                           ` Samuel Pitoiset
2017-02-14 15:08   ` [PATCH v2] " Samuel Pitoiset
     [not found]     ` <20170214150828.32314-1-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 16:41       ` Tom St Denis
     [not found]         ` <b97cf47b-1f0f-a9dc-4aeb-fa11a9a0f4d6-5C7GfCeVMHo@public.gmane.org>
2017-02-14 17:01           ` Samuel Pitoiset
     [not found]             ` <638559e3-6dab-107c-f483-562f6a298ab3-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 17:16               ` Tom St Denis
     [not found]                 ` <468a8aea-645c-037f-f78e-0d24a5b84a14-5C7GfCeVMHo@public.gmane.org>
2017-02-14 17:52                   ` Tom St Denis
     [not found]                     ` <2338bf9c-ab65-36c6-53ae-a15321189817-5C7GfCeVMHo@public.gmane.org>
2017-02-14 18:07                       ` Tom St Denis
2017-02-14 18:08                       ` Tom St Denis
2017-02-14 16:57   ` [PATCH] " Deucher, Alexander
     [not found]     ` <BN6PR12MB16525D9E10BE446048A8FD5FF7580-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-14 16:58       ` Tom St Denis
     [not found]         ` <b24985ed-1030-deb1-2c80-a5435c383ae4-5C7GfCeVMHo@public.gmane.org>
2017-02-14 17:01           ` Deucher, Alexander
2017-02-14 17:01           ` Deucher, Alexander
     [not found]             ` <BN6PR12MB16522B9BBE1A9048F35EFCF7F7580-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-02-14 17:04               ` Samuel Pitoiset
     [not found]                 ` <ff5516f0-f675-9874-ca2f-e5c26981568b-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-14 17:08                   ` Deucher, Alexander
2017-02-15 18:32   ` [PATCH v3] " Samuel Pitoiset
     [not found]     ` <20170215183229.32590-1-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-02-15 18:34       ` Tom St Denis
     [not found]         ` <fa40c67e-2507-20d1-3c6a-77d253b72865-5C7GfCeVMHo@public.gmane.org>
2017-02-15 18:39           ` Samuel Pitoiset

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=BN6PR12MB1652DD1BE92DB032AEC64C76F7580@BN6PR12MB1652.namprd12.prod.outlook.com \
    --to=alexander.deucher-5c7gfcevmho@public.gmane.org \
    --cc=Tom.StDenis-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@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.