public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: ville.syrjala@linux.intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/3] drm/i915: Make intel_dp_is_edp() less specific
Date: Fri, 1 Nov 2013 10:25:09 -0700	[thread overview]
Message-ID: <20131101102509.6ba6861d@jbarnes-desktop> (raw)
In-Reply-To: <1383322961-7394-3-git-send-email-ville.syrjala@linux.intel.com>

On Fri,  1 Nov 2013 18:22:40 +0200
ville.syrjala@linux.intel.com wrote:

> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> All the bits in the VBT child device type have some speciifc meaning,
> so looking for an exact match isn't always the right thing. On some
> VLVs for example the device type for eDP panels is 0x1806.
> 
> If we mask out the bits that could concievably change between different
> eDP panels, we are left with the set of bits that should still
> tell us if the port is eDP or not.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71051
> Tested-by: Robert Hooker <robert.hooker@canonical.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index ede023c..87cfb12 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -3281,7 +3281,7 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
>  		p_child = dev_priv->vbt.child_dev + i;
>  
>  		if (p_child->common.dvo_port == port_mapping[port] &&
> -		    p_child->common.device_type == DEVICE_TYPE_eDP)
> +		    (p_child->common.device_type & 0x1f3f) == (DEVICE_TYPE_eDP & 0x1f3f))
>  			return true;
>  	}
>  	return false;

Is there no way to split out these magic bits individually into
something readable?  If not, I guess we'll have to trust you, but it
seems fragile.

Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>

-- 
Jesse Barnes, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2013-11-01 17:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 16:22 [PATCH 0/3] drm/i915: eDP vs. DP detection changes ville.syrjala
2013-11-01 16:22 ` [PATCH 1/3] drm/i915: Check VBT for eDP ports on VLV ville.syrjala
2013-11-01 17:23   ` Jesse Barnes
2013-11-01 16:22 ` [PATCH 2/3] drm/i915: Make intel_dp_is_edp() less specific ville.syrjala
2013-11-01 17:25   ` Jesse Barnes [this message]
2013-11-01 18:32     ` [PATCH 1/2] drm/i915: Give names to the VBT child device type bits ville.syrjala
2013-11-01 18:32       ` [PATCH v2 2/2] drm/i915: Make intel_dp_is_edp() less specific ville.syrjala
2013-11-04 16:08         ` Paulo Zanoni
2013-11-04 16:30           ` Daniel Vetter
2013-11-04 15:58       ` [PATCH 1/2] drm/i915: Give names to the VBT child device type bits Paulo Zanoni
2013-11-01 16:22 ` [PATCH 3/3] drm/i915: Simplify DP vs. eDP detection ville.syrjala
2013-11-01 17:25   ` Jesse Barnes
2013-11-28 12:43     ` Daniel Vetter

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=20131101102509.6ba6861d@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.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