public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Thomas Richter <thor@math.tu-berlin.de>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: Questions on display pipes on 835GM
Date: Sat, 05 Oct 2013 18:47:05 +0200	[thread overview]
Message-ID: <52504289.10107@math.tu-berlin.de> (raw)
In-Reply-To: <29761_1380973482_524FFBA9_29761_4042_1_20131005114432.GE9395@intel.com>

Hi Ville, hi Daniel,

>> Thus, here my questions:
>> *) Can I, within the dvo driver code, somehow detect to which display
>> pipe the DVO and thus the TFT is actually connected
>> to?
>
> Something like this:
> intel_dvo = container_of(dvo,  struct intel_dvo, dev);
> pipe = to_intel_ctrc(intel_dvo.base.base.crtc)->pipe
>
> But currectly it looks like struct intel_dvo isn't visible
> outside intel_dvo.c which would need changing, or the hacks
> need to be moved into intel_dvoc.

What I currently did is that I'm assuming that the intel_encoder struct 
is right in front of the dvo structure, and thus I can get the pipe this 
way. Yuck!

However, while I get the proper pipe back, apparently there is a 
discrepancy of what the i915 believes the DVO is attached to, and which 
pipe it is actually attached to. That is, if I boot up without an 
external monitor, everything is fine and my pipe code returns pipe 0, 
and "unlocks" the DVO correctly. If an external monitor is connected, 
the DVO locks up again during bootstrap.

>> *) Can I somehow prohibit that the DVO is driven by *anything but* the
>> 60Hz signal it likes, thus to prevent the lock-up
>> and disable the weird hack I'm currently using?
>
> I think currently it should be driven at the correct rate or not at all.

True enough, but how to ensure this?

> The CRT port can only be driven by pipe A, so I think that explains why
> your hacks may go bad when a CRT monitor is used.

Understood, this makes sense. Thus, DVO would then be at pipe B. How is 
this switch made, and where? There need to be a register somewhere that 
tells the i835 which signal goes where.

> I see several problems with the ns2501 code.
> - it assumes DVOC. While that may be true always, getting the correct
>    register from .dvo_reg is trivial

This is actually no longer required. I experimented a bit with it and 
all that is necessary to keep the DVO active is the proper timing in the 
PLL register, either A or B, whatever the DVO is attached to.

> - assumes pipe A, which as stated isn't always true. During modesetting
>    operations you can get the correct crtc via intel_dvo.base.base.crtc,
>    from which you can get the pipe.

True enough, but this information does not seem to be up to date, or 
seems to be incorrect if an external monitor is attached. If I'm 
resetting pipes A and B, then I don't see a problem and my little hack 
can activate the DVO just fine. However, some part of the i915 driver 
seem to have loaded an incorrect value into the pipe B PLL, then again 
creating a lock-up on the internal display.

It seems to me that if "mirroring" is enabled, both displays seem to be 
driven by the same PLL, hence by the same frequency, hence locking up 
the display. The DVO is awakened by the hack if required, but the TFT is 
dead anyhow.

> - the hack doesn't set up all the DPLL registers, but I suppose we
>    could try to eliminate the hack. One thing that would need maybe
>    fixing is the get_hw_state function. We could perhaps just change
>    intel_dvo.c not to call the connector get_hw_state func if the
>    encoder says the dvo port isn't active.

Not necessary, actually. If the PLL registers are set correctly, the DVO 
is operational.

Concerning the get_hw_state(), I also added the hack here to re-enable 
the DVO if it's stuck, but it doesn't make a difference.

Greetings,
	Thomas

  parent reply	other threads:[~2013-10-05 16:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-23 22:51 [PATCH] drm/i915: enable trickle feed on Haswell Paulo Zanoni
2013-08-30 17:25 ` Ville Syrjälä
2013-09-02  6:01   ` Daniel Vetter
     [not found]   ` <29427_1378101775_52242A0E_29427_747_1_20130902060151.GE9374@phenom.ffwll.local>
2013-10-05  8:33     ` Questions on display pipes on 835GM Thomas Richter
2013-10-05 11:44       ` Ville Syrjälä
     [not found]       ` <29761_1380973482_524FFBA9_29761_4042_1_20131005114432.GE9395@intel.com>
2013-10-05 16:47         ` Thomas Richter [this message]
2013-10-05 19:24           ` Daniel Vetter
2013-10-05 19:39             ` Daniel Vetter
     [not found]             ` <29761_1381001928_52506AC8_29761_5606_1_20131005193904.GX31334@phenom.ffwll.local>
2013-10-05 23:09               ` Thomas Richter
2013-10-05 23:37                 ` Daniel Vetter
     [not found]                 ` <5132_1381149082_5252A99A_5132_80_1_CAKMK7uHkOJ=urFKCacocf_i+6YL9Azf5vK=Au-kRJMi=sNBP1Q@mail.gmail.com>
2013-10-07 21:58                   ` Broken in 3.10.10 (was: Questions on display pipes on 835GM) Thomas Richter
2013-10-08  7:24                     ` Daniel Vetter
2013-10-08  8:39                       ` Daniel Vetter
2013-10-08  9:14                         ` Chris Wilson
     [not found]                       ` <26192_1381221546_5253C4A9_26192_7222_1_CAKMK7uGvk9vuNXunutyHjkGjvBWsv7ObN02EfbG2679MtQ5M=A@mail.gmail.com>
2013-10-08 17:06                         ` Broken in 3.10.10 Thomas Richter
2013-10-05 23:04         ` [PATCH] 835GM DLL setup Thomas Richter
2013-10-05 23:46           ` 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=52504289.10107@math.tu-berlin.de \
    --to=thor@math.tu-berlin.de \
    --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