From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping
Date: Fri, 20 Mar 2015 12:11:04 +0000 [thread overview]
Message-ID: <550C0E58.9010004@linux.intel.com> (raw)
In-Reply-To: <1426852890.11755.10.camel@jlahtine-mobl1>
On 03/20/2015 12:01 PM, Joonas Lahtinen wrote:
> On to, 2015-03-19 at 15:07 +0000, Tvrtko Ursulin wrote:
>> Hi,
>>
>> On 03/19/2015 01:02 PM, Joonas Lahtinen wrote:
>>>> static inline
>>>> int i915_get_ggtt_vma_pages(struct i915_vma *vma)
>>>
>>> Same rant about function signatures as on earlier patch, put all on the
>>> same line like most of new the code has it.
>>
>> Ok.
>>
>>>> struct i915_ggtt_view {
>>>> enum i915_ggtt_view_type type;
>>>>
>>>> struct sg_table *pages;
>>>> +
>>>> + union {
>>>> + struct intel_rotation_info rotation_info;
>>>> + };
>>>
>>> In preparation for the memcmp way of comparing views, I would move this
>>> be before the variable struct parts (namely sg_table *pages), and also
>>> wrap it once more so the result would be like this:
>>>
>>> [snip]
>>> enum i915_ggtt_view_type type;
>>>
>>> union {
>>> struct {
>>> struct intel_rotation_info info;
>>> } rotated;
>>> struct {
>>> ...
>>> } partial;
>>> };
>>>
>>> // private bits go here, to be wrapped in their struct with view
>>> // type comparing patches
>>>
>>> struct sg_table *pages;
>>> [snip]
>>>
>>> That way it's clear which view owns what.
>>
>> Hm, rotation info is not considered in comparing views, it is just a
>> bucket of data passed around between layers. So I suppose private data
>> under your design. Since there is no private union yet, maybe do this later?
>
> Why not? Isn't a 270 degree rotated view substantially different from a
> 90 degree rotated view (even when the difference technically is just
> some bit flip somewhere else).
>
> At least I would be pretty upset if I was returned the address for 90
> degree rotated view when I wanted 270 rotated. If multiple rotated views
> are not possible, then it is again an implicit thing.
>
> There are quite a lot of hardware constraints like this that appear in
> the code implicitly, which IMHO makes the code hard to follow at times.
> So I'd try to make it more explicit that the views are not the same,
> there just can be one rotated view at a time (if that is the case).
90 and 270 views are indeed the same page layout - same address for
scanout. And there can only be one such VMA for an object at a time.
But how this mapping needs to look like is determined by more than the
object itself - framebuffer geometry defines it. The private data in the
view is used to transfer that meta-data so the GTT core can build the
appropriate view.
That was my argument in fact for not putting the page shuffling bit in
i915_gem_gtt.c since it is really display engine ownership.
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-03-20 12:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-17 15:45 [PATCH v4 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-17 15:45 ` [PATCH 1/7] drm/i915/skl: Extract tile height code into a helper function Tvrtko Ursulin
2015-03-18 12:50 ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 2/7] drm/i915: Use GGTT view when (un)pinning objects to planes Tvrtko Ursulin
2015-03-18 13:52 ` Joonas Lahtinen
2015-03-18 13:57 ` Daniel Vetter
2015-03-17 15:45 ` [PATCH 3/7] drm/i915: Pass in plane state when (un)pinning frame buffers Tvrtko Ursulin
2015-03-18 14:01 ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 4/7] drm/i915: Helper function to determine GGTT view from plane state Tvrtko Ursulin
2015-03-18 14:10 ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping Tvrtko Ursulin
2015-03-19 13:02 ` Joonas Lahtinen
2015-03-19 15:07 ` Tvrtko Ursulin
2015-03-20 12:01 ` Joonas Lahtinen
2015-03-20 12:11 ` Tvrtko Ursulin [this message]
2015-03-20 13:31 ` Joonas Lahtinen
2015-03-20 13:44 ` Tvrtko Ursulin
2015-03-17 15:45 ` [PATCH 6/7] drm/i915/skl: Query display address through a wrapper Tvrtko Ursulin
2015-03-19 13:03 ` Joonas Lahtinen
2015-03-17 15:45 ` [PATCH 7/7] drm/i915/skl: Take 90/270 rotation into account in watermark calculations Tvrtko Ursulin
2015-03-19 14:05 ` Joonas Lahtinen
-- strict thread matches above, loose matches on Subject: below --
2015-03-23 11:10 [PATCH v5 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-23 11:10 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping Tvrtko Ursulin
2015-03-23 13:03 ` Joonas Lahtinen
2015-03-05 14:07 [PATCH v3 0/7] Skylake 90/270 display rotation Tvrtko Ursulin
2015-03-05 14:07 ` [PATCH 5/7] drm/i915/skl: Support secondary (rotated) frame buffer mapping 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=550C0E58.9010004@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@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 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.