From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Move modeset state checker calls.
Date: Fri, 8 Apr 2016 11:38:55 +0200 [thread overview]
Message-ID: <57077C2F.3000703@linux.intel.com> (raw)
In-Reply-To: <20160407232336.GH22764@intel.com>
Op 08-04-16 om 01:23 schreef Matt Roper:
> On Wed, Mar 23, 2016 at 02:58:07PM +0100, Maarten Lankhorst wrote:
>> The modeset state checker no longer has full access to the hardware,
>> instead it should only check affected crtc's.
>>
>> Looking for disabled stuff can be checked immediately after all crtc
>> disables have completed, while each enabled crtc can be checked right
>> after being enabled.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> drivers/gpu/drm/i915/intel_display.c | 24 +++++-------------------
>> 1 file changed, 5 insertions(+), 19 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
>> index 4148b262f2a7..b6a75aa32e5a 100644
>> --- a/drivers/gpu/drm/i915/intel_display.c
>> +++ b/drivers/gpu/drm/i915/intel_display.c
>> @@ -13027,28 +13027,13 @@ check_disabled_dpll_state(struct drm_device *dev)
>> }
>>
>> static void
>> -intel_modeset_check_disabled(struct drm_device *dev,
>> - struct drm_atomic_state *old_state)
>> +intel_modeset_check_disabled(struct drm_device *dev)
>> {
>> check_encoder_state(dev);
>> check_connector_state(dev, NULL);
>> check_disabled_dpll_state(dev);
>> }
>>
>> -static void
>> -intel_modeset_check_state(struct drm_device *dev,
>> - struct drm_atomic_state *old_state)
>> -{
>> - struct drm_crtc_state *old_crtc_state;
>> - struct drm_crtc *crtc;
>> - int i;
>> -
>> - for_each_crtc_in_state(old_state, crtc, old_crtc_state, i)
>> - intel_modeset_check_crtc(crtc, old_crtc_state, crtc->state);
>> -
>> - intel_modeset_check_disabled(dev, old_state);
>> -}
>> -
>> static void update_scanline_offset(struct intel_crtc *crtc)
>> {
>> struct drm_device *dev = crtc->base.dev;
>> @@ -13616,6 +13601,8 @@ static int intel_atomic_commit(struct drm_device *dev,
>> if (dev_priv->display.modeset_commit_cdclk &&
>> intel_state->dev_cdclk != dev_priv->cdclk_freq)
>> dev_priv->display.modeset_commit_cdclk(state);
>> +
>> + intel_modeset_check_disabled(dev);
> As noted on patch #1, since we're checking all disabled state (and not
> just the things that are newly-disabled by this transaction), we may not
> hold full locks over everything that's disabled here and might be racing
> with other updates. But we're no worse off than we were before.
>
> As a minor behavior change, it looks like we're also no longer calling
> this when we're doing non-modeset pipe updates, but that should be fine.
>
This is true, but enabling a pipe requires connection_mutex, which is always held if we do a modeset anyway..
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2016-04-08 9:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-23 13:58 [PATCH 0/2] drm/i915: Split up modeset state checker Maarten Lankhorst
2016-03-23 13:58 ` [PATCH 1/2] drm/i915: Make modeset state checker take crtc as argument Maarten Lankhorst
2016-04-07 23:22 ` Matt Roper
2016-03-23 13:58 ` [PATCH 2/2] drm/i915: Move modeset state checker calls Maarten Lankhorst
2016-04-07 23:23 ` Matt Roper
2016-04-08 9:38 ` Maarten Lankhorst [this message]
2016-03-25 16:59 ` [PATCH 0/2] drm/i915: Split up modeset state checker Matt Roper
2016-03-29 7:33 ` Maarten Lankhorst
2016-03-30 8:00 ` [PATCH 3/2] drm/i915: Rename hw state checker to hw state verifier Maarten Lankhorst
2016-03-30 11:26 ` Daniel Vetter
2016-04-07 23:24 ` Matt Roper
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=57077C2F.3000703@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.d.roper@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 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.