igt_kms: Merge condition in igt_plane_set_fb

There were two paths for fb and !fb.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: chandra konduru <chandra.konduru@intel.com>
Cc: Thomas Wood <thomas.wood@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Tvrtko Ursulin 2015-05-12 11:06:36 +01:00 committed by Daniel Vetter
parent 759bb7ac98
commit c3bd608fc5

View File

@ -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;