[PATCH] drm/v3d: Fix compile with CONFIG_WERROR

2024-06-03 Thread Ashutosh Dixit
: ‘v3d_v42_performance_counters’ defined but not used \ [-Werror=unused-const-variable=] Fixes: 3cbcbe016c31 ("drm/v3d: Add Performance Counters descriptions for V3D 4.2 and 7.1") Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/v3d/v3d_drv.h | 4 +++- 1 file changed, 3 insertions(+),

[PATCH] drm/i915/hwmon: Get rid of devm

2024-04-17 Thread Ashutosh Dixit
previous logic for ddat_gt->hwmon_dev error return (Andi) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 Reviewed-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 46 +-- 1 file changed, 32 insertions(+), 14 deleti

[PATCH v4] drm/i915/hwmon: Get rid of devm

2024-04-16 Thread Ashutosh Dixit
://gitlab.freedesktop.org/drm/intel/-/issues/10366 Reviewed-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 52 +-- 1 file changed, 36 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm

[PATCH v3] drm/i915/hwmon: Get rid of devm

2024-04-15 Thread Ashutosh Dixit
rid of devm_ and release/free everything explicitly during device unbind. v2: Change commit message and other minor code changes v3: Cleanup from i915_hwmon_register on error (Armin Wolf) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 Signed-off-by: Ashutosh Dixit --- drivers/gpu

[PATCH] drm/i915/hwmon: Get rid of devm

2024-04-15 Thread Ashutosh Dixit
rid of devm_ and release/free everything explicitly during device unbind. v2: Change commit message and other minor code changes v3: Cleanup from i915_hwmon_register on error (Armin Wolf) Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 Signed-off-by: Ashutosh Dixit --- drivers/gpu

[PATCH v2] drm/i915/hwmon: Get rid of devm

2024-04-15 Thread Ashutosh Dixit
rid of devm_ and release/free everything explicitly during device unbind. v2: Change commit message and other minor code changes Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10366 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 41

[PATCH] drm/i915/perf: Remove gtt_offset from stream->oa_buffer.head/.tail

2023-09-19 Thread Ashutosh Dixit
_buffer.tail without adding gtt_offset to them and just allow for the gtt_offset when reading/writing from/to HW registers. v2: Minor tweak to commit message due to dropping patch in previous series Signed-off-by: Ashutosh Dixit Reviewed-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/i915

[PATCH] dim: Disallow remote branch deletions with 'dim push'

2023-06-01 Thread Ashutosh Dixit
An inadvertent 'dim push -d' can delete remote branches. Disallow such remote branch deletions. Signed-off-by: Ashutosh Dixit --- dim | 6 ++ 1 file changed, 6 insertions(+) diff --git a/dim b/dim index 126568e..e5899e6 100755 --- a/dim +++ b/dim @@ -1029,6 +1029,12 @@ function

[PATCH 2/2] drm/i915/pmu: Make PMU sample array two-dimensional

2023-05-24 Thread Ashutosh Dixit
-by: Tvrtko Ursulin Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 16 +++- drivers/gpu/drm/i915/i915_pmu.h | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index 09313cf9316b4

[PATCH 1/2] drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked

2023-05-24 Thread Ashutosh Dixit
) v3: Remove gpu_active argument of pmu_needs_timer (Andrzej) Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_pmu.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915

[PATCH v2 0/2] drm/i915/pmu: couple of cleanups

2023-05-24 Thread Ashutosh Dixit
Cc: Andrzej Hajda Cc: Tvrtko Ursulin Signed-off-by: Ashutosh Dixit Ashutosh Dixit (2): drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked drm/i915/pmu: Make PMU sample array two-dimensional drivers/gpu/drm/i915/i915_pmu.c | 32

[PATCH] drm/i915/perf: Clear out entire reports after reading if not power of 2 size

2023-05-23 Thread Ashutosh Dixit
size is not a power of 2, we need to zero out the entire report to be able to detect unlanded reports reliably. v2: Add Fixes tag (Umesh) Fixes: 1cc064dce4ed ("drm/i915/perf: Add support for OA media units") Reviewed-by: Umesh Nerlige Ramappa Reviewed-by: Lionel Landwerlin Signed-off-by

[PATCH 1/2] drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked

