[PATCH libdrm] modetest: Allow full testing of primary planes

Ville Syrjala ville.syrjala at linux.intel.com
Mon Oct 16 17:10:56 UTC 2017


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

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 at linux.intel.com>
---
 tests/modetest/modetest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
index b8891ff5e2e8..eca8cde68123 100644
--- a/tests/modetest/modetest.c
+++ b/tests/modetest/modetest.c
@@ -1005,7 +1005,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;
 		}
-- 
2.13.6



More information about the dri-devel mailing list