intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH i-g-t] tests/kms_dp_dsc: Transmit correct DRM connector structure.
@ 2021-06-01  3:41 Lee Shawn C
  2021-06-04 18:47 ` Mark Yacoub
  0 siblings, 1 reply; 2+ messages in thread
From: Lee Shawn C @ 2021-06-01  3:41 UTC (permalink / raw)
  To: intel-gfx, igt-dev; +Cc: markyacoub, charlton.lin

1. Pass one more parameter (current drmModeConnector) when
   call "run_test()". Use it to retrieve proper connector_type.
2. SIGSEGV fault would happen due to "igt_output" did not
   store properly in "data->output". Main funciton already
   pass "igt_output" pointer into "run_test()" function.
   Use this pointer instead of "data->output" to get display mode.

Fixes: a1772be7dede ("tests/kms_dp_dsc: Bug fix for DP on Pipe A")

Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
---
 tests/kms_dp_dsc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
index ea7c9f4f72ce..e434384da369 100644
--- a/tests/kms_dp_dsc.c
+++ b/tests/kms_dp_dsc.c
@@ -224,11 +224,11 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
 }
 
 static void run_test(data_t *data, igt_output_t *output,
-		     enum dsc_test_type test_type)
+		     drmModeConnector *connector, enum dsc_test_type test_type)
 {
 	enum pipe pipe;
 
-	data->mode = igt_output_get_mode(data->output);
+	data->mode = igt_output_get_mode(output);
 	igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
 			      data->mode->vdisplay,
 			      DRM_FORMAT_XRGB8888,
@@ -239,7 +239,7 @@ static void run_test(data_t *data, igt_output_t *output,
 		if (is_i915_device(data->drm_fd)) {
 			uint32_t devid = intel_get_drm_devid(data->drm_fd);
 
-			if (data->connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
+			if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
 			    data->pipe == PIPE_A && IS_GEN11(devid)) {
 				igt_debug("DSC not supported on Pipe A on external DP in Gen11 platforms\n");
 				continue;
@@ -304,7 +304,7 @@ igt_main
 					continue;
 				}
 				test_conn_cnt++;
-				run_test(&data, output, test_basic_dsc_enable);
+				run_test(&data, output, connector, test_basic_dsc_enable);
 			}
 			igt_skip_on(test_conn_cnt == 0);
 		}
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Intel-gfx] [PATCH i-g-t] tests/kms_dp_dsc: Transmit correct DRM connector structure.
  2021-06-01  3:41 [Intel-gfx] [PATCH i-g-t] tests/kms_dp_dsc: Transmit correct DRM connector structure Lee Shawn C
@ 2021-06-04 18:47 ` Mark Yacoub
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Yacoub @ 2021-06-04 18:47 UTC (permalink / raw)
  To: Lee Shawn C; +Cc: igt-dev, intel-gfx, charlton.lin

On Mon, May 31, 2021 at 11:36 PM Lee Shawn C <shawn.c.lee@intel.com> wrote:
>
> 1. Pass one more parameter (current drmModeConnector) when
>    call "run_test()". Use it to retrieve proper connector_type.
> 2. SIGSEGV fault would happen due to "igt_output" did not
>    store properly in "data->output". Main funciton already
>    pass "igt_output" pointer into "run_test()" function.
>    Use this pointer instead of "data->output" to get display mode.
>
> Fixes: a1772be7dede ("tests/kms_dp_dsc: Bug fix for DP on Pipe A")
>
Tested on ChromeOS on TGL (Delbin) and JSL (Drawlat)
Tested-by: Mark Yacoub <markyacoub@chromium.org>
> Signed-off-by: Lee Shawn C <shawn.c.lee@intel.com>
> ---
>  tests/kms_dp_dsc.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_dp_dsc.c b/tests/kms_dp_dsc.c
> index ea7c9f4f72ce..e434384da369 100644
> --- a/tests/kms_dp_dsc.c
> +++ b/tests/kms_dp_dsc.c
> @@ -224,11 +224,11 @@ static void update_display(data_t *data, enum dsc_test_type test_type)
>  }
>
>  static void run_test(data_t *data, igt_output_t *output,
> -                    enum dsc_test_type test_type)
> +                    drmModeConnector *connector, enum dsc_test_type test_type)
>  {
>         enum pipe pipe;
>
> -       data->mode = igt_output_get_mode(data->output);
> +       data->mode = igt_output_get_mode(output);
>         igt_create_pattern_fb(data->drm_fd, data->mode->hdisplay,
>                               data->mode->vdisplay,
>                               DRM_FORMAT_XRGB8888,
> @@ -239,7 +239,7 @@ static void run_test(data_t *data, igt_output_t *output,
>                 if (is_i915_device(data->drm_fd)) {
>                         uint32_t devid = intel_get_drm_devid(data->drm_fd);
>
> -                       if (data->connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
> +                       if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort &&
>                             data->pipe == PIPE_A && IS_GEN11(devid)) {
>                                 igt_debug("DSC not supported on Pipe A on external DP in Gen11 platforms\n");
>                                 continue;
> @@ -304,7 +304,7 @@ igt_main
>                                         continue;
>                                 }
>                                 test_conn_cnt++;
> -                               run_test(&data, output, test_basic_dsc_enable);
> +                               run_test(&data, output, connector, test_basic_dsc_enable);
>                         }
>                         igt_skip_on(test_conn_cnt == 0);
>                 }
> --
> 2.17.1
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-06-04 18:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01  3:41 [Intel-gfx] [PATCH i-g-t] tests/kms_dp_dsc: Transmit correct DRM connector structure Lee Shawn C
2021-06-04 18:47 ` Mark Yacoub

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).