2023-05-23 Thread Ashutosh Dixit
) Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_pmu.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c b/drivers/gpu/drm/i915/i915_pmu.c index a814583e19fd7..b47d890d4ada1 100644 --- a/drivers

[PATCH 2/2] drm/i915/pmu: Make PMU sample array two-dimensional

2023-05-23 Thread Ashutosh Dixit
No functional changes but we can remove some unsightly index computation and read/write functions if we convert the PMU sample array from a one-dimensional to a two-dimensional array. Suggested-by: Tvrtko Ursulin Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 60

[PATCH 0/2] drm/i915/pmu: couple of cleanups

2023-05-23 Thread Ashutosh Dixit
Ashutosh Dixit (2): drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked drm/i915/pmu: Make PMU sample array two-dimensional drivers/gpu/drm/i915/i915_pmu.c | 72 +++-- drivers/gpu/drm/i915/i915_pmu.h | 2 +- 2 files changed, 24 insertions

[PATCH] drm/i915/perf: Clear out entire reports after reading if not power of 2 size

2023-05-22 Thread Ashutosh Dixit
size is not a power of 2, we need to zero out the entire report to be able to detect unlanded reports reliably. Cc: Umesh Nerlige Ramappa Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_perf.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git

[PATCH v2] drm/i915/hwmon: Silence UBSAN uninitialized bool variable warning

2023-05-12 Thread Ashutosh Dixit
remaining uninitialized. Silence the warning by initializing the variable to an arbitrary value. v2: Move variable initialization to the declaration (Andi) Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 2 +- 1 file

[PATCH] drm/i915/pmu: Turn off the timer to sample frequencies when GT is parked

2023-05-11 Thread Ashutosh Dixit
; The above code prevents frequencies to be sampled while the GT is parked. So we might as well turn off the sampling timer itself in this case and save CPU cycles/power. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 11 +++ 1 file changed, 7 insertions(+), 4

[PATCH] drm/i915/hwmon: Silence UBSAN uninitialized bool variable warning

2023-05-10 Thread Ashutosh Dixit
remaining uninitialized. Silence the warning by initializing the variable to an arbitrary value. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915

