From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>,
Vidya Srinivas <vidya.srinivas@intel.com>,
Ben Widawsky <ben@bwidawsk.net>
Subject: Re: [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS
Date: Wed, 7 Jun 2017 15:53:41 +0300 [thread overview]
Message-ID: <20170607125341.GK12629@intel.com> (raw)
In-Reply-To: <CAPj87rNrYA7SfMRpEEmywf4cDY16b0QReXC7_X8FnMfV10CXZQ@mail.gmail.com>
On Wed, Jun 07, 2017 at 12:44:47PM +0100, Daniel Stone wrote:
> Hi Vidya,
>
> On 7 June 2017 at 12:40, Vidya Srinivas <vidya.srinivas@intel.com> wrote:
> > +static const struct drm_format_info ccs_formats[] = {
> > + { .format = DRM_FORMAT_XRGB8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 16, .vsub = 8, },
> > + { .format = DRM_FORMAT_XBGR8888, .depth = 24, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 16, .vsub = 8, },
> > + { .format = DRM_FORMAT_ARGB8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 16, .vsub = 8, },
> > + { .format = DRM_FORMAT_ABGR8888, .depth = 32, .num_planes = 2, .cpp = { 4, 1, }, .hsub = 16, .vsub = 8, },
> > +};
>
> I notice that here hsub/vsub are declared as 16x8. In Ville's tree
> which I pulled my submission from, this is 8x16, which aligns with
> this comment (missing from your submission):
> /*
> * 1 byte of CCS actually corresponds to 16x8 pixels on the main
> * surface, and the memory layout for the CCS tile us 64x64 bytes.
> * But since we're pretending the CCS tile is 128 bytes wide we
> * adjust hsub/vsub here accordingly to 8x16 so that the
> * bytes<->x/y conversions come out correct.
> */
>
> If the hsub/vsub is inverted to match the comment, trying to add a
> 3200x1800 (for example) framebuffer will fail, because (1800 % 16) !=
> 0. This is true even if the allocation is correct (i.e. the buffer
> contains an even number of tiles for both width and height). Generic
> userspace cannot know that it should try to create a larger
> framebuffer (in this case 3200x1808) and only show a smaller region of
> that framebuffer.
>
> This is the reason for the halign/valign patch mentioned earlier, as
> well as the additional part of the comment which was also present in
> my submission:
> /*
> * We don't require any
> * CCS block size alignment of the fb under the assumption that the
> * hardware will handle things correctly of only a single pixel
> * gets touched. The compression should be lossless so any garbage
> * pixels as part of the same block shouldn't cause visual artifacts.
> */
The alignment requirement is gone in upstream, hence my latest CCS
stuff doesn't have the valign/halign stuff anymore.
Anyways, I'll have to revisit the the offsets[] thing because people
didn't like my original linear offset idea, and it doesn't match what
userspace already does.
And I still need to convince myself that the ccs hash mode won't be
an issue, which I think I'm close to doing since I managed to trick
igt rendercopy to do ccs.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-06-07 12:53 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-07 4:51 [PATCH 00/11] Adding NV12 support for SKL display Vidya Srinivas
2017-06-07 4:51 ` [PATCH 01/11] drm/i915: Add render decompression support Vidya Srinivas
2017-06-07 4:51 ` [PATCH 02/11] drm/i915: Fix scaling check for 90/270 degree plane rotation Vidya Srinivas
2017-06-07 4:51 ` [PATCH 03/11] drm/i915: Fix SKL+ watermarks for 90/270 rotation Vidya Srinivas
2017-06-07 4:51 ` Vidya Srinivas
2017-06-07 4:51 ` [PATCH 04/11] drm/i915: Fix 90/270 rotated coordinates for FBC Vidya Srinivas
2017-06-07 4:51 ` Vidya Srinivas
2017-06-07 4:51 ` [PATCH 05/11] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-06-07 4:51 ` [PATCH 06/11] drm/i915: Set scaler mode for NV12 Vidya Srinivas
2017-06-07 4:51 ` [PATCH 07/11] drm/i915: Update format_is_yuv() to include NV12 Vidya Srinivas
2017-06-07 4:51 ` [PATCH 08/11] drm/i915: Upscale scaler max scale for NV12 Vidya Srinivas
2017-06-07 4:51 ` [PATCH 09/11] drm/i915: Add NV12 as supported format for primary plane Vidya Srinivas
2017-06-07 4:51 ` [PATCH 10/11] drm/i915: Add NV12 as supported format for sprite plane Vidya Srinivas
2017-06-07 4:51 ` [PATCH 11/11] drm/i915: Add NV12 support to intel_framebuffer_init Vidya Srinivas
2017-06-07 8:01 ` ✗ Fi.CI.BAT: failure for Adding NV12 support for SKL display Patchwork
2017-06-07 10:41 ` [PATCH 0/8] " Vidya Srinivas
2017-06-07 10:41 ` [PATCH 1/8] drm/i915: Add render decompression support Vidya Srinivas
2017-06-07 10:52 ` Daniel Stone
2017-06-07 10:41 ` [PATCH 2/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-06-07 10:46 ` Daniel Stone
2017-06-07 10:41 ` [PATCH 3/8] drm/i915: Set scaler mode for NV12 Vidya Srinivas
2017-06-12 13:56 ` Ville Syrjälä
2017-06-15 11:30 ` Srinivas, Vidya
2017-06-07 10:41 ` [PATCH 4/8] drm/i915: Update format_is_yuv() to include NV12 Vidya Srinivas
2017-06-07 10:41 ` [PATCH 5/8] drm/i915: Upscale scaler max scale for NV12 Vidya Srinivas
2017-06-12 14:07 ` Ville Syrjälä
2017-06-07 10:41 ` [PATCH 6/8] drm/i915: Add NV12 as supported format for primary plane Vidya Srinivas
2017-06-12 14:12 ` Ville Syrjälä
2017-06-15 11:30 ` Srinivas, Vidya
2017-06-07 10:41 ` [PATCH 7/8] drm/i915: Add NV12 as supported format for sprite plane Vidya Srinivas
2017-06-12 14:20 ` Ville Syrjälä
2017-06-15 11:30 ` Srinivas, Vidya
2017-06-07 10:41 ` [PATCH 8/8] drm/i915: Add NV12 support to intel_framebuffer_init Vidya Srinivas
2017-06-12 14:25 ` Ville Syrjälä
2017-06-15 11:30 ` Srinivas, Vidya
2017-06-08 9:07 ` [PATCH 0/8] Adding NV12 support for SKL display Jani Nikula
2017-06-07 11:40 ` Vidya Srinivas
2017-06-07 11:40 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-06-07 11:44 ` Daniel Stone
2017-06-07 12:53 ` Ville Syrjälä [this message]
2017-06-07 14:24 ` Daniel Stone
2017-06-07 15:33 ` Ville Syrjälä
2017-06-07 15:48 ` Daniel Stone
2017-06-07 16:28 ` Ville Syrjälä
2017-06-07 17:14 ` Daniel Stone
2017-06-07 11:40 ` [PATCH 2/8] drm/i915: Add render decompression support Vidya Srinivas
2017-06-07 11:40 ` [PATCH 3/8] drm/i915: Set scaler mode for NV12 Vidya Srinivas
2017-06-07 11:41 ` [PATCH 4/8] drm/i915: Update format_is_yuv() to include NV12 Vidya Srinivas
2017-06-07 11:41 ` [PATCH 5/8] drm/i915: Upscale scaler max scale for NV12 Vidya Srinivas
2017-06-07 11:41 ` [PATCH 6/8] drm/i915: Add NV12 as supported format for primary plane Vidya Srinivas
2017-06-07 11:41 ` [PATCH 7/8] drm/i915: Add NV12 as supported format for sprite plane Vidya Srinivas
2017-06-07 11:41 ` [PATCH 8/8] drm/i915: Add NV12 support to intel_framebuffer_init Vidya Srinivas
-- strict thread matches above, loose matches on Subject: below --
2017-06-20 6:10 [PATCH 0/8] Adding NV12 support for SKL display Vidya Srinivas
2017-06-20 6:10 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-07-10 6:53 [PATCH 0/8] Adding NV12 support for SKL display Vidya Srinivas
2017-07-10 6:53 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-07-14 23:16 ` Jason Ekstrand
2017-07-11 14:10 [PATCH 0/8] Adding NV12 support for SKL display Vidya Srinivas
2017-07-11 14:10 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-07-24 4:27 [PATCH 0/8] Adding NV12 support for BXT display Vidya Srinivas
2017-07-24 4:27 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-07-31 7:04 [PATCH 0/8] Adding NV12 support Vidya Srinivas
2017-07-31 7:04 ` [PATCH 1/8] drm/i915: Implement .get_format_info() hook for CCS Vidya Srinivas
2017-08-02 21:26 ` Jason Ekstrand
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=20170607125341.GK12629@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ben@bwidawsk.net \
--cc=daniel@fooishbar.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=vidya.srinivas@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.