* [PATCH 1/3] drm/amd/powerplay: fix suspend error on DPM disabled @ 2017-04-10 9:37 Huang Rui [not found] ` <1491817071-17014-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Huang Rui @ 2017-04-10 9:37 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher; +Cc: Huang Rui Signed-off-by: Huang Rui <ray.huang@amd.com> --- drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 9da5b0b..f73e80c 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c @@ -251,7 +251,9 @@ static int pp_suspend(void *handle) ret = pp_check(pp_handle); - if (ret != 0) + if (ret == PP_DPM_DISABLED) + return 0; + else if (ret != 0) return ret; eventmgr = pp_handle->eventmgr; -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1491817071-17014-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>]
* [PATCH 2/3] drm/amdgpu: do not free fence buf when driver probes. [not found] ` <1491817071-17014-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> @ 2017-04-10 9:37 ` Huang Rui 2017-04-10 9:37 ` [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase Huang Rui 1 sibling, 0 replies; 6+ messages in thread From: Huang Rui @ 2017-04-10 9:37 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher; +Cc: Huang Rui Fence buf needs to be used on suspend/resume phase. Signed-off-by: Huang Rui <ray.huang@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 68ccaed..19180aa 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -358,8 +358,6 @@ static int psp_load_fw(struct amdgpu_device *adev) if (ret) goto failed_mem; - amdgpu_bo_free_kernel(&psp->fence_buf_bo, - &psp->fence_buf_mc_addr, &psp->fence_buf); kfree(cmd); return 0; @@ -423,6 +421,10 @@ static int psp_hw_fini(void *handle) amdgpu_bo_free_kernel(&psp->fw_pri_bo, &psp->fw_pri_mc_addr, &psp->fw_pri_buf); + if (psp->fence_buf_bo) + amdgpu_bo_free_kernel(&psp->fence_buf_bo, + &psp->fence_buf_mc_addr, &psp->fence_buf); + return 0; } -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase [not found] ` <1491817071-17014-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 2017-04-10 9:37 ` [PATCH 2/3] drm/amdgpu: do not free fence buf when driver probes Huang Rui @ 2017-04-10 9:37 ` Huang Rui [not found] ` <1491817071-17014-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Huang Rui @ 2017-04-10 9:37 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher; +Cc: Huang Rui ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, because VBIOS will check the bit to decide if execute ASIC_Init posting via kernel driver. Signed-off-by: Huang Rui <ray.huang@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 5 ++++- drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c index ad43299..b0dd72a8 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c @@ -1727,8 +1727,11 @@ void amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev) { int i; - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { + if (i == 7) + adev->bios_scratch[i] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; WREG32(mmBIOS_SCRATCH_0 + i, adev->bios_scratch[i]); + } } void amdgpu_atombios_scratch_regs_engine_hung(struct amdgpu_device *adev, diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c index 4b9abd6..c7e28bf 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c @@ -26,6 +26,7 @@ #include "atomfirmware.h" #include "amdgpu_atomfirmware.h" #include "atom.h" +#include "atombios.h" #define get_index_into_master_table(master_table, table_name) (offsetof(struct master_table, table_name) / sizeof(uint16_t)) @@ -77,8 +78,11 @@ void amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device *adev) { int i; - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { + if (i == 7) + adev->bios_scratch[i] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; WREG32(adev->bios_scratch_reg_offset + i, adev->bios_scratch[i]); + } } int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device *adev) -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply related [flat|nested] 6+ messages in thread
[parent not found: <1491817071-17014-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>]
* Re: [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase [not found] ` <1491817071-17014-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> @ 2017-04-10 12:09 ` Grazvydas Ignotas [not found] ` <CANOLnOOcnUitqWAWjtTEa0U69pEj5mFMMJZSHrKz5S_TQEcoDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-04-10 14:55 ` Deucher, Alexander 1 sibling, 1 reply; 6+ messages in thread From: Grazvydas Ignotas @ 2017-04-10 12:09 UTC (permalink / raw) To: Huang Rui; +Cc: Alex Deucher, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW [-- Attachment #1.1: Type: text/plain, Size: 1284 bytes --] On Mon, Apr 10, 2017 at 12:37 PM, Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org> wrote: > ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, > because VBIOS will check the bit to decide if execute ASIC_Init > posting via kernel driver. > > Signed-off-by: Huang Rui <ray.huang-5C7GfCeVMHo@public.gmane.org> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 5 ++++- > drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > index ad43299..b0dd72a8 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > @@ -1727,8 +1727,11 @@ void amdgpu_atombios_scratch_regs_restore(struct > amdgpu_device *adev) > { > int i; > > - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) > + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { > + if (i == 7) > + adev->bios_scratch[i] &= > ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; > Maybe move this line before the loop? A comment may also be useful so that somebody doesn't delete the code again in future. Gražvydas [-- Attachment #1.2: Type: text/html, Size: 1880 bytes --] [-- Attachment #2: Type: text/plain, Size: 154 bytes --] _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <CANOLnOOcnUitqWAWjtTEa0U69pEj5mFMMJZSHrKz5S_TQEcoDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase [not found] ` <CANOLnOOcnUitqWAWjtTEa0U69pEj5mFMMJZSHrKz5S_TQEcoDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2017-04-11 3:41 ` Huang Rui 0 siblings, 0 replies; 6+ messages in thread From: Huang Rui @ 2017-04-11 3:41 UTC (permalink / raw) To: Grazvydas Ignotas Cc: Deucher, Alexander, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW On Mon, Apr 10, 2017 at 08:09:17PM +0800, Grazvydas Ignotas wrote: > On Mon, Apr 10, 2017 at 12:37 PM, Huang Rui <ray.huang@amd.com> wrote: > > ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, > because VBIOS will check the bit to decide if execute ASIC_Init > posting via kernel driver. > > Signed-off-by: Huang Rui <ray.huang@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 5 ++++- > drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c b/drivers/gpu/drm > /amd/amdgpu/amdgpu_atombios.c > index ad43299..b0dd72a8 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > @@ -1727,8 +1727,11 @@ void amdgpu_atombios_scratch_regs_restore(struct > amdgpu_device *adev) > { > int i; > > - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) > + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { > + if (i == 7) > + adev->bios_scratch[i] &= > ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; > > > Maybe move this line before the loop? > A comment may also be useful so that somebody doesn't delete the code again in > future. > OK. I'm fine to move it before this loop. /* * VBIOS will check ASIC_INIT_COMPLETE bit to decide if * execute ASIC_Init posting via driver */ adev->bios_scratch[7] &= ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; Thanks, Rui _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase [not found] ` <1491817071-17014-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 2017-04-10 12:09 ` Grazvydas Ignotas @ 2017-04-10 14:55 ` Deucher, Alexander 1 sibling, 0 replies; 6+ messages in thread From: Deucher, Alexander @ 2017-04-10 14:55 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Huang, Ray > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Huang Rui > Sent: Monday, April 10, 2017 5:38 AM > To: amd-gfx@lists.freedesktop.org; Deucher, Alexander > Cc: Huang, Ray > Subject: [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on > resuming phase > > ASIC_INIT_COMPLETE bit must be cleared during S3 resuming phase, > because VBIOS will check the bit to decide if execute ASIC_Init > posting via kernel driver. > > Signed-off-by: Huang Rui <ray.huang@amd.com> Series is: Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 5 ++++- > drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 6 +++++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > index ad43299..b0dd72a8 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c > @@ -1727,8 +1727,11 @@ void > amdgpu_atombios_scratch_regs_restore(struct amdgpu_device *adev) > { > int i; > > - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) > + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { > + if (i == 7) > + adev->bios_scratch[i] &= > ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; > WREG32(mmBIOS_SCRATCH_0 + i, adev->bios_scratch[i]); > + } > } > > void amdgpu_atombios_scratch_regs_engine_hung(struct amdgpu_device > *adev, > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c > index 4b9abd6..c7e28bf 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c > @@ -26,6 +26,7 @@ > #include "atomfirmware.h" > #include "amdgpu_atomfirmware.h" > #include "atom.h" > +#include "atombios.h" > > #define get_index_into_master_table(master_table, table_name) > (offsetof(struct master_table, table_name) / sizeof(uint16_t)) > > @@ -77,8 +78,11 @@ void > amdgpu_atomfirmware_scratch_regs_restore(struct amdgpu_device > *adev) > { > int i; > > - for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) > + for (i = 0; i < AMDGPU_BIOS_NUM_SCRATCH; i++) { > + if (i == 7) > + adev->bios_scratch[i] &= > ~ATOM_S7_ASIC_INIT_COMPLETE_MASK; > WREG32(adev->bios_scratch_reg_offset + i, adev- > >bios_scratch[i]); > + } > } > > int amdgpu_atomfirmware_allocate_fb_scratch(struct amdgpu_device > *adev) > -- > 2.7.4 > > _______________________________________________ > 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 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-04-11 3:41 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2017-04-10 9:37 [PATCH 1/3] drm/amd/powerplay: fix suspend error on DPM disabled Huang Rui [not found] ` <1491817071-17014-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 2017-04-10 9:37 ` [PATCH 2/3] drm/amdgpu: do not free fence buf when driver probes Huang Rui 2017-04-10 9:37 ` [PATCH 3/3] drm/amdgpu: fix to clear ASIC INIT COMPLETE bit on resuming phase Huang Rui [not found] ` <1491817071-17014-3-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org> 2017-04-10 12:09 ` Grazvydas Ignotas [not found] ` <CANOLnOOcnUitqWAWjtTEa0U69pEj5mFMMJZSHrKz5S_TQEcoDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2017-04-11 3:41 ` Huang Rui 2017-04-10 14:55 ` Deucher, Alexander
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.