All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhu, Rex" <Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
To: Andy Furniss <adf.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alex Deucher
	<alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: amd-gfx list <amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: RE: [PATCH 4/4] drm/amd/powerplay: add profiling mode in dpm level
Date: Mon, 9 Jan 2017 10:40:56 +0000	[thread overview]
Message-ID: <CY4PR12MB1687BA955CA0340AB65272F8FB640@CY4PR12MB1687.namprd12.prod.outlook.com> (raw)
In-Reply-To: <587365E8.7000904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2304 bytes --]

Thanks for quick response.

>>>The patch doesn't apply directly to drm-next-4.10-wip, here's what I tested -

Sorry, it is because code base has been changed in my local.

Please review the attached patch.

Best Regards
Rex


-----Original Message-----
From: Andy Furniss [mailto:adf.lists@gmail.com] 
Sent: Monday, January 09, 2017 6:29 PM
To: Zhu, Rex; Alex Deucher
Cc: amd-gfx list
Subject: Re: [PATCH 4/4] drm/amd/powerplay: add profiling mode in dpm level

Hi, that change does fix it for me.

The patch doesn't apply directly to drm-next-4.10-wip, here's what I tested -

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 0345fbb..ac2e5f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -162,7 +162,7 @@ static ssize_t
amdgpu_set_dpm_forced_performance_level(struct device *dev,
         }

         if (current_level == level)
-               return 0;
+               return count;

         if (level == AMD_DPM_FORCED_LEVEL_PROFILING)
                 amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_GFX,



Zhu, Rex wrote:
> Thanks Andy,
>
> The attached patch can fix this bug.
> Please review.
>
> Best Regards
> Rex
>
> -----Original Message-----
> From: Andy Furniss [mailto:adf.lists@gmail.com]
> Sent: Monday, January 09, 2017 4:18 AM
> To: Alex Deucher; Zhu, Rex
> Cc: amd-gfx list
> Subject: Re: [PATCH 4/4] drm/amd/powerplay: add profiling mode in dpm 
> level
>
> Alex Deucher wrote:
>> On Fri, Dec 23, 2016 at 3:45 AM, Rex Zhu <Rex.Zhu@amd.com> wrote:
>>> Change-Id: I4a46440882cd94fe5e77e3f351aaccc218a2ece5
>>
>> Patches 1-3:
>> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
>>
>> patch 4:
>> Please add a better patch description and explain what profiling mode 
>> is good for, etc.
>
> This on drm-next-4.10-wip regresses setting profile a bit on R9285.
>
> It works eg. if in auto then doing
>
> echo high > 
> /sys/class/drm/card0/device/power_dpm_force_performance_level
>
> is OK and echo auto  > ... is also OK.
>
> The issue if I am in auto and echo auto > .... then I don't get my prompt back.
>
> echo high from elsewhere will make it return - but it doesn't set high.
>


[-- Attachment #2: 0001-drm-amdgpu-fix-bug-return-invaild-value-to-sysfs.patch --]
[-- Type: application/octet-stream, Size: 901 bytes --]

From d020dae854fb0cf50a663ec8e932b85694f75f98 Mon Sep 17 00:00:00 2001
From: Rex Zhu <Rex.Zhu@amd.com>
Date: Mon, 9 Jan 2017 15:18:01 +0800
Subject: [PATCH 1/6] drm/amdgpu: fix bug return invaild value to sysfs.

Change-Id: Ib9e1f60ad816eaaedd247c224684686d764a72fc
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index 8438642..02aa7ce 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -162,7 +162,7 @@ static ssize_t amdgpu_set_dpm_forced_performance_level(struct device *dev,
 	}
 
 	if (current_level == level)
-		return 0;
+		return count;
 
 	if (level == AMD_DPM_FORCED_LEVEL_PROFILING)
 		amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_GFX,
-- 
1.9.1


[-- Attachment #3: Type: text/plain, Size: 154 bytes --]

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2017-01-09 10:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-23  8:45 [PATCH 1/4] drm/amd/powerplay: delete dpm code for Cz/St Rex Zhu
     [not found] ` <1482482752-31020-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2016-12-23  8:45   ` [PATCH 2/4] drm/amd/powerplay: Unify dpm level defines Rex Zhu
2016-12-23  8:45   ` [PATCH 3/4] drm/amd/powerplay: fix bug dpm level set by user was reset to auto Rex Zhu
2016-12-23  8:45   ` [PATCH 4/4] drm/amd/powerplay: add profiling mode in dpm level Rex Zhu
     [not found]     ` <1482482752-31020-4-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org>
2016-12-31  6:25       ` Alex Deucher
     [not found]         ` <CADnq5_P2GiXmoWnUiHipKQj-2VYT0sD72LoOScmmRua+_kQCXA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-01-08 20:18           ` Andy Furniss
     [not found]             ` <58729E90.3090506-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-09  7:46               ` Zhu, Rex
     [not found]                 ` <CY4PR12MB1687780C20D2155C8D92F994FB640-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-09 10:28                   ` Andy Furniss
     [not found]                     ` <587365E8.7000904-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2017-01-09 10:40                       ` Zhu, Rex [this message]
     [not found]                         ` <CY4PR12MB1687BA955CA0340AB65272F8FB640-rpdhrqHFk06Y0SjTqZDccQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-01-09 10:57                           ` Andy Furniss
2017-01-09 14:24                   ` Deucher, Alexander
2017-01-03 10:15       ` Huang Rui

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=CY4PR12MB1687BA955CA0340AB65272F8FB640@CY4PR12MB1687.namprd12.prod.outlook.com \
    --to=rex.zhu-5c7gfcevmho@public.gmane.org \
    --cc=adf.lists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@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.