From: Thierry Reding <thierry.reding@gmail.com>
To: Liviu Dudau <Liviu.Dudau@arm.com>
Cc: Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
Rob Clark <robdclark@gmail.com>,
DRI devel <dri-devel@lists.freedesktop.org>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: drm: Bogus WARN() in drm_atomic_helper_update_legacy_modeset_state() ?
Date: Thu, 12 Nov 2015 13:16:55 +0100 [thread overview]
Message-ID: <20151112121655.GA31019@ulmo> (raw)
In-Reply-To: <20151111160942.GS963@e106497-lin.cambridge.arm.com>
[-- Attachment #1: Type: text/plain, Size: 2192 bytes --]
On Wed, Nov 11, 2015 at 04:09:42PM +0000, Liviu Dudau wrote:
> On Tue, Nov 10, 2015 at 05:56:15PM +0100, Thierry Reding wrote:
> > On Tue, Nov 10, 2015 at 03:01:03PM +0000, Liviu Dudau wrote:
> > > Hello,
> > >
> > > When booting my Juno board with the HDLCD driver that I have converted to
> > > atomic operations I'm getting the following warning:
> >
> > Perhaps you can provide pointers to the source code, that might make it
> > easier for people to spot what's going wrong.
> >
> > Thierry
>
> Hi Thierry,
>
> I have just pushed to the mailing lists my patch series. [1] [2]
>
> If you want to checkout the code I also have a branch here:
>
> git://git://linux-arm.org/linux-ld testing/hdlcd
Okay, so if I understand correctly you're using the tda998x as encoder/
connector attached to your new HDLCD driver. I think the problem isn't
so much that nothing has set up the CRTC for the encoder, but rather
that the tda998x encoder tries to statically associate the encoder with
the connector. While that might be correct in that it represents the
hardware state (i.e. there is no way to physically route it anywhere
else), the DRM logical state is that it's not connected until a complete
pipeline has been set up, in which case a CRTC would have been assigned
to the encoder.
If your setup were working correctly you'd never reach the WARN_ON
because the
if (connector->encoder) {
conditional (on line 673 in drivers/gpu/drm/drm_atomic_helper.c) would
have evaluated to false already, since logically there'd be no encoder
associated with the connector yet.
Does the patch below help? Let me know and I can produce a proper patch.
Thierry
--- >8 ---
diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c
index 896b6aaf8c4d..8b0a402190eb 100644
--- a/drivers/gpu/drm/i2c/tda998x_drv.c
+++ b/drivers/gpu/drm/i2c/tda998x_drv.c
@@ -1453,7 +1453,6 @@ static int tda998x_bind(struct device *dev, struct device *master, void *data)
if (ret)
goto err_sysfs;
- priv->connector.encoder = &priv->encoder;
drm_mode_connector_attach_encoder(&priv->connector, &priv->encoder);
return 0;
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-11-12 12:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 15:01 drm: Bogus WARN() in drm_atomic_helper_update_legacy_modeset_state() ? Liviu Dudau
2015-11-10 16:56 ` Thierry Reding
2015-11-11 16:09 ` Liviu Dudau
2015-11-12 12:16 ` Thierry Reding [this message]
2015-11-12 13:57 ` Liviu Dudau
2015-11-12 16:28 ` Thierry Reding
2015-11-16 16:30 ` Daniel Vetter
[not found] ` <56443151.3020508@rock-chips.com>
[not found] ` <56443311.2020902@rock-chips.com>
2015-11-12 10:34 ` Liviu Dudau
2015-11-12 10:52 ` Mark yao
2015-11-12 12:26 ` Thierry Reding
[not found] ` <56444EA1.3050506@rock-chips.com>
2015-11-12 10:36 ` Liviu Dudau
2015-11-12 10:49 ` Mark yao
2015-11-12 13:34 ` Thierry Reding
2015-11-12 14:03 ` Liviu Dudau
2015-11-12 16:12 ` Thierry Reding
2015-11-12 16:48 ` Liviu Dudau
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=20151112121655.GA31019@ulmo \
--to=thierry.reding@gmail.com \
--cc=Liviu.Dudau@arm.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robdclark@gmail.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