From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915: Make infoframe trnsmission more reliable on g4x
Date: Mon, 10 Feb 2014 18:28:47 +0100 [thread overview]
Message-ID: <20140210172847.GA17001@phenom.ffwll.local> (raw)
In-Reply-To: <20140210124007.GG3891@intel.com>
On Mon, Feb 10, 2014 at 02:40:07PM +0200, Ville Syrjälä wrote:
> On Mon, Feb 10, 2014 at 12:16:14PM +0000, Damien Lespiau wrote:
> > On Thu, Jan 23, 2014 at 11:15:35PM +0200, ville.syrjala@linux.intel.com wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > On g4x there's just one video DIP, but there can be two HDMI/DVI
> > > ports. Currently even a DVI monitor on another port can clobber
> > > the infoframes meant for a real HDMI monitor on the other port.
> > >
> > > Make sure we only ever send DIPs to one port. The first port with a
> > > HDMI sink to get there gets to own the DIP until such time that the
> > > port is completely turned off (ie. not just DPMS off). If there are
> > > two HDMI sinks attached, the one to arrive second doesn't get any
> > > infoframes. And if there's a DVI sink on the other port, it will
> > > no longer disable DIP transmission for the other port.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
> >
> > I guess follow-up patches could turn off Video DIPs on other platforms,
> > if I read the code correctly we're always leaving Video DIPs on when
> > disabling the pipe.
>
> Yeah. Actually I realized afterwards that that's also a problem if we
> switch from say HDMI->DP on the same transcoder. We might end up
> sending infoframes to the DP sink that we constructed for the HDMI sink.
> Or if the video DIP has port select bits (not all platforms do), then
> I think we might even end up sending infoframes from some transcoder to
> a port that isn't connected to said transcoder. I have no idea if the
> hardware can even do that, but it would seem safer not to program it
> that way in the first place.
>
> But the .off hook isn't sufficient to fix that since we could switch the
> output without calling the .off hook. I think the real solution would to
> always disable infoframes in hdmi disable or post_disable, and always
> re-enabling them in enable or pre_enable.
>
> That would require changing the new g4x logic you just reviewed since
> we couldn't track the owner of the video DIP by the register contents
> anymore. So I think we'd need to add a piece of software state for that
> purpose instead.
>
> If anyone's looking for a relatively straightforward small project,
> this would seem to fit the bill.
Or plan B:
1. Add infoframe tracking to the pipe_config.
2. Use the new ->new_config pointers to arbitrate on g4x/vlv and clear the
pipe_config->has_infoframes bit if more than one pipe needs. Yeah that
means if you disable the 1st pipe the 2nd won't automatically get
infoframes, but a) meh b) we can fix that once we have atomic modeset and
recompute the config always. So a FIXME comment should be good enough.
3. Lock it down with infoframes hw readout support. Make that also check
that the infoframes are correct (i.e. our own), which gives us
infoframe-correct fastboot support.
Now the ->off hook in this series moves into another direction entirely,
so I'm not sure whether I should merge it. Also we don't seem to have bug
reports about this really, probably due to the lack of state checking ;-)
Suggestions highly welcome.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2014-02-10 17:28 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-23 21:15 [PATCH 0/3] drm/i915: "Fix" g4x infoframes w/ multiple HDMI/DVI monitors ville.syrjala
2014-01-23 21:15 ` [PATCH 1/3] drm/i915: Add encoder .off() hook ville.syrjala
2014-02-10 12:10 ` Damien Lespiau
2014-01-23 21:15 ` [PATCH 2/3] drm/i915: Convert DIP port switch cases to a simple macro ville.syrjala
2014-02-10 12:11 ` Damien Lespiau
2014-02-13 9:43 ` Daniel Vetter
2014-01-23 21:15 ` [PATCH 3/3] drm/i915: Make infoframe trnsmission more reliable on g4x ville.syrjala
2014-02-10 12:16 ` Damien Lespiau
2014-02-10 12:40 ` Ville Syrjälä
2014-02-10 17:28 ` Daniel Vetter [this message]
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=20140210172847.GA17001@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--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 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.