[Intel-gfx] [PATCH v2 1/2] drm: Create new structure for HDMI info

kbuild test robot lkp at intel.com
Tue Dec 20 23:31:05 UTC 2016


Hi Shashank,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on v4.9 next-20161220]
[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/Shashank-Sharma/drm-Create-new-structure-for-HDMI-info/20161221-065128
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: x86_64-randconfig-i0-201651 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/agp_backend.h:33,
                    from include/drm/drmP.h:35,
                    from drivers/gpu/drm/radeon/radeon_connectors.c:26:
   drivers/gpu/drm/radeon/radeon_connectors.c: In function 'radeon_get_monitor_bpc':
>> drivers/gpu/drm/radeon/radeon_connectors.c:213:33: error: 'struct drm_display_info' has no member named 'edid_hdmi_dc_modes'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
                                    ^
   include/linux/compiler.h:149:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^
   drivers/gpu/drm/radeon/radeon_connectors.c:213:5: note: in expansion of macro 'if'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
        ^
>> drivers/gpu/drm/radeon/radeon_connectors.c:213:33: error: 'struct drm_display_info' has no member named 'edid_hdmi_dc_modes'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
                                    ^
   include/linux/compiler.h:149:42: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                             ^
   drivers/gpu/drm/radeon/radeon_connectors.c:213:5: note: in expansion of macro 'if'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
        ^
>> drivers/gpu/drm/radeon/radeon_connectors.c:213:33: error: 'struct drm_display_info' has no member named 'edid_hdmi_dc_modes'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
                                    ^
   include/linux/compiler.h:160:16: note: in definition of macro '__trace_if'
      ______r = !!(cond);     \
                   ^
   drivers/gpu/drm/radeon/radeon_connectors.c:213:5: note: in expansion of macro 'if'
        if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
        ^

vim +213 drivers/gpu/drm/radeon/radeon_connectors.c

771fe6b9 Jerome Glisse         2009-06-05   20   * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
771fe6b9 Jerome Glisse         2009-06-05   21   * OTHER DEALINGS IN THE SOFTWARE.
771fe6b9 Jerome Glisse         2009-06-05   22   *
771fe6b9 Jerome Glisse         2009-06-05   23   * Authors: Dave Airlie
771fe6b9 Jerome Glisse         2009-06-05   24   *          Alex Deucher
771fe6b9 Jerome Glisse         2009-06-05   25   */
760285e7 David Howells         2012-10-02  @26  #include <drm/drmP.h>
760285e7 David Howells         2012-10-02   27  #include <drm/drm_edid.h>
760285e7 David Howells         2012-10-02   28  #include <drm/drm_crtc_helper.h>
760285e7 David Howells         2012-10-02   29  #include <drm/drm_fb_helper.h>
9843ead0 Dave Airlie           2015-02-24   30  #include <drm/drm_dp_mst_helper.h>
760285e7 David Howells         2012-10-02   31  #include <drm/radeon_drm.h>
771fe6b9 Jerome Glisse         2009-06-05   32  #include "radeon.h"
1a626b68 Slava Grigorev        2014-12-01   33  #include "radeon_audio.h"
923f6848 Alex Deucher          2009-09-10   34  #include "atom.h"
771fe6b9 Jerome Glisse         2009-06-05   35  
10ebc0bc Dave Airlie           2012-09-17   36  #include <linux/pm_runtime.h>
47eb8f73 Lukas Wunner          2016-01-11   37  #include <linux/vga_switcheroo.h>
10ebc0bc Dave Airlie           2012-09-17   38  
9843ead0 Dave Airlie           2015-02-24   39  static int radeon_dp_handle_hpd(struct drm_connector *connector)
9843ead0 Dave Airlie           2015-02-24   40  {
9843ead0 Dave Airlie           2015-02-24   41  	struct radeon_connector *radeon_connector = to_radeon_connector(connector);
9843ead0 Dave Airlie           2015-02-24   42  	int ret;
9843ead0 Dave Airlie           2015-02-24   43  
9843ead0 Dave Airlie           2015-02-24   44  	ret = radeon_dp_mst_check_status(radeon_connector);
9843ead0 Dave Airlie           2015-02-24   45  	if (ret == -EINVAL)
9843ead0 Dave Airlie           2015-02-24   46  		return 1;
9843ead0 Dave Airlie           2015-02-24   47  	return 0;
9843ead0 Dave Airlie           2015-02-24   48  }
d4877cf2 Alex Deucher          2009-12-04   49  void radeon_connector_hotplug(struct drm_connector *connector)
d4877cf2 Alex Deucher          2009-12-04   50  {
d4877cf2 Alex Deucher          2009-12-04   51  	struct drm_device *dev = connector->dev;
d4877cf2 Alex Deucher          2009-12-04   52  	struct radeon_device *rdev = dev->dev_private;
d4877cf2 Alex Deucher          2009-12-04   53  	struct radeon_connector *radeon_connector = to_radeon_connector(connector);
d4877cf2 Alex Deucher          2009-12-04   54  
9843ead0 Dave Airlie           2015-02-24   55  	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
9843ead0 Dave Airlie           2015-02-24   56  		struct radeon_connector_atom_dig *dig_connector =
9843ead0 Dave Airlie           2015-02-24   57  			radeon_connector->con_priv;
9843ead0 Dave Airlie           2015-02-24   58  
9843ead0 Dave Airlie           2015-02-24   59  		if (radeon_connector->is_mst_connector)
9843ead0 Dave Airlie           2015-02-24   60  			return;
9843ead0 Dave Airlie           2015-02-24   61  		if (dig_connector->is_mst) {
9843ead0 Dave Airlie           2015-02-24   62  			radeon_dp_handle_hpd(connector);
9843ead0 Dave Airlie           2015-02-24   63  			return;
9843ead0 Dave Airlie           2015-02-24   64  		}
9843ead0 Dave Airlie           2015-02-24   65  	}
cbac9543 Alex Deucher          2011-07-11   66  	/* bail if the connector does not have hpd pin, e.g.,
cbac9543 Alex Deucher          2011-07-11   67  	 * VGA, TV, etc.
cbac9543 Alex Deucher          2011-07-11   68  	 */
cbac9543 Alex Deucher          2011-07-11   69  	if (radeon_connector->hpd.hpd == RADEON_HPD_NONE)
cbac9543 Alex Deucher          2011-07-11   70  		return;
cbac9543 Alex Deucher          2011-07-11   71  
d4877cf2 Alex Deucher          2009-12-04   72  	radeon_hpd_set_polarity(rdev, radeon_connector->hpd.hpd);
d4877cf2 Alex Deucher          2009-12-04   73  
73104b5c Alex Deucher          2011-08-09   74  	/* if the connector is already off, don't turn it back on */
6e9f798d Daniel Vetter         2014-05-29   75  	/* FIXME: This access isn't protected by any locks. */
73104b5c Alex Deucher          2011-08-09   76  	if (connector->dpms != DRM_MODE_DPMS_ON)
73104b5c Alex Deucher          2011-08-09   77  		return;
73104b5c Alex Deucher          2011-08-09   78  
d5811e87 Alex Deucher          2011-08-13   79  	/* just deal with DP (not eDP) here. */
d5811e87 Alex Deucher          2011-08-13   80  	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
266dcba5 Jerome Glisse         2012-07-19   81  		struct radeon_connector_atom_dig *dig_connector =
266dcba5 Jerome Glisse         2012-07-19   82  			radeon_connector->con_priv;
266dcba5 Jerome Glisse         2012-07-19   83  
266dcba5 Jerome Glisse         2012-07-19   84  		/* if existing sink type was not DP no need to retrain */
266dcba5 Jerome Glisse         2012-07-19   85  		if (dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT)
266dcba5 Jerome Glisse         2012-07-19   86  			return;
7c3ed0fd Alex Deucher          2011-05-20   87  
266dcba5 Jerome Glisse         2012-07-19   88  		/* first get sink type as it may be reset after (un)plug */
266dcba5 Jerome Glisse         2012-07-19   89  		dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector);
266dcba5 Jerome Glisse         2012-07-19   90  		/* don't do anything if sink is not display port, i.e.,
266dcba5 Jerome Glisse         2012-07-19   91  		 * passive dp->(dvi|hdmi) adaptor
266dcba5 Jerome Glisse         2012-07-19   92  		 */
266dcba5 Jerome Glisse         2012-07-19   93  		if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
266dcba5 Jerome Glisse         2012-07-19   94  			int saved_dpms = connector->dpms;
266dcba5 Jerome Glisse         2012-07-19   95  			/* Only turn off the display if it's physically disconnected */
ca2ccde5 Jerome Glisse         2012-07-19   96  			if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
1e85e1d0 Alex Deucher          2011-05-20   97  				drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
ca2ccde5 Jerome Glisse         2012-07-19   98  			} else if (radeon_dp_needs_link_train(radeon_connector)) {
924f92bf Stephen Chandler Paul 2015-08-21   99  				/* Don't try to start link training before we
924f92bf Stephen Chandler Paul 2015-08-21  100  				 * have the dpcd */
924f92bf Stephen Chandler Paul 2015-08-21  101  				if (!radeon_dp_getdpcd(radeon_connector))
924f92bf Stephen Chandler Paul 2015-08-21  102  					return;
924f92bf Stephen Chandler Paul 2015-08-21  103  
ca2ccde5 Jerome Glisse         2012-07-19  104  				/* set it to OFF so that drm_helper_connector_dpms()
ca2ccde5 Jerome Glisse         2012-07-19  105  				 * won't return immediately since the current state
ca2ccde5 Jerome Glisse         2012-07-19  106  				 * is ON at this point.
ca2ccde5 Jerome Glisse         2012-07-19  107  				 */
ca2ccde5 Jerome Glisse         2012-07-19  108  				connector->dpms = DRM_MODE_DPMS_OFF;
5ba7ddf8 Alex Deucher          2011-10-03  109  				drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
ca2ccde5 Jerome Glisse         2012-07-19  110  			}
d5811e87 Alex Deucher          2011-08-13  111  			connector->dpms = saved_dpms;
d4877cf2 Alex Deucher          2009-12-04  112  		}
d4877cf2 Alex Deucher          2009-12-04  113  	}
266dcba5 Jerome Glisse         2012-07-19  114  }
d4877cf2 Alex Deucher          2009-12-04  115  
445282db Dave Airlie           2009-09-09  116  static void radeon_property_change_mode(struct drm_encoder *encoder)
445282db Dave Airlie           2009-09-09  117  {
445282db Dave Airlie           2009-09-09  118  	struct drm_crtc *crtc = encoder->crtc;
445282db Dave Airlie           2009-09-09  119  
445282db Dave Airlie           2009-09-09  120  	if (crtc && crtc->enabled) {
445282db Dave Airlie           2009-09-09  121  		drm_crtc_helper_set_mode(crtc, &crtc->mode,
f4510a27 Matt Roper            2014-04-01  122  					 crtc->x, crtc->y, crtc->primary->fb);
445282db Dave Airlie           2009-09-09  123  	}
445282db Dave Airlie           2009-09-09  124  }
eccea792 Alex Deucher          2012-03-26  125  
eccea792 Alex Deucher          2012-03-26  126  int radeon_get_monitor_bpc(struct drm_connector *connector)
eccea792 Alex Deucher          2012-03-26  127  {
eccea792 Alex Deucher          2012-03-26  128  	struct drm_device *dev = connector->dev;
eccea792 Alex Deucher          2012-03-26  129  	struct radeon_device *rdev = dev->dev_private;
eccea792 Alex Deucher          2012-03-26  130  	struct radeon_connector *radeon_connector = to_radeon_connector(connector);
eccea792 Alex Deucher          2012-03-26  131  	struct radeon_connector_atom_dig *dig_connector;
eccea792 Alex Deucher          2012-03-26  132  	int bpc = 8;
ea292861 Mario Kleiner         2014-06-05  133  	int mode_clock, max_tmds_clock;
eccea792 Alex Deucher          2012-03-26  134  
eccea792 Alex Deucher          2012-03-26  135  	switch (connector->connector_type) {
eccea792 Alex Deucher          2012-03-26  136  	case DRM_MODE_CONNECTOR_DVII:
eccea792 Alex Deucher          2012-03-26  137  	case DRM_MODE_CONNECTOR_HDMIB:
eccea792 Alex Deucher          2012-03-26  138  		if (radeon_connector->use_digital) {
377bd8a9 Alex Deucher          2014-07-15  139  			if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) {
eccea792 Alex Deucher          2012-03-26  140  				if (connector->display_info.bpc)
eccea792 Alex Deucher          2012-03-26  141  					bpc = connector->display_info.bpc;
eccea792 Alex Deucher          2012-03-26  142  			}
eccea792 Alex Deucher          2012-03-26  143  		}
eccea792 Alex Deucher          2012-03-26  144  		break;
eccea792 Alex Deucher          2012-03-26  145  	case DRM_MODE_CONNECTOR_DVID:
eccea792 Alex Deucher          2012-03-26  146  	case DRM_MODE_CONNECTOR_HDMIA:
377bd8a9 Alex Deucher          2014-07-15  147  		if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) {
eccea792 Alex Deucher          2012-03-26  148  			if (connector->display_info.bpc)
eccea792 Alex Deucher          2012-03-26  149  				bpc = connector->display_info.bpc;
eccea792 Alex Deucher          2012-03-26  150  		}
eccea792 Alex Deucher          2012-03-26  151  		break;
eccea792 Alex Deucher          2012-03-26  152  	case DRM_MODE_CONNECTOR_DisplayPort:
eccea792 Alex Deucher          2012-03-26  153  		dig_connector = radeon_connector->con_priv;
eccea792 Alex Deucher          2012-03-26  154  		if ((dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) ||
eccea792 Alex Deucher          2012-03-26  155  		    (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_eDP) ||
377bd8a9 Alex Deucher          2014-07-15  156  		    drm_detect_hdmi_monitor(radeon_connector_edid(connector))) {
eccea792 Alex Deucher          2012-03-26  157  			if (connector->display_info.bpc)
eccea792 Alex Deucher          2012-03-26  158  				bpc = connector->display_info.bpc;
eccea792 Alex Deucher          2012-03-26  159  		}
eccea792 Alex Deucher          2012-03-26  160  		break;
eccea792 Alex Deucher          2012-03-26  161  	case DRM_MODE_CONNECTOR_eDP:
eccea792 Alex Deucher          2012-03-26  162  	case DRM_MODE_CONNECTOR_LVDS:
eccea792 Alex Deucher          2012-03-26  163  		if (connector->display_info.bpc)
eccea792 Alex Deucher          2012-03-26  164  			bpc = connector->display_info.bpc;
eccea792 Alex Deucher          2012-03-26  165  		else if (ASIC_IS_DCE41(rdev) || ASIC_IS_DCE5(rdev)) {
319d1e14 Jani Nikula           2015-03-11  166  			const struct drm_connector_helper_funcs *connector_funcs =
eccea792 Alex Deucher          2012-03-26  167  				connector->helper_private;
eccea792 Alex Deucher          2012-03-26  168  			struct drm_encoder *encoder = connector_funcs->best_encoder(connector);
eccea792 Alex Deucher          2012-03-26  169  			struct radeon_encoder *radeon_encoder = to_radeon_encoder(encoder);
eccea792 Alex Deucher          2012-03-26  170  			struct radeon_encoder_atom_dig *dig = radeon_encoder->enc_priv;
eccea792 Alex Deucher          2012-03-26  171  
eccea792 Alex Deucher          2012-03-26  172  			if (dig->lcd_misc & ATOM_PANEL_MISC_V13_6BIT_PER_COLOR)
eccea792 Alex Deucher          2012-03-26  173  				bpc = 6;
eccea792 Alex Deucher          2012-03-26  174  			else if (dig->lcd_misc & ATOM_PANEL_MISC_V13_8BIT_PER_COLOR)
eccea792 Alex Deucher          2012-03-26  175  				bpc = 8;
eccea792 Alex Deucher          2012-03-26  176  		}
eccea792 Alex Deucher          2012-03-26  177  		break;
eccea792 Alex Deucher          2012-03-26  178  	}
89b92339 Mario Kleiner         2014-05-05  179  
377bd8a9 Alex Deucher          2014-07-15  180  	if (drm_detect_hdmi_monitor(radeon_connector_edid(connector))) {
89b92339 Mario Kleiner         2014-05-05  181  		/* hdmi deep color only implemented on DCE4+ */
89b92339 Mario Kleiner         2014-05-05  182  		if ((bpc > 8) && !ASIC_IS_DCE4(rdev)) {
89b92339 Mario Kleiner         2014-05-05  183  			DRM_DEBUG("%s: HDMI deep color %d bpc unsupported. Using 8 bpc.\n",
72082093 Jani Nikula           2014-06-03  184  					  connector->name, bpc);
89b92339 Mario Kleiner         2014-05-05  185  			bpc = 8;
89b92339 Mario Kleiner         2014-05-05  186  		}
89b92339 Mario Kleiner         2014-05-05  187  
89b92339 Mario Kleiner         2014-05-05  188  		/*
89b92339 Mario Kleiner         2014-05-05  189  		 * Pre DCE-8 hw can't handle > 12 bpc, and more than 12 bpc doesn't make
89b92339 Mario Kleiner         2014-05-05  190  		 * much sense without support for > 12 bpc framebuffers. RGB 4:4:4 at
89b92339 Mario Kleiner         2014-05-05  191  		 * 12 bpc is always supported on hdmi deep color sinks, as this is
89b92339 Mario Kleiner         2014-05-05  192  		 * required by the HDMI-1.3 spec. Clamp to a safe 12 bpc maximum.
89b92339 Mario Kleiner         2014-05-05  193  		 */
89b92339 Mario Kleiner         2014-05-05  194  		if (bpc > 12) {
89b92339 Mario Kleiner         2014-05-05  195  			DRM_DEBUG("%s: HDMI deep color %d bpc unsupported. Using 12 bpc.\n",
72082093 Jani Nikula           2014-06-03  196  					  connector->name, bpc);
89b92339 Mario Kleiner         2014-05-05  197  			bpc = 12;
89b92339 Mario Kleiner         2014-05-05  198  		}
ea292861 Mario Kleiner         2014-06-05  199  
ea292861 Mario Kleiner         2014-06-05  200  		/* Any defined maximum tmds clock limit we must not exceed? */
2a272ca9 Ville Syrjälä         2016-09-28  201  		if (connector->display_info.max_tmds_clock > 0) {
ea292861 Mario Kleiner         2014-06-05  202  			/* mode_clock is clock in kHz for mode to be modeset on this connector */
ea292861 Mario Kleiner         2014-06-05  203  			mode_clock = radeon_connector->pixelclock_for_modeset;
ea292861 Mario Kleiner         2014-06-05  204  
ea292861 Mario Kleiner         2014-06-05  205  			/* Maximum allowable input clock in kHz */
2a272ca9 Ville Syrjälä         2016-09-28  206  			max_tmds_clock = connector->display_info.max_tmds_clock;
ea292861 Mario Kleiner         2014-06-05  207  
ea292861 Mario Kleiner         2014-06-05  208  			DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
ea292861 Mario Kleiner         2014-06-05  209  					  connector->name, mode_clock, max_tmds_clock);
ea292861 Mario Kleiner         2014-06-05  210  
ea292861 Mario Kleiner         2014-06-05  211  			/* Check if bpc is within clock limit. Try to degrade gracefully otherwise */
ea292861 Mario Kleiner         2014-06-05  212  			if ((bpc == 12) && (mode_clock * 3/2 > max_tmds_clock)) {
ea292861 Mario Kleiner         2014-06-05 @213  				if ((connector->display_info.edid_hdmi_dc_modes & DRM_EDID_HDMI_DC_30) &&
ea292861 Mario Kleiner         2014-06-05  214  					(mode_clock * 5/4 <= max_tmds_clock))
ea292861 Mario Kleiner         2014-06-05  215  					bpc = 10;
ea292861 Mario Kleiner         2014-06-05  216  				else

:::::: The code at line 213 was first introduced by commit
:::::: ea29286146db6c72683af76bc8297cebeeec6d13 drm/radeon: hdmi deep color modes must obey clock limit of sink.

:::::: TO: Mario Kleiner <mario.kleiner.de at gmail.com>
:::::: CC: Alex Deucher <alexander.deucher at amd.com>

---
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: 20651 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20161221/98b4107d/attachment-0001.gz>


More information about the dri-devel mailing list