public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/7] drm/i915/skl: Update watermarks for Y tiling
Date: Wed, 25 Feb 2015 10:50:04 +0000	[thread overview]
Message-ID: <54EDA8DC.8010808@linux.intel.com> (raw)
In-Reply-To: <20150224214219.GI24485@phenom.ffwll.local>

On 02/24/2015 09:42 PM, Daniel Vetter wrote:
> On Mon, Feb 23, 2015 at 03:56:00PM +0000, Tvrtko Ursulin wrote:
>> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>>
>> Display watermarks need different programming for different tiling
>> modes.
>>
>> Set the relevant flag so this happens during the plane commit and
>> add relevant data into a structure made available to the watermark
>> computation code.
>>
>> v2: Pass in tiling info to sprite plane updates as well.
>> v3: Rebased for plane handling changes.
>> v4: Handle fb == NULL when plane is disabled.
>> v5: Refactored for addfb2 interface.
>> v6: Refactored for fb modifier changes.
>> v7: Updated for atomic commit by only updating watermarks when tiling changes.
>>
>> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
>> Acked-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
>> Acked-by: Matt Roper <matthew.d.roper@intel.com>
>> ---
>>   drivers/gpu/drm/i915/intel_display.c |  6 ++++++
>>   drivers/gpu/drm/i915/intel_drv.h     |  1 +
>>   drivers/gpu/drm/i915/intel_pm.c      | 33 ++++++++++++++++++++++++++++-----
>>   drivers/gpu/drm/i915/intel_sprite.c  |  6 ++++++
>>   4 files changed, 41 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index c622b11..74d4923 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -11985,6 +11985,12 @@ intel_check_primary_plane(struct drm_plane *plane,
>>   			INTEL_FRONTBUFFER_PRIMARY(intel_crtc->pipe);
>>
>>   		intel_crtc->atomic.update_fbc = true;
>> +
>> +		/* Update watermarks on tiling changes. */
>> +		if (!plane->state->fb || !state->base.fb ||
>> +		    plane->state->fb->modifier[0] !=
>> +		    state->base.fb->modifier[0])
>> +			intel_crtc->atomic.update_wm = true;
>
> Imo this is fragile. We should unconditionally recomupte watermarks imo
> and just ellide the hw update if nothing changed. Spending a few cpu
> cycles on this per frame shouldn't hurt, and it will avoid duplicated
> logic and checks for watermark recomputation splattered all over the code.
 >
> I know that it's kinda there already, but still minimal enough to patch
> up. But if Matt knows that this will get removed again with the two-stage
> wm code then I'm ok with leaving it in, with a FIXME comment added.

"Splattered all over the code" equals two places going to one when 
primary and sprite planes are unified.

I wouldn't wish for this to become an unbounded task since I am not sure 
it is not good enough as it is. I checked with Matt and Ander and they 
think it is good enough for now.

Not sure if FIXME is warranted here - to say what? That it will be 
refactored with the two-stage wm rewrite?

Regards,

Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-02-25 10:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-23 15:55 [PATCH 0/7] Skylake Y tiled scanout Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 1/7] drm/i915/skl: Add new displayable tiling formats Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 2/7] drm/i915/skl: Allow scanning out Y and Yf fbs Tvrtko Ursulin
2015-02-24 16:38   ` Damien Lespiau
2015-02-24 17:36   ` Ville Syrjälä
2015-02-25 10:36     ` Tvrtko Ursulin
2015-02-25 11:32       ` Ville Syrjälä
2015-02-23 15:55 ` [PATCH 3/7] drm/i915/skl: Adjust intel_fb_align_height() for Yb/Yf tiling Tvrtko Ursulin
2015-02-24 16:54   ` Damien Lespiau
2015-02-25 10:54     ` Tvrtko Ursulin
2015-02-25 14:00       ` Damien Lespiau
2015-02-25 15:20         ` Damien Lespiau
2015-02-23 15:55 ` [PATCH 4/7] drm/i915/skl: Teach pin_and_fence_fb_obj() about Y tiling constraints Tvrtko Ursulin
2015-02-23 15:55 ` [PATCH 5/7] drm/i915/skl: Adjust get_plane_config() to support Yb/Yf tiling Tvrtko Ursulin
2015-02-24 17:26   ` Damien Lespiau
2015-02-25 10:38     ` Tvrtko Ursulin
2015-02-23 15:56 ` [PATCH 6/7] drm/i915/skl: Update watermarks for Y tiling Tvrtko Ursulin
2015-02-24 19:26   ` Damien Lespiau
2015-02-25 10:34     ` Tvrtko Ursulin
2015-02-25 14:08       ` Damien Lespiau
2015-02-24 21:42   ` Daniel Vetter
2015-02-25 10:50     ` Tvrtko Ursulin [this message]
2015-02-25 14:27       ` Damien Lespiau
2015-02-25 15:03       ` Daniel Vetter
2015-02-23 15:56 ` [PATCH 7/7] drm/i915/skl: Allow Y (and Yf) frame buffer creation Tvrtko Ursulin
2015-02-24 19:30   ` Damien Lespiau
2015-02-24 21:46   ` Daniel Vetter
2015-02-25 10:51     ` Tvrtko Ursulin
2015-02-25  6:08   ` shuang.he
2015-02-24 19:06 ` [PATCH 0/7] Skylake Y tiled scanout Damien Lespiau

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=54EDA8DC.8010808@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=daniel@ffwll.ch \
    /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