* [PATCH i-g-t] ksm_pipe_color: Set legacy gamma values inside loop.
@ 2016-04-11 17:41 Bob Paauwe
2016-04-18 11:33 ` Lionel Landwerlin
0 siblings, 1 reply; 2+ messages in thread
From: Bob Paauwe @ 2016-04-11 17:41 UTC (permalink / raw)
To: intel-gfx
When testing multple outputs, make sure to set the gamma values before
testing the output. Otherwise we're testing using the gamma values
that were reset after last output was tested. Without this, the first
output passes, but each output after that will fail.
Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
tests/kms_pipe_color.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
index f08aabd..9f7ac7e 100644
--- a/tests/kms_pipe_color.c
+++ b/tests/kms_pipe_color.c
@@ -452,10 +452,6 @@ static void test_pipe_legacy_gamma(data_t *data,
green_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
blue_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
- red_lut[0] = green_lut[0] = blue_lut[0] = 0;
- for (i = 1; i < legacy_lut_size; i++)
- red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
-
for_each_connected_output(&data->display, output) {
drmModeModeInfo *mode;
struct igt_fb fb_modeset, fb;
@@ -500,6 +496,10 @@ static void test_pipe_legacy_gamma(data_t *data,
*/
paint_gradient_rectangles(data, mode, red_green_blue, &fb);
igt_plane_set_fb(primary, &fb);
+
+ red_lut[0] = green_lut[0] = blue_lut[0] = 0;
+ for (i = 1; i < legacy_lut_size; i++)
+ red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
legacy_lut_size, red_lut, green_lut, blue_lut), 0);
igt_display_commit(&data->display);
--
2.5.5
_______________________________________________
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: [PATCH i-g-t] ksm_pipe_color: Set legacy gamma values inside loop.
2016-04-11 17:41 [PATCH i-g-t] ksm_pipe_color: Set legacy gamma values inside loop Bob Paauwe
@ 2016-04-18 11:33 ` Lionel Landwerlin
0 siblings, 0 replies; 2+ messages in thread
From: Lionel Landwerlin @ 2016-04-18 11:33 UTC (permalink / raw)
To: intel-gfx
Hi Bob,
Thanks for spotting this.
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
On 11/04/16 18:41, Bob Paauwe wrote:
> When testing multple outputs, make sure to set the gamma values before
> testing the output. Otherwise we're testing using the gamma values
> that were reset after last output was tested. Without this, the first
> output passes, but each output after that will fail.
>
> Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
> ---
> tests/kms_pipe_color.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c
> index f08aabd..9f7ac7e 100644
> --- a/tests/kms_pipe_color.c
> +++ b/tests/kms_pipe_color.c
> @@ -452,10 +452,6 @@ static void test_pipe_legacy_gamma(data_t *data,
> green_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
> blue_lut = malloc(sizeof(uint16_t) * legacy_lut_size);
>
> - red_lut[0] = green_lut[0] = blue_lut[0] = 0;
> - for (i = 1; i < legacy_lut_size; i++)
> - red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
> -
> for_each_connected_output(&data->display, output) {
> drmModeModeInfo *mode;
> struct igt_fb fb_modeset, fb;
> @@ -500,6 +496,10 @@ static void test_pipe_legacy_gamma(data_t *data,
> */
> paint_gradient_rectangles(data, mode, red_green_blue, &fb);
> igt_plane_set_fb(primary, &fb);
> +
> + red_lut[0] = green_lut[0] = blue_lut[0] = 0;
> + for (i = 1; i < legacy_lut_size; i++)
> + red_lut[i] = green_lut[i] = blue_lut[i] = 0xffff;
> igt_assert_eq(drmModeCrtcSetGamma(data->drm_fd, primary->pipe->crtc_id,
> legacy_lut_size, red_lut, green_lut, blue_lut), 0);
> igt_display_commit(&data->display);
_______________________________________________
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:[~2016-04-18 11:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 17:41 [PATCH i-g-t] ksm_pipe_color: Set legacy gamma values inside loop Bob Paauwe
2016-04-18 11:33 ` Lionel Landwerlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox