All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH i-g-t v2 08/15] igt_kms: Remove pan members from igt_plane, v2.
Date: Thu, 21 Jul 2016 14:42:40 +0300	[thread overview]
Message-ID: <1469101360.2625.8.camel@gmail.com> (raw)
In-Reply-To: <1467798955-7324-9-git-send-email-maarten.lankhorst@linux.intel.com>

On Wed, 2016-07-06 at 11:55 +0200, Maarten Lankhorst wrote:
> They're duplicates with src_x/y, so just use those.
> 
> Changes since v1:
> - Fix order of parameters in calls to igt_fb_set_position.
> 
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
>  lib/igt_kms.c             | 24 ++++--------------------
>  lib/igt_kms.h             |  4 ----
>  tests/kms_panel_fitting.c |  2 +-
>  tests/kms_plane.c         |  8 +++-----
>  tests/kms_plane_scaling.c |  2 +-
>  5 files changed, 9 insertions(+), 31 deletions(-)
> 
> diff --git a/lib/igt_kms.c b/lib/igt_kms.c
> index 8c7598a88a69..9fc5559a5df4 100644
> --- a/lib/igt_kms.c
> +++ b/lib/igt_kms.c
> @@ -1915,7 +1915,7 @@ static int igt_primary_plane_commit_legacy(igt_plane_t
> *primary,
>  	igt_assert(!primary->rotation_changed);
>  
>  	if (!primary->fb_changed && !primary->position_changed &&
> -		!primary->size_changed && !primary->panning_changed)
> +		!primary->size_changed)
>  		return 0;
>  
>  	crtc_id = pipe->crtc_id;
> @@ -1927,18 +1927,18 @@ static int igt_primary_plane_commit_legacy(igt_plane_t
> *primary,
>  
>  	if (fb_id) {
>  		LOG(display,
> -		    "%s: SetCrtc pipe %s, fb %u, panning (%d, %d), "
> +		    "%s: SetCrtc pipe %s, fb %u, src (%d, %d), "
>  		    "mode %dx%d\n",
>  		    igt_output_name(output),
>  		    kmstest_pipe_name(pipe->pipe),
>  		    fb_id,
> -		    primary->pan_x, primary->pan_y,
> +		    primary->src_x, primary->src_x,
>  		    mode->hdisplay, mode->vdisplay);
>  
>  		ret = drmModeSetCrtc(display->drm_fd,
>  				     crtc_id,
>  				     fb_id,
> -				     primary->pan_x, primary->pan_y,
> +				     primary->src_x, primary->src_x,
>  				     &output->id,
>  				     1,
>  				     mode);
> @@ -1962,7 +1962,6 @@ static int igt_primary_plane_commit_legacy(igt_plane_t
> *primary,
>  	primary->fb_changed = false;
>  	primary->position_changed = false;
>  	primary->size_changed = false;
> -	primary->panning_changed = false;
>  
>  	return 0;
>  }
> @@ -2408,21 +2407,6 @@ void igt_fb_set_size(struct igt_fb *fb, igt_plane_t
> *plane,
>  	plane->fb_changed = true;
>  }
>  
> -void igt_plane_set_panning(igt_plane_t *plane, int x, int y)
> -{
> -	igt_pipe_t *pipe = plane->pipe;
> -	igt_display_t *display = pipe->display;
> -
> -	LOG(display, "%s.%d: plane_set_panning(%d,%d)\n",
> -	    kmstest_pipe_name(pipe->pipe),
> -	    plane->index, x, y);
> -
> -	plane->pan_x = x;
> -	plane->pan_y = y;
> -
> -	plane->panning_changed = true;
> -}
> -
>  static const char *rotation_name(igt_rotation_t rotation)
>  {
>  	switch (rotation) {
> diff --git a/lib/igt_kms.h b/lib/igt_kms.h
> index b9e8d344ed8c..4d18c01042c9 100644
> --- a/lib/igt_kms.h
> +++ b/lib/igt_kms.h
> @@ -220,7 +220,6 @@ typedef struct {
>  	/* state tracking */
>  	unsigned int fb_changed       : 1;
>  	unsigned int position_changed : 1;
> -	unsigned int panning_changed  : 1;
>  	unsigned int rotation_changed : 1;
>  	unsigned int size_changed     : 1;
>  	/*
> @@ -244,8 +243,6 @@ typedef struct {
>  	uint32_t src_w;
>  	uint32_t src_h;
>  
> -	/* panning offset within the fb */
> -	unsigned int pan_x, pan_y;
>  	igt_rotation_t rotation;
>  	uint32_t atomic_props_plane[IGT_NUM_PLANE_PROPS];
>  } igt_plane_t;
> @@ -326,7 +323,6 @@ void igt_pipe_set_gamma_lut(igt_pipe_t *pipe, void *ptr,
> size_t length);
>  void igt_plane_set_fb(igt_plane_t *plane, struct igt_fb *fb);
>  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_panning(igt_plane_t *plane, int x, int y);
>  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,
> diff --git a/tests/kms_panel_fitting.c b/tests/kms_panel_fitting.c
> index 7c501fcdd3fb..da09da32d704 100644
> --- a/tests/kms_panel_fitting.c
> +++ b/tests/kms_panel_fitting.c
> @@ -89,7 +89,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
> enum pipe pipe,
>  		ret = drmModeSetCrtc(data->drm_fd,
>  				plane->pipe->crtc_id,
>  				data->fb_id1,
> -				plane->pan_x, plane->pan_y,
> +				plane->src_x, plane->src_y,
>  				&output->id,
>  				1,
>  				mode);
> diff --git a/tests/kms_plane.c b/tests/kms_plane.c
> index 60b8d71d52d4..7c01fe91b263 100644
> --- a/tests/kms_plane.c
> +++ b/tests/kms_plane.c
> @@ -321,11 +321,9 @@ test_plane_panning_with_output(data_t *data,
>  	igt_plane_set_fb(primary, &primary_fb);
>  
>  	if (flags & TEST_PANNING_TOP_LEFT)
> -		igt_plane_set_panning(primary, 0, 0);
> +		igt_fb_set_position(&primary_fb, primary, 0, 0);

While at it you might want to rename igt_fb_set_position() to
igt_plane_set_position() or something. The name is very misleading as it doens't
depend on the fb and only sets properties on the plane.

But anyway,

Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com>


>  	else
> -		igt_plane_set_panning(primary, mode->hdisplay, mode-
> >vdisplay);
> -
> -	igt_plane_set_position(primary, 0, 0);
> +		igt_fb_set_position(&primary_fb, primary, mode->hdisplay,
> mode->vdisplay);
>  
>  	igt_display_commit(&data->display);
>  
> @@ -343,7 +341,7 @@ test_plane_panning_with_output(data_t *data,
>  
>  	/* reset states to neutral values, assumed by other tests */
>  	igt_output_set_pipe(output, PIPE_ANY);
> -	igt_plane_set_panning(primary, 0, 0);
> +	igt_fb_set_position(&primary_fb, primary, 0, 0);
>  
>  	test_fini(data);
>  }
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 39bb5e113411..4546ce548515 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -98,7 +98,7 @@ static void prepare_crtc(data_t *data, igt_output_t *output,
> enum pipe pipe,
>  		ret = drmModeSetCrtc(data->drm_fd,
>  				plane->pipe->crtc_id,
>  				data->fb_id1,
> -				plane->pan_x, plane->pan_y,
> +				plane->src_x, plane->src_y,
>  				&output->id,
>  				1,
>  				mode);
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-07-21 11:42 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06  9:55 [PATCH i-g-t v2 00/15] Add support for atomic modeset to IGT Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 01/15] igt_kms: Remove kmstest_connector_config.crtc_idx Maarten Lankhorst
2016-07-13 12:13   ` Daniel Vetter
2016-07-19 12:52     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 02/15] igt_kms: Find optimal encoder only after selecting pipe Maarten Lankhorst
2016-07-15 11:14   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 03/15] kms_psr_sink_crc: Use for_each_pipe_with_valid_output to find a valid config Maarten Lankhorst
2016-07-15 11:15   ` Ander Conselvan De Oliveira
2016-07-19 13:58     ` Ander Conselvan De Oliveira
2016-07-20  7:53       ` Maarten Lankhorst
2016-07-20 12:17         ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 04/15] igt_kms: Make PIPE_ANY a alias for PIPE_NONE Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 05/15] tests/kms: Clean up more users of unassigned pipes Maarten Lankhorst
2016-07-20 12:56   ` Ander Conselvan De Oliveira
2016-07-21  9:21     ` Maarten Lankhorst
2016-07-25 13:04     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 06/15] igt_kms: Change PIPE_ANY behavior to mean unassigned Maarten Lankhorst
2016-07-21  9:23   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 07/15] igt_kms: Handle atomic pipe properties better Maarten Lankhorst
2016-07-21 10:07   ` Ander Conselvan De Oliveira
2016-07-06  9:55 ` [PATCH i-g-t v2 08/15] igt_kms: Remove pan members from igt_plane, v2 Maarten Lankhorst
2016-07-21 11:42   ` Ander Conselvan De Oliveira [this message]
2016-07-21 12:37     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 09/15] igt_kms: Clear all _changed members centrally Maarten Lankhorst
2016-07-21 12:13   ` Ander Conselvan De Oliveira
2016-07-21 12:43     ` Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 10/15] igt_kms: Add modeset support to atomic commits Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 11/15] tests: Add kms_rmfb test Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 12/15] tests: Add kms_atomic_transition Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 13/15] igt_kms: Add more apis for panel fitting test Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 14/15] igt_kms: Allow disabling previous override mode Maarten Lankhorst
2016-07-06  9:55 ` [PATCH i-g-t v2 15/15] kms_panel_fitting: Add tests for fastboot Maarten Lankhorst

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=1469101360.2625.8.camel@gmail.com \
    --to=conselvan2@gmail.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 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.