dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Thierry Reding <treding@nvidia.com>
Cc: daniel.vetter@ffwll.ch, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, alexdeucher@gmail.com
Subject: Re: [RFC] drm: Add utility function to check for edp1.4
Date: Fri, 31 Oct 2014 17:06:39 +0100	[thread overview]
Message-ID: <20141031160639.GU26941@phenom.ffwll.local> (raw)
In-Reply-To: <20141029134227.GA17727@ulmo.nvidia.com>

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 <sonika.jindal@intel.com>
> > 
> > v2: Reading DP_EDP_REV, only when DISPLAY_CONTROL_CAPABLE field is set (Satheesh)
> > 
> > v3: Moving the utility function to drm_dp_helper (Daniel)
> > 
> > Signed-off-by: Sonika Jindal <sonika.jindal@intel.com>
> > ---
> >  drivers/gpu/drm/drm_dp_helper.c |   15 +++++++++++++++
> >  include/drm/drm_dp_helper.h     |    2 ++
> >  2 files changed, 17 insertions(+)
> > 
> > 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 *aux)
> >  	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_RECEIVER_CAP_SIZE])
> 
> 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.

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.

It's a bit strange then that this helper reads more code, but I guess you
really only care about the edp_rev field if you want the edp revision, and
with your interface suggestion I don't think we'd ever need to read this
again.

So for me the input fields make sense. I agree that for the output of the
function an enum with all the edp revisions is better.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2014-10-31 16:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  6:15 [RFC] drm: Add utility function to check for edp1.4 sonika.jindal
2014-10-29 13:42 ` Thierry Reding
2014-10-30  4:14   ` sonika
2014-10-31 16:06   ` Daniel Vetter [this message]
2014-11-03  8:25     ` Thierry Reding
2014-11-03  8:28       ` Daniel Vetter
2014-11-04  5:55         ` sonika

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141031160639.GU26941@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=alexdeucher@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=treding@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox