-
Notifications
You must be signed in to change notification settings - Fork 6
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
Pispbe/port to mainline pisp be #30
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update the pisp_be_config.h and pisp_common.h headers from v11 mainline patch series at: https://lore.kernel.org/all/[email protected]/ Plus additional fixes on top sent at: https://lore.kernel.org/linux-media/[email protected]/ Signed-off-by: Jacopo Mondi <[email protected]>
The mainline header now uses uppercase identifiers for the image format macros. Adjust them in libpisp code. Signed-off-by: Jacopo Mondi <[email protected]>
Now that pisp_common.h doesn't include pips_types.h (which will be removed) the single files using C standard int types should include the header explicitly. Signed-off-by: Jacopo Mondi <[email protected]>
The 'abs()' symbol is undefined. Use the implementation from the C++ STL. Signed-off-by: Jacopo Mondi <[email protected]>
The pips_types.h header has been absorbed in pisp_common.h by the mainline driver version. Drop it from libpisp as well. Signed-off-by: Jacopo Mondi <[email protected]>
The mainline version of pisp_be_config.h and pisp_common.h define all types that are to be written directly to HW registers as packed, to avoid the compiler inserting holes to force any alignment of the types' members. However, this triggers a compiler error when the types members are error: taking address of packed member of ‘pisp_image_format_config’ may result in an unaligned pointer value [-Werror=address-of-packed-member] See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36566#c6 for a more detailed explanation about the compiler error is actually correct. Albeit libpisp is only going to be compiled on architectures that allow byte-alligned access (ARMv8) the compiler flags accesses by pointer to packed struct members as errors. Work this around by using a temporary variable to store the packed structure member value and pass it by pointer. As the functions the variables are passed to might modify the variable values, re-assign them after the function call to the packed structure members. Signed-off-by: Jacopo Mondi <[email protected]>
The mainline version of pisp_be_config.h header defines the 'num_tiles' member of 'struct pisp_be_tiles_config' as an unsigned 32-bit value. Use an unsigned integer as loop variable to avoid the following compilation error: error: comparison of integer expressions of different signedness Signed-off-by: Jacopo Mondi <[email protected]>
naushir
reviewed
Jul 4, 2024
getOutputSize(i, image_config.width, image_config.height); | ||
uint16_t width = image_config.width; | ||
uint16_t height = image_config.height; | ||
getOutputSize(i, width, height); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to copy width/height to image_config here.
However, I think the easiest thing would be to remove this patch and add -Wno-address-of-packed-member
to the compiler flags.
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Port libpisp to use the uAPI header introduced by raspberrypi/linux#6249
Most commits are trivial, but b128cb1 might be a bit annoying. I found no other smart ways of working this around.