Re: [PATCH] drm: Use atomic state for FB in legacy ioctls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

-- 
Ville Syrjälä
Intel OTC
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux