[v4 3/3] drm/i915: Attach colorspace property and enable modeset

kbuild test robot lkp at intel.com
Wed Nov 28 20:49:09 UTC 2018


Hi Uma,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20181128]
[cannot apply to v4.20-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Uma-Shankar/Add-Colorspace-connector-property-interface/20181128-083317
base:   git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/i915/intel_hdmi.c:493:51: warning: mixing different enum types
   drivers/gpu/drm/i915/intel_hdmi.c:493:51:     unsigned int enum absolute_colorimetry_list  versus
   drivers/gpu/drm/i915/intel_hdmi.c:493:51:     unsigned int enum hdmi_colorimetry 
   include/linux/slab.h:332:43: warning: dubious: x & !y
   include/linux/slab.h:332:43: warning: dubious: x & !y

vim +493 drivers/gpu/drm/i915/intel_hdmi.c

   460	
   461	static void intel_hdmi_set_avi_infoframe(struct intel_encoder *encoder,
   462						 const struct intel_crtc_state *crtc_state,
   463						 const struct drm_connector_state *conn_state)
   464	{
   465		struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
   466		const struct drm_display_mode *adjusted_mode =
   467			&crtc_state->base.adjusted_mode;
   468		struct drm_connector *connector = &intel_hdmi->attached_connector->base;
   469		bool is_hdmi2_sink = connector->display_info.hdmi.scdc.supported ||
   470		   connector->display_info.color_formats & DRM_COLOR_FORMAT_YCRCB420;
   471		union hdmi_infoframe frame;
   472		int ret;
   473	
   474		ret = drm_hdmi_avi_infoframe_from_display_mode(&frame.avi,
   475							       adjusted_mode,
   476							       is_hdmi2_sink);
   477		if (ret < 0) {
   478			DRM_ERROR("couldn't fill AVI infoframe\n");
   479			return;
   480		}
   481	
   482		if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR420)
   483			frame.avi.colorspace = HDMI_COLORSPACE_YUV420;
   484		else if (crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444)
   485			frame.avi.colorspace = HDMI_COLORSPACE_YUV444;
   486		else
   487			frame.avi.colorspace = HDMI_COLORSPACE_RGB;
   488	
   489		if (conn_state->colorspace == COLORIMETRY_DEFAULT) {
   490			/* Set ITU 709 as default for HDMI */
   491			frame.avi.colorimetry = COLORIMETRY_ITU_709;
   492		} else if (conn_state->colorspace < COLORIMETRY_XV_YCC_601) {
 > 493			frame.avi.colorimetry = conn_state->colorspace;
   494		} else {
   495			frame.avi.colorimetry = HDMI_COLORIMETRY_EXTENDED;
   496			/*
   497			 * Starting from extended list where COLORIMETRY_XV_YCC_601
   498			 * is the first extended mode and its value is 0 as per HDMI
   499			 * specification.
   500			 */
   501			frame.avi.extended_colorimetry = conn_state->colorspace -
   502								COLORIMETRY_XV_YCC_601;
   503		}
   504	
   505		drm_hdmi_avi_infoframe_quant_range(&frame.avi, adjusted_mode,
   506						   crtc_state->limited_color_range ?
   507						   HDMI_QUANTIZATION_RANGE_LIMITED :
   508						   HDMI_QUANTIZATION_RANGE_FULL,
   509						   intel_hdmi->rgb_quant_range_selectable,
   510						   is_hdmi2_sink);
   511	
   512		drm_hdmi_avi_infoframe_content_type(&frame.avi,
   513						    conn_state);
   514	
   515		/* TODO: handle pixel repetition for YCBCR420 outputs */
   516		intel_write_infoframe(encoder, crtc_state,
   517				      &frame);
   518	}
   519	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 66662 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20181129/4175e1af/attachment-0001.gz>


More information about the dri-devel mailing list