From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
Paulo Zanoni <paulo.r.zanoni@intel.com>,
intel-gfx@lists.freedesktop.org,
Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Subject: Re: [PATCH 6/7] drm/i915: use compute_page_offset() on SKL too
Date: Thu, 24 Sep 2015 10:55:17 +0100 [thread overview]
Message-ID: <5603C885.4010307@linux.intel.com> (raw)
In-Reply-To: <20150923170315.GP6739@nuc-i3427.alporthouse.com>
On 09/23/2015 06:03 PM, Chris Wilson wrote:
> On Wed, Sep 23, 2015 at 12:52:26PM -0300, Paulo Zanoni wrote:
>> The trick is not strictly necessary on SKL because the offset
>> registers allow more bits. But for FBC, doing this changes how the
>> hardware tracking works - it starts at the surface address we provide
>> - so there's a higher chance that the CRTC will be pointing to an area
>> of the frontbuffer that is actually being covered by the hardware
>> tracking mechanism. This fixes fbc-farfromfence on SKL.
>>
>> Testcase: igt/kms_frontbuffer_tracking/fbc-farfromfence
>> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 24b8a72..d40ae71 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -3031,6 +3031,7 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>> int src_x = 0, src_y = 0, src_w = 0, src_h = 0;
>> int dst_x = 0, dst_y = 0, dst_w = 0, dst_h = 0;
>> int scaler_id = -1;
>> + int pixel_size;
>>
>> plane_state = to_intel_plane_state(plane->state);
>>
>> @@ -3079,6 +3080,12 @@ static void skylake_update_primary_plane(struct drm_crtc *crtc,
>> src_h = intel_crtc->config->pipe_src_h;
>> }
>>
>> + pixel_size = drm_format_plane_cpp(fb->pixel_format, 0);
>> + intel_crtc->dspaddr_offset = intel_gen4_compute_page_offset(dev_priv,
>> + &x, &y, obj->tiling_mode,
>> + pixel_size, fb->pitches[0]);
>> + surf_addr += intel_crtc->dspaddr_offset;
>> +
>> if (intel_rotation_90_or_270(rotation)) {
>> /* stride = Surface height in tiles */
>> tile_height = intel_tile_height(dev, fb->pixel_format,
>
> Tvrtko mind running this past your 90/270 rotation sanity tester?
You mean igt/kms_rotation_crc ?
I don't have the background of what is this doing, but what jumps out at
me is use of obj->tiling_mode which is not used for display tiling on
skl+, and tile size calculations in intel_gen4_compute_page_offset seems
to only support X tiling.
The two together would make me say that it can't possibly work. :)
Maybe Paolo can get quicker to running that igt since it sounds like he
is already set up?
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-09-24 9:55 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-23 15:52 [PATCH 0/7] FBC again: stolen + SKL fixes Paulo Zanoni
2015-09-23 15:52 ` [PATCH 1/7] drm/i915: fix CFB size calculation Paulo Zanoni
2015-09-23 16:58 ` Chris Wilson
2015-09-24 17:07 ` Ville Syrjälä
2015-09-23 15:52 ` [PATCH 2/7] drm/i915: don't use the first stolen page on Broadwell Paulo Zanoni
2015-09-23 16:55 ` Chris Wilson
2015-09-28 8:51 ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 3/7] drm/i915: don't allocate fbcon from stolen memory if it's too big Paulo Zanoni
2015-09-23 16:54 ` Chris Wilson
2015-09-28 8:54 ` Daniel Vetter
2015-09-28 9:09 ` Chris Wilson
2015-09-29 14:26 ` Daniel Vetter
2015-10-08 20:19 ` Jesse Barnes
2015-10-09 7:34 ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 4/7] drm/i915: export size_is_valid() from __intel_fbc_update() Paulo Zanoni
2015-09-23 17:09 ` Chris Wilson
2015-09-28 8:59 ` Daniel Vetter
2015-09-28 12:47 ` Ville Syrjälä
2015-09-28 13:13 ` Paulo Zanoni
2015-09-28 13:38 ` Ville Syrjälä
2015-09-28 13:32 ` Daniel Vetter
2015-09-23 15:52 ` [PATCH 5/7] drm/i915: fix FBC buffer size checks Paulo Zanoni
2015-09-23 16:59 ` Chris Wilson
2015-09-30 20:10 ` Zanoni, Paulo R
2015-09-23 15:52 ` [PATCH 6/7] drm/i915: use compute_page_offset() on SKL too Paulo Zanoni
2015-09-23 17:03 ` Chris Wilson
2015-09-24 9:55 ` Tvrtko Ursulin [this message]
2015-09-24 10:16 ` Chris Wilson
2015-09-24 17:10 ` Ville Syrjälä
2015-10-12 18:19 ` Hindman, Gavin
2015-10-12 21:01 ` Ville Syrjälä
2015-09-23 15:52 ` [PATCH 7/7] drm/i915: extract fbc_supported() Paulo Zanoni
2015-09-23 17:01 ` Chris Wilson
2015-09-28 8:57 ` Daniel Vetter
2015-09-30 20:05 ` [PATCH 1/3] drm/i915: remove pre-atomic check from SKL update_primary_plane Paulo Zanoni
2015-09-30 20:05 ` [PATCH 2/3] drm/i915: fix CFB size calculation Paulo Zanoni
2015-10-01 12:14 ` Ville Syrjälä
2015-10-01 12:23 ` Ville Syrjälä
2015-10-01 17:47 ` Zanoni, Paulo R
2015-10-01 18:11 ` Ville Syrjälä
2015-10-01 22:54 ` Zanoni, Paulo R
2015-10-01 22:55 ` Paulo Zanoni
2015-10-08 21:29 ` Ville Syrjälä
2015-09-30 20:05 ` [PATCH 3/3] drm/i915: fix FBC buffer size checks Paulo Zanoni
2015-10-01 12:22 ` Ville Syrjälä
2015-10-01 18:04 ` Zanoni, Paulo R
2015-10-01 22:57 ` Paulo Zanoni
2015-10-09 7:36 ` Daniel Vetter
2015-10-01 12:07 ` [PATCH 1/3] drm/i915: remove pre-atomic check from SKL update_primary_plane Ville Syrjälä
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=5603C885.4010307@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=paulo.r.zanoni@intel.com \
--cc=tvrtko.ursulin@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;
as well as URLs for NNTP newsgroup(s).