From: Damien Lespiau <damien.lespiau@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/8] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling
Date: Thu, 26 Feb 2015 15:52:58 +0000 [thread overview]
Message-ID: <20150226155258.GA2053@strange.ger.corp.intel.com> (raw)
In-Reply-To: <1424882844-19444-6-git-send-email-tvrtko.ursulin@linux.intel.com>
On Wed, Feb 25, 2015 at 04:47:21PM +0000, Tvrtko Ursulin wrote:
> From: Damien Lespiau <damien.lespiau@intel.com>
>
> v2: Rebased for addfb2 interface and consolidated a bit. (Tvrtko Ursulin)
> v3: Rebased for fb modifier changes. (Tvrtko Ursulin)
> v4: Use intel_fb_stride_alignment instead of open coding. (Damien Lespiau)
>
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> (v3)
Still looks good to me:
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
--
Damien
> ---
> drivers/gpu/drm/i915/intel_display.c | 40 +++++++++++++++++++++---------------
> 1 file changed, 23 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f262515..626e6538 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -7732,7 +7732,7 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
> {
> struct drm_device *dev = crtc->base.dev;
> struct drm_i915_private *dev_priv = dev->dev_private;
> - u32 val, base, offset, stride_mult;
> + u32 val, base, offset, stride_mult, tiling;
> int pipe = crtc->pipe;
> int fourcc, pixel_format;
> int aligned_height;
> @@ -7751,11 +7751,6 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
> if (!(val & PLANE_CTL_ENABLE))
> goto error;
>
> - if (val & PLANE_CTL_TILED_MASK) {
> - plane_config->tiling = I915_TILING_X;
> - fb->modifier[0] = I915_FORMAT_MOD_X_TILED;
> - }
> -
> pixel_format = val & PLANE_CTL_FORMAT_MASK;
> fourcc = skl_format_to_fourcc(pixel_format,
> val & PLANE_CTL_ORDER_RGBX,
> @@ -7763,6 +7758,26 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
> fb->pixel_format = fourcc;
> fb->bits_per_pixel = drm_format_plane_cpp(fourcc, 0) * 8;
>
> + tiling = val & PLANE_CTL_TILED_MASK;
> + switch (tiling) {
> + case PLANE_CTL_TILED_LINEAR:
> + fb->modifier[0] = DRM_FORMAT_MOD_NONE;
> + break;
> + case PLANE_CTL_TILED_X:
> + plane_config->tiling = I915_TILING_X;
> + fb->modifier[0] = I915_FORMAT_MOD_X_TILED;
> + break;
> + case PLANE_CTL_TILED_Y:
> + fb->modifier[0] = I915_FORMAT_MOD_Y_TILED;
> + break;
> + case PLANE_CTL_TILED_YF:
> + fb->modifier[0] = I915_FORMAT_MOD_Yf_TILED;
> + break;
> + default:
> + MISSING_CASE(tiling);
> + goto error;
> + }
> +
> base = I915_READ(PLANE_SURF(pipe, 0)) & 0xfffff000;
> plane_config->base = base;
>
> @@ -7773,17 +7788,8 @@ skylake_get_initial_plane_config(struct intel_crtc *crtc,
> fb->width = ((val >> 0) & 0x1fff) + 1;
>
> val = I915_READ(PLANE_STRIDE(pipe, 0));
> - switch (plane_config->tiling) {
> - case I915_TILING_NONE:
> - stride_mult = 64;
> - break;
> - case I915_TILING_X:
> - stride_mult = 512;
> - break;
> - default:
> - MISSING_CASE(plane_config->tiling);
> - goto error;
> - }
> + stride_mult = intel_fb_stride_alignment(dev, fb->modifier[0],
> + fb->pixel_format);
> fb->pitches[0] = (val & 0x3ff) * stride_mult;
>
> aligned_height = intel_fb_align_height(dev, fb->height,
> --
> 2.3.0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-02-26 15:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-25 16:47 [PATCH v4 0/8] Skylake Y tiled scanout Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 1/8] drm/i915/skl: Add new displayable tiling formats Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 2/8] drm/i915/skl: Allow scanning out Y and Yf fbs Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 3/8] drm/i915/skl: Adjust intel_fb_align_height() for Yb/Yf tiling Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 4/8] drm/i915/skl: Teach pin_and_fence_fb_obj() about Y tiling constraints Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 5/8] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling Tvrtko Ursulin
2015-02-26 15:52 ` Damien Lespiau [this message]
2015-02-25 16:47 ` [PATCH 6/8] drm/i915/skl: Updated watermark programming Tvrtko Ursulin
2015-02-26 16:45 ` Damien Lespiau
2015-02-27 9:34 ` Tvrtko Ursulin
2015-02-25 16:47 ` [PATCH 7/8] drm/i915/skl: Update watermarks for Y tiling Tvrtko Ursulin
2015-02-26 16:59 ` Damien Lespiau
2015-02-27 9:39 ` Tvrtko Ursulin
2015-02-27 14:24 ` Damien Lespiau
2015-02-25 16:47 ` [PATCH 8/8] drm/i915/skl: Allow Y (and Yf) frame buffer creation Tvrtko Ursulin
2015-02-26 14:55 ` shuang.he
2015-02-26 16:44 ` Daniel Vetter
2015-02-27 9:45 ` Tvrtko Ursulin
2015-02-27 14:20 ` Daniel Vetter
-- strict thread matches above, loose matches on Subject: below --
2015-02-27 11:15 [PATCH v5 0/8] Skylake Y tiled scanout Tvrtko Ursulin
2015-02-27 11:15 ` [PATCH 5/8] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling Tvrtko Ursulin
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=20150226155258.GA2053@strange.ger.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=tvrtko.ursulin@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