Skip to content

Commit bd672b7

Browse files
Claudio SuarezThomas Zimmermann
authored andcommitted
drm: fix error found in some cases after the patch d1af5cd
The patch d1af5cd ("drm: get rid of DRM_DEBUG_* log calls in drm core, files drm_a*.c") fails when the drm_device cannot be found in the parameter plane_state->crtc. Fix it using plane_state->plane. Reported-by: kernel test robot <[email protected]> Fixes: 6e22dc3 ("drm: get rid of DRM_DEBUG_* log calls in drm core, files drm_a*.c") Signed-off-by: Claudio Suarez <[email protected]> [danvet: fix Fixes: line] Signed-off-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 521d459) Signed-off-by: Thomas Zimmermann <[email protected]>
1 parent 69e6300 commit bd672b7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/gpu/drm/drm_atomic_helper.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
828828
}
829829

830830
if (!crtc_state->enable && !can_update_disabled) {
831-
drm_dbg_kms(plane_state->crtc->dev,
832-
"Cannot update plane of a disabled CRTC.\n");
831+
drm_dbg_kms(plane_state->plane->dev,
832+
"Cannot update plane of a disabled CRTC.\n");
833833
return -EINVAL;
834834
}
835835

@@ -839,8 +839,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
839839
hscale = drm_rect_calc_hscale(src, dst, min_scale, max_scale);
840840
vscale = drm_rect_calc_vscale(src, dst, min_scale, max_scale);
841841
if (hscale < 0 || vscale < 0) {
842-
drm_dbg_kms(plane_state->crtc->dev,
843-
"Invalid scaling of plane\n");
842+
drm_dbg_kms(plane_state->plane->dev,
843+
"Invalid scaling of plane\n");
844844
drm_rect_debug_print("src: ", &plane_state->src, true);
845845
drm_rect_debug_print("dst: ", &plane_state->dst, false);
846846
return -ERANGE;
@@ -864,8 +864,8 @@ int drm_atomic_helper_check_plane_state(struct drm_plane_state *plane_state,
864864
return 0;
865865

866866
if (!can_position && !drm_rect_equals(dst, &clip)) {
867-
drm_dbg_kms(plane_state->crtc->dev,
868-
"Plane must cover entire CRTC\n");
867+
drm_dbg_kms(plane_state->plane->dev,
868+
"Plane must cover entire CRTC\n");
869869
drm_rect_debug_print("dst: ", dst, false);
870870
drm_rect_debug_print("clip: ", &clip, false);
871871
return -EINVAL;

0 commit comments

Comments
 (0)