Skip to content

Commit

Permalink
drm/vc4: Drop LBM and UPM allocation failure messages to debug
Browse files Browse the repository at this point in the history
Seeing as it is userspace that creates the state and commit that
is validated, drop the log messages to debug to avoid userspace
being able to totally spam the kernel log.

Signed-off-by: Dave Stevenson <[email protected]>
  • Loading branch information
6by9 committed Sep 30, 2024
1 parent 50e3301 commit f6b2fe6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ static int vc4_plane_allocate_lbm(struct drm_plane_state *state)
VC4_NUM_LBM_HANDLES,
GFP_KERNEL);
if (lbm_handle < 0) {
drm_err(drm, "Out of lbm_handles\n");
drm_dbg_driver(drm, "Out of lbm_handles\n");
return lbm_handle;
}
vc4_state->lbm_handle = lbm_handle;
Expand All @@ -1004,7 +1004,8 @@ static int vc4_plane_allocate_lbm(struct drm_plane_state *state)
spin_unlock_irqrestore(&hvs->mm_lock, irqflags);

if (ret) {
drm_err(drm, "Failed to allocate LBM entry: %d\n", ret);
drm_dbg_driver(drm, "Failed to allocate LBM entry: %d\n",
ret);
refcount_set(&refcount->refcount, 0);
ida_free(&hvs->lbm_handles, lbm_handle);
vc4_state->lbm_handle = 0;
Expand Down Expand Up @@ -1076,7 +1077,7 @@ static int vc6_plane_allocate_upm(struct drm_plane_state *state)
VC4_NUM_UPM_HANDLES,
GFP_KERNEL);
if (upm_handle < 0) {
drm_err(drm, "Out of upm_handles\n");
drm_dbg_driver(drm, "Out of upm_handles\n");
return upm_handle;
}
vc4_state->upm_handle[i] = upm_handle;
Expand All @@ -1092,7 +1093,8 @@ static int vc6_plane_allocate_upm(struct drm_plane_state *state)
0, 0);
spin_unlock_irqrestore(&hvs->mm_lock, irqflags);
if (ret) {
drm_err(drm, "Failed to allocate UPM entry: %d\n", ret);
drm_dbg_driver(drm, "Failed to allocate UPM entry: %d\n",
ret);
refcount_set(&refcount->refcount, 0);
ida_free(&hvs->upm_handles, upm_handle);
vc4_state->upm_handle[i] = 0;
Expand Down

0 comments on commit f6b2fe6

Please sign in to comment.