[3/8] drm/bochs: stop looking at legacy state
diff mbox

Message ID 1437049241-11972-4-git-send-email-zhjwpku@gmail.com
State New
Headers show

Commit Message

John Hunter July 16, 2015, 12:20 p.m. UTC
From: Zhao Junwang <zhjwpku@gmail.com>

with transitional helpers we've used the new callbacks, but control
flow was still old, but with atomic first step is to call atomic_check,
then prepare_fb, and so on, by this time, we can not look at any legacy
state like plane->fb or crtc->enabled, because they are updated at the
very end.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
 drivers/gpu/drm/bochs/bochs_kms.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff mbox

diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c
index a14bac4..e5fa125 100644
--- a/drivers/gpu/drm/bochs/bochs_kms.c
+++ b/drivers/gpu/drm/bochs/bochs_kms.c
@@ -123,10 +123,10 @@  static int bochs_plane_prepare_fb(struct drm_plane *plane,
 	struct bochs_bo *bo;
 	int ret;
-	if (WARN_ON(plane->fb == NULL))
+	if (WARN_ON(fb == NULL))
 		return -EINVAL;
-	bochs_fb = to_bochs_framebuffer(plane->fb);
+	bochs_fb = to_bochs_framebuffer(fb);
 	bo = gem_to_bochs_bo(bochs_fb->obj);
 	ttm_bo_reserve(&bo->bo, true, false, false, NULL);