All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Thulasimani, Sivakumar" <sivakumar.thulasimani@intel.com>
To: Jani Nikula <jani.nikula@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH] drm/i915: restrict PP save/restore to platforms with lvds
Date: Tue, 9 Feb 2016 13:05:25 +0530	[thread overview]
Message-ID: <56B996BD.9050007@intel.com> (raw)
In-Reply-To: <87wpqev1sb.fsf@intel.com>



On 2/9/2016 11:54 AM, Jani Nikula wrote:
> On Tue, 09 Feb 2016, "Thulasimani, Sivakumar" <sivakumar.thulasimani@intel.com> wrote:
>> On 2/8/2016 3:25 PM, Daniel Vetter wrote:
>>> eDP already restores PP state completely on it's own, we only need
>>> this code for LVDS. Since it's more work to move this into the lvds
>>> encoder properly just limit it to affected pch chips for now
>>> (ibx&cpt/ppt).
>>>
>>> Cc: Jani Nikula <jani.nikula@intel.com>
>>> Acked-by: Jani Nikula <jani.nikula@intel.com>
>>> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/i915_suspend.c | 8 ++++----
>>>    1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
>>> index a2aa09ce3202..7f6b050266a7 100644
>>> --- a/drivers/gpu/drm/i915/i915_suspend.c
>>> +++ b/drivers/gpu/drm/i915/i915_suspend.c
>>> @@ -43,8 +43,8 @@ static void i915_save_display(struct drm_device *dev)
>>>    	else if (INTEL_INFO(dev)->gen <= 4 && IS_MOBILE(dev) && !IS_I830(dev))
>>>    		dev_priv->regfile.saveLVDS = I915_READ(LVDS);
>>>    
>>> -	/* Panel power sequencer */
>>> -	if (HAS_PCH_SPLIT(dev)) {
>>> +	/* Panel power sequencer, only needed for LVDS */
>>> +	if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) {
>>>    		dev_priv->regfile.savePP_CONTROL = I915_READ(PCH_PP_CONTROL);
>>>    		dev_priv->regfile.savePP_ON_DELAYS = I915_READ(PCH_PP_ON_DELAYS);
>>>    		dev_priv->regfile.savePP_OFF_DELAYS = I915_READ(PCH_PP_OFF_DELAYS);
>> won't this code execute for eDP too ? Also it seems incorrect we are
>> saving and restoring PP_CONTROL register too when we should have
>> followed proper sequence delays for each bit in PP_CONTROL.  This will
>> end up bring up the panel before modeset in best case or damage the
>> panel in the worst case.
> Exactly the reasons why we are trying to limit this code to fewer
> platforms! This is very fragile stuff though, I fear we might regress
> something (even if that something is currently working by coincidence)
> if we limit this further, in one go. I'd like to do this little by
> little, and see what breaks, if anything.
>
> With this patch, we'd already limit all of this hackery to cougarpoint
> and older, instead of all PCH split up to and including Skylake. If
> anyone wants to dig into LVDS power sequencing after that, I'm not
> opposed...
>
> BR,
> Jani.
missed the part where this patch is reducing the platforms :).
can we reduce this to systems with LVDS alone ? i am sure eDP will 
blankout if
pps is not followed but have observed some LVDS panels working even without
pps delays.

Sivakumar
>
>> Sivakumar
>>
>>> @@ -78,8 +78,8 @@ static void i915_restore_display(struct drm_device *dev)
>>>    	else if (INTEL_INFO(dev)->gen <= 4 && IS_MOBILE(dev) && !IS_I830(dev))
>>>    		I915_WRITE(LVDS, dev_priv->regfile.saveLVDS & mask);
>>>    
>>> -	/* Panel power sequencer */
>>> -	if (HAS_PCH_SPLIT(dev)) {
>>> +	/* Panel power sequencer, only needed for LVDS */
>>> +	if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev)) {
>>>    		I915_WRITE(PCH_PP_ON_DELAYS, dev_priv->regfile.savePP_ON_DELAYS);
>>>    		I915_WRITE(PCH_PP_OFF_DELAYS, dev_priv->regfile.savePP_OFF_DELAYS);
>>>    		I915_WRITE(PCH_PP_DIVISOR, dev_priv->regfile.savePP_DIVISOR);

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-02-09  7:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-08  9:55 [PATCH] drm/i915: restrict PP save/restore to platforms with lvds Daniel Vetter
2016-02-09  2:46 ` Thulasimani, Sivakumar
2016-02-09  6:24   ` Jani Nikula
2016-02-09  7:35     ` Thulasimani, Sivakumar [this message]
2016-03-10 10:20 ` ✗ Fi.CI.BAT: warning for " Patchwork

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=56B996BD.9050007@intel.com \
    --to=sivakumar.thulasimani@intel.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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.