[PATCH] drm/amdgpu: Remove duplicated power source update

Deucher, Alexander Alexander.Deucher at amd.com
Thu Aug 23 12:58:44 UTC 2018


In that case,

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

________________________________
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Zhu, Rex <Rex.Zhu at amd.com>
Sent: Thursday, August 23, 2018 8:41:28 AM
To: Alex Deucher
Cc: Wu, Hersen; amd-gfx list
Subject: RE: [PATCH] drm/amdgpu: Remove duplicated power source update

Hi Alex,

We get initial state in amdgpu_device_init.

Best Regards
Rex



> -----Original Message-----
> From: Alex Deucher <alexdeucher at gmail.com>
> Sent: Thursday, August 23, 2018 8:37 PM
> To: Zhu, Rex <Rex.Zhu at amd.com>
> Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>; Wu, Hersen
> <hersenxs.wu at amd.com>
> Subject: Re: [PATCH] drm/amdgpu: Remove duplicated power source update
>
> On Thu, Aug 23, 2018 at 2:40 AM Rex Zhu <Rex.Zhu at amd.com> wrote:
> >
> > when ac/dc switch, driver will be notified by acpi event.
> > then the power source will be updated. so don't need to get power
> > source when set power state.
>
> Don't we need this to get the initial state?  Maybe we should move this to
> one of the init functions if we don't already check there.
>
> Alex
>
> >
> > Signed-off-by: Rex Zhu <Rex.Zhu at amd.com>
> > ---
> >  drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 --------
> >  1 file changed, 8 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > index daa55fb..3e51e9c 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
> > @@ -1933,14 +1933,6 @@ void amdgpu_pm_compute_clocks(struct
> amdgpu_device *adev)
> >                         amdgpu_fence_wait_empty(ring);
> >         }
> >
> > -       mutex_lock(&adev->pm.mutex);
> > -       /* update battery/ac status */
> > -       if (power_supply_is_system_supplied() > 0)
> > -               adev->pm.ac_power = true;
> > -       else
> > -               adev->pm.ac_power = false;
> > -       mutex_unlock(&adev->pm.mutex);
> > -
> >         if (adev->powerplay.pp_funcs->dispatch_tasks) {
> >                 if (!amdgpu_device_has_dc_support(adev)) {
> >                         mutex_lock(&adev->pm.mutex);
> > --
> > 1.9.1
> >
> > _______________________________________________
> > amd-gfx mailing list
> > amd-gfx at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180823/716a01cd/attachment.html>


More information about the amd-gfx mailing list