On Tue, Dec 13, 2016 at 11:14:47PM +0200, Ville Syrjälä wrote: > 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@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> Applied to drm-misc, thanks. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel