Rotation support#5
Open
WhyNotHugo wants to merge 3 commits into
Open
Conversation
Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
My main goal was to use the Pixel Pipe for rotation, but it soon became obvious that is was the same effort to use it for all rendering, so we can have hardware-based rendering entirely, rather than CPU rendering. Used an internal API between the PxP and the EPDC, so that both rendering and rotation are done in hardware. Using the V4L2 API should be feasible too, but I have no idea how to do so and it would likely be *a lot* more code. I trust this doesn't violate any conventions: I found least one other instance of a similar approach. It's unclear to me if we need the software fallback or not. The main question is: is there any device which has this EPDC but doesn't have the same PxP? Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
Signed-off-by: Hugo Osvaldo Barrera <hugo@whynothugo.nl>
This file contains hidden or 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
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.
The three commits implement rotation. I'd appreciate feedback on these:
39ca70a: implements software based rotation for the DRM driver. I think this is clean and likely suitable for inclusion.
65e11b8: I wanted to get hardware-based rotation, and at some point it became obvious that I could just as easily get away with hardware-based rendering entirely. This works, but I used an internal API to talk to the PxP. There's precedent of this design in the kernel, but I'm not sure that's enough to consider this good, and I'm not sure if there are devices with an mxc-epdc but without an imx-pxp. If there's another "correct" way to do this, I'd be happy to try.
975639c: I still haven't tested this one fully, but it tweaks the FB->DRM delegation to also delegate rotation. Otherwise, when a client rotates via the FB API, this rotation is swallowed and the image remains in its original position. I think this one is too much of a hack. I'm not sure how to do it cleanly or if the idea itself is acceptable for upstream.
This PR is opened as a request for feedback. Feel free to pick any code that seems okay, but it's not open with any expectation of it being ready to merge.