Re: [PATCH 12/17] drm: convert crtc to properties/state

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

 



On Mon, May 26, 2014 at 5:31 AM, Daniel Vetter <daniel@xxxxxxxx> wrote:
>> +struct drm_crtc_state *
>> +drm_atomic_get_crtc_state(struct drm_crtc *crtc, struct drm_atomic_state *a)
>> +{
>> +     struct drm_crtc_state *cstate;
>> +     int ret;
>> +
>> +     cstate = a->cstates[crtc->id];
>> +
>> +     if (!cstate) {
>> +             ret = drm_modeset_lock(&crtc->mutex, &a->acquire_ctx);
>> +             if (ret)
>> +                     return ERR_PTR(ret);
>> +
>> +             cstate = drm_crtc_create_state(crtc);
>> +             if (!cstate)
>> +                     return ERR_PTR(-ENOMEM);
>> +             init_crtc_state(crtc, cstate, a);
>> +             a->crtcs[crtc->id] = crtc;
>> +             a->cstates[crtc->id] = cstate;
>> +
>> +             /* we'll need it later, so make sure we have state
>> +              * for primary plane too:
>> +              */
>> +             drm_atomic_get_plane_state(crtc->primary, a);
>
> I haven't figured out why. With primary planes I don't really see a need
> for this. If we need it to implement the legacy setcrtc interface, then
> that should be done there, not here.


well, if you sort out how to disable primary helper plane, then yes,
you are right :-)

see commit_crtc_state()

BR,
-R
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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