[Intel-gfx] [PATCH] drm: Convert all helpers to drm_connector_list_iter

kbuild test robot lkp at intel.com
Thu Dec 15 22:59:49 UTC 2016


Hi Daniel,

[auto build test ERROR on drm/drm-next]
[also build test ERROR on next-20161215]
[cannot apply to v4.9]
[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/Daniel-Vetter/drm-Convert-all-helpers-to-drm_connector_list_iter/20161216-061508
base:   git://people.freedesktop.org/~airlied/linux.git drm-next
config: i386-randconfig-x003-201650 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_helper_encoder_in_use':
>> drivers/gpu/drm/drm_crtc_helper.c:91:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:104:2: error: implicit declaration of function 'drm_connector_list_iter_get' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_get(dev, &conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:105:2: error: implicit declaration of function 'drm_for_each_connector_iter' [-Werror=implicit-function-declaration]
     drm_for_each_connector_iter(connector, &conn_iter) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:105:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_crtc_helper.c:91:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_crtc_helper_disable':
   drivers/gpu/drm/drm_crtc_helper.c:446:34: error: storage size of 'conn_iter' isn't known
      struct drm_connector_list_iter conn_iter;
                                     ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:452:54: error: expected ';' before '{' token
      drm_for_each_connector_iter(connector, &conn_iter) {
                                                         ^
   drivers/gpu/drm/drm_crtc_helper.c:446:34: warning: unused variable 'conn_iter' [-Wunused-variable]
      struct drm_connector_list_iter conn_iter;
                                     ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_crtc_helper_set_config':
   drivers/gpu/drm/drm_crtc_helper.c:521:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:588:3: error: expected ';' before 'save_connector_encoders'
      save_connector_encoders[count++] = connector->encoder;
      ^~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:589:2: error: implicit declaration of function 'drm_connector_list_iter_put' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_put(&conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:633:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_crtc_helper.c:675:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
>> drivers/gpu/drm/drm_crtc_helper.c:767:3: error: expected ';' before 'connector'
      connector->encoder = save_connector_encoders[count++];
      ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:521:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:517:49: warning: unused variable 'new_encoder' [-Wunused-variable]
     struct drm_encoder **save_connector_encoders, *new_encoder, *encoder;
                                                    ^~~~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:516:41: warning: unused variable 'new_crtc' [-Wunused-variable]
     struct drm_crtc **save_encoder_crtcs, *new_crtc;
                                            ^~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_helper_choose_encoder_dpms':
   drivers/gpu/drm/drm_crtc_helper.c:795:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from drivers/gpu/drm/drm_crtc_helper.c:32:
>> include/linux/compiler.h:149:2: error: expected ';' before 'if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
>> drivers/gpu/drm/drm_crtc_helper.c:800:3: note: in expansion of macro 'if'
      if (connector->encoder == encoder)
      ^~
   drivers/gpu/drm/drm_crtc_helper.c:795:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c: In function 'drm_helper_choose_crtc_dpms':
   drivers/gpu/drm/drm_crtc_helper.c:836:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   In file included from include/linux/linkage.h:4:0,
                    from include/linux/kernel.h:6,
                    from drivers/gpu/drm/drm_crtc_helper.c:32:
>> include/linux/compiler.h:149:2: error: expected ';' before 'if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
     ^
   include/linux/compiler.h:147:23: note: in expansion of macro '__trace_if'
    #define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
                          ^~~~~~~~~~
   drivers/gpu/drm/drm_crtc_helper.c:841:3: note: in expansion of macro 'if'
      if (connector->encoder && connector->encoder->crtc == crtc)
      ^~
   drivers/gpu/drm/drm_crtc_helper.c:836:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/drm_probe_helper.c: In function 'drm_kms_helper_poll_enable_locked':
>> drivers/gpu/drm/drm_probe_helper.c:132:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_probe_helper.c:140:2: error: implicit declaration of function 'drm_connector_list_iter_get' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_get(dev, &conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_probe_helper.c:141:2: error: implicit declaration of function 'drm_for_each_connector_iter' [-Werror=implicit-function-declaration]
     drm_for_each_connector_iter(connector, &conn_iter) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_probe_helper.c:141:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_probe_helper.c:132:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c: In function 'output_poll_execute':
   drivers/gpu/drm/drm_probe_helper.c:388:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c:405:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_probe_helper.c:389:28: warning: unused variable 'old_status' [-Wunused-variable]
     enum drm_connector_status old_status;
                               ^~~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c:388:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c: In function 'drm_helper_hpd_irq_event':
   drivers/gpu/drm/drm_probe_helper.c:570:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c:579:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_probe_helper.c:571:28: warning: unused variable 'old_status' [-Wunused-variable]
     enum drm_connector_status old_status;
                               ^~~~~~~~~~
   drivers/gpu/drm/drm_probe_helper.c:570:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/drm_plane_helper.c: In function 'get_connectors_for_crtc':
>> drivers/gpu/drm/drm_plane_helper.c:77:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_plane_helper.c:87:2: error: implicit declaration of function 'drm_connector_list_iter_get' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_get(dev, &conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_plane_helper.c:88:2: error: implicit declaration of function 'drm_for_each_connector_iter' [-Werror=implicit-function-declaration]
     drm_for_each_connector_iter(connector, &conn_iter) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_plane_helper.c:88:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_plane_helper.c:77:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/drm_atomic_helper.c: In function 'handle_conflicting_encoders':
>> drivers/gpu/drm/drm_atomic_helper.c:97:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_atomic_helper.c:148:2: error: implicit declaration of function 'drm_connector_list_iter_get' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_get(state->dev, &conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_atomic_helper.c:149:2: error: implicit declaration of function 'drm_for_each_connector_iter' [-Werror=implicit-function-declaration]
     drm_for_each_connector_iter(connector, &conn_iter) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_atomic_helper.c:149:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
   drivers/gpu/drm/drm_atomic_helper.c:98:22: warning: unused variable 'encoder' [-Wunused-variable]
     struct drm_encoder *encoder;
                         ^~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c:97:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c: In function 'drm_atomic_helper_disable_all':
   drivers/gpu/drm/drm_atomic_helper.c:2452:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c:2462:48: error: expected ';' before '{' token
     drm_for_each_connector_iter(conn, &conn_iter) {
                                                   ^
>> drivers/gpu/drm/drm_atomic_helper.c:2480:2: error: implicit declaration of function 'drm_connector_list_iter_put' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_put(&conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c:2479:1: warning: label 'free' defined but not used [-Wunused-label]
    free:
    ^~~~
   drivers/gpu/drm/drm_atomic_helper.c:2452:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c: In function 'drm_atomic_helper_connector_dpms':
   drivers/gpu/drm/drm_atomic_helper.c:2853:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c:2882:57: error: expected ';' before '{' token
     drm_for_each_connector_iter(tmp_connector, &conn_iter) {
                                                            ^
   drivers/gpu/drm/drm_atomic_helper.c:2853:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c: In function 'drm_atomic_helper_duplicate_state':
   drivers/gpu/drm/drm_atomic_helper.c:3269:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   drivers/gpu/drm/drm_atomic_helper.c:3301:48: error: expected ';' before '{' token
     drm_for_each_connector_iter(conn, &conn_iter) {
                                                   ^
   drivers/gpu/drm/drm_atomic_helper.c:3269:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   cc1: some warnings being treated as errors
--
   drivers/gpu/drm/drm_modeset_helper.c: In function 'drm_helper_move_panel_connectors_to_head':
>> drivers/gpu/drm/drm_modeset_helper.c:51:33: error: 'struct drm_mode_config' has no member named 'connector_list_lock'; did you mean 'connector_list'?
     spin_lock_irq(&dev->mode_config.connector_list_lock);
                                    ^
   drivers/gpu/drm/drm_modeset_helper.c:61:35: error: 'struct drm_mode_config' has no member named 'connector_list_lock'; did you mean 'connector_list'?
     spin_unlock_irq(&dev->mode_config.connector_list_lock);
                                      ^
--
   drivers/gpu/drm/drm_fb_helper.c: In function 'drm_fb_helper_single_add_all_connectors':
>> drivers/gpu/drm/drm_fb_helper.c:123:33: error: storage size of 'conn_iter' isn't known
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
>> drivers/gpu/drm/drm_fb_helper.c:130:2: error: implicit declaration of function 'drm_connector_list_iter_get' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_get(dev, &conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_fb_helper.c:131:2: error: implicit declaration of function 'drm_for_each_connector_iter' [-Werror=implicit-function-declaration]
     drm_for_each_connector_iter(connector, &conn_iter) {
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/drm_fb_helper.c:131:53: error: expected ';' before '{' token
     drm_for_each_connector_iter(connector, &conn_iter) {
                                                        ^
>> drivers/gpu/drm/drm_fb_helper.c:151:2: error: implicit declaration of function 'drm_connector_list_iter_put' [-Werror=implicit-function-declaration]
     drm_connector_list_iter_put(&conn_iter);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/gpu/drm/drm_fb_helper.c:150:1: warning: label 'out' defined but not used [-Wunused-label]
    out:
    ^~~
   drivers/gpu/drm/drm_fb_helper.c:139:1: warning: label 'fail' defined but not used [-Wunused-label]
    fail:
    ^~~~
   drivers/gpu/drm/drm_fb_helper.c:123:33: warning: unused variable 'conn_iter' [-Wunused-variable]
     struct drm_connector_list_iter conn_iter;
                                    ^~~~~~~~~
   cc1: some warnings being treated as errors

vim +91 drivers/gpu/drm/drm_crtc_helper.c

    26	 *      Keith Packard
    27	 *	Eric Anholt <eric at anholt.net>
    28	 *      Dave Airlie <airlied at linux.ie>
    29	 *      Jesse Barnes <jesse.barnes at intel.com>
    30	 */
    31	
  > 32	#include <linux/kernel.h>
    33	#include <linux/export.h>
    34	#include <linux/moduleparam.h>
    35	
    36	#include <drm/drmP.h>
    37	#include <drm/drm_atomic.h>
    38	#include <drm/drm_crtc.h>
    39	#include <drm/drm_fourcc.h>
    40	#include <drm/drm_crtc_helper.h>
    41	#include <drm/drm_fb_helper.h>
    42	#include <drm/drm_plane_helper.h>
    43	#include <drm/drm_atomic_helper.h>
    44	#include <drm/drm_edid.h>
    45	
    46	/**
    47	 * DOC: overview
    48	 *
    49	 * The CRTC modeset helper library provides a default set_config implementation
    50	 * in drm_crtc_helper_set_config(). Plus a few other convenience functions using
    51	 * the same callbacks which drivers can use to e.g. restore the modeset
    52	 * configuration on resume with drm_helper_resume_force_mode().
    53	 *
    54	 * Note that this helper library doesn't track the current power state of CRTCs
    55	 * and encoders. It can call callbacks like ->dpms() even though the hardware is
    56	 * already in the desired state. This deficiency has been fixed in the atomic
    57	 * helpers.
    58	 *
    59	 * The driver callbacks are mostly compatible with the atomic modeset helpers,
    60	 * except for the handling of the primary plane: Atomic helpers require that the
    61	 * primary plane is implemented as a real standalone plane and not directly tied
    62	 * to the CRTC state. For easier transition this library provides functions to
    63	 * implement the old semantics required by the CRTC helpers using the new plane
    64	 * and atomic helper callbacks.
    65	 *
    66	 * Drivers are strongly urged to convert to the atomic helpers (by way of first
    67	 * converting to the plane helpers). New drivers must not use these functions
    68	 * but need to implement the atomic interface instead, potentially using the
    69	 * atomic helpers for that.
    70	 *
    71	 * These legacy modeset helpers use the same function table structures as
    72	 * all other modesetting helpers. See the documentation for struct
    73	 * &drm_crtc_helper_funcs, struct &drm_encoder_helper_funcs and struct
    74	 * &drm_connector_helper_funcs.
    75	 */
    76	
    77	/**
    78	 * drm_helper_encoder_in_use - check if a given encoder is in use
    79	 * @encoder: encoder to check
    80	 *
    81	 * Checks whether @encoder is with the current mode setting output configuration
    82	 * in use by any connector. This doesn't mean that it is actually enabled since
    83	 * the DPMS state is tracked separately.
    84	 *
    85	 * Returns:
    86	 * True if @encoder is used, false otherwise.
    87	 */
    88	bool drm_helper_encoder_in_use(struct drm_encoder *encoder)
    89	{
    90		struct drm_connector *connector;
  > 91		struct drm_connector_list_iter conn_iter;
    92		struct drm_device *dev = encoder->dev;
    93	
    94		/*
    95		 * We can expect this mutex to be locked if we are not panicking.
    96		 * Locking is currently fubar in the panic handler.
    97		 */
    98		if (!oops_in_progress) {
    99			WARN_ON(!mutex_is_locked(&dev->mode_config.mutex));
   100			WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
   101		}
   102	
   103	
 > 104		drm_connector_list_iter_get(dev, &conn_iter);
 > 105		drm_for_each_connector_iter(connector, &conn_iter) {
   106			if (connector->encoder == encoder) {
   107				drm_connector_list_iter_put(&conn_iter);
   108				return true;

---
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: 26883 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20161216/32fb1a1a/attachment-0001.gz>


More information about the Intel-gfx mailing list