linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics <intel-gfx@lists.freedesktop.org>,
	DRI <dri-devel@lists.freedesktop.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: "Linux Next Mailing List" <linux-next@vger.kernel.org>,
	"Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Uma Shankar" <uma.shankar@intel.com>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>
Subject: linux-next: manual merge of the drm-misc tree with the drm-intel tree
Date: Tue, 19 Mar 2019 11:51:16 +1100	[thread overview]
Message-ID: <20190319115116.5b5892fd@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 4213 bytes --]

Hi all,

Today's linux-next merge of the drm-misc tree got a conflict in:

  drivers/gpu/drm/i915/intel_hdmi.c

between commit:

  fbf08556ed43 ("drm/i915: Precompute HDMI infoframes")

from the drm-intel tree and commit:

  2f146b78d5a9 ("drm/i915: Attach colorspace property and enable modeset")

from the drm-misc tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/gpu/drm/i915/intel_hdmi.c
index ecfec5d3292e,765718b606d8..000000000000
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@@ -638,70 -469,39 +638,72 @@@ static void intel_write_infoframe(struc
  	buffer[3] = 0;
  	len++;
  
 -	intel_dig_port->write_infoframe(encoder,
 -					crtc_state,
 -					frame->any.type, buffer, len);
 +	intel_dig_port->write_infoframe(encoder, crtc_state, type, buffer, len);
  }
  
 -static void intel_hdmi_set_avi_infoframe(struct intel_encoder *encoder,
 -					 const struct intel_crtc_state *crtc_state,
 -					 const struct drm_connector_state *conn_state)
 +void intel_read_infoframe(struct intel_encoder *encoder,
 +			  const struct intel_crtc_state *crtc_state,
 +			  enum hdmi_infoframe_type type,
 +			  union hdmi_infoframe *frame)
  {
 +	struct intel_digital_port *intel_dig_port = enc_to_dig_port(&encoder->base);
 +	u8 buffer[VIDEO_DIP_DATA_SIZE];
 +	int ret;
 +
 +	if ((crtc_state->infoframes.enable &
 +	     intel_hdmi_infoframe_enable(type)) == 0)
 +		return;
 +
 +	intel_dig_port->read_infoframe(encoder, crtc_state,
 +				       type, buffer, sizeof(buffer));
 +
 +	/* Fill the 'hole' (see big comment above) at position 3 */
 +	memmove(&buffer[1], &buffer[0], 3);
 +
 +	/* see comment above for the reason for this offset */
 +	ret = hdmi_infoframe_unpack(frame, buffer + 1, sizeof(buffer) - 1);
 +	if (ret) {
 +		DRM_DEBUG_KMS("Failed to unpack infoframe type 0x%02x\n", type);
 +		return;
 +	}
 +
 +	if (frame->any.type != type)
 +		DRM_DEBUG_KMS("Found the wrong infoframe type 0x%x (expected 0x%02x)\n",
 +			      frame->any.type, type);
 +}
 +
 +static bool
 +intel_hdmi_compute_avi_infoframe(struct intel_encoder *encoder,
 +				 struct intel_crtc_state *crtc_state,
 +				 struct drm_connector_state *conn_state)
 +{
 +	struct hdmi_avi_infoframe *frame = &crtc_state->infoframes.avi.avi;
  	const struct drm_display_mode *adjusted_mode =
  		&crtc_state->base.adjusted_mode;
 -	union hdmi_infoframe frame;
 +	struct drm_connector *connector = conn_state->connector;
  	int ret;
  
 -	ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
 -						       conn_state->connector,
 +	if (!crtc_state->has_infoframe)
 +		return true;
 +
 +	crtc_state->infoframes.enable |=
 +		intel_hdmi_infoframe_enable(HDMI_INFOFRAME_TYPE_AVI);
 +
 +	ret = drm_hdmi_avi_infoframe_from_display_mode(frame, connector,
  						       adjusted_mode);
 -	if (ret < 0) {
 -		DRM_ERROR("couldn't fill AVI infoframe\n");
 -		return;
 -	}
 +	if (ret)
 +		return false;
  
  	if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
 -		frame.avi.colorspace = HDMI_COLORSPACE_YUV420;
 +		frame->colorspace = HDMI_COLORSPACE_YUV420;
  	else if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444)
 -		frame.avi.colorspace = HDMI_COLORSPACE_YUV444;
 +		frame->colorspace = HDMI_COLORSPACE_YUV444;
  	else
 -		frame.avi.colorspace = HDMI_COLORSPACE_RGB;
 +		frame->colorspace = HDMI_COLORSPACE_RGB;
  
 -	drm_hdmi_avi_infoframe_colorspace(&frame.avi, conn_state);
++	drm_hdmi_avi_infoframe_colorspace(frame, conn_state);
+ 
 -	drm_hdmi_avi_infoframe_quant_range(&frame.avi,
 -					   conn_state->connector,
 +	drm_hdmi_avi_infoframe_quant_range(frame, connector,
  					   adjusted_mode,
  					   crtc_state->limited_color_range ?
  					   HDMI_QUANTIZATION_RANGE_LIMITED :

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2019-03-19  0:51 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-19  0:51 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-09-22  3:34 linux-next: manual merge of the drm-misc tree with the drm-intel tree Stephen Rothwell
2020-04-15  1:52 Stephen Rothwell
2019-08-20  2:19 Stephen Rothwell
2019-05-22 23:58 Stephen Rothwell
2019-05-22 23:53 Stephen Rothwell
2019-01-16  1:27 Stephen Rothwell
2017-07-20  1:23 Stephen Rothwell
2017-07-21  0:11 ` Stephen Rothwell
2017-05-23  2:00 Stephen Rothwell
2017-05-25  1:53 ` Stephen Rothwell
2017-03-06 23:48 Stephen Rothwell
2017-01-03  2:14 Stephen Rothwell
2017-01-03  2:08 Stephen Rothwell
2017-01-03  1:59 Stephen Rothwell
2017-01-03  1:50 Stephen Rothwell
2016-10-23 23:59 Stephen Rothwell
2016-05-03  3:24 Stephen Rothwell
2016-05-03  7:54 ` Daniel Vetter
2016-04-27  2:32 Stephen Rothwell
2015-12-14  1:06 Stephen Rothwell
2015-10-15  2:04 Stephen Rothwell
2015-09-29  1:26 Stephen Rothwell

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=20190319115116.5b5892fd@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=joonas.lahtinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=rodrigo.vivi@intel.com \
    --cc=uma.shankar@intel.com \
    --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;
as well as URLs for NNTP newsgroup(s).