From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 1/2] drm/i915: Add function to check for linear surfaces
Date: Fri, 26 Oct 2018 18:01:52 +0300 [thread overview]
Message-ID: <20181026150152.GX9144@intel.com> (raw)
In-Reply-To: <20181025231026.1839-1-dhinakaran.pandiyan@intel.com>
On Thu, Oct 25, 2018 at 04:10:26PM -0700, Dhinakaran Pandiyan wrote:
> A framebuffer can comprise surfaces with distinct tiling formats,
> making checks against modifier alone insufficient. Make use of a
> function to identify a linear surface based on both modifier and color
> plane.
>
> v2: Typo fix
newline missing here
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> ---
> drivers/gpu/drm/i915/intel_display.c | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index fe045abb6472..25e5402efd52 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -2205,6 +2205,11 @@ static u32 intel_adjust_tile_offset(int *x, int *y,
> return new_offset;
> }
>
> +static inline bool is_surface_linear(uint64_t modifier, int color_plane)
inline not needed. s/uint64_t/u64/
Otherwise
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +{
> + return modifier == DRM_FORMAT_MOD_LINEAR;
> +}
> +
> static u32 intel_adjust_aligned_offset(int *x, int *y,
> const struct drm_framebuffer *fb,
> int color_plane,
> @@ -2217,7 +2222,7 @@ static u32 intel_adjust_aligned_offset(int *x, int *y,
>
> WARN_ON(new_offset > old_offset);
>
> - if (fb->modifier != DRM_FORMAT_MOD_LINEAR) {
> + if (!is_surface_linear(fb->modifier, color_plane)) {
> unsigned int tile_size, tile_width, tile_height;
> unsigned int pitch_tiles;
>
> @@ -2281,14 +2286,13 @@ static u32 intel_compute_aligned_offset(struct drm_i915_private *dev_priv,
> unsigned int rotation,
> u32 alignment)
> {
> - uint64_t fb_modifier = fb->modifier;
> unsigned int cpp = fb->format->cpp[color_plane];
> u32 offset, offset_aligned;
>
> if (alignment)
> alignment--;
>
> - if (fb_modifier != DRM_FORMAT_MOD_LINEAR) {
> + if (!is_surface_linear(fb->modifier, color_plane)) {
> unsigned int tile_size, tile_width, tile_height;
> unsigned int tile_rows, tiles, pitch_tiles;
>
> @@ -2525,7 +2529,7 @@ intel_fill_fb_info(struct drm_i915_private *dev_priv,
> tile_size);
> offset /= tile_size;
>
> - if (fb->modifier != DRM_FORMAT_MOD_LINEAR) {
> + if (!is_surface_linear(fb->modifier, i)) {
> unsigned int tile_width, tile_height;
> unsigned int pitch_tiles;
> struct drm_rect r;
> --
> 2.14.1
--
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-10-26 15:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 21:32 [PATCH 1/2] drm/i915: Add function to check for linear surfaces Dhinakaran Pandiyan
2018-10-25 21:32 ` [PATCH 2/2] drm/i915: Do not program aux plane offsets on gen11+ Dhinakaran Pandiyan
2018-10-26 15:45 ` Ville Syrjälä
2018-10-25 22:45 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Add function to check for linear surfaces Patchwork
2018-10-25 23:10 ` [PATCH v2 1/2] " Dhinakaran Pandiyan
2018-10-26 15:01 ` Ville Syrjälä [this message]
2018-10-26 0:17 ` ✓ Fi.CI.BAT: success for series starting with [v2,1/2] drm/i915: Add function to check for linear surfaces (rev2) Patchwork
2018-10-26 7:21 ` ✗ 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=20181026150152.GX9144@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=dhinakaran.pandiyan@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: 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.