Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ramalingam C <ramalingam.c@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/9] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing
Date: Mon, 2 Dec 2019 13:25:47 +0530	[thread overview]
Message-ID: <20191202075411.GA5177@intel.com> (raw)
In-Reply-To: <20191129185434.25549-2-ville.syrjala@linux.intel.com>

On 2019-11-29 at 20:54:26 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use DRM_RECT_FMT & co. to simpify the code.

Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 18 +++++++-----------
>  1 file changed, 7 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index cab632791f73..3f54e66ab762 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2599,6 +2599,7 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  		struct drm_plane_state *state;
>  		struct drm_plane *plane = &intel_plane->base;
>  		struct drm_format_name_buf format_name;
> +		struct drm_rect src, dst;
>  		char rot_str[48];
>  
>  		if (!plane->state) {
> @@ -2608,6 +2609,9 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  
>  		state = plane->state;
>  
> +		src = drm_plane_state_src(state);
> +		dst = drm_plane_state_dest(state);
> +
>  		if (state->fb) {
>  			drm_get_format_name(state->fb->format->format,
>  					    &format_name);
> @@ -2617,19 +2621,11 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  
>  		plane_rotation(rot_str, sizeof(rot_str), state->rotation);
>  
> -		seq_printf(m, "\t--Plane id %d: type=%s, crtc_pos=%4dx%4d, crtc_size=%4dx%4d, src_pos=%d.%04ux%d.%04u, src_size=%d.%04ux%d.%04u, format=%s, rotation=%s\n",
> +		seq_printf(m, "\t--Plane id %d: type=%s, dst=" DRM_RECT_FMT ", src=" DRM_RECT_FP_FMT ", format=%s, rotation=%s\n",
>  			   plane->base.id,
>  			   plane_type(intel_plane->base.type),
> -			   state->crtc_x, state->crtc_y,
> -			   state->crtc_w, state->crtc_h,
> -			   (state->src_x >> 16),
> -			   ((state->src_x & 0xffff) * 15625) >> 10,
> -			   (state->src_y >> 16),
> -			   ((state->src_y & 0xffff) * 15625) >> 10,
> -			   (state->src_w >> 16),
> -			   ((state->src_w & 0xffff) * 15625) >> 10,
> -			   (state->src_h >> 16),
> -			   ((state->src_h & 0xffff) * 15625) >> 10,
> +			   DRM_RECT_ARG(&dst),
> +			   DRM_RECT_FP_ARG(&src),
>  			   format_name.str,
>  			   rot_str);
>  	}
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

WARNING: multiple messages have this Message-ID (diff)
From: Ramalingam C <ramalingam.c@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2 1/9] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing
Date: Mon, 2 Dec 2019 13:25:47 +0530	[thread overview]
Message-ID: <20191202075411.GA5177@intel.com> (raw)
Message-ID: <20191202075547.fJRw5VVdID1YMPuk-viGxfQb7s6RoaqzRE8r5GxKRHA@z> (raw)
In-Reply-To: <20191129185434.25549-2-ville.syrjala@linux.intel.com>

On 2019-11-29 at 20:54:26 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Use DRM_RECT_FMT & co. to simpify the code.

Looks good to me.

Reviewed-by: Ramalingam C <ramalingam.c@intel.com>
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_debugfs.c | 18 +++++++-----------
>  1 file changed, 7 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index cab632791f73..3f54e66ab762 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -2599,6 +2599,7 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  		struct drm_plane_state *state;
>  		struct drm_plane *plane = &intel_plane->base;
>  		struct drm_format_name_buf format_name;
> +		struct drm_rect src, dst;
>  		char rot_str[48];
>  
>  		if (!plane->state) {
> @@ -2608,6 +2609,9 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  
>  		state = plane->state;
>  
> +		src = drm_plane_state_src(state);
> +		dst = drm_plane_state_dest(state);
> +
>  		if (state->fb) {
>  			drm_get_format_name(state->fb->format->format,
>  					    &format_name);
> @@ -2617,19 +2621,11 @@ static void intel_plane_info(struct seq_file *m, struct intel_crtc *intel_crtc)
>  
>  		plane_rotation(rot_str, sizeof(rot_str), state->rotation);
>  
> -		seq_printf(m, "\t--Plane id %d: type=%s, crtc_pos=%4dx%4d, crtc_size=%4dx%4d, src_pos=%d.%04ux%d.%04u, src_size=%d.%04ux%d.%04u, format=%s, rotation=%s\n",
> +		seq_printf(m, "\t--Plane id %d: type=%s, dst=" DRM_RECT_FMT ", src=" DRM_RECT_FP_FMT ", format=%s, rotation=%s\n",
>  			   plane->base.id,
>  			   plane_type(intel_plane->base.type),
> -			   state->crtc_x, state->crtc_y,
> -			   state->crtc_w, state->crtc_h,
> -			   (state->src_x >> 16),
> -			   ((state->src_x & 0xffff) * 15625) >> 10,
> -			   (state->src_y >> 16),
> -			   ((state->src_y & 0xffff) * 15625) >> 10,
> -			   (state->src_w >> 16),
> -			   ((state->src_w & 0xffff) * 15625) >> 10,
> -			   (state->src_h >> 16),
> -			   ((state->src_h & 0xffff) * 15625) >> 10,
> +			   DRM_RECT_ARG(&dst),
> +			   DRM_RECT_FP_ARG(&src),
>  			   format_name.str,
>  			   rot_str);
>  	}
> -- 
> 2.23.0
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2019-12-02  7:56 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29 18:54 [PATCH v2 0/9] drm/i915: i915_display_info cleanup Ville Syrjala
2019-11-29 18:54 ` [Intel-gfx] " Ville Syrjala
2019-11-29 18:54 ` [PATCH v2 1/9] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02  7:55   ` Ramalingam C [this message]
2019-12-02  7:55     ` Ramalingam C
2019-11-29 18:54 ` [PATCH v2 2/9] drm/i915: Switch to intel_ types in debugfs display_info Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02  8:59   ` Ramalingam C
2019-12-02  8:59     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 3/9] drm/i915: Reorganize plane/fb dump in debugfs Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 14:27   ` Ramalingam C
2019-12-02 14:27     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 4/9] drm/i915: Refactor debugfs display info code Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 14:34   ` Ramalingam C
2019-12-02 14:34     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 5/9] drm/i915: Dump the mode for the crtc just the once Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 14:56   ` Ramalingam C
2019-12-02 14:56     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 6/9] drm/i915: Use drm_modeset_lock_all() in debugfs display info Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 15:05   ` Ramalingam C
2019-12-02 15:05     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 7/9] drm/i915: Use the canonical [CRTC:%d:%s]/etc. format in i915_display_info Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 15:08   ` Ramalingam C
2019-12-02 15:08     ` [Intel-gfx] " Ramalingam C
2019-12-02 15:43     ` Ramalingam C
2019-12-02 15:43       ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 8/9] drm/i915: Dump both the uapi and hw states for crtcs and planes Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 15:18   ` Ramalingam C
2019-12-02 15:18     ` [Intel-gfx] " Ramalingam C
2019-11-29 18:54 ` [PATCH v2 9/9] drm/i915: Stop using connector->encoder and encoder->crtc links in i915_display_info Ville Syrjala
2019-11-29 18:54   ` [Intel-gfx] " Ville Syrjala
2019-12-02 15:40   ` Ramalingam C
2019-12-02 15:40     ` [Intel-gfx] " Ramalingam C
2019-12-02 16:24     ` Ville Syrjälä
2019-12-02 16:24       ` [Intel-gfx] " Ville Syrjälä
2019-12-02 16:52       ` Ramalingam C
2019-12-02 16:52         ` [Intel-gfx] " Ramalingam C
2019-11-29 21:43 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915: i915_display_info cleanup Patchwork
2019-11-29 21:43   ` [Intel-gfx] " Patchwork
2019-11-29 22:27 ` ✓ Fi.CI.BAT: success " Patchwork
2019-11-29 22:27   ` [Intel-gfx] " Patchwork
2019-12-01  1:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-12-01  1:15   ` [Intel-gfx] " 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=20191202075411.GA5177@intel.com \
    --to=ramalingam.c@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@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