[PATCH 1/2] drm: Simplify fb refcounting rules around ->update_plane

Daniel Vetter daniel.vetter at ffwll.ch
Wed Apr 23 08:25:42 PDT 2014


On Wed, Apr 23, 2014 at 4:45 PM, Matt Roper <matthew.d.roper at intel.com> wrote:
>> @@ -177,22 +176,7 @@ int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
>>       set.connectors = connector_list;
>>       set.num_connectors = num_connectors;
>>
>> -     /*
>> -      * set_config() adjusts crtc->primary->fb; however the DRM setplane
>> -      * code that called us expects to handle the framebuffer update and
>> -      * reference counting; save and restore the current fb before
>> -      * calling it.
>> -      *
>> -      * N.B., we call set_config() directly here rather than using
>> -      * drm_mode_set_config_internal.  We're reprogramming the same
>> -      * connectors that were already in use, so we shouldn't need the extra
>> -      * cross-CRTC fb refcounting to accomodate stealing connectors.
>> -      * drm_mode_setplane() already handles the basic refcounting for the
>> -      * framebuffers involved in this operation.
>> -      */
>
> I think the second half of this comment (explaining why we call
> set_config() directly rather than calling
> drm_mode_set_config_internal()) still has some value.

Sorry I've forgotten to keep it when respinning the patch. I agree
with you. Will resend.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list