From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 04/15] drm/i915: Walk over encoders in crtc enable/disable using atomic state.
Date: Mon, 11 Jul 2016 06:54:23 +0200 [thread overview]
Message-ID: <30435155-4bf2-6595-cd87-ec6b5e4ab9f0@linux.intel.com> (raw)
In-Reply-To: <20160708103019.GS4329@intel.com>
Op 08-07-16 om 12:30 schreef Ville Syrjälä:
> On Thu, Jul 07, 2016 at 01:55:46PM +0200, Maarten Lankhorst wrote:
>> This cleans up another possible use of the connector list,
>> encoder->crtc is legacy state and should not be used.
>>
>> With the atomic state as argument it's easy to find the encoder from
>> the connector it belongs to.
>>
>> intel_opregion_notify_encoder is a noop for !HAS_DDI, so it's harmless
>> to unconditionally include it in encoder enable/disable.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 190 ++++++++++++++++++++++++-----------
>> 1 file changed, 134 insertions(+), 56 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 8e7d453db48c..19e5379000b8 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -4704,6 +4704,123 @@ static void intel_crtc_disable_planes(struct drm_crtc *crtc, unsigned plane_mask
>> intel_frontbuffer_flip(dev, INTEL_FRONTBUFFER_ALL_MASK(pipe));
>> }
>>
>> +static void intel_encoders_pre_pll_enable(struct drm_crtc *crtc,
>> + struct drm_atomic_state *old_state)
> This whole old_state thing is very annoying. We're enabling things, so
> intuitively one would assume that we want to look at the new state.
> It's not quite as bad here as it's in the cdclk code where old_state
> actually contain partially old and partially new state.
>
> Would be nice if someone came up with some kind of sane solution for
> this, that would avoid having to crosswire one's brain. Would be nice
> to have explicit old and new states I think.
>
> And the magic disable phase is my other main annoyance with atomic. If
> we had an explicit new state, then splitting the disable+(re)enable
> sequence into three states should be much easier, so that we'd have a
> nice transition like so: old_state->stuff_disabled_state->stuff_enabled_state.
> But of course this migh still be a little hard to achieve on account of
> atomic unwisely mixing up the user visible state and internal state in
> the same structures.
>
Agreed, although the real bummer is different meaning to the state pointer before
and after commit. Before it contains the new state, after the old. It would make
more sense to have a pointer to both, and differentiate using
for_each_<old,new>_<plane,connector,crtc>_in_state
Maybe an option to use both states as well, for the few places that would need it, mostly in atomic check.
~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-07-11 4:54 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-07 11:55 [PATCH 01/15] drm/i915: handle DP_MST correctly in bxt_get_dpll Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 02/15] drm/i915: Pass atomic state to crtc enable/disable functions Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 03/15] drm/i915: Remove unused mode_set hook from encoder Maarten Lankhorst
2016-07-08 10:19 ` Ville Syrjälä
2016-07-07 11:55 ` [PATCH 04/15] drm/i915: Walk over encoders in crtc enable/disable using atomic state Maarten Lankhorst
2016-07-08 10:30 ` Ville Syrjälä
2016-07-11 4:54 ` Maarten Lankhorst [this message]
2016-07-07 11:55 ` [PATCH 05/15] drm/i915: Pass crtc_state and connector_state to encoder functions Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 06/15] drm/i915: Make encoder->compute_config take the connector state Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 07/15] drm/i915: Remove unused loop from intel_dp_mst_compute_config Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 08/15] drm/i915: Convert intel_crt to use atomic state Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 09/15] drm/i915: Convert intel_dvo " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 10/15] drm/i915: Convert intel_dsi " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 11/15] drm/i915: Convert intel_sdvo " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 12/15] drm/i915: Convert intel_lvds " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 13/15] drm/i915: Convert intel_dp_mst " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 14/15] drm/i915: Convert intel_dp " Maarten Lankhorst
2016-07-07 11:55 ` [PATCH 15/15] drm/i915: Use more atomic state in intel_color.c Maarten Lankhorst
2016-07-07 12:23 ` ✗ Ro.CI.BAT: warning for series starting with [01/15] drm/i915: handle DP_MST correctly in bxt_get_dpll Patchwork
2016-07-08 9:58 ` [PATCH 01/15] " Ville Syrjälä
-- strict thread matches above, loose matches on Subject: below --
2016-08-09 15:03 [PATCH 00/15] drm/i915: Use connector atomic state in encoders Maarten Lankhorst
2016-08-09 15:04 ` [PATCH 04/15] drm/i915: Walk over encoders in crtc enable/disable using atomic state Maarten Lankhorst
2016-08-22 14:28 ` Daniel Vetter
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=30435155-4bf2-6595-cd87-ec6b5e4ab9f0@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox