<div dir="ltr">So we should remove the can_update_disabled parameter, and set it to true<div>in the drm_plane_helper_check_update callback?</div><div><br></div><div>I am still learning the atomic world, pls forgive if I don't understand it well</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 13, 2015 at 3:17 PM, Maarten Lankhorst <span dir="ltr"><<a href="mailto:maarten.lankhorst@linux.intel.com" target="_blank">maarten.lankhorst@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Op 13-07-15 om 09:12 schreef Maarten Lankhorst:<br>
<div><div class="h5">> Op 13-07-15 om 02:21 schreef John Hunter:<br>
>> From: Zhao Junwang <<a href="mailto:zhjwpku@gmail.com">zhjwpku@gmail.com</a>><br>
>><br>
>> Cc: Daniel Vetter <<a href="mailto:daniel.vetter@ffwll.ch">daniel.vetter@ffwll.ch</a>><br>
>> Signed-off-by: Zhao Junwang <<a href="mailto:zhjwpku@gmail.com">zhjwpku@gmail.com</a>><br>
>> ---<br>
>>  drivers/gpu/drm/drm_atomic_helper.c |   55 +++++++++++++++++++++++++++++++++++<br>
>>  include/drm/drm_atomic_helper.h     |    7 +++++<br>
>>  2 files changed, 62 insertions(+)<br>
>><br>
>> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c<br>
>> index 536ae4d..3d94ff8 100644<br>
>> --- a/drivers/gpu/drm/drm_atomic_helper.c<br>
>> +++ b/drivers/gpu/drm/drm_atomic_helper.c<br>
>> @@ -1336,6 +1336,61 @@ void drm_atomic_helper_swap_state(struct drm_device *dev,<br>
>>  EXPORT_SYMBOL(drm_atomic_helper_swap_state);<br>
>><br>
>>  /**<br>
>> + * drm_atomic_helper_plane_check_update<br>
>> + * @plane: plane object to update<br>
> == plane_state->plane, so can be removed<br>
>> + * @state: drm plane state<br>
> rename to plane_state<br>
>> + * @min_scale: minimum @src:@dest scaling factor in 16.16 fixed point<br>
>> + * @max_scale: maximum @src:@dest scaling factor in 16.16 fixed point<br>
>> + * @can_position: is it legal to position the plane such that it<br>
>> + *                doesn't cover the entire crtc?  This will generally<br>
>> + *                only be false for primary planes.<br>
>> + * @can_update_disabled: can the plane be updated while the crtc<br>
>> + *                       is disabled?<br>
>> + *<br>
> If you look carefully at drm_plane_helper_check_update, can_update_disabled will be a noop,<br>
> so remove this parameter.<br>
><br>
> plane_state->crtc != NULL iff plane_state->fb != NULL<br>
><br>
</div></div>Oops, should check harder before I hit send. You can disable a crtc with planes attached, but the clip<br>
will be bogus in that case. When !crtc->enable the clip will be set { 0, 0, 0, 0 }, hiding the plane.<br>
<br>
There's still no need for can_update_disabled in the atomic world though, the plane state will be properly recalculated during a modeset.<br>
If you don't want to update a plane while a crtc is disabled, just don't update it in your commit function.<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>Best regards<br></div><div>Junwang Zhao</div><div>Microprocessor Research and Develop Center</div><div>Department of Computer Science &Technology</div><div>Peking University</div><div>Beijing, 100871, PRC</div></div></div>
</div>