dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 1/2] drm: Don't allow page flip to change pixel format
Date: Mon, 4 Jun 2012 13:46:32 -0700	[thread overview]
Message-ID: <20120604134632.3a1934cd@jbarnes-desktop> (raw)
In-Reply-To: <CADnq5_MSRh1zfPTYwxtEhQEhF-sW147Kz-W37XBiCxAR9108mA@mail.gmail.com>

That's probably safest, however on Intel we can change the stride and
tiling format for sync flips at least.  But I'm ok with this patch; we
generally need to recalculate bw requirements and watermarks when
adjusting depth and such.

On Thu, 31 May 2012 15:54:03 -0400
Alex Deucher <alexdeucher@gmail.com> wrote:

> On Thu, May 31, 2012 at 3:44 PM, Singh, Satyeshwar
> <satyeshwar.singh@intel.com> wrote:
> > Does this by extension mean that stride changes should also not be allowed while page flipping?
> 
> Everything beyond a crtc base address change should require a full modeset.
> 
> Alex
> 
> > Thanks,
> > Satyeshwar
> >
> > -----Original Message-----
> > From: dri-devel-bounces+satyeshwar.singh=intel.com@lists.freedesktop.org [mailto:dri-devel-bounces+satyeshwar.singh=intel.com@lists.freedesktop.org] On Behalf Of Laurent Pinchart
> > Sent: Thursday, May 31, 2012 9:26 AM
> > To: dri-devel@lists.freedesktop.org
> > Subject: [PATCH 1/2] drm: Don't allow page flip to change pixel format
> >
> > A page flip is not a mode set, changing the frame buffer pixel format doesn't make sense and isn't handled by most drivers anyway. Disallow it.
> >
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  drivers/gpu/drm/drm_crtc.c |    8 ++++++++
> >  1 files changed, 8 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 92cea9d..0d15b56 100644
> > --- a/drivers/gpu/drm/drm_crtc.c
> > +++ b/drivers/gpu/drm/drm_crtc.c
> > @@ -3530,6 +3530,14 @@ int drm_mode_page_flip_ioctl(struct drm_device *dev,
> >                goto out;
> >        }
> >
> > +       if (crtc->fb->pixel_format != fb->pixel_format ||
> > +           crtc->fb->bits_per_pixel != crtc->fb->bits_per_pixel ||
> > +           crtc->fb->depth != fb->depth) {
> > +               DRM_DEBUG_KMS("Page flip is not allowed to change frame buffer format.\n");
> > +               ret = -EINVAL;
> > +               goto out;
> > +       }
> > +
> >        if (page_flip->flags & DRM_MODE_PAGE_FLIP_EVENT) {
> >                ret = -ENOMEM;
> >                spin_lock_irqsave(&dev->event_lock, flags);
> > --
> > 1.7.3.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
> 


-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2012-06-04 20:46 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31 16:26 [PATCH 0/2] Miscellaneous mode set and page flip fixes Laurent Pinchart
2012-05-31 16:26 ` [PATCH 1/2] drm: Don't allow page flip to change pixel format Laurent Pinchart
2012-05-31 19:44   ` Singh, Satyeshwar
2012-05-31 19:54     ` Alex Deucher
2012-06-01 11:46       ` Ville Syrjälä
2012-06-04 20:46       ` Jesse Barnes [this message]
2012-05-31 16:26 ` [PATCH 2/2] drm: Perform a full mode set when the pixel format changed Laurent Pinchart
2012-07-19 11:55 ` [PATCH 0/2] Miscellaneous mode set and page flip fixes Laurent Pinchart
2012-08-23 10:05   ` Laurent Pinchart
2013-03-28 15:14     ` Laurent Pinchart

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=20120604134632.3a1934cd@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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