Skip to content

Rotation support#5

Open
WhyNotHugo wants to merge 3 commits into
akemnade:kobo/drm-merged-7.0from
WhyNotHugo:kobo-clara-hd
Open

Rotation support#5
WhyNotHugo wants to merge 3 commits into
akemnade:kobo/drm-merged-7.0from
WhyNotHugo:kobo-clara-hd

Conversation

@WhyNotHugo
Copy link
Copy Markdown

@WhyNotHugo WhyNotHugo commented May 22, 2026

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.

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>
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.

1 participant