From: Daniel Vetter <daniel@ffwll.ch>
To: Egbert Eich <eich@freedesktop.org>
Cc: Egbert Eich <eich@suse.de>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915: Set up SDVO encoder type only at detect
Date: Wed, 16 Apr 2014 09:55:10 +0200 [thread overview]
Message-ID: <20140416075509.GF10722@phenom.ffwll.local> (raw)
In-Reply-To: <21326.7192.130642.36744@linux-qknr.fritz.box>
On Wed, Apr 16, 2014 at 07:58:48AM +0200, Egbert Eich wrote:
> Daniel Vetter writes:
> > On Mon, Apr 14, 2014 at 07:26:09PM +0200, Egbert Eich wrote:
> > > Depending on the SDVO output_flags SDVO may have multiple connectors.
> > > These are all initialized in intel_sdvo_output_setup(). The connector
> > > that is initialized later will override the encoder_type that has been
> > > set up by an earlier connector type initialization. Eventually the
> > > one that comes last wins.
> > > Eventually when intel_sdvo_detect() is called the active connector is
> > > determined.
> > > Delay encoder type initialization until the active connector is known
> > > and set it to the type that corresponds to this connector.
> > >
> > > Signed-off-by: Egbert Eich <eich@suse.de>
> >
> > Hm, has this any effect on the code itself? I think if we want to fix this
> > just for optics we should add a new DRM_MODE_ENCODER_MULTI. At least I
> > have an sdvo here which has a dac, hdmi and tv-out ...
>
> With the present logic the last connector in the list matching a flag bit
> will win the encoder type. The encoder type is presently just used for
> (debug) messages, so it is cosmetic.
I'm vary of changing the encoder type at runtime tbh. We use the same hack
in intel_ddi.c to switch between hdmi and dp mode, and the results aren't
pretty imo. For debug output imo adding a new "multi" encoder type is
better.
And if we need the type somehow to set up the right connector for sdvo
encoders with more than one detected output, then we need to track this
piece of state somewhere in our modeset state (either with the
connector->encoder links or with a bit of state in the pipe config
structure). Which also means we need state read-out and cross-check
support to make sure it really does what we want.
Storing such state in global structure tends to lead to subtile bugs and
prevent proper pre-compute/commit semantics for modeset changes.
-Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
prev parent reply other threads:[~2014-04-16 7:55 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-14 17:26 [PATCH 0/2] Fix if multiple SDVO outputs are flagged Egbert Eich
2014-04-14 17:26 ` [PATCH 1/2] drm/i915: Only break encoder linked when linked to connector Egbert Eich
2014-04-15 7:46 ` Chris Wilson
2014-04-15 9:14 ` Egbert Eich
2014-04-15 19:08 ` Daniel Vetter
2014-04-16 6:04 ` Egbert Eich
2014-04-16 9:16 ` [PATCH] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() Egbert Eich
2014-04-16 11:42 ` Daniel Vetter
2014-04-25 8:56 ` [PATCH v3] " Egbert Eich
2014-04-25 11:28 ` Jani Nikula
2014-04-14 17:26 ` [PATCH 2/2] drm/i915: Set up SDVO encoder type only at detect Egbert Eich
2014-04-15 9:39 ` Chris Wilson
2014-04-15 19:14 ` [PATCH v2] " Egbert Eich
2014-04-15 19:19 ` Chris Wilson
2014-04-15 19:12 ` [PATCH 2/2] " Daniel Vetter
2014-04-16 5:58 ` Egbert Eich
2014-04-16 7:55 ` 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=20140416075509.GF10722@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=eich@freedesktop.org \
--cc=eich@suse.de \
--cc=intel-gfx@lists.freedesktop.org \
/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