public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Dave Airlie <airlied@linux•ie>
Cc: linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
	Ma Ling <ling.ma@intel•com>, Eric Anholt <eric@anholt•net>,
	Zhao Yakui <yakui.zhao@intel•com>
Subject: linux-next: manual merge of the drm tree with the  tree
Date: Mon, 10 Aug 2009 15:14:13 +1000	[thread overview]
Message-ID: <20090810151413.f3e7a08f.sfr@canb.auug.org.au> (raw)

Hi Dave,

Today's linux-next merge of the drm tree got a conflict in
drivers/gpu/drm/i915/intel_sdvo.c between commit
fb7a46f3cc7d7dcf7c5edb3a38c84e3f730d7adb ("drm/i915: Choose real sdvo
output according to result from detection") from Linus' tree and commit
8a4c47f346cc7a12d0897c05eb3cc1add26b487f ("drm: Remove the unused prefix
in DRM_DEBUG_KMS/DRIVER/MODE") from the drm tree.

I fixed it up (see below) and can carry the fix as necessary.  This fix
may not be correct, so it would be better if you could fix it in the drm
tree by merging Linus' tree.
-- 
Cheers,
Stephen Rothwell                    sfr@canb•auug.org.au

diff --cc drivers/gpu/drm/i915/intel_sdvo.c
index 5371d93,abef69c..0000000
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@@ -1519,7 -1459,7 +1518,7 @@@ static enum drm_connector_status intel_
  	intel_sdvo_write_cmd(intel_output, SDVO_CMD_GET_ATTACHED_DISPLAYS, NULL, 0);
  	status = intel_sdvo_read_response(intel_output, &response, 2);
  
- 	DRM_DEBUG("SDVO response %d %d\n", response & 0xff, response >> 8);
 -	DRM_DEBUG_KMS("SDVO response %d %d\n", response[0], response[1]);
++	DRM_DEBUG_KMS("SDVO response %d %d\n", response & 0xff, response >> 8);
  
  	if (status != SDVO_CMD_STATUS_SUCCESS)
  		return connector_status_unknown;
@@@ -1931,93 -1865,6 +1930,92 @@@ intel_sdvo_get_slave_addr(struct drm_de
  		return 0x72;
  }
  
 +static bool
 +intel_sdvo_output_setup(struct intel_output *intel_output, uint16_t flags)
 +{
 +	struct drm_connector *connector = &intel_output->base;
 +	struct drm_encoder *encoder = &intel_output->enc;
 +	struct intel_sdvo_priv *sdvo_priv = intel_output->dev_priv;
 +	bool ret = true, registered = false;
 +
 +	sdvo_priv->is_tv = false;
 +	intel_output->needs_tv_clock = false;
 +	sdvo_priv->is_lvds = false;
 +
 +	if (device_is_registered(&connector->kdev)) {
 +		drm_sysfs_connector_remove(connector);
 +		registered = true;
 +	}
 +
 +	if (flags &
 +	    (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) {
 +		if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS0)
 +			sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS0;
 +		else
 +			sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS1;
 +
 +		encoder->encoder_type = DRM_MODE_ENCODER_TMDS;
 +		connector->connector_type = DRM_MODE_CONNECTOR_DVID;
 +
 +		if (intel_sdvo_get_supp_encode(intel_output,
 +					       &sdvo_priv->encode) &&
 +		    intel_sdvo_get_digital_encoding_mode(intel_output) &&
 +		    sdvo_priv->is_hdmi) {
 +			/* enable hdmi encoding mode if supported */
 +			intel_sdvo_set_encode(intel_output, SDVO_ENCODE_HDMI);
 +			intel_sdvo_set_colorimetry(intel_output,
 +						   SDVO_COLORIMETRY_RGB256);
 +			connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
 +		}
 +	} else if (flags & SDVO_OUTPUT_SVID0) {
 +
 +		sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
 +		encoder->encoder_type = DRM_MODE_ENCODER_TVDAC;
 +		connector->connector_type = DRM_MODE_CONNECTOR_SVIDEO;
 +		sdvo_priv->is_tv = true;
 +		intel_output->needs_tv_clock = true;
 +	} else if (flags & SDVO_OUTPUT_RGB0) {
 +
 +		sdvo_priv->controlled_output = SDVO_OUTPUT_RGB0;
 +		encoder->encoder_type = DRM_MODE_ENCODER_DAC;
 +		connector->connector_type = DRM_MODE_CONNECTOR_VGA;
 +	} else if (flags & SDVO_OUTPUT_RGB1) {
 +
 +		sdvo_priv->controlled_output = SDVO_OUTPUT_RGB1;
 +		encoder->encoder_type = DRM_MODE_ENCODER_DAC;
 +		connector->connector_type = DRM_MODE_CONNECTOR_VGA;
 +	} else if (flags & SDVO_OUTPUT_LVDS0) {
 +
 +		sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS0;
 +		encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
 +		connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
 +		sdvo_priv->is_lvds = true;
 +	} else if (flags & SDVO_OUTPUT_LVDS1) {
 +
 +		sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS1;
 +		encoder->encoder_type = DRM_MODE_ENCODER_LVDS;
 +		connector->connector_type = DRM_MODE_CONNECTOR_LVDS;
 +		sdvo_priv->is_lvds = true;
 +	} else {
 +
 +		unsigned char bytes[2];
 +
 +		sdvo_priv->controlled_output = 0;
 +		memcpy(bytes, &sdvo_priv->caps.output_flags, 2);
- 		DRM_DEBUG_KMS(I915_SDVO,
- 				"%s: Unknown SDVO output type (0x%02x%02x)\n",
++		DRM_DEBUG_KMS("%s: Unknown SDVO output type (0x%02x%02x)\n",
 +				  SDVO_NAME(sdvo_priv),
 +				  bytes[0], bytes[1]);
 +		ret = false;
 +	}
 +
 +	if (ret && registered)
 +		ret = drm_sysfs_connector_add(connector) == 0 ? true : false;
 +
 +
 +	return ret;
 +
 +}
 +
  bool intel_sdvo_init(struct drm_device *dev, int output_device)
  {
  	struct drm_connector *connector;
@@@ -2075,12 -1923,75 +2072,12 @@@
  	intel_output->ddc_bus->algo = &intel_sdvo_i2c_bit_algo;
  
  	/* In defaut case sdvo lvds is false */
 -	sdvo_priv->is_lvds = false;
  	intel_sdvo_get_capabilities(intel_output, &sdvo_priv->caps);
  
 -	if (sdvo_priv->caps.output_flags &
 -	    (SDVO_OUTPUT_TMDS0 | SDVO_OUTPUT_TMDS1)) {
 -		if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_TMDS0)
 -			sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS0;
 -		else
 -			sdvo_priv->controlled_output = SDVO_OUTPUT_TMDS1;
 -
 -		encoder_type = DRM_MODE_ENCODER_TMDS;
 -		connector_type = DRM_MODE_CONNECTOR_DVID;
 -
 -		if (intel_sdvo_get_supp_encode(intel_output,
 -					       &sdvo_priv->encode) &&
 -		    intel_sdvo_get_digital_encoding_mode(intel_output) &&
 -		    sdvo_priv->is_hdmi) {
 -			/* enable hdmi encoding mode if supported */
 -			intel_sdvo_set_encode(intel_output, SDVO_ENCODE_HDMI);
 -			intel_sdvo_set_colorimetry(intel_output,
 -						   SDVO_COLORIMETRY_RGB256);
 -			connector_type = DRM_MODE_CONNECTOR_HDMIA;
 -		}
 -	}
 -	else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_SVID0)
 -	{
 -		sdvo_priv->controlled_output = SDVO_OUTPUT_SVID0;
 -		encoder_type = DRM_MODE_ENCODER_TVDAC;
 -		connector_type = DRM_MODE_CONNECTOR_SVIDEO;
 -		sdvo_priv->is_tv = true;
 -		intel_output->needs_tv_clock = true;
 -	}
 -	else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB0)
 -	{
 -		sdvo_priv->controlled_output = SDVO_OUTPUT_RGB0;
 -		encoder_type = DRM_MODE_ENCODER_DAC;
 -		connector_type = DRM_MODE_CONNECTOR_VGA;
 -	}
 -	else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_RGB1)
 -	{
 -		sdvo_priv->controlled_output = SDVO_OUTPUT_RGB1;
 -		encoder_type = DRM_MODE_ENCODER_DAC;
 -		connector_type = DRM_MODE_CONNECTOR_VGA;
 -	}
 -	else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_LVDS0)
 -	{
 -		sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS0;
 -		encoder_type = DRM_MODE_ENCODER_LVDS;
 -		connector_type = DRM_MODE_CONNECTOR_LVDS;
 -		sdvo_priv->is_lvds = true;
 -	}
 -	else if (sdvo_priv->caps.output_flags & SDVO_OUTPUT_LVDS1)
 -	{
 -		sdvo_priv->controlled_output = SDVO_OUTPUT_LVDS1;
 -		encoder_type = DRM_MODE_ENCODER_LVDS;
 -		connector_type = DRM_MODE_CONNECTOR_LVDS;
 -		sdvo_priv->is_lvds = true;
 -	}
 -	else
 -	{
 -		unsigned char bytes[2];
 -
 -		sdvo_priv->controlled_output = 0;
 -		memcpy (bytes, &sdvo_priv->caps.output_flags, 2);
 -		DRM_DEBUG_KMS("%s: Unknown SDVO output type (0x%02x%02x)\n",
 -				  SDVO_NAME(sdvo_priv),
 -				  bytes[0], bytes[1]);
 -		encoder_type = DRM_MODE_ENCODER_NONE;
 -		connector_type = DRM_MODE_CONNECTOR_Unknown;
 +	if (intel_sdvo_output_setup(intel_output,
 +				    sdvo_priv->caps.output_flags) != true) {
- 		DRM_DEBUG("SDVO output failed to setup on SDVO%c\n",
++		DRM_DEBUG_KMS("SDVO output failed to setup on SDVO%c\n",
 +			  output_device == SDVOB ? 'B' : 'C');
  		goto err_i2c;
  	}
  

             reply	other threads:[~2009-08-10  5:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-10  5:14 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2009-08-20  5:27 linux-next: manual merge of the drm tree with the tree Stephen Rothwell
2009-09-30  1:58 Stephen Rothwell
2010-03-02  3:36 Stephen Rothwell
2012-10-04  2:21 Stephen Rothwell
2014-01-08  1:50 Stephen Rothwell
2015-12-03 14:41 Mark Brown

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=20090810151413.f3e7a08f.sfr@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=airlied@linux$(echo .)ie \
    --cc=eric@anholt$(echo .)net \
    --cc=ling.ma@intel$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=yakui.zhao@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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