From: Thomas Reim Subject: Re: [PATCH] drm/radeon/kms: remove useless radeon_ddc_dump() Date: Mon, 31 Oct 2011 16:15:04 +0100 Message-ID: <1320074105.4172.51.camel@Mark-Aurel.gas.de> References: <1319585047-1529-1-git-send-email-alexdeucher@gmail.com> <1319892930.14718.19.camel@Mark-Aurel.gas.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0810578472==" Return-path: Received: from mail-wy0-f177.google.com (mail-wy0-f177.google.com [74.125.82.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 8DDABA0208 for ; Mon, 31 Oct 2011 08:15:20 -0700 (PDT) Received: by wyf28 with SMTP id 28so901279wyf.36 for ; Mon, 31 Oct 2011 08:15:19 -0700 (PDT) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Alex Deucher Cc: Alex Deucher , dri-devel@lists.freedesktop.org, Thomas Reim List-Id: dri-devel@lists.freedesktop.org --===============0810578472== Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-CIjpCga+dO9e6WRzg56r" --=-CIjpCga+dO9e6WRzg56r Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Dear Alex,=20 your reply confuses me: > On Sat, Oct 29, 2011 at 8:55 AM, Thomas Reim wrot= e: > > Dear Alex, > > > > but we use DDC probing e. g. to identify connectors with improperly > > terminated i2c bus. Instead of flooding logs and terminals with EDID du= mps, > > we decided some months ago to use this function during module loading t= o > > inform the user once (and only once!), which connector has a monitor > > connected with valid EDID and which connector has not. >=20 > There's nothing in that function that actually prevents the printing > of bad EDIDs. =20 That's true.=20 > All it does is call drm_get_edid() and report whether > it found an EDID or not. radeon_dvi_detect() already takes into > account the requires_extended_probe flag.=20 The extended probe flag will prevent the radeon driver from further useless printing of bad EDIDs every ten seconds: in radeon_connectors.c: if (radeon_connector->ddc_bus) dret =3D radeon_ddc_probe(radeon_connector, radeon_connector->requires_extended= _probe); if (dret) { if (radeon_connector->edid) { kfree(radeon_connector->edid); radeon_connector->edid =3D NULL; } radeon_connector->edid =3D drm_get_edid(&radeon_connector->= base, &radeon_connector->ddc_bus->adapter); But the now to be removed function radeon_ddc_dump() took care during connector setup that at least one (!) dump was in the logs, accompagnied by the info, that no monitor is connected, or there is a wrong/buggy EDID.=20 in radeon_display.c: radeon_print_display_setup(dev); list_for_each_entry(drm_connector, &dev->mode_config.connec= tor_list, head) radeon_ddc_dump(drm_connector); I cannot imagine why this should confuse users. Having retrieved and configured connectors plus info plus EDID dump in case of problems logged next to each other was perfect. > The connectors are probed by > the fb code for the console as well so it just adds to the module load > time. If we want to print what connectors are connected, it should be > done from the fb code so we only have to do it once. >=20 I briefly checked the code, but couldn't find a promising connector probing function in the fb code. Did you mean function drm_fb_helper_probe_connector_modes? > > Graphic solutions in general have several connectors integrated, and it= 's > > sometimes really difficult to identify, which one of the does not work = as > > expected, based on the logs. From above log we see, that a monitor is > > connected to DVI connector, nothing is connected to the VGA connector, = and > > we have a problem with the HDMI connector. Without this fuinction, noth= ing > > helpful from radeon module would be in the logs. >=20 > We should print the connector name in the generic drm error code then > if we want to print this info at boot time. Is there a place that is not called every ten seconds? >=20 > > > > Maybe we can keep this function, but call it only for connectors, for w= hich > > it works, i. e. not for DP, eDP and DP bridge connectors. >=20 > That's just as bad. Users won't understand why only certain > connectors are probed. >=20 > > > > Best regards > > > > Thomas Reim > > > > Am Dienstag, den 25.10.2011, 19:24 -0400 schrieb alexdeucher@gmail.com: > > > > From: Alex Deucher > > > > The function didn't work with DP, eDP, or DP bridge > > connectors and thus confused users as it lead them to > > believe nothing was connected or the EDID was invalid > > when in fact is was, just on the aux bus rather an i2c. > > > > It should also speed up module loading as it avoids a > > bunch of extra DDC probing. > > > > Signed-off-by: Alex Deucher > > --- > > drivers/gpu/drm/radeon/radeon_display.c | 33 > > ------------------------------- > > 1 files changed, 0 insertions(+), 33 deletions(-) > > > > diff --git a/drivers/gpu/drm/radeon/radeon_display.c > > b/drivers/gpu/drm/radeon/radeon_display.c > > index 6adb3e5..4998736 100644 > > --- a/drivers/gpu/drm/radeon/radeon_display.c > > +++ b/drivers/gpu/drm/radeon/radeon_display.c > > @@ -33,8 +33,6 @@ > > #include "drm_crtc_helper.h" > > #include "drm_edid.h" > > > > -static int radeon_ddc_dump(struct drm_connector *connector); > > - > > static void avivo_crtc_load_lut(struct drm_crtc *crtc) > > { > > struct radeon_crtc *radeon_crtc =3D to_radeon_crtc(crtc); > > @@ -669,7 +667,6 @@ static void radeon_print_display_setup(struct drm_d= evice > > *dev) > > static bool radeon_setup_enc_conn(struct drm_device *dev) > > { > > struct radeon_device *rdev =3D dev->dev_private; > > - struct drm_connector *drm_connector; > > bool ret =3D false; > > > > if (rdev->bios) { > > @@ -689,8 +686,6 @@ static bool radeon_setup_enc_conn(struct drm_device > > *dev) > > if (ret) { > > radeon_setup_encoder_clones(dev); > > radeon_print_display_setup(dev); > > - list_for_each_entry(drm_connector, &dev->mode_config.connector_list, > > head) > > - radeon_ddc_dump(drm_connector); > > } > > > > return ret; > > @@ -743,34 +738,6 @@ int radeon_ddc_get_modes(struct radeon_connector > > *radeon_connector) > > return 0; > > } > > > > -static int radeon_ddc_dump(struct drm_connector *connector) > > -{ > > - struct edid *edid; > > - struct radeon_connector *radeon_connector =3D > > to_radeon_connector(connector); > > - int ret =3D 0; > > - > > - /* on hw with routers, select right port */ > > - if (radeon_connector->router.ddc_valid) > > - radeon_router_select_ddc_port(radeon_connector); > > - > > - if (!radeon_connector->ddc_bus) > > - return -1; > > - edid =3D drm_get_edid(connector, &radeon_connector->ddc_bus->adapter)= ; > > - /* Log EDID retrieval status here. In particular with regard to > > - * connectors with requires_extended_probe flag set, that will preven= t > > - * function radeon_dvi_detect() to fetch EDID on this connector, > > - * as long as there is no valid EDID header found */ > > - if (edid) { > > - DRM_INFO("Radeon display connector %s: Found valid EDID", > > - drm_get_connector_name(connector)); > > - kfree(edid); > > - } else { > > - DRM_INFO("Radeon display connector %s: No monitor connected or inval= id > > EDID", > > - drm_get_connector_name(connector)); > > - } > > - return ret; > > -} > > - > > /* avivo */ > > static void avivo_get_fb_div(struct radeon_pll *pll, > > u32 target_clock, > > > > --=-CIjpCga+dO9e6WRzg56r Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQEcBAABAgAGBQJOrrtqAAoJEII1bee/l5G+PxIH/2BEkJopIhAn6Osj9PLt7HRT ijmtMBlFRRjpengdOQDV27Ltjv4w3rwGek5V7UxrcHFCqz3ts5et0N3cry5O8Fhq +th/n2cu+X5O2Ua6KuE7E++vCRAKhx3FvjdO02G08DiCd5awkwDgv5B9CxlUAvZS fJHemkZKSDJrQ/bONQoDTwjpjbiG0x2iiSRvH1fgef1esZsaRLhVm1Z6T+fC9sAm FheUzHK9G0L3l3wKKx0YxeWmhcTmBKwr2CynKmQPRDnW6bcgGlaBEYx8fRfdQ0Fx 5TtLaSOMHbRfqjKGE/G5rZXe7+KwZ1vNfvjIuk5eu6cw3vkGaKiEmQD2ek4ixys= =ShEF -----END PGP SIGNATURE----- --=-CIjpCga+dO9e6WRzg56r-- --===============0810578472== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0810578472==--