[PATCH v6 0/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-20 Thread Ashutosh Dixit
v6: Update Patch 3 to remove the timeout when blocked v1-v5: Please see individual patches for revision history Ashutosh Dixit (3): drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write drm/i915/guc: Disable PL1 power limit when loading GuC firmware drm/i915/hwmon: Block

[PATCH 2/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-20 Thread Ashutosh Dixit
reported by kernel build robot by creating new err_rps label Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 13 +++-- drivers/gpu/drm/i915/i915_hwmon.c | 40

[PATCH 3/3] drm/i915/hwmon: Block waiting for GuC reset to complete

2023-04-20 Thread Ashutosh Dixit
Instead of erroring out when GuC reset is in progress, block waiting for GuC reset to complete which is a more reasonable uapi behavior. v2: Avoid race between wake_up_all and waiting for wakeup (Rodrigo) v3: Remove timeout when blocked (Tvrtko) Signed-off-by: Ashutosh Dixit Reviewed

[PATCH 1/3] drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write

2023-04-20 Thread Ashutosh Dixit
In preparation for follow-on patches, refactor hwm_power_max_write to take hwmon_lock and runtime pm wakeref at start of the function and release them at the end, therefore acquiring these just once each. Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915

[PATCH 3/3] drm/i915/hwmon: Block waiting for GuC reset to complete

2023-04-10 Thread Ashutosh Dixit
Instead of erroring out when GuC reset is in progress, block waiting for GuC reset to complete which is a more reasonable uapi behavior. v2: Avoid race between wake_up_all and waiting for wakeup (Rodrigo) Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 38

[PATCH 1/3] drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write

2023-04-10 Thread Ashutosh Dixit
In preparation for follow-on patches, refactor hwm_power_max_write to take hwmon_lock and runtime pm wakeref at start of the function and release them at the end, therefore acquiring these just once each. Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915

[PATCH 0/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-10 Thread Ashutosh Dixit
Updates to Patch 2/3 and Patch 3/3 in this version. Ashutosh Dixit (3): drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write drm/i915/guc: Disable PL1 power limit when loading GuC firmware drm/i915/hwmon: Block waiting for GuC reset to complete drivers/gpu/drm/i915/gt/uc

[PATCH 2/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-10 Thread Ashutosh Dixit
reported by kernel build robot by creating new err_rps label Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 13 +++-- drivers/gpu/drm/i915/i915_hwmon.c | 40

[PATCH 2/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Ashutosh Dixit
/8062 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 ++ drivers/gpu/drm/i915/i915_hwmon.c | 40 +++ drivers/gpu/drm/i915/i915_hwmon.h | 7 + 3 files changed, 56 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c

[PATCH 1/3] drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write

2023-04-05 Thread Ashutosh Dixit
In preparation for follow-on patches, refactor hwm_power_max_write to take hwmon_lock and runtime pm wakeref at start of the function and release them at the end, therefore acquiring these just once each. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 28

[PATCH 3/3] drm/i915/hwmon: Block waiting for GuC reset to complete

2023-04-05 Thread Ashutosh Dixit
Instead of erroring out when GuC reset is in progress, block waiting for GuC reset to complete which is a more reasonable uapi behavior. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v4 0/3] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-04-05 Thread Ashutosh Dixit
Split the v3 patch into 3 patches for easier review, can squash later if needed. Cc: Rodrigo Vivi Cc: Tvrtko Ursulin Ashutosh Dixit (3): drm/i915/hwmon: Get mutex and rpm ref just once in hwm_power_max_write drm/i915/guc: Disable PL1 power limit when loading GuC firmware drm/i915/hwmon

[PATCH v3] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit

2023-03-31 Thread Ashutosh Dixit
://gitlab.freedesktop.org/drm/intel/-/issues/8060 Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- .../ABI/testing/sysfs-driver-intel-i915-hwmon | 4 ++- drivers/gpu/drm/i915/i915_hwmon.c | 26 +++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git

[PATCH v2] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit

2023-03-30 Thread Ashutosh Dixit
of enabling it, avoiding the freq drop issue. v2: Add explanation for bugs mentioned below (Rodrigo) Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8060 Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- .../ABI

[PATCH] drm/i915/hwmon: Use 0 to designate disabled PL1 power limit

2023-03-28 Thread Ashutosh Dixit
/drm/intel/-/issues/8062 Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8060 Signed-off-by: Ashutosh Dixit --- .../ABI/testing/sysfs-driver-intel-i915-hwmon | 3 ++- drivers/gpu/drm/i915/i915_hwmon.c | 24 +++ 2 files changed, 26 insertions(+), 1 deletion

[PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-03-19 Thread Ashutosh Dixit
PL1 power limit"). Revert it again. Cc: # v6.2+ Cc: Jani Nikula Cc: Rodrigo Vivi Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Fixes: ee892ea83d99 ("drm/i915/hwmon: Enable PL1 power limit") Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5

[PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-03-18 Thread Ashutosh Dixit
PL1 power limit"). Revert it again. Cc: Jani Nikula Cc: Rodrigo Vivi Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Fixes: ee892ea83d99 ("drm/i915/hwmon: Enable PL1 power limit") Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5 - 1 file

[PATCH] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-03-15 Thread Ashutosh Dixit
explanatory comments - Function renames - Type corrections - Locking annotation Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 +++ drivers/gpu/drm/i915/i915_hwmon.c | 39

[PATCH] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-15 Thread Ashutosh Dixit
and intel_rps_read_punit_req Fixes: 22009b6dad66 ("drm/i915/mtl: Modify CAGF functions for MTL") Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8280 Signed-off-by: Ashutosh Dixit Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_rps.c | 38 - drivers/gp

[PATCH v2] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-03-13 Thread Ashutosh Dixit
/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 10 ++- drivers/gpu/drm/i915/i915_hwmon.c | 39 +++ drivers/gpu/drm/i915/i915_hwmon.h | 7 + 3 files changed, 55 insertions(+), 1 deletion(-) diff --git

[PATCH] drm/i915/guc: Disable PL1 power limit when loading GuC firmware

2023-03-10 Thread Ashutosh Dixit
limit was enabled and set to a low value). Therefore disable the PL1 power limit when possible when loading GuC firmware. Link: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 9 ++- drivers/gpu/drm/i915

[PATCH 2/2] drm/i915/pmu: Remove fallback to requested freq for SLPC

2023-03-09 Thread Ashutosh Dixit
freq will be 0 when gt is in RC6 which is correct. Also this is rare since PMU freq sampling happens only when gt is unparked. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c

[PATCH 1/2] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-09 Thread Ashutosh Dixit
ses: https://gitlab.freedesktop.org/drm/intel/-/issues/8280 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_rps.c | 34 - drivers/gpu/drm/i915/gt/intel_rps.h | 2 +- drivers/gpu/drm/i915/i915_pmu.c | 10 - 3 files changed, 24 insertions(+), 22 deletion

[PATCH 0/2] drm/i915/pmu: Use common freq functions with sysfs

2023-03-09 Thread Ashutosh Dixit
for older generations (prior to Gen6). It also future proofs the PMU where sometimes code has been updated for sysfs and PMU has been missed. Ashutosh Dixit (2): drm/i915/pmu: Use functions common with sysfs to read actual freq drm/i915/pmu: Remove fallback to requested freq for SLPC drivers/gpu/drm

[PATCH 1/2] drm/i915/pmu: Use functions common with sysfs to read actual freq

2023-03-08 Thread Ashutosh Dixit
for older generations (prior to Gen6). It also future proofs the PMU where sometimes code has been updated for sysfs and PMU has been missed. Fixes: 22009b6dad66 ("drm/i915/mtl: Modify CAGF functions for MTL") Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8280 Signed-off-by: Ashu

[PATCH 0/2] drm/i915/pmu: Use common freq functions with sysfs

2023-03-08 Thread Ashutosh Dixit
for older generations (prior to Gen6). It also future proofs the PMU where sometimes code has been updated for sysfs and PMU has been missed. Ashutosh Dixit (2): drm/i915/pmu: Use functions common with sysfs to read actual freq drm/i915/pmu: Remove fallback to requested freq for SLPC drivers/gpu/drm

[PATCH 2/2] drm/i915/pmu: Remove fallback to requested freq for SLPC

2023-03-08 Thread Ashutosh Dixit
freq will be 0 when gt is in RC6 which is correct. Also this is rare since PMU freq sampling happens only when gt is unparked. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_pmu.c

[PATCH 0/3] drm/i915/pmu: Use common freq functions with sysfs

2023-03-07 Thread Ashutosh Dixit
code future proof where sometimes code has been updated for sysfs and PMU has been missed. Ashutosh Dixit (3): drm/i915/rps: Expose read_actual_frequency_fw for PMU drm/i915/rps: Expose get_requested_frequency_fw for PMU drm/i915/pmu: Use common freq functions with sysfs drivers/gpu/drm/i915

[PATCH 2/3] drm/i915/rps: Expose get_requested_frequency_fw for PMU

2023-03-07 Thread Ashutosh Dixit
(rps) and slpc which was previously missed due to the non-use of common functions across sysfs and PMU. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_rps.c | 22 +++--- drivers/gpu/drm/i915/gt/intel_rps.h | 2 +- 2 files changed, 20 insertions(+), 4 deletions

[PATCH 3/3] drm/i915/pmu: Use common freq functions with sysfs

2023-03-07 Thread Ashutosh Dixit
code future proof where sometimes code has been updated for sysfs and PMU has been missed. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_rps.c | 10 -- drivers/gpu/drm/i915/gt/intel_rps.h | 1 - drivers/gpu/drm/i915/i915_pmu.c | 10 -- 3 files changed, 4

[PATCH 1/3] drm/i915/rps: Expose read_actual_frequency_fw for PMU

2023-03-07 Thread Ashutosh Dixit
as older generations (before Gen6) which were previously missed due to the non-use of common functions across sysfs and PMU. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_rps.c | 36 + drivers/gpu/drm/i915/gt/intel_rps.h | 1 + 2 files changed, 32

[PATCH 2/2] drm/i915/pmu: Use correct requested freq for SLPC

2023-03-03 Thread Ashutosh Dixit
SLPC does not use 'struct intel_rps'. Use UNSLICE_RATIO bits from GEN6_RPNSWREQ for SLPC. See intel_rps_get_requested_frequency. Bspec: 52745 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers

[PATCH 0/2] drm/i915/pmu: Freq sampling: Fix requested freq fallback

2023-03-03 Thread Ashutosh Dixit
A couple of minor fixes to the PMU requested freq fallback for PMU freq sampling. Ashutosh Dixit (2): drm/i915/pmu: Use only freq bits for falling back to requested freq drm/i915/pmu: Use correct requested freq for SLPC drivers/gpu/drm/i915/i915_pmu.c | 13 - 1 file changed, 8

[PATCH 1/2] drm/i915/pmu: Use only freq bits for falling back to requested freq

2023-03-03 Thread Ashutosh Dixit
On newer generations, the GEN12_RPSTAT1 register contains more than freq information, e.g. see GEN12_VOLTAGE_MASK. Therefore use only the freq bits to decide whether to fall back to requested freq. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_pmu.c | 6 ++ 1 file changed, 2

[PATCH] drm/i915/hwmon: Accept writes of value 0 to power1_max_interval

2023-02-27 Thread Ashutosh Dixit
puting ilog2(0) but this resulted in the corner-case bug below. Therefore allow writes of 0 now but special case that write to x = y = 0. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/7754 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 14 +- 1 file c

[PATCH 2/2] drm/i915/hwmon: Enable PL1 limit when writing limit value to HW

2023-02-16 Thread Ashutosh Dixit
-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_hwmon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 85195d61f89c7..7c20a6f47b92e 100644 --- a/drivers/gpu/drm/i915

[PATCH 1/2] drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write

2023-02-16 Thread Ashutosh Dixit
where the function needs to be extended. Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/i915_hwmon.c | 36 ++- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915

[PATCH 0/2] PL1 power limit fixes for ATSM

2023-02-16 Thread Ashutosh Dixit
by hwmon) so that the first two patches can get merged. The first two patches are sufficient to fix the main ATSM issue. Ashutosh Dixit (2): drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write drm/i915/hwmon: Enable PL1 limit when writing limit value to HW

[PATCH 1/3] drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write

2023-02-13 Thread Ashutosh Dixit
where the function needs to be extended. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 36 ++- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 1225bc432f0d5

[PATCH 2/3] drm/i915/hwmon: Enable PL1 limit when writing limit value to HW

2023-02-13 Thread Ashutosh Dixit
-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 85195d61f89c7..7c20a6f47b92e 100644 --- a/drivers/gpu/drm/i915/i915_hwmon.c +++ b/drivers/gpu/drm

[PATCH 3/3] drm/i915/hwmon: Expose power1_max_enable

2023-02-13 Thread Ashutosh Dixit
limit) values correctly. It can also be used to enable/disable the PL1 power limit. Signed-off-by: Ashutosh Dixit --- .../ABI/testing/sysfs-driver-intel-i915-hwmon | 7 +++ drivers/gpu/drm/i915/i915_hwmon.c | 48 +-- 2 files changed, 51 insertions(+), 4 deletions

[PATCH 0/3] PL1 power limit fixes for ATSM

2023-02-13 Thread Ashutosh Dixit
but patches can be squashed if needed. Ashutosh Dixit (3): drm/i915/hwmon: Replace hwm_field_scale_and_write with hwm_power_max_write drm/i915/hwmon: Enable PL1 limit when writing limit value to HW drm/i915/hwmon: Expose power1_max_enable .../ABI/testing/sysfs-driver-intel-i915-hwmon | 7

[PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-02-08 Thread Ashutosh Dixit
ed, revert 0349c41b0596. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/8062 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 468

[PATCH] drm/i915/hwmon: Enable PL1 power limit

2023-02-03 Thread Ashutosh Dixit
: 99f55efb79114 ("drm/i915/hwmon: Power PL1 limit and TDP setting") Signed-off-by: Ashutosh Dixit Reviewed-by: Gwan-gyeong Mun --- drivers/gpu/drm/i915/i915_hwmon.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwm

[PATCH] drm/i915/hwmon: Enable PL1 power limit

2023-02-02 Thread Ashutosh Dixit
Previous documentation suggested that PL1 power limit is always enabled. However we now find this not to be the case on some platforms (such as ATSM). Therefore enable PL1 power limit during hwmon initialization. Bspec: 51864 v2: Add Bspec reference (Gwan-gyeong) Signed-off-by: Ashutosh Dixit

[PATCH] drm/i915/hwmon: Enable PL1 power limit

2023-02-01 Thread Ashutosh Dixit
Previous documentation suggested that PL1 power limit is always enabled. However we now find this not to be the case on some platforms (such as ATSM). Therefore enable PL1 power limit during hwmon initialization. Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 5 + 1

[PATCH] drm/i915/hwmon: Display clamped PL1 limit

2022-12-15 Thread Ashutosh Dixit
esktop.org/drm/intel/-/issues/7704 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c| 39 drivers/gpu/drm/i915/intel_mchbar_regs.h | 2 ++ 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/

[PATCH] drm/i915/hwmon: Display clamped PL1 limit

2022-12-15 Thread Ashutosh Dixit
HW allows arbitrary PL1 limits to be set but silently clamps these values to "typical but not guaranteed" min/max values in pkg_power_sku register. Follow the same pattern for sysfs, allow arbitrary PL1 limits to be set but display clamped values when read. Signed-off-by: Ashu

[PATCH] drm/i915/hwmon: Don't use FIELD_PREP

2022-10-31 Thread Ashutosh Dixit
/7354 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c| 2 +- drivers/gpu/drm/i915/i915_reg_defs.h | 17 +++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c index 9e97814930254

[PATCH] drm/i915/hwmon: Don't use FIELD_PREP

2022-10-30 Thread Ashutosh Dixit
. The checks are not needed because the mask is formed using REG_GENMASK (so is actually a compile time constant). Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/7354 Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/i915_hwmon.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[PATCH 2/5] drm/i915: Use GEN12_RPSTAT register for GT freq

2022-10-24 Thread Ashutosh Dixit
Shyti Signed-off-by: Don Hiatt Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_rps.c | 32 + drivers/gpu/drm/i915/gt

[PATCH 3/5] drm/i915/mtl: Modify CAGF functions for MTL

2022-10-24 Thread Ashutosh Dixit
forcewake for Gen12+ and returning 0 freq in RC6 v4: Use REG_FIELD_GET and uncore (Rodrigo) Bspec: 66300 Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Ashutosh Dixit Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 drivers/gpu/drm/i915

[PATCH 4/5] drm/i915/gt: Use RC6 residency types as arguments to residency functions

2022-10-24 Thread Ashutosh Dixit
c6_types.h in intel_rc6.h (Jani) Suggested-by: Rodrigo Vivi Suggested-by: Jani Nikula Reported-by: Jani Nikula Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 ++-- drivers/gp

[PATCH 5/5] drm/i915/mtl: C6 residency and C state type for MTL SAMedia

2022-10-24 Thread Ashutosh Dixit
Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 59 ++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 ++ drivers/gpu/drm/i915/gt/intel_rc6.c | 17 -- 3 files changed, 76

[PATCH 1/5] drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf

2022-10-24 Thread Ashutosh Dixit
Instead of masks/shifts settle on REG_FIELD_GET as the standard way to extract reg fields. This allows future patches touching this code to also consistently use REG_FIELD_GET and friends. Suggested-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm

[PATCH 0/5] i915: CAGF and RC6 changes for MTL

2022-10-24 Thread Ashutosh Dixit
v9: Rebuild, identical to v8 v10: Address review comments from Rodrigo on Patch 5 v11: Change state name for MTL_CC0 to RC0 in Patch 5 Ashutosh Dixit (2): drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf drm/i915/gt: Use RC6 residency types as arguments to residency functions Bada

[PATCH 3/5] drm/i915/mtl: Modify CAGF functions for MTL

2022-10-24 Thread Ashutosh Dixit
forcewake for Gen12+ and returning 0 freq in RC6 v4: Use REG_FIELD_GET and uncore (Rodrigo) Bspec: 66300 Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar Reviewed-by: Ashutosh Dixit Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 drivers/gpu/drm/i915

[PATCH 2/5] drm/i915: Use GEN12_RPSTAT register for GT freq

2022-10-24 Thread Ashutosh Dixit
Shyti Signed-off-by: Don Hiatt Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_rps.c | 32 + drivers/gpu/drm/i915/gt

[PATCH 5/5] drm/i915/mtl: C6 residency and C state type for MTL SAMedia

2022-10-24 Thread Ashutosh Dixit
refactor (Jani N) v4: Move MTL branch to top in drpc_show v5: Use FORCEWAKE_MT identical to gen6_drpc (Ashutosh) v6: Add MISSING_CASE for gt_core_status switch statement (Rodrigo) Change state name for MTL_CC0 to C0 (from "on") (Rodrigo) Signed-off-by: Ashutosh Dixit Signed-off-by: Bad

[PATCH 4/5] drm/i915/gt: Use RC6 residency types as arguments to residency functions

2022-10-24 Thread Ashutosh Dixit
c6_types.h in intel_rc6.h (Jani) Suggested-by: Rodrigo Vivi Suggested-by: Jani Nikula Reported-by: Jani Nikula Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 ++-- drivers/gp

[PATCH 0/5] i915: CAGF and RC6 changes for MTL

2022-10-24 Thread Ashutosh Dixit
v9: Rebuild, identical to v8 v10: Address review comments from Rodrigo on Patch 5 Ashutosh Dixit (2): drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf drm/i915/gt: Use RC6 residency types as arguments to residency functions Badal Nilawar (2): drm/i915/mtl: Modify CAGF functions f

[PATCH 1/5] drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf

2022-10-24 Thread Ashutosh Dixit
Instead of masks/shifts settle on REG_FIELD_GET as the standard way to extract reg fields. This allows future patches touching this code to also consistently use REG_FIELD_GET and friends. Suggested-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit Reviewed-by: Rodrigo Vivi --- drivers/gpu/drm

[PATCH 1/5] drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf

2022-10-19 Thread Ashutosh Dixit
Instead of masks/shifts settle on REG_FIELD_GET as the standard way to extract reg fields. This allows future patches touching this code to also consistently use REG_FIELD_GET and friends. Suggested-by: Rodrigo Vivi Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt

[PATCH 5/5] drm/i915/mtl: C6 residency and C state type for MTL SAMedia

2022-10-19 Thread Ashutosh Dixit
refactor (Jani N) v4: Move MTL branch to top in drpc_show v5: Use FORCEWAKE_MT identical to gen6_drpc (Ashutosh) Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 58 ++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5

[PATCH 4/5] drm/i915/gt: Use RC6 residency types as arguments to residency functions

2022-10-19 Thread Ashutosh Dixit
c6_types.h in intel_rc6.h (Jani) Suggested-by: Rodrigo Vivi Suggested-by: Jani Nikula Reported-by: Jani Nikula Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 ++-- drivers/gpu/drm/i915/gt/i

[PATCH 2/5] drm/i915: Use GEN12_RPSTAT register for GT freq

2022-10-19 Thread Ashutosh Dixit
Shyti Signed-off-by: Don Hiatt Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 1 + drivers/gpu/drm/i915/gt/intel_rps.c | 32 + drivers/gpu/drm/i915/gt/intel_rps.h | 2 ++ drivers

[PATCH 3/5] drm/i915/mtl: Modify CAGF functions for MTL

2022-10-19 Thread Ashutosh Dixit
forcewake for Gen12+ and returning 0 freq in RC6 v4: Use REG_FIELD_GET and uncore (Rodrigo) Bspec: 66300 Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 drivers/gpu/drm/i915/gt/intel_rps.c | 12 ++-- 2 files

[PATCH 0/5] i915: CAGF and RC6 changes for MTL

2022-10-19 Thread Ashutosh Dixit
freq" to this series v7: Rebuild, identical to v6 v8: - Add "drm/i915/rps: Prefer REG_FIELD_GET in intel_rps_get_cagf" to the series (based on Rodrigo's review) to consistently use REG_FIELD_GET - Minor changes to other patches, please see individual patches for changelo

[PATCH 2/4] drm/i915/mtl: Modify CAGF functions for MTL

2022-10-18 Thread Ashutosh Dixit
forcewake for Gen12+ and returning 0 freq in RC6 Bspec: 66300 Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 4 drivers/gpu/drm/i915/gt/intel_rps.c | 12 ++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff

[PATCH 4/4] drm/i915/mtl: C6 residency and C state type for MTL SAMedia

2022-10-18 Thread Ashutosh Dixit
refactor (Jani N) v4: Move MTL branch to top in drpc_show Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 60 ++- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 ++ drivers/gpu/drm/i915/gt/intel_rc6.c | 17

[PATCH 0/4] i915: CAGF and RC6 changes for MTL

2022-10-18 Thread Ashutosh Dixit
t;drm/i915/gt: Change RC6 residency functions to accept register ID's" based on code review feedback v6: - Addressed Jani N's review comments on "drm/i915/gt: Change RC6 residency functions to accept register ID's" - Minor changes to other patches, please see individual patches f

[PATCH 1/4] drm/i915: Use GEN12_RPSTAT register for GT freq

2022-10-18 Thread Ashutosh Dixit
Nilawar Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_regs.h | 2 ++ drivers/gpu/drm/i915/gt/intel_rps.c | 32 + drivers/gpu/drm/i915/gt/intel_rps.h | 2 ++ drivers/gpu/drm/i915/i915_pmu.c | 3 +-- 4 files changed

[PATCH 3/4] drm/i915/gt: Use RC6 residency types as arguments to residency functions

2022-10-18 Thread Ashutosh Dixit
Suggested-by: Jani Nikula Reported-by: Jani Nikula Signed-off-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_rc6.c | 55 +++ drivers/gpu/drm/i915/gt

[PATCH 3/3] drm/i915/mtl: C6 residency and C state type for MTL SAMedia

2022-10-14 Thread Ashutosh Dixit
refactor (Jani N) Signed-off-by: Ashutosh Dixit Signed-off-by: Badal Nilawar --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 57 +++ drivers/gpu/drm/i915/gt/intel_gt_regs.h | 5 ++ drivers/gpu/drm/i915/gt/intel_rc6.c | 17 -- 3 files changed, 75 insertions(+), 4

[PATCH 2/3] drm/i915/mtl: Modify CAGF functions for MTL

2022-10-14 Thread Ashutosh Dixit
From: Badal Nilawar Update CAGF functions for MTL to get actual resolved frequency of 3D and SAMedia. v2: Update MTL_MIRROR_TARGET_WP1 position/formatting (MattR) Move MTL branches in cagf functions to top (MattR) Fix commit message (Andi) Bspec: 66300 Signed-off-by: Ashutosh Dixit

[PATCH 0/3] i915: CAGF and RC6 changes for MTL

2022-10-14 Thread Ashutosh Dixit
t;drm/i915/gt: Change RC6 residency functions to accept register ID's" based on code review feedback - Addressed review comments, please see individual patches for changelogs Ashutosh Dixit (1): drm/i915/gt: Change RC6 residency functions to accept register ID's Badal Nilawar (2): drm/i

[PATCH 1/3] drm/i915/gt: Change RC6 residency functions to accept register ID's

2022-10-14 Thread Ashutosh Dixit
-by: Ashutosh Dixit --- drivers/gpu/drm/i915/gt/intel_gt_pm_debugfs.c | 27 +++-- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 12 ++-- drivers/gpu/drm/i915/gt/intel_rc6.c | 56 +++ drivers/gpu/drm/i915/gt/intel_rc6.h | 9 ++- drivers/gpu/drm/i915/gt

[PATCH 0/7] drm/i915: Add HWMON support

2022-10-13 Thread Ashutosh Dixit
) v8: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashutosh) v9: Addressed review comments from Rodrigo and Andi Ashutosh Dixit (2): drm/i915/hwmon: Expose card reactive critical power drm/i915/hwmon: Expose power1_max_interval Dale B Stimson (4): drm

[PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-10-13 Thread Ashutosh Dixit
s/kzalloc/devm_kzalloc/ (Andi) v7: s/hwmon_device_register_with_info/ devm_hwmon_device_register_with_info/ (Ashutosh) Cc: Guenter Roeck Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashu

[PATCH 4/7] drm/i915/hwmon: Show device level energy usage

2022-10-13 Thread Ashutosh Dixit
in doc (Tvrtko) v5: Change contact to intel-gfx (Rodrigo) Change return type of hwm_energy to void (Andi) Signed-off-by: Dale B Stimson Signed-off-by: Ashutosh Dixit Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed

[PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support

2022-10-13 Thread Ashutosh Dixit
-intel-i915-hwmon to MAINTAINERS Cc: Guenter Roeck Cc: Anshuman Gupta Signed-off-by: Riana Tauro Signed-off-by: Badal Nilawar Signed-off-by: Ashutosh Dixit Acked-by: Guenter Roeck Reviewed-by: Ashutosh Dixit Reviewed-by: Anshuman Gupta --- .../ABI/testing/sysfs-driver-intel-i915-hwmon | 7

  1   2   >