-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NHLT: Declare device configuration types #881
Conversation
7f2b21d
to
75635cb
Compare
Changes in v2:
|
Device configuration structures are plenty so declare a struct for each known variant. While these kind of duplicate few types present in actbl2.h already, change is motivated by usage improvements - simplicity and shorten wording. Intention is to have them replacing the existing members in the future. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Referenced in ACPI: NHLT: Device configuration access interface series present on linux-acpi@vger.kernel.org mailing list. |
Looks good to me! Thanks! |
Device configuration structures are plenty so declare a struct for each known variant. As neither of them shall be accessed without verifying the memory block first, introduce macros to make it easy to do so. Link: acpica/acpica#881 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Device configuration structures are plenty so declare a struct for each known variant. As neither of them shall be accessed without verifying the memory block first, introduce macros to make it easy to do so. Link: acpica/acpica#881 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Device configuration structures are plenty so declare a struct for each known variant. As neither of them shall be accessed without verifying the memory block first, introduce macros to make it easy to do so. Link: acpica/acpica#881 Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Hmm... First of all, I have been stumbed over the duplication, then read the commit message and understood the motivation. BUT
Is my knowledge incorrect / outdated? What did I miss? (Personally I think this patch shouldn't be merged, at least in the current form, and sorry for the late reply.) |
I didn't mean to cover all of them. As the PR description and the commit message states, it's all about device-specific-configuration types which are, unfortunately, a mess on NHLT side.
So, this was my main motivation for the change - we were reaching character-limit way to quickly and, the naming pattern utilized throughout the years by the audio teams (who are the main users of the spec) is different. There's no magic here. When the NHLT addition was first added to the ACPICA on my request [1], neither me or any other audio team member were looped in for the review. So, we ended up with code that none uses. Decided to change that and start modelling the functionality in more user-friendly fashion.
If the changes break ACPICA standard, I have no problem with reverting the patch. However, I'd suggest that the users (audio teams) are not ignored and together we come up with something friendly for both parties. |
I believe this change brings more confusion and problems that it tries to solve and has to be reverted (it even has no reviews done according to the side bar of this very page). I tried to explained that in my reply in the mailing list. Since the discussion is about ACPICA change (and not about part that is Linux kernel specific) I will copy'n'paste my answer and let's continue here. (But to the ACPICA maintainers I really don't want to see a next release with this be in. OTOH not sure if my opinion will be respected.) On Wed, Aug 9, 2023 at 11:48 AM Cezary Rojewski
As you may notice I'm not against code that is done as a part of the
What situation? To me it makes it worse. (Again, I'm talking solely
Let's do it there, as it's purely about ACPICA. |
Either I had some kind of outlook malfunction or I have received this message twice, once as a reply to the 1/4 patch on the kernel mailing list and the other copy navigating here. Replying with exact same message I did send over the mailing list.
In general, many types are bogus or redundant. I'd argue that having types defined as _a, _b, _c, _d make the life harder :)
Then we have constants such as:
_PDM/_SSP what? There is no NHLT of type PDM or of type SSP. These specify link types but it's not mentioned in constants names. I believe that by now you see where am going. The patch focuses on device-specific-config area as it's the area that requires most help.
Situation = on top of above, NHLT-code is currently within sound/. Let the handlers be part of drivers/acpi as is the case for all ACPI tables. The handlers themselves do not (and shall not) belong to ACPICA if I'm not mistaken.
Ok. |
I disagree on this. I think we need an author of that specification to be present in the discussion.
It may be _a is generic for some cases and mic is vendor specific (See CSRT data types, for example).
(Hmm... There is no I believe here is the misinterpretation of how it should look like.
Something similar to the format data structures with all those constants be used. It's all over the ACPICA (I mean the design), and your change breaks this AFAICS.
Renaming constants may be fine, but I'm not talking about them.
Yes, but then why touching ACPICA parts which are already there?
Yes, and I'm fully in support of this. My objection is how ACPICA change is done here.
|
Office of the author is right in front of mine. I can ask Marcin to comment on the ACPICA NHLT implementation but I'm pretty sure he will NACK it, just like I would. No one of the audio team was CCed when the structs were added. Again, we ended up with functionality that's either hard to use or unusable.
What am I missing?
should work just fine? It pictures how things are in the field nicely. |
Hi @andy-shev and @crojewsk-intel , Here are my thoughts regarding this discussion: While I have merged this PR already, I can always revert it if there are changes needed (and warranted) and if some things are not "up to the mark" depending on all the data/insights available and what it points to. Since this discussion here is only going back and forth and seeing this is an Intel internal issue, I would like to propose having you both and even the creator/designer of the NHLT table in the next OS/Firmware meeting (hosted by @rafaeljw ) to have an intellectual and positive debate not only on the ACPICA related patch but also any applicable/related kernel patches. The next scheduled meeting is on August 22nd Tuesday (since Tuesday the 15th is a holiday in Poland) at 10 AM PST (the exact time right now + a few more minutes). I would really appreciate if you both show up to the meeting since a few minutes of discussion there could save hours of future debate here or on the kernel mailing list. Please check your email in a few minutes from now for the invitation. We will have all the key decision makers in that meeting (@rafaeljw , @acpibob , Intel Fellow Mark Doran, Ankit Sinha, etc.) from Intel to discuss their thoughts about this and we can hopefully proceed ahead with a consensus on what can be done or changed. Personally, I would like to help the audio team in their efforts to make their lives easier, but like Andy pointed out things need to be followed according to a certain standard to effectively have your patches merged upstream (kernel, ACPICA etc.) and hopefully we can soon find some common ground on this discussion here. Kindly let me know if this is something we could agree to do to come to a solution. Thanks a lot!
|
Sure, but I mentioned the author of the initial implementation of the NHLT in the ACPICA. Is that the same person who wants to NAK it now? I am confused. |
Can you send an invitation? |
Misunderstanding on my part, sorry. I thought you meant author/designer of the NHLT spec. Marcin did not contribute to the implementation found in ACPICA. |
Apologies for the delayed response, but I am back in the office now. Please check your inbox right now for the meeting invite which starts in about 15 minutes, thanks! |
Device configuration structures are plenty so declare a struct for each known variant. While these kind of duplicate few types present in actbl2.h already, change is motivated by usage improvements - simplicity and shorten wording. Intention is to have them replacing the existing members in the future.