From c3bd608fc51620145d29a3ded97370c27cb0ab0c Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Tue, 12 May 2015 11:06:36 +0100 Subject: [PATCH] igt_kms: Merge condition in igt_plane_set_fb There were two paths for fb and !fb. Signed-off-by: Tvrtko Ursulin Reviewed-by: chandra konduru Cc: Thomas Wood Signed-off-by: Daniel Vetter --- lib/igt_kms.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 33d437dc..b5ba2739 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1764,14 +1764,6 @@ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) plane->fb = fb; /* hack to keep tests working that don't call igt_plane_set_size() */ - if (fb) { - plane->crtc_w = fb->width; - plane->crtc_h = fb->height; - } else { - plane->crtc_w = 0; - plane->crtc_h = 0; - } - if (fb) { /* set default plane pos/size as fb size */ plane->crtc_x = 0; @@ -1784,6 +1776,9 @@ void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb) fb->src_y = 0; fb->src_w = fb->width; fb->src_h = fb->height; + } else { + plane->crtc_w = 0; + plane->crtc_h = 0; } plane->fb_changed = true;