modetest: Allow full testing of primary planes
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 11 Oct 2017 14:58:11 +0000 (17:58 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 19 Oct 2017 16:16:16 +0000 (19:16 +0300)
Allow the user to override the default configuration set by setcrtc
for the primary plane. On some hardware primary planes can be freely
positioned/sized, and it'd be nice if we can actually test that feature.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
tests/modetest/modetest.c

index 8ad4766..62d9332 100644 (file)
@@ -1091,7 +1091,8 @@ static int set_plane(struct device *dev, struct plane_arg *p)
                if (!format_support(ovr, p->fourcc))
                        continue;
 
-               if ((ovr->possible_crtcs & (1 << pipe)) && !ovr->crtc_id) {
+               if ((ovr->possible_crtcs & (1 << pipe)) &&
+                   (ovr->crtc_id == 0 || ovr->crtc_id == p->crtc_id)) {
                        plane_id = ovr->plane_id;
                        break;
                }