On 01/09/16 07:08 AM, Alex Deucher wrote: > Ported from nouveau. > > Signed-off-by: Alex Deucher <alexander.deuc...@amd.com>
[...] > +static int > +amdgpufb_open(struct fb_info *info, int user) > +{ > + struct amdgpu_fbdev *rfbdev = info->par; > + struct amdgpu_device *adev = rfbdev->adev; > + int ret = pm_runtime_get_sync(adev->ddev->dev); > + if (ret < 0 && ret != -EACCES) > + return ret; > + return 0; > +} > + > +static int > +amdgpufb_release(struct fb_info *info, int user) > +{ > + struct amdgpu_fbdev *rfbdev = info->par; > + struct amdgpu_device *adev = rfbdev->adev; > + > + pm_runtime_mark_last_busy(adev->ddev->dev); > + pm_runtime_put_autosuspend(adev->ddev->dev); > + return 0; > +} If pm_runtime_get_sync returns -EACCES, won't there be an imbalance with the pm_runtime_put_autosuspend call, which might result in the GPU powering off even when there's something else which is supposed to keep it on? Same for patch 8. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx