All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 5/5] tests/kms_chv_cursor_fail: Handle cleanup better.
Date: Wed, 14 Mar 2018 16:48:36 +0200	[thread overview]
Message-ID: <20180314144836.GH5453@intel.com> (raw)
In-Reply-To: <20180314112021.60224-6-maarten.lankhorst@linux.intel.com>

On Wed, Mar 14, 2018 at 12:20:21PM +0100, Maarten Lankhorst wrote:
> Clean up cursor fb in cleanup_crtc, which means that cursor fb
> has to be created after prepare_crtc() is called.
> 
> This will fix a small leak when a subtest fails.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  tests/kms_chv_cursor_fail.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/kms_chv_cursor_fail.c b/tests/kms_chv_cursor_fail.c
> index 0dd366c3b4b1..7138e549aeb7 100644
> --- a/tests/kms_chv_cursor_fail.c
> +++ b/tests/kms_chv_cursor_fail.c
> @@ -224,6 +224,7 @@ static void cleanup_crtc(data_t *data)
>  	data->pipe_crc = NULL;
>  
>  	igt_remove_fb(data->drm_fd, &data->primary_fb);
> +	igt_remove_fb(data->drm_fd, &data->fb);
>  }
>  
>  static void prepare_crtc(data_t *data)
> @@ -262,15 +263,11 @@ static void prepare_crtc(data_t *data)
>  
>  static void test_crtc(data_t *data, unsigned int edges)
>  {
> -	cleanup_crtc(data);
> +	prepare_crtc(data);
>  
>  	create_cursor_fb(data, data->curw, data->curh);

4 and 5 lgtm as well

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  
> -	prepare_crtc(data);
> -
>  	test_edges(data, edges);
> -
> -	igt_remove_fb(data->drm_fd, &data->fb);
>  }
>  
>  static int opt_handler(int opt, int opt_index, void *_data)
> -- 
> 2.16.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2018-03-14 14:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-14 11:20 [igt-dev] [PATCH i-g-t 0/5] lib/igt_kms: Add for_each_pipe_with_single_output and igt_get_single_output_for_pipe Maarten Lankhorst
2018-03-14 11:20 ` [igt-dev] [PATCH i-g-t 1/5] lib/igt_kms: Add functions to get only a single output for a pipe Maarten Lankhorst
2018-03-14 14:43   ` Ville Syrjälä
2018-03-15 16:58     ` [igt-dev] [PATCH i-g-t] lib/igt_kms: Add functions to get only a single output for a pipe, v2 Maarten Lankhorst
2018-03-14 11:20 ` [igt-dev] [PATCH i-g-t 2/5] tests/kms_rmfb: Use for_each_pipe_with_single_output Maarten Lankhorst
2018-03-14 14:44   ` Ville Syrjälä
2018-03-14 11:20 ` [igt-dev] [PATCH i-g-t 3/5] tests/kms_busy: Convert to using igt_get_single_output_for_pipe Maarten Lankhorst
2018-03-14 14:46   ` Ville Syrjälä
2018-03-16  8:28     ` [igt-dev] [PATCH i-g-t] tests/kms_busy: Convert to using igt_get_single_output_for_pipe, v2 Maarten Lankhorst
2018-03-14 11:20 ` [igt-dev] [PATCH i-g-t 4/5] tests/kms_chv_cursor_fail: Reorder tests, and use igt_display_require_output_on_pipe Maarten Lankhorst
2018-03-14 11:20 ` [igt-dev] [PATCH i-g-t 5/5] tests/kms_chv_cursor_fail: Handle cleanup better Maarten Lankhorst
2018-03-14 14:48   ` Ville Syrjälä [this message]
2018-03-19 15:07     ` Maarten Lankhorst
2018-03-14 13:37 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add for_each_pipe_with_single_output and igt_get_single_output_for_pipe Patchwork
2018-03-14 17:22 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2018-03-15 18:31 ` [igt-dev] ✗ Fi.CI.BAT: warning for lib/igt_kms: Add for_each_pipe_with_single_output and igt_get_single_output_for_pipe. (rev2) Patchwork
2018-03-15 19:29 ` Patchwork
2018-03-16  7:29 ` Patchwork
2018-03-16  9:03 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/igt_kms: Add for_each_pipe_with_single_output and igt_get_single_output_for_pipe. (rev3) Patchwork
2018-03-16 10:41 ` [igt-dev] ✗ Fi.CI.IGT: warning " 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=20180314144836.GH5453@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.