drm/amdgpu: Add missing power attribute to APU check

Submitted by Alex Deucher on Jan. 10, 2019, 3:23 a.m.

Details

Message ID 20190110032347.18890-1-alexander.deucher@amd.com
State Accepted
Commit 84d3245599f527138c4d4b87deed14a7e85cd81b
Headers show
Series "drm/amdgpu: Add missing power attribute to APU check" ( rev: 1 ) in AMD X.Org drivers

Browsing this patch as part of:
"drm/amdgpu: Add missing power attribute to APU check" rev 1 in AMD X.Org drivers
<< prev patch [1/1] next patch >>

Commit Message

Alex Deucher Jan. 10, 2019, 3:23 a.m.
Add missing power_average to visible check for power
attributesi for APUs.  Was missed before.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 51eb2cf42b81..979d96278413 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1799,7 +1799,8 @@  static umode_t hwmon_attributes_visible(struct kobject *kobj,
 		effective_mode &= ~S_IWUSR;
 
 	if ((adev->flags & AMD_IS_APU) &&
-	    (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
+	    (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
+	     attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
 	     attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
 	     attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
 		return 0;

Comments

Ping?

On Wed, Jan 9, 2019 at 10:23 PM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Add missing power_average to visible check for power
> attributesi for APUs.  Was missed before.
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> index 51eb2cf42b81..979d96278413 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> @@ -1799,7 +1799,8 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
>                 effective_mode &= ~S_IWUSR;
>
>         if ((adev->flags & AMD_IS_APU) &&
> -           (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> +           (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
> +            attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
>              attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
>              attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
>                 return 0;
> --
> 2.20.1
>
Ping again?

Alex

On Tue, Jan 15, 2019 at 11:32 AM Alex Deucher <alexdeucher@gmail.com> wrote:
>
> Ping?
>
> On Wed, Jan 9, 2019 at 10:23 PM Alex Deucher <alexdeucher@gmail.com> wrote:
> >
> > Add missing power_average to visible check for power
> > attributesi for APUs.  Was missed before.
> >
> > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > index 51eb2cf42b81..979d96278413 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > @@ -1799,7 +1799,8 @@ static umode_t hwmon_attributes_visible(struct kobject *kobj,
> >                 effective_mode &= ~S_IWUSR;
> >
> >         if ((adev->flags & AMD_IS_APU) &&
> > -           (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> > +           (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||
> > +            attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||
> >              attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||
> >              attr == &sensor_dev_attr_power1_cap.dev_attr.attr))
> >                 return 0;
> > --
> > 2.20.1
> >
Reviewed-by: Evan Quan <evan.quan@amd.com>


> -----Original Message-----

> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex

> Deucher

> Sent: 2019年1月22日 3:01

> To: amd-gfx list <amd-gfx@lists.freedesktop.org>

> Cc: Deucher, Alexander <Alexander.Deucher@amd.com>

> Subject: Re: [PATCH] drm/amdgpu: Add missing power attribute to APU

> check

> 

> Ping again?

> 

> Alex

> 

> On Tue, Jan 15, 2019 at 11:32 AM Alex Deucher <alexdeucher@gmail.com>

> wrote:

> >

> > Ping?

> >

> > On Wed, Jan 9, 2019 at 10:23 PM Alex Deucher <alexdeucher@gmail.com>

> wrote:

> > >

> > > Add missing power_average to visible check for power attributesi for

> > > APUs.  Was missed before.

> > >

> > > Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

> > > ---

> > >  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 3 ++-

> > >  1 file changed, 2 insertions(+), 1 deletion(-)

> > >

> > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > > b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > > index 51eb2cf42b81..979d96278413 100644

> > > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c

> > > @@ -1799,7 +1799,8 @@ static umode_t

> hwmon_attributes_visible(struct kobject *kobj,

> > >                 effective_mode &= ~S_IWUSR;

> > >

> > >         if ((adev->flags & AMD_IS_APU) &&

> > > -           (attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr ||

> > > +           (attr == &sensor_dev_attr_power1_average.dev_attr.attr ||

> > > +            attr == &sensor_dev_attr_power1_cap_max.dev_attr.attr

> > > + ||

> > >              attr == &sensor_dev_attr_power1_cap_min.dev_attr.attr||

> > >              attr == &sensor_dev_attr_power1_cap.dev_attr.attr))

> > >                 return 0;

> > > --

> > > 2.20.1

> > >

> _______________________________________________

> amd-gfx mailing list

> amd-gfx@lists.freedesktop.org

> https://lists.freedesktop.org/mailman/listinfo/amd-gfx