Skip to content
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

drm/v3d: CPU job submissions shouldn't affect V3D GPU clock #6611

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

txenoo
Copy link
Contributor

@txenoo txenoo commented Jan 13, 2025

We can avoid calling the v3d_clock_up_put and v3d_clock_up_get when a job is submitted to a CPU queue. This way we avoid delaying timestamps CPU jobs by 4.5ms that is the time that it takes to increase the V3D frequency when the V3D subsystem changes its clock frequency.

Fixes: fe6a858 ("drm/v3d: Correct clock settng calls to new APIs")

@txenoo
Copy link
Contributor Author

txenoo commented Jan 13, 2025

@popcornmix @mairacanal can you review this, it is a downstream patch as the V3D clock frequency management as this is only enabled downstream. We started seeing this issue with 6.12.

It solves some issues we have to make timestamp queries work using GPU jobs in V3D, so we can land Mesa v3d: Add support for timestamp, time elapsed, and timestamp disjoint queries

@txenoo txenoo force-pushed the no-clock-changes-on-cpu-jobs branch from 3eee4cc to 38515ff Compare January 13, 2025 19:02
@mairacanal
Copy link
Contributor

LGTM, feel free to add my:

Reviewed-by: Maíra Canal <mcanal@igalia.com>

We can avoid calling the v3d_clock_up_put and v3d_clock_up_get
when a job is submitted to a CPU queue. We don't need to change
the V3D core frequency to run a CPU job as it is executed on
the CPU. This way we avoid delaying timestamps CPU jobs by 4.5ms
that is the time that it takes the firmware to increase the V3D
core frequency.

Fixes: fe6a858 ("drm/v3d: Correct clock settng calls to new APIs")
Signed-off-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Maíra Canal <mcanal@igalia.com>
@txenoo txenoo force-pushed the no-clock-changes-on-cpu-jobs branch from 38515ff to 7b8288b Compare January 14, 2025 09:53
@popcornmix
Copy link
Collaborator

A quick test looks fine. v3d clock still goes up and down, 3d renders and framerate from aquarium looks reasonable.

@pelwell pelwell merged commit 5955d87 into raspberrypi:rpi-6.12.y Jan 14, 2025
11 of 12 checks passed
@pelwell
Copy link
Contributor

pelwell commented Jan 14, 2025

Thanks!

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.

4 participants