From: Daniel Vetter <daniel@ffwll.ch>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 6/6] drm/i915: Reject page flips with changed format/offset/pitch
Date: Thu, 5 Jul 2012 13:31:17 +0200 [thread overview]
Message-ID: <20120705113117.GH5203@phenom.ffwll.local> (raw)
In-Reply-To: <1337882939-22274-7-git-send-email-ville.syrjala@linux.intel.com>
On Thu, May 24, 2012 at 09:08:59PM +0300, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> MI display flips can't handle some changes in the framebuffer
> format or layout. Return an error in such cases.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Queued for -next, thanks for the patch. I've punted on the others, hoping
for a few i-g-t tests (and maybe someone else that could review them).
Safe for the uninitialized stack var patch and this one, because we need
this check to fix up gen4+ tileoffset limitations.
Yours, Daniel
> ---
> drivers/gpu/drm/i915/intel_display.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index f4338cb..72ac2f9 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -6217,6 +6217,19 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> unsigned long flags;
> int ret;
>
> + /* Can't change pixel format via MI display flips. */
> + if (fb->pixel_format != crtc->fb->pixel_format)
> + return -EINVAL;
> +
> + /*
> + * TILEOFF/LINOFF registers can't be changed via MI display flips.
> + * Note that pitch changes could also affect these register.
> + */
> + if (INTEL_INFO(dev)->gen > 3 &&
> + (fb->offsets[0] != crtc->fb->offsets[0] ||
> + fb->pitches[0] != crtc->fb->pitches[0]))
> + return -EINVAL;
> +
> work = kzalloc(sizeof *work, GFP_KERNEL);
> if (work == NULL)
> return -ENOMEM;
> --
> 1.7.3.4
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-07-05 11:31 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 18:08 [PATCH 0/6] drm/i915: Framebuffer layout fixes and sanity checks ville.syrjala
2012-05-24 18:08 ` [PATCH 1/6] drm/i915: Fix display pixel format handling ville.syrjala
2012-05-24 18:08 ` [PATCH 2/6] drm/i915: Check framebuffer stride more thoroughly ville.syrjala
2012-07-05 11:27 ` Daniel Vetter
2012-07-05 11:59 ` [Intel-gfx] " Ville Syrjälä
2012-05-24 18:08 ` [PATCH 3/6] drm/i915: Zero initialize mode_cmd ville.syrjala
2012-07-05 11:28 ` Daniel Vetter
2012-05-24 18:08 ` [PATCH 4/6] drm/i915: Check the framebuffer offset ville.syrjala
2012-05-24 18:08 ` [PATCH 5/6] drm/i915: Handle framebuffer offsets[] ville.syrjala
2012-05-24 18:31 ` Jesse Barnes
2012-05-24 18:49 ` Ville Syrjälä
2012-05-24 19:01 ` [Intel-gfx] " Daniel Vetter
2012-07-05 11:29 ` Daniel Vetter
2012-07-05 12:01 ` [Intel-gfx] " Ville Syrjälä
2012-05-24 18:08 ` [PATCH 6/6] drm/i915: Reject page flips with changed format/offset/pitch ville.syrjala
2012-07-05 11:31 ` Daniel Vetter [this message]
2012-07-19 12:27 ` [Intel-gfx] " Laurent Pinchart
2012-07-19 12:39 ` Daniel Vetter
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=20120705113117.GH5203@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox