* [PATCH] drm/i915/gt: Perf_limit_reasons are only available for Gen11+
@ 2022-09-28 19:02 ` Ashutosh Dixit
0 siblings, 0 replies; 5+ messages in thread
From: Ashutosh Dixit @ 2022-09-28 19:02 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Rodrigo Vivi
Register GT0_PERF_LIMIT_REASONS (0x1381a8) is available only for
Gen11+. Therefore ensure perf_limit_reasons sysfs files are created only
for Gen11+. Otherwise on Gen < 5 accessing these files results in the
following oops:
<1> [88.829420] BUG: unable to handle page fault for address: ffffc90000bb81a8
<1> [88.829438] #PF: supervisor read access in kernel mode
<1> [88.829447] #PF: error_code(0x0000) - not-present page
This patch is a backport of the drm-tip commit 0d2d201095e9 to
drm-intel-fixes. The backport is not identical to 0d2d201095e9, it only
includes the sysfs portions of 0d2d201095e9. The debugfs portion of
0d2d201095e9 is not available in drm-intel-fixes so has not been
backported.
Bspec: 20008
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6863
Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
index 73a8b46e0234..d09a0e845d09 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
@@ -545,8 +545,7 @@ static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_ratl, RATL_MASK);
static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_thermalert, VR_THERMALERT_MASK);
static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_tdc, VR_TDC_MASK);
-static const struct attribute *freq_attrs[] = {
- &dev_attr_punit_req_freq_mhz.attr,
+static const struct attribute *throttle_reason_attrs[] = {
&attr_throttle_reason_status.attr,
&attr_throttle_reason_pl1.attr,
&attr_throttle_reason_pl2.attr,
@@ -763,12 +762,20 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj)
if (!is_object_gt(kobj))
return;
- ret = sysfs_create_files(kobj, freq_attrs);
+ ret = sysfs_create_file(kobj, &dev_attr_punit_req_freq_mhz.attr);
if (ret)
drm_warn(>->i915->drm,
- "failed to create gt%u throttle sysfs files (%pe)",
+ "failed to create gt%u punit_req_freq_mhz sysfs (%pe)",
gt->info.id, ERR_PTR(ret));
+ if (GRAPHICS_VER(gt->i915) >= 11) {
+ ret = sysfs_create_files(kobj, throttle_reason_attrs);
+ if (ret)
+ drm_warn(>->i915->drm,
+ "failed to create gt%u throttle sysfs files (%pe)",
+ gt->info.id, ERR_PTR(ret));
+ }
+
if (HAS_MEDIA_RATIO_MODE(gt->i915) && intel_uc_uses_guc_slpc(>->uc)) {
ret = sysfs_create_files(kobj, media_perf_power_attrs);
if (ret)
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Intel-gfx] [PATCH] drm/i915/gt: Perf_limit_reasons are only available for Gen11+
@ 2022-09-28 19:02 ` Ashutosh Dixit
0 siblings, 0 replies; 5+ messages in thread
From: Ashutosh Dixit @ 2022-09-28 19:02 UTC (permalink / raw)
To: intel-gfx; +Cc: dri-devel, Rodrigo Vivi
Register GT0_PERF_LIMIT_REASONS (0x1381a8) is available only for
Gen11+. Therefore ensure perf_limit_reasons sysfs files are created only
for Gen11+. Otherwise on Gen < 5 accessing these files results in the
following oops:
<1> [88.829420] BUG: unable to handle page fault for address: ffffc90000bb81a8
<1> [88.829438] #PF: supervisor read access in kernel mode
<1> [88.829447] #PF: error_code(0x0000) - not-present page
This patch is a backport of the drm-tip commit 0d2d201095e9 to
drm-intel-fixes. The backport is not identical to 0d2d201095e9, it only
includes the sysfs portions of 0d2d201095e9. The debugfs portion of
0d2d201095e9 is not available in drm-intel-fixes so has not been
backported.
Bspec: 20008
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6863
Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
index 73a8b46e0234..d09a0e845d09 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
@@ -545,8 +545,7 @@ static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_ratl, RATL_MASK);
static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_thermalert, VR_THERMALERT_MASK);
static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_tdc, VR_TDC_MASK);
-static const struct attribute *freq_attrs[] = {
- &dev_attr_punit_req_freq_mhz.attr,
+static const struct attribute *throttle_reason_attrs[] = {
&attr_throttle_reason_status.attr,
&attr_throttle_reason_pl1.attr,
&attr_throttle_reason_pl2.attr,
@@ -763,12 +762,20 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj)
if (!is_object_gt(kobj))
return;
- ret = sysfs_create_files(kobj, freq_attrs);
+ ret = sysfs_create_file(kobj, &dev_attr_punit_req_freq_mhz.attr);
if (ret)
drm_warn(>->i915->drm,
- "failed to create gt%u throttle sysfs files (%pe)",
+ "failed to create gt%u punit_req_freq_mhz sysfs (%pe)",
gt->info.id, ERR_PTR(ret));
+ if (GRAPHICS_VER(gt->i915) >= 11) {
+ ret = sysfs_create_files(kobj, throttle_reason_attrs);
+ if (ret)
+ drm_warn(>->i915->drm,
+ "failed to create gt%u throttle sysfs files (%pe)",
+ gt->info.id, ERR_PTR(ret));
+ }
+
if (HAS_MEDIA_RATIO_MODE(gt->i915) && intel_uc_uses_guc_slpc(>->uc)) {
ret = sysfs_create_files(kobj, media_perf_power_attrs);
if (ret)
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Intel-gfx] [PATCH] drm/i915/gt: Perf_limit_reasons are only available for Gen11+
2022-09-28 19:02 ` [Intel-gfx] " Ashutosh Dixit
@ 2022-09-28 20:43 ` Rodrigo Vivi
-1 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2022-09-28 20:43 UTC (permalink / raw)
To: Ashutosh Dixit; +Cc: intel-gfx, dri-devel
On Wed, Sep 28, 2022 at 12:02:12PM -0700, Ashutosh Dixit wrote:
> Register GT0_PERF_LIMIT_REASONS (0x1381a8) is available only for
> Gen11+. Therefore ensure perf_limit_reasons sysfs files are created only
> for Gen11+. Otherwise on Gen < 5 accessing these files results in the
> following oops:
>
> <1> [88.829420] BUG: unable to handle page fault for address: ffffc90000bb81a8
> <1> [88.829438] #PF: supervisor read access in kernel mode
> <1> [88.829447] #PF: error_code(0x0000) - not-present page
>
> This patch is a backport of the drm-tip commit 0d2d201095e9 to
> drm-intel-fixes. The backport is not identical to 0d2d201095e9, it only
> includes the sysfs portions of 0d2d201095e9. The debugfs portion of
> 0d2d201095e9 is not available in drm-intel-fixes so has not been
> backported.
Thanks for the backport. While pushing it, I adjusted the commit message
to make checkpatch happier and to also ensure we included the previous
reviews and patchwork link to the backport.
>
> Bspec: 20008
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6863
> Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces")
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> index 73a8b46e0234..d09a0e845d09 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> @@ -545,8 +545,7 @@ static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_ratl, RATL_MASK);
> static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_thermalert, VR_THERMALERT_MASK);
> static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_tdc, VR_TDC_MASK);
>
> -static const struct attribute *freq_attrs[] = {
> - &dev_attr_punit_req_freq_mhz.attr,
> +static const struct attribute *throttle_reason_attrs[] = {
> &attr_throttle_reason_status.attr,
> &attr_throttle_reason_pl1.attr,
> &attr_throttle_reason_pl2.attr,
> @@ -763,12 +762,20 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj)
> if (!is_object_gt(kobj))
> return;
>
> - ret = sysfs_create_files(kobj, freq_attrs);
> + ret = sysfs_create_file(kobj, &dev_attr_punit_req_freq_mhz.attr);
> if (ret)
> drm_warn(>->i915->drm,
> - "failed to create gt%u throttle sysfs files (%pe)",
> + "failed to create gt%u punit_req_freq_mhz sysfs (%pe)",
> gt->info.id, ERR_PTR(ret));
>
> + if (GRAPHICS_VER(gt->i915) >= 11) {
> + ret = sysfs_create_files(kobj, throttle_reason_attrs);
> + if (ret)
> + drm_warn(>->i915->drm,
> + "failed to create gt%u throttle sysfs files (%pe)",
> + gt->info.id, ERR_PTR(ret));
> + }
> +
> if (HAS_MEDIA_RATIO_MODE(gt->i915) && intel_uc_uses_guc_slpc(>->uc)) {
> ret = sysfs_create_files(kobj, media_perf_power_attrs);
> if (ret)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915/gt: Perf_limit_reasons are only available for Gen11+
@ 2022-09-28 20:43 ` Rodrigo Vivi
0 siblings, 0 replies; 5+ messages in thread
From: Rodrigo Vivi @ 2022-09-28 20:43 UTC (permalink / raw)
To: Ashutosh Dixit; +Cc: intel-gfx, dri-devel
On Wed, Sep 28, 2022 at 12:02:12PM -0700, Ashutosh Dixit wrote:
> Register GT0_PERF_LIMIT_REASONS (0x1381a8) is available only for
> Gen11+. Therefore ensure perf_limit_reasons sysfs files are created only
> for Gen11+. Otherwise on Gen < 5 accessing these files results in the
> following oops:
>
> <1> [88.829420] BUG: unable to handle page fault for address: ffffc90000bb81a8
> <1> [88.829438] #PF: supervisor read access in kernel mode
> <1> [88.829447] #PF: error_code(0x0000) - not-present page
>
> This patch is a backport of the drm-tip commit 0d2d201095e9 to
> drm-intel-fixes. The backport is not identical to 0d2d201095e9, it only
> includes the sysfs portions of 0d2d201095e9. The debugfs portion of
> 0d2d201095e9 is not available in drm-intel-fixes so has not been
> backported.
Thanks for the backport. While pushing it, I adjusted the commit message
to make checkpatch happier and to also ensure we included the previous
reviews and patchwork link to the backport.
>
> Bspec: 20008
> Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/6863
> Fixes: fa68bff7cf27 ("drm/i915/gt: Add sysfs throttle frequency interfaces")
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
> drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 15 +++++++++++----
> 1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> index 73a8b46e0234..d09a0e845d09 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
> @@ -545,8 +545,7 @@ static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_ratl, RATL_MASK);
> static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_thermalert, VR_THERMALERT_MASK);
> static INTEL_GT_RPS_BOOL_ATTR_RO(throttle_reason_vr_tdc, VR_TDC_MASK);
>
> -static const struct attribute *freq_attrs[] = {
> - &dev_attr_punit_req_freq_mhz.attr,
> +static const struct attribute *throttle_reason_attrs[] = {
> &attr_throttle_reason_status.attr,
> &attr_throttle_reason_pl1.attr,
> &attr_throttle_reason_pl2.attr,
> @@ -763,12 +762,20 @@ void intel_gt_sysfs_pm_init(struct intel_gt *gt, struct kobject *kobj)
> if (!is_object_gt(kobj))
> return;
>
> - ret = sysfs_create_files(kobj, freq_attrs);
> + ret = sysfs_create_file(kobj, &dev_attr_punit_req_freq_mhz.attr);
> if (ret)
> drm_warn(>->i915->drm,
> - "failed to create gt%u throttle sysfs files (%pe)",
> + "failed to create gt%u punit_req_freq_mhz sysfs (%pe)",
> gt->info.id, ERR_PTR(ret));
>
> + if (GRAPHICS_VER(gt->i915) >= 11) {
> + ret = sysfs_create_files(kobj, throttle_reason_attrs);
> + if (ret)
> + drm_warn(>->i915->drm,
> + "failed to create gt%u throttle sysfs files (%pe)",
> + gt->info.id, ERR_PTR(ret));
> + }
> +
> if (HAS_MEDIA_RATIO_MODE(gt->i915) && intel_uc_uses_guc_slpc(>->uc)) {
> ret = sysfs_create_files(kobj, media_perf_power_attrs);
> if (ret)
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gt: Perf_limit_reasons are only available for Gen11+ (rev2)
2022-09-28 19:02 ` [Intel-gfx] " Ashutosh Dixit
(?)
(?)
@ 2022-09-29 0:20 ` Patchwork
-1 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2022-09-29 0:20 UTC (permalink / raw)
To: Dixit, Ashutosh; +Cc: intel-gfx
== Series Details ==
Series: drm/i915/gt: Perf_limit_reasons are only available for Gen11+ (rev2)
URL : https://patchwork.freedesktop.org/series/109196/
State : failure
== Summary ==
Error: patch https://patchwork.freedesktop.org/api/1.0/series/109196/revisions/2/mbox/ not applied
Applying: drm/i915/gt: Perf_limit_reasons are only available for Gen11+
Using index info to reconstruct a base tree...
M drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
Falling back to patching base and 3-way merge...
Auto-merging drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 drm/i915/gt: Perf_limit_reasons are only available for Gen11+
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-09-29 0:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-28 19:02 [PATCH] drm/i915/gt: Perf_limit_reasons are only available for Gen11+ Ashutosh Dixit
2022-09-28 19:02 ` [Intel-gfx] " Ashutosh Dixit
2022-09-28 20:43 ` Rodrigo Vivi
2022-09-28 20:43 ` Rodrigo Vivi
2022-09-29 0:20 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gt: Perf_limit_reasons are only available for Gen11+ (rev2) Patchwork
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.