All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wachowski, Karol" <karol.wachowski@linux.intel.com>
To: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>,
	dri-devel@lists.freedesktop.org
Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com,
	lizhi.hou@amd.com, dawid.osuchowski@linux.intel.com
Subject: Re: [PATCH] accel/ivpu: Replace profiling frequency debugfs with test mode bit
Date: Tue, 3 Nov 2026 11:57:30 +0100	[thread overview]
Message-ID: <d9d9e293-6ea7-490d-b0d2-cfba733484fb@linux.intel.com> (raw)
In-Reply-To: <20261103094215.1245113-1-andrzej.kacprowski@linux.intel.com>

On 03-Nov-26 10:42, Andrzej Kacprowski wrote:
> Remove the profiling frequency debugfs control.
> Add IVPU_TEST_MODE_PROF_FREQ_HIGH to select
> PLL_PROFILING_FREQ_HIGH during driver initialization.
> High frequency profiling is for debugging purposes
> and it can be set at initialization time - there is
> no need to control it via debugfs.
> 
> Signed-off-by: Andrzej Kacprowski <andrzej.kacprowski@linux.intel.com>
> ---

Reviewed-by: Karol Wachowski <karol.wachowski@linux.intel.com>

>   drivers/accel/ivpu/ivpu_debugfs.c | 29 -----------------------------
>   drivers/accel/ivpu/ivpu_drv.h     |  1 +
>   drivers/accel/ivpu/ivpu_hw.c      | 13 -------------
>   drivers/accel/ivpu/ivpu_hw.h      |  1 -
>   drivers/accel/ivpu/ivpu_hw_btrs.c |  7 ++++++-
>   5 files changed, 7 insertions(+), 44 deletions(-)
> 
> diff --git a/drivers/accel/ivpu/ivpu_debugfs.c b/drivers/accel/ivpu/ivpu_debugfs.c
> index dc20bc73c6ed..ae535fe49274 100644
> --- a/drivers/accel/ivpu/ivpu_debugfs.c
> +++ b/drivers/accel/ivpu/ivpu_debugfs.c
> @@ -226,33 +226,6 @@ static const struct file_operations fw_log_fops = {
>   	.release = single_release,
>   };
>   
> -static ssize_t
> -fw_profiling_freq_fops_write(struct file *file, const char __user *user_buf,
> -			     size_t size, loff_t *pos)
> -{
> -	struct ivpu_device *vdev = file->private_data;
> -	bool enable;
> -	int ret;
> -
> -	ret = kstrtobool_from_user(user_buf, size, &enable);
> -	if (ret < 0)
> -		return ret;
> -
> -	ivpu_hw_profiling_freq_drive(vdev, enable);
> -
> -	ret = pci_try_reset_function(to_pci_dev(vdev->drm.dev));
> -	if (ret)
> -		return ret;
> -
> -	return size;
> -}
> -
> -static const struct file_operations fw_profiling_freq_fops = {
> -	.owner = THIS_MODULE,
> -	.open = simple_open,
> -	.write = fw_profiling_freq_fops_write,
> -};
> -
>   static ssize_t
>   fw_trace_destination_mask_fops_write(struct file *file, const char __user *user_buf,
>   				     size_t size, loff_t *pos)
> @@ -513,8 +486,6 @@ void ivpu_debugfs_init(struct ivpu_device *vdev)
>   			    &ivpu_resume_engine_fops);
>   
>   	if (ivpu_hw_ip_gen(vdev) >= IVPU_HW_IP_40XX) {
> -		debugfs_create_file("fw_profiling_freq_drive", 0200,
> -				    debugfs_root, vdev, &fw_profiling_freq_fops);
>   		debugfs_create_file("dct", 0644, debugfs_root, vdev, &ivpu_dct_fops);
>   	}
>   
> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h
> index ea5b8dc612d1..b33a53101894 100644
> --- a/drivers/accel/ivpu/ivpu_drv.h
> +++ b/drivers/accel/ivpu/ivpu_drv.h
> @@ -238,6 +238,7 @@ extern bool ivpu_force_snoop;
>   #define IVPU_TEST_MODE_CLK_RELINQ_DISABLE BIT(11)
>   #define IVPU_TEST_MODE_CLK_RELINQ_ENABLE  BIT(12)
>   #define IVPU_TEST_MODE_D0I2_DISABLE       BIT(13)
> +#define IVPU_TEST_MODE_PROF_FREQ_HIGH     BIT(14)
>   extern int ivpu_test_mode;
>   
>   struct ivpu_file_priv *ivpu_file_priv_get(struct ivpu_file_priv *file_priv);
> diff --git a/drivers/accel/ivpu/ivpu_hw.c b/drivers/accel/ivpu/ivpu_hw.c
> index 86679d64fc14..2cc2915ab5c5 100644
> --- a/drivers/accel/ivpu/ivpu_hw.c
> +++ b/drivers/accel/ivpu/ivpu_hw.c
> @@ -359,19 +359,6 @@ int ivpu_hw_boot_fw(struct ivpu_device *vdev)
>   	return ret;
>   }
>   
> -void ivpu_hw_profiling_freq_drive(struct ivpu_device *vdev, bool enable)
> -{
> -	if (ivpu_hw_ip_gen(vdev) == IVPU_HW_IP_37XX) {
> -		vdev->hw->pll.profiling_freq = PLL_PROFILING_FREQ_DEFAULT;
> -		return;
> -	}
> -
> -	if (enable)
> -		vdev->hw->pll.profiling_freq = PLL_PROFILING_FREQ_HIGH;
> -	else
> -		vdev->hw->pll.profiling_freq = PLL_PROFILING_FREQ_DEFAULT;
> -}
> -
>   void ivpu_irq_handlers_init(struct ivpu_device *vdev)
>   {
>   	if (ivpu_hw_btrs_gen(vdev) == IVPU_HW_BTRS_MTL)
> diff --git a/drivers/accel/ivpu/ivpu_hw.h b/drivers/accel/ivpu/ivpu_hw.h
> index 8c1b61df6cd4..de3dcb8e6173 100644
> --- a/drivers/accel/ivpu/ivpu_hw.h
> +++ b/drivers/accel/ivpu/ivpu_hw.h
> @@ -61,7 +61,6 @@ int ivpu_hw_power_up(struct ivpu_device *vdev);
>   int ivpu_hw_power_down(struct ivpu_device *vdev);
>   int ivpu_hw_reset(struct ivpu_device *vdev);
>   int ivpu_hw_boot_fw(struct ivpu_device *vdev);
> -void ivpu_hw_profiling_freq_drive(struct ivpu_device *vdev, bool enable);
>   void ivpu_irq_handlers_init(struct ivpu_device *vdev);
>   void ivpu_hw_irq_enable(struct ivpu_device *vdev);
>   void ivpu_hw_irq_disable(struct ivpu_device *vdev);
> diff --git a/drivers/accel/ivpu/ivpu_hw_btrs.c b/drivers/accel/ivpu/ivpu_hw_btrs.c
> index 840983a618ca..602d09e511e5 100644
> --- a/drivers/accel/ivpu/ivpu_hw_btrs.c
> +++ b/drivers/accel/ivpu/ivpu_hw_btrs.c
> @@ -153,7 +153,12 @@ static int info_init_lnl(struct ivpu_device *vdev)
>   		return ret;
>   
>   	hw->tile_fuse = tile_fuse_config;
> -	hw->pll.profiling_freq = PLL_PROFILING_FREQ_DEFAULT;
> +
> +	if (ivpu_test_mode & IVPU_TEST_MODE_PROF_FREQ_HIGH)
> +		hw->pll.profiling_freq = PLL_PROFILING_FREQ_HIGH;
> +	else
> +		hw->pll.profiling_freq = PLL_PROFILING_FREQ_DEFAULT;
> +
>   	hw->btrs_irq_mask = BTRS_LNL_IRQ_MASK;
>   
>   	if (ivpu_test_mode & IVPU_TEST_MODE_FREQ_CHANGE_ENABLE)


  reply	other threads:[~2026-11-03 10:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-03  9:42 [PATCH] accel/ivpu: Replace profiling frequency debugfs with test mode bit Andrzej Kacprowski
2026-11-03 10:57 ` Wachowski, Karol [this message]
2026-11-03 16:55 ` Jeff Hugo
2026-11-05  8:50   ` Karol Wachowski

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=d9d9e293-6ea7-490d-b0d2-cfba733484fb@linux.intel.com \
    --to=karol.wachowski@linux.intel.com \
    --cc=andrzej.kacprowski@linux.intel.com \
    --cc=dawid.osuchowski@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jeff.hugo@oss.qualcomm.com \
    --cc=lizhi.hou@amd.com \
    --cc=oded.gabbay@gmail.com \
    /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.