Skip to content

Commit

Permalink
drm/atomic: Boost CPU when committing a new frame
Browse files Browse the repository at this point in the history
In order to reduce jank, request a CPU boost whenever a new
frame is ready to be rendered to the display. The boosts should be
sufficient enough to render 60 FPS without any dropped frames when there
is no significant external source of load.

Change-Id: I967a4f786c89e5ac1bb559167cfe8d345213a02a
Signed-off-by: Sultan Alsawaf <[email protected]>
Signed-off-by: Panchajanya1999 <[email protected]>
Signed-off-by: Hunter-commits <[email protected]>
  • Loading branch information
kerneltoast authored and zeelog committed Oct 24, 2022
1 parent 04ffec3 commit 546d354
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/drm_atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#include <drm/drm_mode.h>
#include <drm/drm_plane_helper.h>
#include <linux/sync_file.h>

#include <linux/cpu_input_boost.h>
#include <linux/devfreq_boost.h>
#include "drm_crtc_internal.h"

static void crtc_commit_free(struct kref *kref)
Expand Down Expand Up @@ -1904,6 +1905,12 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
(arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
return -EINVAL;

if (!(arg->flags & DRM_MODE_ATOMIC_TEST_ONLY)) {
devfreq_boost_kick(DEVFREQ_MSM_CPUBW);
cpu_input_boost_kick();

}

drm_modeset_acquire_init(&ctx, 0);

state = drm_atomic_state_alloc(dev);
Expand Down

0 comments on commit 546d354

Please sign in to comment.