Skip to contentSkip to conversation

Improve kms_panel_fitting.

PATCH Superseded [email protected] 4 participants 23 messages Apr 22, 2016 – May 2, 2016

v1 of 6 Superseded Latest is v6 →

lore
Share & tools
lore
#0 lore raw

cover Improve kms_panel_fitting.

From: Robert Foss <[email protected]>

This series removes some dead code from kms_panel_fitting and enables support for LVDS and DSI connectors.

Robert Foss (7):
kms_panel_fitting: Remove un-read variable.
kms_panel_fitting: Remove un-read variable pipe_crc.
kms_panel_fitting: Remove un-used variable.
kms_panel_fitting: Switched DRM format to a hardware agnostic
alternative.
kms_panel_fitting: Enabled test on non-Intel hardware.
kms_panel_fitting: Don't skip test after finding an incompatible
connector.
kms_panel_fitting: Add support for LVDS and DSI connectors.

 tests/kms_panel_fitting.c | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 1/7 kms_panel_fitting: Remove un-read variable.

From: Robert Foss <[email protected]>

Remove devid from data_t since it is never read.
Also remove one assignment to devid.

---
 tests/kms_panel_fitting.c | 2 --
 1 file changed, 2 deletions(-)
tests/kms_panel_fitting.c +0 -2
index 829d9cd..ab06d25 100644
@@ -29,7 +29,6 @@
 IGT_TEST_DESCRIPTION("Test display panel fitting");
 
 typedef struct {
-	uint32_t devid;
 	int drm_fd;
 	igt_display_t display;
 	igt_crc_t ref_crc;
@@ -224,7 +223,6 @@ igt_simple_main
 	data.drm_fd = drm_open_driver(DRIVER_INTEL);
 	igt_require_pipe_crc();
 	igt_display_init(&data.display, data.drm_fd);
-	data.devid = intel_get_drm_devid(data.drm_fd);
 
 	test_panel_fitting(&data);
 
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw

PATCH 2/7 kms_panel_fitting: Remove un-read variable pipe_crc.

In reply to [email protected]

From: Robert Foss <[email protected]>

pipe_crc in data_t is assigned an allocated memory space and then later free'd. But it is never used for any comparisons. It should therefore be safe to remove pipe_crc and the crc requirement.

---
 tests/kms_panel_fitting.c | 9 ---------
 1 file changed, 9 deletions(-)
tests/kms_panel_fitting.c +0 -9
index ab06d25..b64e829 100644
@@ -32,7 +32,6 @@ typedef struct {
 	int drm_fd;
 	igt_display_t display;
 	igt_crc_t ref_crc;
-	igt_pipe_crc_t *pipe_crc;
 
 	int image_w;
 	int image_h;
@@ -59,10 +58,6 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 
 	igt_output_set_pipe(output, pipe);
 
-	/* create the pipe_crc object for this pipe */
-	igt_pipe_crc_free(data->pipe_crc);
-	data->pipe_crc = igt_pipe_crc_new(pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
-
 	/* before allocating, free if any older fb */
 	if (data->fb_id1) {
 		igt_remove_fb(data->drm_fd, &data->fb1);
@@ -109,9 +104,6 @@ static void cleanup_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane)
 {
 	igt_display_t *display = &data->display;
 
-	igt_pipe_crc_free(data->pipe_crc);
-	data->pipe_crc = NULL;
-
 	if (data->fb_id1) {
 		igt_remove_fb(data->drm_fd, &data->fb1);
 		data->fb_id1 = 0;
@@ -221,7 +213,6 @@ igt_simple_main
 	igt_skip_on_simulation();
 
 	data.drm_fd = drm_open_driver(DRIVER_INTEL);
-	igt_require_pipe_crc();
 	igt_display_init(&data.display, data.drm_fd);
 
 	test_panel_fitting(&data);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#3 lore raw

PATCH 3/7 kms_panel_fitting: Remove un-used variable.

In reply to [email protected]

From: Robert Foss <[email protected]>

ref_crc is never assigned or read, and can be safely removed.

---
 tests/kms_panel_fitting.c | 1 -
 1 file changed, 1 deletion(-)
tests/kms_panel_fitting.c +0 -1
index b64e829..dface97 100644
@@ -31,7 +31,6 @@ IGT_TEST_DESCRIPTION("Test display panel fitting");
 typedef struct {
 	int drm_fd;
 	igt_display_t display;
-	igt_crc_t ref_crc;
 
 	int image_w;
 	int image_h;
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#4 lore raw

PATCH 4/7 kms_panel_fitting: Switched DRM format to a hardware agnostic alternative.

In reply to [email protected]

From: Robert Foss <[email protected]>

Changed the DRM format to LOCAL_DRM_FORMAT_MOD_NONE since it is hardware agnostic.

Also fixed formatting/tabs.

---
 tests/kms_panel_fitting.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
tests/kms_panel_fitting.c +5 -5
index dface97..ec7ce21 100644
@@ -65,10 +65,10 @@ static void prepare_crtc(data_t *data, igt_output_t *output, enum pipe pipe,
 
 	/* allocate fb for plane 1 */
 	data->fb_id1 = igt_create_pattern_fb(data->drm_fd,
-					     mode->hdisplay, mode->vdisplay,
-					     DRM_FORMAT_XRGB8888,
-					     LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
-					     &data->fb1);
+						mode->hdisplay, mode->vdisplay,
+						DRM_FORMAT_XRGB8888,
+						LOCAL_DRM_FORMAT_MOD_NONE,
+						&data->fb1);
 	igt_assert(data->fb_id1);
 
 	/*
@@ -158,7 +158,7 @@ static void test_panel_fitting(data_t *d)
 
 		d->fb_id2 = igt_create_image_fb(d->drm_fd, 0, 0,
 						DRM_FORMAT_XRGB8888,
-						LOCAL_I915_FORMAT_MOD_X_TILED, /* tiled */
+						LOCAL_DRM_FORMAT_MOD_NONE,
 						FILE_NAME, &d->fb2);
 		igt_assert(d->fb_id2);
 
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#5 lore raw

PATCH 5/7 kms_panel_fitting: Enabled test on non-Intel hardware.

In reply to [email protected]

From: Robert Foss <[email protected]>

Switched from DRIVER_INTEL to DRIVER_ANY to enable test on all hardware.

---
 tests/kms_panel_fitting.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/kms_panel_fitting.c +1 -1
index ec7ce21..2398a5e 100644
@@ -211,7 +211,7 @@ igt_simple_main
 
 	igt_skip_on_simulation();
 
-	data.drm_fd = drm_open_driver(DRIVER_INTEL);
+	data.drm_fd = drm_open_driver(DRIVER_ANY);
 	igt_display_init(&data.display, data.drm_fd);
 
 	test_panel_fitting(&data);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#6 lore raw

PATCH 6/7 kms_panel_fitting: Don't skip test after finding an incompatible connector.

In reply to [email protected]

From: Robert Foss <[email protected]>

If an incompatible connector is found, don't skip the test, but rather keep looking for valid connectors.

---
 tests/kms_panel_fitting.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/kms_panel_fitting.c +3 -2
index 2398a5e..60a22b0 100644
@@ -140,8 +140,9 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		igt_require(output->config.connector->connector_type ==
-			DRM_MODE_CONNECTOR_eDP);
+		if (output->config.connector->connector_type !=
+			DRM_MODE_CONNECTOR_eDP)
+			continue;
 
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw

Re: [PATCH i-g-t 6/7] kms_panel_fitting: Don't skip test after finding an incompatible connector.

Quoted 15 lines · On Fri, Apr 22, 2016 at 05:24:59PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

If an incompatible connector is found, don't skip the test, but rather keep looking for valid connectors.

---
 tests/kms_panel_fitting.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/kms_panel_fitting.c +0 -0
index 2398a5e..60a22b0 100644

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 145

Quoted 8 lines
tests/kms_panel_fitting.c +3 -2
@@ -140,8 +140,9 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		igt_require(output->config.connector->connector_type ==
-			DRM_MODE_CONNECTOR_eDP);
+		if (output->config.connector->connector_type !=
+			DRM_MODE_CONNECTOR_eDP)
+			continue;

Needs a counter to make sure we end up at least with one successful run. See e.g kms_cursor_crc.

for_each_config {

	if (unsuitable_conntector)
		continue;

	/* test code */

	valid_configs++;
}

igt_require(valid_configs);

I thought about extracting this into an igt block as a helper, but every tests has it's own idea of how to write for_each_config and when to skip. So hand-rolling everywhere unfortunately :(
-Daniel

Quoted 6 lines
tests/kms_panel_fitting.c +0 -0
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
Signature · 1 line
2.5.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#8 lore raw

Re: [PATCH i-g-t 6/7] kms_panel_fitting: Don't skip test after finding an incompatible connector.

Quoted 38 lines · Daniel Vetter
Quoted 15 lines · On Fri, Apr 22, 2016 at 05:24:59PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

If an incompatible connector is found, don't skip the test, but rather keep looking for valid connectors.

---
  tests/kms_panel_fitting.c | 5 +++--
  1 file changed, 3 insertions(+), 2 deletions(-)
tests/kms_panel_fitting.c +0 -0
index 2398a5e..60a22b0 100644

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 145

Quoted 8 lines
tests/kms_panel_fitting.c +3 -2
@@ -140,8 +140,9 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		igt_require(output->config.connector->connector_type ==
-			DRM_MODE_CONNECTOR_eDP);
+		if (output->config.connector->connector_type !=
+			DRM_MODE_CONNECTOR_eDP)
+			continue;

Needs a counter to make sure we end up at least with one successful run. See e.g kms_cursor_crc.

for_each_config {

	if (unsuitable_conntector)
		continue;

	/* test code */

	valid_configs++;
}
Quoted 8 lines

igt_require(valid_configs);

I thought about extracting this into an igt block as a helper, but every tests has it's own idea of how to write for_each_config and when to skip. So hand-rolling everywhere unfortunately :(
-Daniel

But isn't there already a check like that in trunk?

	int valid_tests = 0;
	for_each_connected_output {
		/* test code */
		valid_tests++;
	}
	igt_require_f(valid_tests, "no valid crtc/connector\n");
Quoted 7 lines
Quoted 6 lines
tests/kms_panel_fitting.c +0 -1
  		pipe = output->config.pipe;
  		igt_output_set_pipe(output, pipe);
--

2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reviewed-by
#9 lore raw

Re: [PATCH i-g-t 6/7] kms_panel_fitting: Don't skip test after finding an incompatible connector.

Quoted 49 lines · Robert Foss
Quoted 38 lines · Daniel Vetter
Quoted 15 lines · On Fri, Apr 22, 2016 at 05:24:59PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

If an incompatible connector is found, don't skip the test, but rather keep looking for valid connectors.

---
 tests/kms_panel_fitting.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/kms_panel_fitting.c +0 -0
index 2398a5e..60a22b0 100644

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 145

Quoted 8 lines
tests/kms_panel_fitting.c +3 -2
@@ -140,8 +140,9 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		igt_require(output->config.connector->connector_type ==
-			DRM_MODE_CONNECTOR_eDP);
+		if (output->config.connector->connector_type !=
+			DRM_MODE_CONNECTOR_eDP)
+			continue;

Needs a counter to make sure we end up at least with one successful run. See e.g kms_cursor_crc.

for_each_config {

	if (unsuitable_conntector)
		continue;

	/* test code */

	valid_configs++;
}
Quoted 8 lines

igt_require(valid_configs);

I thought about extracting this into an igt block as a helper, but every tests has it's own idea of how to write for_each_config and when to skip. So hand-rolling everywhere unfortunately :(
-Daniel

Quoted 8 lines

But isn't there already a check like that in trunk?

	int valid_tests = 0;
	for_each_connected_output {
		/* test code */
		valid_tests++;
	}
	igt_require_f(valid_tests, "no valid crtc/connector\n");

Oops, didn't read the existing code carefully enough.

Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
tests/kms_panel_fitting.c +0 -1
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
--

2.5.0

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#10 lore raw

PATCH 7/7 kms_panel_fitting: Add support for LVDS and DSI connectors.

In reply to [email protected]

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
 tests/kms_panel_fitting.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +9 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
+		    default:
+			    continue;
+		}
 
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#11 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Think you can squash the last two into one (you're removing what you've added in the previous one).

Also see https://lists.freedesktop.org/archives/intel-gfx/2016-March/090617.html.

Quoted 40 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
 tests/kms_panel_fitting.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +9 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
+		    default:
+			    continue;
+		}
 
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
Signature · 6 lines
2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#12 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

In reply to [email protected]
Quoted 20 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
 tests/kms_panel_fitting.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +0 -2
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
 	for_each_connected_output(display, output) {
 		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 10 lines
tests/kms_panel_fitting.c +9 -1
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

Quoted 6 lines
tests/kms_panel_fitting.c +0 -0
 		pipe = output->config.pipe;
 		igt_output_set_pipe(output, pipe);
Signature · 1 line
2.5.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#13 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
  tests/kms_panel_fitting.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

Quoted 7 lines
Quoted 6 lines
tests/kms_panel_fitting.c +0 -1
  		pipe = output->config.pipe;
  		igt_output_set_pipe(output, pipe);
--

2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#14 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 40 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
  tests/kms_panel_fitting.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

Quoted 6 lines

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

Quoted 11 lines
Quoted 7 lines
Quoted 6 lines
tests/kms_panel_fitting.c +0 -1
  		pipe = output->config.pipe;
  		igt_output_set_pipe(output, pipe);
--

2.5.0

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#15 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 43 lines · Ville Syrjälä
Quoted 42 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
   tests/kms_panel_fitting.c | 12 +++++++++---
   1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
   	for_each_connected_output(display, output) {
   		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

Quoted 8 lines
Quoted 4 lines

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 6 lines
tests/kms_panel_fitting.c +0 -1
   		pipe = output->config.pipe;
   		igt_output_set_pipe(output, pipe);
--

2.5.0

Quoted 5 lines
Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#16 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 49 lines · Robert Foss
Quoted 46 lines · Ville Syrjälä
Quoted 45 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
  tests/kms_panel_fitting.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#17 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 55 lines · Daniel Vetter
Quoted 54 lines · Robert Foss
Quoted 51 lines · Ville Syrjälä
Quoted 40 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
   tests/kms_panel_fitting.c | 12 +++++++++---
   1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
   	for_each_connected_output(display, output) {
   		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

Quoted 6 lines

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

Quoted 7 lines
Quoted 2 lines

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Other than a Description/Restrictions entry for "scaling mode", is there anything you'd like to see added?

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#18 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 61 lines · Robert Foss
Quoted 58 lines · Daniel Vetter
Quoted 56 lines · Robert Foss
Quoted 43 lines · Ville Syrjälä
Quoted 42 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
  tests/kms_panel_fitting.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

Quoted 8 lines
Quoted 4 lines

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Quoted 7 lines
Quoted 4 lines

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Other than a Description/Restrictions entry for "scaling mode", is there anything you'd like to see added?

I meant moving it into the generic section and list which drivers support it. No need to change the description itself - that's an entire project on itself.
-Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#19 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 67 lines · Daniel Vetter
Quoted 66 lines · Robert Foss
Quoted 62 lines · Daniel Vetter
Quoted 49 lines · Robert Foss
Quoted 46 lines · Ville Syrjälä
Quoted 45 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
   tests/kms_panel_fitting.c | 12 +++++++++---
   1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
   	for_each_connected_output(display, output) {
   		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Quoted 8 lines
Quoted 2 lines

Other than a Description/Restrictions entry for "scaling mode", is there anything you'd like to see added?

I meant moving it into the generic section and list which drivers support it. No need to change the description itself - that's an entire project on itself.
-Daniel

I'm not seeing any other properties that have driver support listed. Would adding a column called "Driver support" make sense?

Just to be clear, I'm moving the property to DRM->Generic->scaling mode.

Rob.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#20 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 73 lines · Robert Foss
Quoted 70 lines · Daniel Vetter
Quoted 68 lines · Robert Foss
Quoted 55 lines · Daniel Vetter
Quoted 54 lines · Robert Foss
Quoted 51 lines · Ville Syrjälä
Quoted 40 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
  tests/kms_panel_fitting.c | 12 +++++++++---
  1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
  	for_each_connected_output(display, output) {
  		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

Quoted 6 lines

No, this isn't an old patch, I misunderstood where our conversation ended.

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

Quoted 7 lines
Quoted 2 lines

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Other than a Description/Restrictions entry for "scaling mode", is there anything you'd like to see added?

Quoted 8 lines
Quoted 5 lines

I meant moving it into the generic section and list which drivers support it. No need to change the description itself - that's an entire project on itself.
-Daniel

I'm not seeing any other properties that have driver support listed. Would adding a column called "Driver support" make sense?

Not sure we want to go to all that trouble. The current table is pretty much a dead-end wrt documentation, and we're just stalling on getting better markup support for kerneldoc before we can fix it all up properly. -Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
#21 lore raw

Re: [PATCH i-g-t 7/7] kms_panel_fitting: Add support for LVDS and DSI connectors.

Quoted 80 lines · Daniel Vetter
Quoted 79 lines · Robert Foss
Quoted 75 lines · Daniel Vetter
Quoted 61 lines · Robert Foss
Quoted 58 lines · Daniel Vetter
Quoted 56 lines · Robert Foss
Quoted 43 lines · Ville Syrjälä
Quoted 42 lines · Robert Foss
Quoted 28 lines · Daniel Vetter
Quoted 27 lines · On Fri, Apr 22, 2016 at 05:25:00PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

Add support for DRM_MODE_CONNECTOR_LVDS and DRM_MODE_CONNECTOR_DSI connectors.

---
   tests/kms_panel_fitting.c | 12 +++++++++---
   1 file changed, 9 insertions(+), 3 deletions(-)
tests/kms_panel_fitting.c +6 -3
index 60a22b0..933776c 100644
@@ -140,9 +140,15 @@ static void test_panel_fitting(data_t *d)
   	for_each_connected_output(display, output) {
   		drmModeModeInfo *mode, native_mode;
 
-		if (output->config.connector->connector_type !=
-			DRM_MODE_CONNECTOR_eDP)
-			continue;
+		switch (output->config.connector->connector_type)
+		{
+		    case DRM_MODE_CONNECTOR_LVDS:
+		    case DRM_MODE_CONNECTOR_eDP:
+		    case DRM_MODE_CONNECTOR_DSI:
+			    break;
Quoted 9 lines

tests/kms_panel_fitting.c static void test_panel_fitting(data_t *d) · line 151

Quoted 3 lines
tests/kms_panel_fitting.c +3 -0
+		    default:
+			    continue;
+		}

I think ville commented that we should instead check for "scaling mode", and we discussed this on irc. Am I accidentally looking at an old patch series?
-Daniel

No, this isn't an old patch, I misunderstood where our conversation ended.

Quoted 8 lines
Quoted 4 lines

"scaling mode" is an intel specific extension as far as I understand it, which is somewhat the opposite of generalizing i-g-t tests.

Is there an architecture independent way forward?

A quick poke at cscope tells me "scaling mode" is used by amdgpu, gma500, i915, nouveau, and radeon. Seems fairly independent to me.

If that is the case, and it seems to be, "scaling mode" is definitely worth pursuing.

Quoted 7 lines
Quoted 4 lines

Perhaps also send in a kernel patch to update the docbook table? It's awful, but the best thing we have right now ...
-Daniel

Other than a Description/Restrictions entry for "scaling mode", is there anything you'd like to see added?

I meant moving it into the generic section and list which drivers support it. No need to change the description itself - that's an entire project on itself.
-Daniel

Quoted 8 lines
Quoted 2 lines

I'm not seeing any other properties that have driver support listed. Would adding a column called "Driver support" make sense?

Not sure we want to go to all that trouble. The current table is pretty much a dead-end wrt documentation, and we're just stalling on getting better markup support for kerneldoc before we can fix it all up properly. -Daniel

Documentation patch submitted to lkml.
This series should be cleared for merging now.
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

#22 lore raw
In reply to [email protected]
Quoted 5 lines · On Fri, Apr 22, 2016 at 05:24:53PM -0400, [email protected] wrote:

From: Robert Foss <[email protected]>

This series removes some dead code from kms_panel_fitting and enables support for LVDS and DSI connectors.

Quoted 10 lines

Robert Foss (7):
kms_panel_fitting: Remove un-read variable.
kms_panel_fitting: Remove un-read variable pipe_crc.
kms_panel_fitting: Remove un-used variable.
kms_panel_fitting: Switched DRM format to a hardware agnostic
alternative.
kms_panel_fitting: Enabled test on non-Intel hardware.
kms_panel_fitting: Don't skip test after finding an incompatible
connector.
kms_panel_fitting: Add support for LVDS and DSI connectors.

Two comments, lgtm otherwise but again please ask Tomeu to do a detailed review before pushing.
-Daniel

Quoted 7 lines
 tests/kms_panel_fitting.c | 35 +++++++++++++++--------------------
 1 file changed, 15 insertions(+), 20 deletions(-)
Signature · 1 line
2.5.0
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx