From: Damien Lespiau <damien.lespiau@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org, Sagar Kamble <sagar.a.kamble@intel.com>
Subject: Re: [PATCH 1/2] drm/i915: Compute WM for current cursor size
Date: Wed, 26 Mar 2014 15:21:52 +0000 [thread overview]
Message-ID: <20140326152152.GI1729@strange.amr.corp.intel.com> (raw)
In-Reply-To: <1395837495-29870-1-git-send-email-chris@chris-wilson.co.uk>
On Wed, Mar 26, 2014 at 12:38:14PM +0000, Chris Wilson wrote:
> Now that we can use different cursor size, we can not hardcode 64 pixels
> as the cursor width anymore.
>
> v2: Apply to 965gm/g4x paths as well
>
> Cc: Damien Lespiau <damien.lespiau@intel.com>
> Cc: Sagar Kamble <sagar.a.kamble@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
> drivers/gpu/drm/i915/intel_pm.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
> index b6872895fb42..22134558c452 100644
> --- a/drivers/gpu/drm/i915/intel_pm.c
> +++ b/drivers/gpu/drm/i915/intel_pm.c
> @@ -1136,7 +1136,7 @@ static bool g4x_compute_wm0(struct drm_device *dev,
> /* Use the large buffer method to calculate cursor watermark */
> line_time_us = max(htotal * 1000 / clock, 1);
> line_count = (cursor_latency_ns / line_time_us + 1000) / 1000;
> - entries = line_count * 64 * pixel_size;
> + entries = line_count * to_intel_crtc(crtc)->cursor_width * pixel_size;
> tlb_miss = cursor->fifo_size*cursor->cacheline_size - hdisplay * 8;
> if (tlb_miss > 0)
> entries += tlb_miss;
> @@ -1222,7 +1222,7 @@ static bool g4x_compute_srwm(struct drm_device *dev,
> *display_wm = entries + display->guard_size;
>
> /* calculate the self-refresh watermark for display cursor */
> - entries = line_count * pixel_size * 64;
> + entries = line_count * pixel_size * to_intel_crtc(crtc)->cursor_width;
> entries = DIV_ROUND_UP(entries, cursor->cacheline_size);
> *cursor_wm = entries + cursor->guard_size;
>
> @@ -1457,7 +1457,7 @@ static void i965_update_wm(struct drm_crtc *unused_crtc)
> entries, srwm);
>
> entries = (((sr_latency_ns / line_time_us) + 1000) / 1000) *
> - pixel_size * 64;
> + pixel_size * to_intel_crtc(crtc)->cursor_width;
> entries = DIV_ROUND_UP(entries,
> i965_cursor_wm_info.cacheline_size);
> cursor_sr = i965_cursor_wm_info.fifo_size -
> @@ -2120,7 +2120,7 @@ static void ilk_compute_wm_parameters(struct drm_crtc *crtc,
> p->pri.bytes_per_pixel = crtc->fb->bits_per_pixel / 8;
> p->cur.bytes_per_pixel = 4;
> p->pri.horiz_pixels = intel_crtc->config.pipe_src_w;
> - p->cur.horiz_pixels = 64;
> + p->cur.horiz_pixels = intel_crtc->cursor_width;
> /* TODO: for now, assume primary and cursor planes are always enabled. */
> p->pri.enabled = true;
> p->cur.enabled = true;
> --
> 1.9.1
>
prev parent reply other threads:[~2014-03-26 15:24 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 14:49 [PATCH 0/3] A few cursor fixups after the multi-size patches Damien Lespiau
2014-03-25 14:49 ` [PATCH 1/3] drm/i915: Don't set mode_config's cursor size Damien Lespiau
2014-03-25 14:54 ` Chris Wilson
2014-03-25 14:59 ` Damien Lespiau
2014-03-25 15:09 ` Chris Wilson
2014-03-25 16:05 ` Damien Lespiau
2014-03-25 16:38 ` Chris Wilson
2014-03-25 16:57 ` Damien Lespiau
2014-03-25 18:23 ` Daniel Vetter
2014-03-25 18:25 ` Daniel Vetter
2014-03-25 18:51 ` Damien Lespiau
2014-03-25 19:42 ` Daniel Vetter
2014-03-25 17:58 ` Damien Lespiau
2014-03-25 15:15 ` Sagar Arun Kamble
2014-03-25 15:11 ` Imre Deak
2014-03-25 14:49 ` [PATCH 2/3] drm/i915: Remove max_cursor_{width, height} from the crtc Damien Lespiau
2014-03-25 14:49 ` [PATCH 3/3] drm/i915: Use the actual cursor width for WM computation Damien Lespiau
2014-03-26 12:24 ` Chris Wilson
2014-03-26 12:27 ` Chris Wilson
2014-03-26 12:38 ` [PATCH 1/2] drm/i915: Compute WM for current cursor size Chris Wilson
2014-03-26 12:38 ` [PATCH 2/2] drm/i915: Recompute WM when the cursor size changes Chris Wilson
2014-03-26 12:53 ` Daniel Vetter
2014-03-26 15:21 ` Damien Lespiau
2014-03-26 16:35 ` Daniel Vetter
2014-03-26 15:21 ` Damien Lespiau [this message]
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=20140326152152.GI1729@strange.amr.corp.intel.com \
--to=damien.lespiau@intel.com \
--cc=chris@chris-wilson.co.uk \
--cc=intel-gfx@lists.freedesktop.org \
--cc=sagar.a.kamble@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