From: Ville Syrjala <ville.syrjala@linux.intel.com> To: intel-gfx@lists.freedesktop.org Subject: [PATCH 1/5] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing Date: Tue, 29 Oct 2019 17:16:10 +0200 [thread overview] Message-ID: <20191029151614.16929-1-ville.syrjala@linux.intel.com> (raw) From: Ville Syrjälä <ville.syrjala@linux.intel.com> Use DRM_RECT_FMT & co. to simpify the code. 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 8016484ebcd3..8365c0b15e9d 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
WARNING: multiple messages have this Message-ID (diff)
From: Ville Syrjala <ville.syrjala@linux.intel.com> To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH 1/5] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing Date: Tue, 29 Oct 2019 17:16:10 +0200 [thread overview] Message-ID: <20191029151614.16929-1-ville.syrjala@linux.intel.com> (raw) Message-ID: <20191029151610.Jwg10vGBkot5iGBlXHcWKRPspy8TtmchrxSShyPE8ko@z> (raw) From: Ville Syrjälä <ville.syrjala@linux.intel.com> Use DRM_RECT_FMT & co. to simpify the code. 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 8016484ebcd3..8365c0b15e9d 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
next reply other threads:[~2019-10-29 15:16 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-10-29 15:16 Ville Syrjala [this message] 2019-10-29 15:16 ` [Intel-gfx] [PATCH 1/5] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing Ville Syrjala 2019-10-29 15:16 ` [PATCH 2/5] drm/i915: Switch to intel_ types in debugfs display_info Ville Syrjala 2019-10-29 15:16 ` [Intel-gfx] " Ville Syrjala 2019-10-29 15:16 ` [PATCH 3/5] drm/i915: Reorganize plane/fb dump in debugfs Ville Syrjala 2019-10-29 15:16 ` [Intel-gfx] " Ville Syrjala 2019-10-29 15:16 ` [PATCH 4/5] drm/i915: Refactor debugfs display info code Ville Syrjala 2019-10-29 15:16 ` [Intel-gfx] " Ville Syrjala 2019-10-29 15:16 ` [PATCH 5/5] drm/i915: Dump the mode for the crtc just the once Ville Syrjala 2019-10-29 15:16 ` [Intel-gfx] " Ville Syrjala 2019-10-29 20:00 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915: Use drm_rect to simplify plane {crtc, src}_{x, y, w, h} printing Patchwork 2019-10-29 20:00 ` [Intel-gfx] " Patchwork 2019-10-29 20:21 ` ✓ Fi.CI.BAT: success " Patchwork 2019-10-29 20:21 ` [Intel-gfx] " Patchwork 2019-10-30 15:50 ` ✗ Fi.CI.IGT: failure " Patchwork 2019-10-30 15:50 ` [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=20191029151614.16929-1-ville.syrjala@linux.intel.com \ --to=ville.syrjala@linux.intel.com \ --cc=intel-gfx@lists.freedesktop.org \ /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: linkBe 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.