From: Zhenyu Wang Subject: Re: [PATCH] i915: fix ironlake edp panel setup (v2) Date: Mon, 28 Jun 2010 14:04:56 +0800 Message-ID: <20100628060456.GC10521@zhen-devel.sh.intel.com> References: <1277682314-20396-1-git-send-email-airlied@gmail.com> Reply-To: Zhenyu Wang Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1923871195==" Return-path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by gabe.freedesktop.org (Postfix) with ESMTP id 0C1E29E762 for ; Sun, 27 Jun 2010 23:04:57 -0700 (PDT) In-Reply-To: <1277682314-20396-1-git-send-email-airlied@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 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: Dave Airlie Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org --===============1923871195== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9dgjiU4MmWPVapMU" Content-Disposition: inline --9dgjiU4MmWPVapMU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2010.06.28 09:45:14 +1000, Dave Airlie wrote: > From: Dave Airlie >=20 > So the previous fix didn't work for everyone, I read the eDP spec and cla= ims a 20% overhead for encoding, so make sure we take this into account whe= n working out the bandwidth requirements. >=20 > This makes my eDP panel happy also, please test on others. >=20 > Signed-off-by: Dave Airlie > --- > drivers/gpu/drm/i915/intel_dp.c | 10 ++++++++-- > 1 files changed, 8 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel= _dp.c > index 6094e42..9830243 100644 > --- a/drivers/gpu/drm/i915/intel_dp.c > +++ b/drivers/gpu/drm/i915/intel_dp.c > @@ -139,6 +139,12 @@ intel_dp_link_required(struct drm_device *dev, > } > =20 > static int > +intel_dp_max_data_rate(int max_link_clock, int max_lanes) > +{ > + return (max_link_clock * max_lanes * 8) / 10; > +} > + > +static int > intel_dp_mode_valid(struct drm_connector *connector, > struct drm_display_mode *mode) > { > @@ -148,7 +154,7 @@ intel_dp_mode_valid(struct drm_connector *connector, > int max_lanes =3D intel_dp_max_lane_count(intel_encoder); > =20 > if (intel_dp_link_required(connector->dev, intel_encoder, mode->clock) > - > max_link_clock * max_lanes) > + > intel_dp_max_data_rate(max_link_clock, max_lanes)) > return MODE_CLOCK_HIGH; > =20 > if (mode->clock < 10000) > @@ -509,7 +515,7 @@ intel_dp_mode_fixup(struct drm_encoder *encoder, stru= ct drm_display_mode *mode, > =20 > for (lane_count =3D 1; lane_count <=3D max_lane_count; lane_count <<=3D= 1) { > for (clock =3D 0; clock <=3D max_clock; clock++) { > - int link_avail =3D intel_dp_link_clock(bws[clock]) * lane_count; > + int link_avail =3D intel_dp_max_data_rate(intel_dp_link_clock(bws[clo= ck]), lane_count); > =20 > if (intel_dp_link_required(encoder->dev, intel_encoder, mode->clock) > <=3D link_avail) { > --=20 sorry, this is still broken on the 16x9 panel.=20 'intel_dp_link_required' is 107840*18/8 =3D 242640, 'intel_dp_max_data_rate= ' is 270000*1*8/10 =3D 216000. So it will fail in both check. --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --9dgjiU4MmWPVapMU Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkwoO4gACgkQsQQaM014GCeoBQCcDK6YCnq93CssAmOOAjy0u8nd qgIAn3ZKPUphr01/eoOtpeWHb/wVXOia =eROC -----END PGP SIGNATURE----- --9dgjiU4MmWPVapMU-- --===============1923871195== 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 --===============1923871195==--