From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [RFC] drm: Add utility function to check for edp1.4 Date: Mon, 3 Nov 2014 09:25:01 +0100 Message-ID: <20141103082500.GA21847@ulmo.nvidia.com> References: <1413958523-32742-1-git-send-email-sonika.jindal@intel.com> <20141029134227.GA17727@ulmo.nvidia.com> <20141031160639.GU26941@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0459665090==" Return-path: In-Reply-To: <20141031160639.GU26941@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Daniel Vetter Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, alexdeucher@gmail.com List-Id: intel-gfx@lists.freedesktop.org --===============0459665090== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BOKacYhQ+x31HxR3" Content-Disposition: inline --BOKacYhQ+x31HxR3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 31, 2014 at 05:06:39PM +0100, Daniel Vetter wrote: > On Wed, Oct 29, 2014 at 02:42:29PM +0100, Thierry Reding wrote: > > On Wed, Oct 22, 2014 at 11:45:23AM +0530, sonika.jindal@intel.com wrote: > > > From: Sonika Jindal > > >=20 > > > v2: Reading DP_EDP_REV, only when DISPLAY_CONTROL_CAPABLE field is se= t (Satheesh) > > >=20 > > > v3: Moving the utility function to drm_dp_helper (Daniel) > > >=20 > > > Signed-off-by: Sonika Jindal > > > --- > > > drivers/gpu/drm/drm_dp_helper.c | 15 +++++++++++++++ > > > include/drm/drm_dp_helper.h | 2 ++ > > > 2 files changed, 17 insertions(+) > > >=20 > > > diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp= _helper.c > > > index 08e33b8..a54a760 100644 > > > --- a/drivers/gpu/drm/drm_dp_helper.c > > > +++ b/drivers/gpu/drm/drm_dp_helper.c > > > @@ -768,3 +768,18 @@ void drm_dp_aux_unregister(struct drm_dp_aux *au= x) > > > i2c_del_adapter(&aux->ddc); > > > } > > > EXPORT_SYMBOL(drm_dp_aux_unregister); > > > + > > > +bool drm_dp_is_edp_v1_4(struct drm_dp_aux *aux, const u8 dpcd[DP_REC= EIVER_CAP_SIZE]) > >=20 > > I'd prefer if this didn't take a dpcd argument but rather directly > > accessed the DP_EDP_CONFIGURATION_CAP register so that it can be used > > directly rather than rely on the driver to have read a dpcd block in the > > appropriate format. >=20 > The idea is that you'd grab the DPCD field anyway since it's needed all > over the place. We have a pile of helpers already that take exactly this > block and decode parts of it. So I think this makes sense - dp aux is fast > but not entirely free, so caching seems useful. If we want to always cache part of the DPCD wouldn't it be better to add the cache to struct drm_dp_aux instead of having to duplicate this in every driver? Thierry --BOKacYhQ+x31HxR3 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUVzvcAAoJEN0jrNd/PrOhPLUQAKJpDc7vmIxhLDeT6lvjFKWa U1l4lP51FK+d2tBTjdm6ltW1sTo3M4JfuRFcCgdRn/lQLrau90cScqqfefTkuZAr E5XF/m38keXM8wDO7OGGT2laYDBphRfj8vZMMxhccrGEoRgLvcfalz1d8VfMtEGI pa4SKX4Z8a2sH3wizY5ufDTBBPMUaTZISB97v7RT0S5vIIB2qsqhGSAV/3caflpc V5dsiVj6t/MU/yIbnNauaCmiA7r3YB3WwAtZFGVi2ZSRYqk4GZmvkYXyV4GepMsk kFJH/1EKhmtBtODiR14rt9pQe188xZ+seD7cAIugrP9J7KhTanxcwU+nmagj5rIx T+sojY7DmZXqAIdxHM34GTZW+N5XiV66/zY2YsaarEyE0GQiLn0rms5DySr5wgXT 6Vh+6ACGapoEgrFMyo7uUeRPKK8d+JZRaPaPGBqrcdLB8qn16LBvuXUjosY8XJl4 yJZI7xxQ3rBt8CxEm3/QflkPTRrUklu7rJpGYR/c1s23JRt0Wa6FbbLP+hRXmnlV aoSeN/2tPxScglkdIRVFOo2SK6bCKPQzYRH95fg85eQJPfclogiaGqL4glOIYak0 M6I8uWdSUdZMpiY7irg09y/SlPvchsTxjEmHMDj8DEI+I4r4wuoEE0/Mj2SeyHRD oq/jcZDlVYOs1rk9HEZH =TyJ7 -----END PGP SIGNATURE----- --BOKacYhQ+x31HxR3-- --===============0459665090== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSW50ZWwtZ2Z4 IG1haWxpbmcgbGlzdApJbnRlbC1nZnhAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHA6Ly9saXN0 cy5mcmVlZGVza3RvcC5vcmcvbWFpbG1hbi9saXN0aW5mby9pbnRlbC1nZngK --===============0459665090==--