Skip to contentSkip to conversation

modetest: Allow full testing of primary planes

PATCH In review Ville Syrjala 1 participant 2 messages Oct 16, 2017 – Oct 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 modetest: Allow full testing of primary planes

From: Ville Syrjälä <[email protected]>

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.

---
 tests/modetest/modetest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/modetest/modetest.c +2 -1
index b8891ff5e2e8..eca8cde68123 100644
@@ -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;
 		}
Signature · 6 lines
2.13.6

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#1 lore raw
Quoted 7 lines · Ville Syrjala

From: Ville Syrjälä <[email protected]>

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.

No one objected, so I went ahead and pushed this.

Quoted 20 lines
---
 tests/modetest/modetest.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tests/modetest/modetest.c +2 -1
index b8891ff5e2e8..eca8cde68123 100644
@@ -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;
 		}
Signature · 1 line
2.13.6
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel