From: Mika Kahola <mika.kahola@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 11/14] lib/igt_kms: Remove igt_crtc_set_background()
Date: Fri, 20 Oct 2017 09:33:46 +0300 [thread overview]
Message-ID: <1508481226.3274.134.camel@intel.com> (raw)
In-Reply-To: <20171012115435.18880-12-maarten.lankhorst@linux.intel.com>
Reviewed-by: Mika Kahola <mika.kahola@intel.com>
On Thu, 2017-10-12 at 13:54 +0200, Maarten Lankhorst wrote:
> This can be handled by generic properties.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> lib/igt_kms.c | 21 ---------------------
> lib/igt_kms.h | 1 -
> tests/kms_crtc_background_color.c | 18 +++++++++---------
> 3 files changed, 9 insertions(+), 31 deletions(-)
>
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 70b104b24f8d..9cf4b68f4191 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -3227,27 +3227,6 @@ void igt_pipe_request_out_fence(igt_pipe_t
> *pipe)
> igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_OUT_FENCE_PTR,
> (ptrdiff_t)&pipe->out_fence_fd);
> }
>
> -/**
> - * igt_crtc_set_background:
> - * @pipe: pipe pointer to which background color to be set
> - * @background: background color value in BGR 16bpc
> - *
> - * Sets background color for requested pipe. Color value provided
> here
> - * will be actually submitted at output commit time via
> "background_color"
> - * property.
> - * For example to get red as background, set background =
> 0x00000000FFFF.
> - */
> -void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background)
> -{
> - igt_display_t *display = pipe->display;
> -
> - LOG(display, "%s.%d: crtc_set_background(%"PRIx64")\n",
> - kmstest_pipe_name(pipe->pipe),
> - pipe->pipe, background);
> -
> - igt_pipe_obj_set_prop_value(pipe, IGT_CRTC_BACKGROUND,
> background);
> -}
> -
> void igt_wait_for_vblank_count(int drm_fd, enum pipe pipe, int
> count)
> {
> drmVBlank wait_vbl;
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index dbba0cd53a25..e722f0be3757 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -378,7 +378,6 @@ void igt_plane_set_fence_fd(igt_plane_t *plane,
> int fence_fd);
> void igt_plane_set_position(igt_plane_t *plane, int x, int y);
> void igt_plane_set_size(igt_plane_t *plane, int w, int h);
> void igt_plane_set_rotation(igt_plane_t *plane, igt_rotation_t
> rotation);
> -void igt_crtc_set_background(igt_pipe_t *pipe, uint64_t background);
> void igt_fb_set_position(struct igt_fb *fb, igt_plane_t *plane,
> uint32_t x, uint32_t y);
> void igt_fb_set_size(struct igt_fb *fb, igt_plane_t *plane,
> diff --git a/tests/kms_crtc_background_color.c
> b/tests/kms_crtc_background_color.c
> index 414cc82f3e8b..6edb8de3bb24 100644
> --- a/tests/kms_crtc_background_color.c
> +++ b/tests/kms_crtc_background_color.c
> @@ -97,7 +97,7 @@ static void prepare_crtc(data_t *data, igt_output_t
> *output, enum pipe pipe,
> igt_assert(fb_id);
>
> /* To make FB pixel win with background color, set alpha as
> full opaque */
> - igt_crtc_set_background(plane->pipe, pipe_background_color);
> + igt_pipe_set_prop_value(display, pipe, IGT_CRTC_BACKGROUND,
> pipe_background_color);
> if (opaque_buffer)
> alpha = 1.0; /* alpha 1 is fully opque */
> else
> @@ -117,7 +117,7 @@ static void cleanup_crtc(data_t *data,
> igt_output_t *output, igt_plane_t *plane)
>
> igt_remove_fb(data->gfx_fd, &data->fb);
>
> - igt_crtc_set_background(plane->pipe, BLACK64);
> + igt_pipe_obj_set_prop_value(plane->pipe,
> IGT_CRTC_BACKGROUND, BLACK64);
> igt_plane_set_fb(plane, NULL);
> igt_output_set_pipe(output, PIPE_ANY);
>
> @@ -144,26 +144,26 @@ static void test_crtc_background(data_t *data)
> /* Now set background without using a plane, i.e.,
> * Disable the plane to let hw background color win
> blend. */
> igt_plane_set_fb(plane, NULL);
> - igt_crtc_set_background(plane->pipe, PURPLE64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, PURPLE64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> /* Try few other background colors */
> - igt_crtc_set_background(plane->pipe, CYAN64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, CYAN64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> - igt_crtc_set_background(plane->pipe, YELLOW64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, YELLOW64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> - igt_crtc_set_background(plane->pipe, RED64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, RED64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> - igt_crtc_set_background(plane->pipe, GREEN64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, GREEN64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> - igt_crtc_set_background(plane->pipe, BLUE64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, BLUE64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> - igt_crtc_set_background(plane->pipe, WHITE64);
> + igt_pipe_set_prop_value(display, pipe,
> IGT_CRTC_BACKGROUND, WHITE64);
> igt_display_commit2(display, COMMIT_UNIVERSAL);
>
> valid_tests++;
--
Mika Kahola - Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-10-20 6:33 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 11:54 [PATCH i-g-t v2 00/14] lib/igt_kms: Rewrite property handling to better match atomic Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 01/14] lib/igt_kms: Rework connector properties to be more atomic, v2 Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 02/14] lib/igt_kms: Rework plane properties to be more atomic, v5 Maarten Lankhorst
2017-10-19 9:08 ` Mika Kahola
2017-10-19 9:44 ` Maarten Lankhorst
2017-10-20 8:03 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 03/14] lib/igt_kms: Rework pipe properties to be more atomic, v7 Maarten Lankhorst
2017-10-19 10:28 ` Mika Kahola
2018-03-05 14:37 ` Maxime Ripard
2018-03-06 13:41 ` Daniel Vetter
2018-03-06 13:47 ` Maarten Lankhorst
2017-10-12 11:54 ` [PATCH i-g-t v2 04/14] lib/igt_kms: Allow setting any plane property through the universal path Maarten Lankhorst
2017-10-19 11:04 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 05/14] lib/igt_kms: Allow setting any output property through the !atomic paths Maarten Lankhorst
2017-10-20 9:38 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 06/14] lib/igt_kms: Export property blob functions for output/pipe/plane, v2 Maarten Lankhorst
2017-10-19 11:24 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 07/14] lib/igt_kms: Unexport broadcast rgb API Maarten Lankhorst
2017-10-19 11:28 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 08/14] lib/igt_kms: Add igt_$obj_has_prop functions Maarten Lankhorst
2017-10-12 15:33 ` [PATCH i-g-t v2] lib/igt_kms: Add igt_$obj_has_prop functions, v2 Maarten Lankhorst
2017-10-19 12:06 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 09/14] lib/igt_kms: Add igt_$obj_get_prop functions Maarten Lankhorst
2017-10-19 12:58 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 10/14] lib/igt_kms: Remove igt_pipe_get_property Maarten Lankhorst
2017-10-19 13:18 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 11/14] lib/igt_kms: Remove igt_crtc_set_background() Maarten Lankhorst
2017-10-20 6:33 ` Mika Kahola [this message]
2017-10-12 11:54 ` [PATCH i-g-t v2 12/14] tests/kms_color: Rework tests slightly to work better with new atomic api Maarten Lankhorst
2017-10-20 7:14 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 13/14] tests/chamelium: Remove reliance on output->config.pipe Maarten Lankhorst
2017-10-20 7:15 ` Mika Kahola
2017-10-12 11:54 ` [PATCH i-g-t v2 14/14] tests/kms_atomic: Convert/rewrite tests to use igt_kms framework Maarten Lankhorst
2017-10-12 15:33 ` [PATCH i-g-t v2] tests/kms_atomic: Convert/rewrite tests to use igt_kms framework, v2 Maarten Lankhorst
2017-10-20 10:02 ` Mika Kahola
2017-10-20 10:08 ` Maarten Lankhorst
2017-10-20 10:16 ` Mika Kahola
2017-10-20 11:43 ` Maarten Lankhorst
2017-10-12 12:28 ` ✓ Fi.CI.BAT: success for lib/igt_kms: Rewrite property handling to better match atomic. (rev4) Patchwork
2017-10-12 15:01 ` ✗ Fi.CI.IGT: failure " Patchwork
2017-10-12 16:04 ` ✓ Fi.CI.BAT: success for lib/igt_kms: Rewrite property handling to better match atomic. (rev6) Patchwork
2017-10-12 23:47 ` ✗ Fi.CI.IGT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1508481226.3274.134.camel@intel.com \
--to=mika.kahola@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=maarten.lankhorst@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox