Skip to content

Conversation

@jsarha
Copy link
Contributor

@jsarha jsarha commented Oct 4, 2022

The add config option to automatically enable probes logging when probes extraction dma is started.

Signed-off-by: Jyri Sarha jyri.sarha@intel.com

Copy link
Member

@abonislawski abonislawski Oct 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This cant be default y, we can have this feature as optional if you want but in normal flow we need to add probe point to enable logging and kernel must follow this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I removed the "default y". Can you explain why we can not have it? Does Windows driver start to probe extract DMA automatically, or something?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because we will try to add probe point to start logging and it will result in error because the same probe point was already added by auto_enable feature.

Please make sure kernel is not assuming it will auto start and send proper request to start logging.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At the moment kernel is not assuming anything. Its totally agnostic about the probe points and just sends the magic numbers fed to the debugfs file in an to the firmware. At the moment its up to the user to come up with the correct magic numbers to enable the probes it wants, and the number are different in IPC3 and IPC4 modes, that is why I wanted hide the complexity from the user in the simple logging phase.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not our default logging mode so the user should know what he is doing :) But anyway you can hide the complexity from the user but there is no need to change kernel-FW flow, for example you can send probe point magic number request based on simple user trigger/debugfs config or something

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway, there is still three things the user must do for the logs to be coming through probes interface.

  1. Turn on probes logging back end in fw build
  2. Turn on probes auto logging in fw build
  3. Start probes DMA

If someone just likes to user probes for something else and even if we would have the logging back end and the auto logging on by default, it would hardly matter that he gets the logs through probes too. And in any case its easy enough leave the probes logging options out.

But then again I am new here and may not understand everything. Just make a concrete proposal and I change this. So were you suggesting a special debugfs file to turn logs on. @lgirdwood , @ujfalusi , @ranj063 does this sound acceptable? Should I add that to linux driver and drop this PR?

The add config option to automatically enable probes logging when
probes extraction dma is started.

Signed-off-by: Jyri Sarha <jyri.sarha@intel.com>
@jsarha jsarha force-pushed the probe-log-autoenable branch from d894341 to d27b2f9 Compare October 5, 2022 09:32
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jsarha better to do this in the driver. i.e. if user opens the log sysfs without a config.

@jsarha
Copy link
Contributor Author

jsarha commented Oct 5, 2022

@jsarha better to do this in the driver. i.e. if user opens the log sysfs without a config.

@lgirdwood the firmware does not accept any config before the probe dma is started so there is never any configuration when the dma is started (there is no log sysfs). I can of course implement the same functionality in the driver, but it is more complex that way and the driver is exposed the contents for the probe add messages. But yes, its perfectly doable, should I do it that way? From the user point of view the behavior will be the same in either case.

@lgirdwood
Copy link
Member

he firmware does not accept any config before the probe dma is started

Why not, would seem reasonable ?

@kv2019i kv2019i marked this pull request as draft December 16, 2022 11:55
@kv2019i
Copy link
Collaborator

kv2019i commented Dec 16, 2022

No activity in a long time, converting as draft.

@gkbldcig
Copy link
Collaborator

Can one of the admins verify this patch?

@jsarha
Copy link
Contributor Author

jsarha commented Jul 22, 2025

There is a more complete version of this PR here: #10096

@jsarha jsarha closed this Jul 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants