From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Anholt Subject: Re: [PATCH 2/2] RFC: drm/pl111: Support using the VGA bridge as fallback Date: Tue, 05 Sep 2017 12:43:18 -0700 Message-ID: <87h8whq6cp.fsf@anholt.net> References: <20170901094629.6566-1-linus.walleij@linaro.org> <20170904074355.gjbf7he2dt5kszfg@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1399745030==" Return-path: Received: from anholt.net (anholt.net [50.246.234.109]) by gabe.freedesktop.org (Postfix) with ESMTP id F19366E5DA for ; Tue, 5 Sep 2017 19:47:55 +0000 (UTC) In-Reply-To: <20170904074355.gjbf7he2dt5kszfg@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Daniel Vetter , Linus Walleij Cc: linux-arm-kernel@lists.infradead.org, Laurent Pinchart , dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1399745030== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Daniel Vetter writes: > On Fri, Sep 01, 2017 at 11:46:29AM +0200, Linus Walleij wrote: >> If we cannot find a panel, assume that the output from the >> PL111 is connected directly to a "dumb" VGA connector, >> so look up the connector from that bridge. >>=20 >> Signed-off-by: Linus Walleij >> --- >> This is how the new API is used in the PL111. >> --- >> drivers/gpu/drm/pl111/Kconfig | 1 + >> drivers/gpu/drm/pl111/pl111_drv.c | 3 +++ >> 2 files changed, 4 insertions(+) >>=20 >> diff --git a/drivers/gpu/drm/pl111/Kconfig b/drivers/gpu/drm/pl111/Kconf= ig >> index e5e2abd66491..82cb3e60ddc8 100644 >> --- a/drivers/gpu/drm/pl111/Kconfig >> +++ b/drivers/gpu/drm/pl111/Kconfig >> @@ -8,6 +8,7 @@ config DRM_PL111 >> select DRM_GEM_CMA_HELPER >> select DRM_BRIDGE >> select DRM_PANEL_BRIDGE >> + select DRM_DUMB_VGA_DAC >> select VT_HW_CONSOLE_BINDING if FRAMEBUFFER_CONSOLE >> help >> Choose this option for DRM support for the PL111 CLCD controller. >> diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/p= l111_drv.c >> index f5bc6f160e60..6db423bbd84e 100644 >> --- a/drivers/gpu/drm/pl111/pl111_drv.c >> +++ b/drivers/gpu/drm/pl111/pl111_drv.c >> @@ -67,6 +67,7 @@ >> #include >> #include >> #include >> +#include >>=20=20 >> #include "pl111_drm.h" >> #include "pl111_versatile.h" >> @@ -128,6 +129,8 @@ static int pl111_modeset_init(struct drm_device *dev) >> if (panel) { >> priv->panel =3D panel; >> priv->connector =3D panel->connector; >> + } else { >> + priv->connector =3D drm_dumb_vga_get_connector(bridge); > > Why do you need to set this? The only code I could find tries to set > polarity values from bus_flags, and for VGA I'd assume you want to instead > key this off the mode? > > Wrt the more general problem: They way we solve this in the i915 atomic > framework is that the various ->fixup calls fill out relevant fields in > the drm_crtc_state. I guess we could add an ->atomic_check to bridges, add > a bus_flags to drm_crtc_state (or maybe just let everyone patch up > adjusted_mode->flags) instead? It seems to me like the bus_flags/format should be specific to each link in the display output chain, rather than global to it. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAlmu/lYACgkQtdYpNtH8 nuh7lxAAoxDUEicsJRSDpve3y3LNFDWIKlgtBZE/Sg9tVl01I+142Tf+7yBC39FU TJENVmHY37R1tOyOMTdYVb9SANK4nP4T4m64sp5J+y4llurwnca1Y53OEMmH3Qz5 wBPijbZHyoXZKEgpGmfgiyrigeR1Be0FK/ax4j61gEdsWufX+Dh9zeWfIehAFyTI qJXhnllpZoPSQV2tfjuYbFhDZ14cl+MIFIOb1anx+OWArf3sz89mAPXh23G5HMAA 4rnpYp6mnHV/0rQpWaETrXWctysOdbFTYuGTE+AX7NIeL9TtlX4drAibBvCZ6Y9o 0vmT4EGc2W79ZkrC72wDWOvh7KcYNgwok9og5IlXionG0dubUBxunuzEBEzAsz4D SJG6ToVwHSdWSMrfSt9hJp6sutJgRgbqXC1Va7aZvkS/3eNrNf+dDfk5PFZcAnl3 bd/K5lr2mD1EppHd3otAXQ2ITPC75lLYNywt33ND3Bk2eeDbnXVMWzA710P82BqC RQNsWa3pno3ef1OyQzjmzcavjz0VTeZ52cGqedEOsgGl8kYZVmcjElqBWW7jr90C 0g/TZXTc+5o/P3BRrjDjgyM5o3ozKtyq+R36X065fgNyfd/UtbzdSYHMrHlbPnm6 skXRIjMy/qjIcIEWnmtL66bAksJmL/14GXOvdOtQ2FsN4hCKZGM= =nKDN -----END PGP SIGNATURE----- --=-=-=-- --===============1399745030== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1399745030==--