From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Daniel Stone <daniels@collabora.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm: Use atomic state for FB in legacy ioctls
Date: Tue, 13 Dec 2016 23:14:47 +0200 [thread overview]
Message-ID: <20161213211447.GR31595@intel.com> (raw)
In-Reply-To: <AFC7DB77-6C09-4174-98E1-4D5CA98A2391@collabora.com>
On Tue, Dec 13, 2016 at 07:02:53PM +0000, Daniel Stone wrote:
> Hi,
>
> > On 13 Dec 2016, at 6:48 pm, Ville Syrjälä <ville.syrjala@linux.intel.com> wrote:
> >
> >> On Tue, Dec 13, 2016 at 06:19:12PM +0000, Daniel Stone wrote:
> >> @@ -357,7 +357,10 @@ int drm_mode_getcrtc(struct drm_device *dev,
> >>
> >> drm_modeset_lock_crtc(crtc, crtc->primary);
> >> crtc_resp->gamma_size = crtc->gamma_size;
> >> - if (crtc->primary->fb)
> >> +
> >> + if (crtc->primary->state && crtc->primary->state->fb)
> >> + crtc_resp->fb_id = crtc->primary->state->fb->base.id;
> >> + else if (!crtc->primary->state && crtc->primary->fb)
> >> crtc_resp->fb_id = crtc->primary->fb->base.id;
> >
> > I think what we do elsewhere is totally ignore the legacy junk if the
> > ->state pointer exists.
>
> Indeed, hence the negative state check on the second branch; having nested if statements instead seemed unnecessarily unwieldy, but the effect is the same.
My bad. You hid it well though ;)
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
--
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2016-12-13 21:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-13 18:19 [PATCH] drm: Use atomic state for FB in legacy ioctls Daniel Stone
2016-12-13 18:48 ` Ville Syrjälä
2016-12-13 19:02 ` Daniel Stone
2016-12-13 21:14 ` Ville Syrjälä [this message]
2016-12-13 21:22 ` 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=20161213211447.GR31595@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@intel.com \
--cc=daniels@collabora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.