From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keith Packard Subject: Re: [PATCH] drm/i915: Enable SDVO hotplug interrupts for HDMI and DVI Date: Tue, 20 Sep 2011 09:27:46 -0700 Message-ID: References: <1316528258-23006-1-git-send-email-simon.farnsworth@onelan.co.uk> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0849820048==" Return-path: Received: from keithp.com (home.keithp.com [63.227.221.253]) by gabe.freedesktop.org (Postfix) with ESMTP id B39389E94A for ; Tue, 20 Sep 2011 09:27:50 -0700 (PDT) In-Reply-To: <1316528258-23006-1-git-send-email-simon.farnsworth@onelan.co.uk> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Simon Farnsworth Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============0849820048== Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --=-=-= Content-Transfer-Encoding: quoted-printable On Tue, 20 Sep 2011 15:17:38 +0100, Simon Farnsworth wrote: > - if (on) { > - intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, NULL, = 0); > - status =3D intel_sdvo_read_response(intel_sdvo, &response, 2); > + intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_HOT_PLUG_SUPPORT, NULL, 0= ); > + status =3D intel_sdvo_read_response(intel_sdvo, &response, 2); ... > + intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG, &respons= e, 2); You are unconditionally enabling hotplug on all devices, I think you want to take the desired device as an argument to this function and add it to the set of active hotplug devices instead. You've just gotten the active hotplug value above, so removing the call to GET_HOT_PLUG_SUPPORT and doing: intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_GET_ACTIVE_HOT_PLUG, NULL, 0); intel_sdvo_read_response(intel_sdvo, &response, 2); response[0] |=3D (1 << device); intel_sdvo_write_cmd(intel_sdvo, SDVO_CMD_SET_ACTIVE_HOT_PLUG, &response, = 2); should do what you want. > @@ -2062,7 +2020,13 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo,= int device) >=20=20 > intel_connector =3D &intel_sdvo_connector->base; > connector =3D &intel_connector->base; > - connector->polled =3D DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_D= ISCONNECT; > + if (intel_sdvo_supports_hotplug(intel_sdvo) & (1 << device)) { > + connector->polled =3D DRM_CONNECTOR_POLL_HPD; > + intel_encoder->hot_plug =3D intel_sdvo_enable_hotplug; The encoder->hot_plug function is what is called when the hotplug interrupt is detected. The only current user is the DisplayPort driver which uses this to signal link retraining. You definitely don't want or need to call intel_sdvo_enable_hotplug at that point. =2D-=20 keith.packard@intel.com --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFOeL8DQp8BWwlsTdMRAqwhAJ99VVWa+vrf/s9/9TWe++yJkVltQgCfSSkN L3sTiJZXdPUREVOD+lLg5BM= =l1QH -----END PGP SIGNATURE----- --=-=-=-- --===============0849820048== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx --===============0849820048==--