Message ID | 20240924081754.209728-18-jacek.lawrynowicz@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | accel/ivpu: Fixes for 6.12-rc1 | expand |
On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote: > From: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> > > Add new test_mode BIT(9) that forces firmware to > enable turbo burst mode. > > Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> > Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> > Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> > --- > drivers/accel/ivpu/ivpu_drv.h | 1 + > drivers/accel/ivpu/ivpu_job.c | 5 +++++ > 2 files changed, 6 insertions(+) > > diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h > index 9acef14deab57..151ab9f2ddc9b 100644 > --- a/drivers/accel/ivpu/ivpu_drv.h > +++ b/drivers/accel/ivpu/ivpu_drv.h > @@ -197,6 +197,7 @@ extern bool ivpu_force_snoop; > #define IVPU_TEST_MODE_PREEMPTION_DISABLE BIT(6) > #define IVPU_TEST_MODE_HWS_EXTRA_EVENTS BIT(7) > #define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8) > +#define IVPU_TEST_MODE_TURBO BIT(9) > 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_job.c b/drivers/accel/ivpu/ivpu_job.c > index 8798fb2046abc..dc5cf7ded9439 100644 > --- a/drivers/accel/ivpu/ivpu_job.c > +++ b/drivers/accel/ivpu/ivpu_job.c > @@ -202,6 +202,11 @@ ivpu_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq, u16 eng > jobq_header->engine_idx = engine; > jobq_header->head = 0; > jobq_header->tail = 0; > + if (ivpu_test_mode & IVPU_TEST_MODE_TURBO) { > + ivpu_dbg(vdev, JOB, "Turbo mode enabled"); > + jobq_header->flags = VPU_JOB_QUEUE_FLAGS_TURBO_MODE; I don't see VPU_JOB_QUEUE_FLAGS_TURBO_MODE defined. What am I missing? > + } > + > wmb(); /* Flush WC buffer for jobq->header */ > > if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW) {
On 9/27/2024 11:25 PM, Jeffrey Hugo wrote: > On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote: >> From: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >> >> Add new test_mode BIT(9) that forces firmware to >> enable turbo burst mode. >> >> Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >> --- >> drivers/accel/ivpu/ivpu_drv.h | 1 + >> drivers/accel/ivpu/ivpu_job.c | 5 +++++ >> 2 files changed, 6 insertions(+) >> >> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h >> index 9acef14deab57..151ab9f2ddc9b 100644 >> --- a/drivers/accel/ivpu/ivpu_drv.h >> +++ b/drivers/accel/ivpu/ivpu_drv.h >> @@ -197,6 +197,7 @@ extern bool ivpu_force_snoop; >> #define IVPU_TEST_MODE_PREEMPTION_DISABLE BIT(6) >> #define IVPU_TEST_MODE_HWS_EXTRA_EVENTS BIT(7) >> #define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8) >> +#define IVPU_TEST_MODE_TURBO BIT(9) >> 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_job.c b/drivers/accel/ivpu/ivpu_job.c >> index 8798fb2046abc..dc5cf7ded9439 100644 >> --- a/drivers/accel/ivpu/ivpu_job.c >> +++ b/drivers/accel/ivpu/ivpu_job.c >> @@ -202,6 +202,11 @@ ivpu_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq, u16 eng >> jobq_header->engine_idx = engine; >> jobq_header->head = 0; >> jobq_header->tail = 0; >> + if (ivpu_test_mode & IVPU_TEST_MODE_TURBO) { >> + ivpu_dbg(vdev, JOB, "Turbo mode enabled"); >> + jobq_header->flags = VPU_JOB_QUEUE_FLAGS_TURBO_MODE; > > I don't see VPU_JOB_QUEUE_FLAGS_TURBO_MODE defined. What am I missing? > VPU_JOB_QUEUE_FLAGS_TURBO_MODE is defined in FW headers. It was added to the FW years ago and now we've started using it in the Linux driver. >> + } >> + >> wmb(); /* Flush WC buffer for jobq->header */ >> if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW) { >
On 9/30/2024 1:01 PM, Jacek Lawrynowicz wrote: > On 9/27/2024 11:25 PM, Jeffrey Hugo wrote: >> On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote: >>> From: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >>> >>> Add new test_mode BIT(9) that forces firmware to >>> enable turbo burst mode. >>> >>> Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >>> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >>> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >>> --- >>> drivers/accel/ivpu/ivpu_drv.h | 1 + >>> drivers/accel/ivpu/ivpu_job.c | 5 +++++ >>> 2 files changed, 6 insertions(+) >>> >>> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h >>> index 9acef14deab57..151ab9f2ddc9b 100644 >>> --- a/drivers/accel/ivpu/ivpu_drv.h >>> +++ b/drivers/accel/ivpu/ivpu_drv.h >>> @@ -197,6 +197,7 @@ extern bool ivpu_force_snoop; >>> #define IVPU_TEST_MODE_PREEMPTION_DISABLE BIT(6) >>> #define IVPU_TEST_MODE_HWS_EXTRA_EVENTS BIT(7) >>> #define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8) >>> +#define IVPU_TEST_MODE_TURBO BIT(9) >>> 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_job.c b/drivers/accel/ivpu/ivpu_job.c >>> index 8798fb2046abc..dc5cf7ded9439 100644 >>> --- a/drivers/accel/ivpu/ivpu_job.c >>> +++ b/drivers/accel/ivpu/ivpu_job.c >>> @@ -202,6 +202,11 @@ ivpu_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq, u16 eng >>> jobq_header->engine_idx = engine; >>> jobq_header->head = 0; >>> jobq_header->tail = 0; >>> + if (ivpu_test_mode & IVPU_TEST_MODE_TURBO) { >>> + ivpu_dbg(vdev, JOB, "Turbo mode enabled"); >>> + jobq_header->flags = VPU_JOB_QUEUE_FLAGS_TURBO_MODE; >> >> I don't see VPU_JOB_QUEUE_FLAGS_TURBO_MODE defined. What am I missing? >> > > VPU_JOB_QUEUE_FLAGS_TURBO_MODE is defined in FW headers. > It was added to the FW years ago and now we've started using it in the Linux driver. Sorry, I meant months, not years :)
On 9/30/2024 5:01 AM, Jacek Lawrynowicz wrote: > On 9/27/2024 11:25 PM, Jeffrey Hugo wrote: >> On 9/24/2024 2:17 AM, Jacek Lawrynowicz wrote: >>> From: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >>> >>> Add new test_mode BIT(9) that forces firmware to >>> enable turbo burst mode. >>> >>> Signed-off-by: Andrzej Kacprowski <Andrzej.Kacprowski@intel.com> >>> Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >>> Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com> >>> --- >>> drivers/accel/ivpu/ivpu_drv.h | 1 + >>> drivers/accel/ivpu/ivpu_job.c | 5 +++++ >>> 2 files changed, 6 insertions(+) >>> >>> diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h >>> index 9acef14deab57..151ab9f2ddc9b 100644 >>> --- a/drivers/accel/ivpu/ivpu_drv.h >>> +++ b/drivers/accel/ivpu/ivpu_drv.h >>> @@ -197,6 +197,7 @@ extern bool ivpu_force_snoop; >>> #define IVPU_TEST_MODE_PREEMPTION_DISABLE BIT(6) >>> #define IVPU_TEST_MODE_HWS_EXTRA_EVENTS BIT(7) >>> #define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8) >>> +#define IVPU_TEST_MODE_TURBO BIT(9) >>> 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_job.c b/drivers/accel/ivpu/ivpu_job.c >>> index 8798fb2046abc..dc5cf7ded9439 100644 >>> --- a/drivers/accel/ivpu/ivpu_job.c >>> +++ b/drivers/accel/ivpu/ivpu_job.c >>> @@ -202,6 +202,11 @@ ivpu_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq, u16 eng >>> jobq_header->engine_idx = engine; >>> jobq_header->head = 0; >>> jobq_header->tail = 0; >>> + if (ivpu_test_mode & IVPU_TEST_MODE_TURBO) { >>> + ivpu_dbg(vdev, JOB, "Turbo mode enabled"); >>> + jobq_header->flags = VPU_JOB_QUEUE_FLAGS_TURBO_MODE; >> >> I don't see VPU_JOB_QUEUE_FLAGS_TURBO_MODE defined. What am I missing? >> > > VPU_JOB_QUEUE_FLAGS_TURBO_MODE is defined in FW headers. > It was added to the FW years ago and now we've started using it in the Linux driver. Err, I missed that this is defined back in patch 1 of the series. I'm good now. Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
diff --git a/drivers/accel/ivpu/ivpu_drv.h b/drivers/accel/ivpu/ivpu_drv.h index 9acef14deab57..151ab9f2ddc9b 100644 --- a/drivers/accel/ivpu/ivpu_drv.h +++ b/drivers/accel/ivpu/ivpu_drv.h @@ -197,6 +197,7 @@ extern bool ivpu_force_snoop; #define IVPU_TEST_MODE_PREEMPTION_DISABLE BIT(6) #define IVPU_TEST_MODE_HWS_EXTRA_EVENTS BIT(7) #define IVPU_TEST_MODE_DISABLE_TIMEOUTS BIT(8) +#define IVPU_TEST_MODE_TURBO BIT(9) 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_job.c b/drivers/accel/ivpu/ivpu_job.c index 8798fb2046abc..dc5cf7ded9439 100644 --- a/drivers/accel/ivpu/ivpu_job.c +++ b/drivers/accel/ivpu/ivpu_job.c @@ -202,6 +202,11 @@ ivpu_cmdq_init(struct ivpu_file_priv *file_priv, struct ivpu_cmdq *cmdq, u16 eng jobq_header->engine_idx = engine; jobq_header->head = 0; jobq_header->tail = 0; + if (ivpu_test_mode & IVPU_TEST_MODE_TURBO) { + ivpu_dbg(vdev, JOB, "Turbo mode enabled"); + jobq_header->flags = VPU_JOB_QUEUE_FLAGS_TURBO_MODE; + } + wmb(); /* Flush WC buffer for jobq->header */ if (vdev->fw->sched_mode == VPU_SCHEDULING_MODE_HW) {