From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: John Hunter <zhjwpku@gmail.com>, dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH] drm: add a drm_atomic_helper_plane_check_update
Date: Mon, 13 Jul 2015 09:17:18 +0200 [thread overview]
Message-ID: <55A365FE.8040008@linux.intel.com> (raw)
In-Reply-To: <55A364E5.4000703@linux.intel.com>
Op 13-07-15 om 09:12 schreef Maarten Lankhorst:
> Op 13-07-15 om 02:21 schreef John Hunter:
>> From: Zhao Junwang <zhjwpku@gmail.com>
>>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
>> ---
>> drivers/gpu/drm/drm_atomic_helper.c | 55 +++++++++++++++++++++++++++++++++++
>> include/drm/drm_atomic_helper.h | 7 +++++
>> 2 files changed, 62 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
>> index 536ae4d..3d94ff8 100644
>> --- a/drivers/gpu/drm/drm_atomic_helper.c
>> +++ b/drivers/gpu/drm/drm_atomic_helper.c
>> @@ -1336,6 +1336,61 @@ void drm_atomic_helper_swap_state(struct drm_device *dev,
>> EXPORT_SYMBOL(drm_atomic_helper_swap_state);
>>
>> /**
>> + * drm_atomic_helper_plane_check_update
>> + * @plane: plane object to update
> == plane_state->plane, so can be removed
>> + * @state: drm plane state
> rename to plane_state
>> + * @min_scale: minimum @src:@dest scaling factor in 16.16 fixed point
>> + * @max_scale: maximum @src:@dest scaling factor in 16.16 fixed point
>> + * @can_position: is it legal to position the plane such that it
>> + * doesn't cover the entire crtc? This will generally
>> + * only be false for primary planes.
>> + * @can_update_disabled: can the plane be updated while the crtc
>> + * is disabled?
>> + *
> If you look carefully at drm_plane_helper_check_update, can_update_disabled will be a noop,
> so remove this parameter.
>
> plane_state->crtc != NULL iff plane_state->fb != NULL
>
Oops, should check harder before I hit send. You can disable a crtc with planes attached, but the clip
will be bogus in that case. When !crtc->enable the clip will be set { 0, 0, 0, 0 }, hiding the plane.
There's still no need for can_update_disabled in the atomic world though, the plane state will be properly recalculated during a modeset.
If you don't want to update a plane while a crtc is disabled, just don't update it in your commit function.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2015-07-13 7:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 0:21 [PATCH] drm: add a drm_atomic_helper_plane_check_update John Hunter
2015-07-13 6:38 ` Daniel Vetter
2015-07-13 7:12 ` Maarten Lankhorst
2015-07-13 7:17 ` Maarten Lankhorst [this message]
2015-07-13 7:35 ` John Hunter
-- strict thread matches above, loose matches on Subject: below --
2015-07-13 10:35 John Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55A365FE.8040008@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=zhjwpku@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.