All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sivakumar Thulasimani <sivakumar.thulasimani@intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 4/7] drm/i915: add common intel_digital_port_connected function
Date: Thu, 27 Aug 2015 13:31:02 +0530	[thread overview]
Message-ID: <55DEC3BE.2090905@intel.com> (raw)
In-Reply-To: <87h9nlxllb.fsf@intel.com>



On 8/27/2015 12:30 PM, Jani Nikula wrote:
> On Wed, 26 Aug 2015, Sivakumar Thulasimani <sivakumar.thulasimani@intel.com> wrote:
>> On 8/20/2015 1:17 PM, Jani Nikula wrote:
>>> Add a common intel_digital_port_connected() that splits out to functions
>>> for different platforms. No functional changes.
>>>
>>> v2: make the function return a boolean
>>>
>>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>>> ---
>>>    drivers/gpu/drm/i915/intel_dp.c | 41 ++++++++++++++++++++++-------------------
>>>    1 file changed, 22 insertions(+), 19 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
>>> index f08859471841..f947951a01d4 100644
>>> --- a/drivers/gpu/drm/i915/intel_dp.c
>>> +++ b/drivers/gpu/drm/i915/intel_dp.c
>>> @@ -4473,13 +4473,6 @@ edp_detect(struct intel_dp *intel_dp)
>>>    	return status;
>>>    }
>>>    
>>> -/*
>>> - * ibx_digital_port_connected - is the specified port connected?
>>> - * @dev_priv: i915 private structure
>>> - * @port: the port to test
>>> - *
>>> - * Returns true if @port is connected, false otherwise.
>>> - */
>>>    static bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
>>>    				       struct intel_digital_port *port)
>>>    {
>>> @@ -4524,13 +4517,12 @@ static bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
>>>    	return I915_READ(SDEISR) & bit;
>>>    }
>>>    
>>> -static bool g4x_digital_port_connected(struct drm_device *dev,
>>> +static bool g4x_digital_port_connected(struct drm_i915_private *dev_priv,
>>>    				       struct intel_digital_port *port)
>>>    {
>>> -	struct drm_i915_private *dev_priv = dev->dev_private;
>>>    	uint32_t bit;
>>>    
>>> -	if (IS_VALLEYVIEW(dev)) {
>>> +	if (IS_VALLEYVIEW(dev_priv)) {
>> this might not work :(.  just noted this as part of another review.
>> please fix this since
>> it is merged.
> Sorry, what might not work?
>
> Jani.

-	if (IS_VALLEYVIEW(dev)) {
+	if (IS_VALLEYVIEW(dev_priv)) { <----- dev_priv is used instead of dev
should be IS_VALLEYVIEW(dev_priv->dev)

>
>>>    		switch (port->port) {
>>>    		case PORT_B:
>>>    			bit = PORTB_HOTPLUG_LIVE_STATUS_VLV;
>>> @@ -4565,6 +4557,22 @@ static bool g4x_digital_port_connected(struct drm_device *dev,
>>>    	return I915_READ(PORT_HOTPLUG_STAT) & bit;
>>>    }
>>>    
>>> +/*
>>> + * intel_digital_port_connected - is the specified port connected?
>>> + * @dev_priv: i915 private structure
>>> + * @port: the port to test
>>> + *
>>> + * Return %true if @port is connected, %false otherwise.
>>> + */
>>> +static bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
>>> +					 struct intel_digital_port *port)
>>> +{
>>> +	if (HAS_PCH_SPLIT(dev_priv))
>>> +		return ibx_digital_port_connected(dev_priv, port);
>>> +	else
>>> +		return g4x_digital_port_connected(dev_priv, port);
>>> +}
>>> +
>>>    static enum drm_connector_status
>>>    ironlake_dp_detect(struct intel_dp *intel_dp)
>>>    {
>>> @@ -4572,7 +4580,7 @@ ironlake_dp_detect(struct intel_dp *intel_dp)
>>>    	struct drm_i915_private *dev_priv = dev->dev_private;
>>>    	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
>>>    
>>> -	if (!ibx_digital_port_connected(dev_priv, intel_dig_port))
>>> +	if (!intel_digital_port_connected(dev_priv, intel_dig_port))
>>>    		return connector_status_disconnected;
>>>    
>>>    	return intel_dp_detect_dpcd(intel_dp);
>>> @@ -4594,7 +4602,7 @@ g4x_dp_detect(struct intel_dp *intel_dp)
>>>    		return status;
>>>    	}
>>>    
>>> -	if (!g4x_digital_port_connected(dev, intel_dig_port))
>>> +	if (!intel_digital_port_connected(dev->dev_private, intel_dig_port))
>>>    		return connector_status_disconnected;
>>>    
>>>    	return intel_dp_detect_dpcd(intel_dp);
>>> @@ -5057,13 +5065,8 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
>>>    		/* indicate that we need to restart link training */
>>>    		intel_dp->train_set_valid = false;
>>>    
>>> -		if (HAS_PCH_SPLIT(dev)) {
>>> -			if (!ibx_digital_port_connected(dev_priv, intel_dig_port))
>>> -				goto mst_fail;
>>> -		} else {
>>> -			if (!g4x_digital_port_connected(dev, intel_dig_port))
>>> -				goto mst_fail;
>>> -		}
>>> +		if (!intel_digital_port_connected(dev_priv, intel_dig_port))
>>> +			goto mst_fail;
>>>    
>>>    		if (!intel_dp_get_dpcd(intel_dp)) {
>>>    			goto mst_fail;
>> -- 
>> regards,
>> Sivakumar
>>

-- 
regards,
Sivakumar

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-27  8:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-20  7:47 [PATCH v2 0/7] drm/i915: clean up *_digital_port_connected Jani Nikula
2015-08-20  7:47 ` [PATCH v2 1/7] drm/i915: move ibx_digital_port_connected to intel_dp.c Jani Nikula
2015-08-26  5:04   ` Jindal, Sonika
2015-08-20  7:47 ` [PATCH v2 2/7] drm/i915: make g4x_digital_port_connected return boolean status Jani Nikula
2015-08-20  8:17   ` R, Durgadoss
2015-08-20  7:47 ` [PATCH v2 3/7] drm/i915: add MISSING_CASE annotation to ibx_digital_port_connected Jani Nikula
2015-08-20 14:26   ` R, Durgadoss
2015-08-20  7:47 ` [PATCH v2 4/7] drm/i915: add common intel_digital_port_connected function Jani Nikula
2015-08-26  5:26   ` Jindal, Sonika
2015-08-26 15:18   ` Sivakumar Thulasimani
2015-08-27  7:00     ` Jani Nikula
2015-08-27  8:01       ` Sivakumar Thulasimani [this message]
2015-08-27  8:08         ` Jani Nikula
2015-08-27  8:12           ` Sivakumar Thulasimani
2015-08-20  7:47 ` [PATCH v2 5/7] drm/i915: split ibx_digital_port_connected to ibx and cpt variants Jani Nikula
2015-08-20  7:47 ` [PATCH v2 6/7] drm/i915: split g4x_digital_port_connected to g4x and vlv variants Jani Nikula
2015-08-20  7:47 ` [PATCH v2 7/7] drm/i915/bxt: Use correct live status register for BXT platform Jani Nikula
2015-08-26  5:32   ` Jindal, Sonika
2015-08-26  6:35     ` Jani Nikula
2015-08-26  9:01 ` [PATCH v2 0/7] drm/i915: clean up *_digital_port_connected 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=55DEC3BE.2090905@intel.com \
    --to=sivakumar.thulasimani@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.