All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom St Denis <tom.stdenis-5C7GfCeVMHo@public.gmane.org>
To: "Deucher,
	Alexander" <Alexander.Deucher-5C7GfCeVMHo@public.gmane.org>,
	'Samuel Pitoiset'
	<samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@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 11:58:01 -0500	[thread overview]
Message-ID: <b24985ed-1030-deb1-2c80-a5435c383ae4@amd.com> (raw)
In-Reply-To: <BN6PR12MB16525D9E10BE446048A8FD5FF7580-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

On 14/02/17 11:57 AM, Deucher, Alexander wrote:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
>> Of Samuel Pitoiset
>> Sent: Monday, February 13, 2017 7:23 PM
>> To: amd-gfx@lists.freedesktop.org
>> Cc: StDenis, Tom; Samuel Pitoiset
>> Subject: [PATCH] drm/amdgpu: expose amdgpu_sensors on pre-powerplay
>> chips
>>
>> 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);
>
> amdgpu_dpm is handled by both powerplay and non-powerplay so I think if we check for that here, we should be fine.  E.g.,
> if (amdgpu_dpm != 0)
>         r = amdgpu_dpm_read_sensor(adev, idx, &values[0], &valuesize);

And a similar fix in the DRM ioctl too I suppose.

Tom
_______________________________________________
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:58 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
     [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 [this message]
     [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=b24985ed-1030-deb1-2c80-a5435c383ae4@amd.com \
    --to=tom.stdenis-5c7gfcevmho@public.gmane.org \
    --cc=Alexander.Deucher-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.