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

John Hunter zhjwpku at gmail.com
Thu Jul 16 05:20:36 PDT 2015


From: Zhao Junwang <zhjwpku at 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 at linux.intel.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Signed-off-by: Zhao Junwang <zhjwpku at gmail.com>
---
 drivers/gpu/drm/bochs/bochs_kms.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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);
 
-- 
1.7.10.4




More information about the dri-devel mailing list