[drm:drm-next-amd-dc-staging 8/9] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:581:2: error: implicit declaration of function 'for_each_connector_in_state'
kbuild test robot
fengguang.wu at intel.com
Mon Oct 9 03:09:20 UTC 2017
tree: git://people.freedesktop.org/~airlied/linux.git drm-next-amd-dc-staging
head: e7b8e99bed73e9c42f1c074ad6009cb59a79bd52
commit: b9e56e41e0c55c2b2ab5919c5e167faa4200b083 [8/9] Merge branch 'drm-next-4.15-dc' of git://people.freedesktop.org/~agd5f/linux into drm-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 6.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout b9e56e41e0c55c2b2ab5919c5e167faa4200b083
# save the attached .config to linux build tree
make.cross ARCH=ia64
Note: the drm/drm-next-amd-dc-staging HEAD e7b8e99bed73e9c42f1c074ad6009cb59a79bd52 builds fine.
It only hurts bisectibility.
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_find_first_crct_matching_connector':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:581:2: error: implicit declaration of function 'for_each_connector_in_state' [-Werror=implicit-function-declaration]
for_each_connector_in_state(
^~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:585:6: error: expected ';' before '{' token
i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:579:19: warning: unused variable 'crtc_from_state' [-Wunused-variable]
struct drm_crtc *crtc_from_state;
^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_display_resume':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:655:2: error: implicit declaration of function 'for_each_crtc_in_state' [-Werror=implicit-function-declaration]
for_each_crtc_in_state(adev->dm.cached_state, crtc, crtc_state, i)
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:656:4: error: expected ';' before 'crtc_state'
crtc_state->active_changed = true;
^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_commit_planes':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3893:2: error: implicit declaration of function 'for_each_plane_in_state' [-Werror=implicit-function-declaration]
for_each_plane_in_state(state, plane, old_plane_state, i) {
^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3893:60: error: expected ';' before '{' token
for_each_plane_in_state(state, plane, old_plane_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3890:16: warning: unused variable 'flags' [-Wunused-variable]
unsigned long flags;
^~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3889:6: warning: unused variable 'planes_count' [-Wunused-variable]
int planes_count = 0;
^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3888:24: warning: unused variable 'acrtc_state' [-Wunused-variable]
struct dm_crtc_state *acrtc_state = to_dm_crtc_state(pcrtc->state);
^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3887:22: warning: unused variable 'acrtc_attach' [-Wunused-variable]
struct amdgpu_crtc *acrtc_attach = to_amdgpu_crtc(pcrtc);
^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3886:25: warning: unused variable 'plane_states_constructed' [-Wunused-variable]
struct dc_plane_state *plane_states_constructed[MAX_SURFACES];
^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3885:26: warning: unused variable 'dc_stream_attach' [-Wunused-variable]
struct dc_stream_state *dc_stream_attach;
^~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_commit':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3990:52: error: expected ';' before '{' token
for_each_crtc_in_state(state, crtc, new_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3980:24: warning: unused variable 'adev' [-Wunused-variable]
struct amdgpu_device *adev = dev->dev_private;
^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_commit_tail':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4027:57: error: expected ';' before '{' token
for_each_crtc_in_state(state, crtc, old_crtc_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4154:67: error: expected ';' before '{' token
for_each_connector_in_state(state, connector, old_conn_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4221:57: error: expected ';' before '{' token
for_each_crtc_in_state(state, crtc, old_crtc_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4020:24: warning: unused variable 'old_acrtc_state' [-Wunused-variable]
struct dm_crtc_state *old_acrtc_state, *new_acrtc_state;
^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4016:16: warning: unused variable 'flags' [-Wunused-variable]
unsigned long flags;
^~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4015:26: warning: unused variable 'new_stream' [-Wunused-variable]
struct dc_stream_state *new_stream = NULL;
^~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4014:22: warning: unused variable 'new_crtcs' [-Wunused-variable]
struct amdgpu_crtc *new_crtcs[MAX_STREAMS];
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4012:26: warning: unused variable 'pcrtc' [-Wunused-variable]
struct drm_crtc *crtc, *pcrtc;
^~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4011:11: warning: unused variable 'new_crtcs_count' [-Wunused-variable]
uint32_t new_crtcs_count = 0;
^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4010:14: warning: unused variable 'j' [-Wunused-variable]
uint32_t i, j;
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4008:33: warning: unused variable 'dm' [-Wunused-variable]
struct amdgpu_display_manager *dm = &adev->dm;
^~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'dm_update_crtcs_state':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4393:53: error: expected ';' before '{' token
for_each_crtc_in_state(state, crtc, crtc_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4521:1: warning: label 'fail' defined but not used [-Wunused-label]
fail:
^~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4387:26: warning: unused variable 'dm_state' [-Wunused-variable]
struct dm_atomic_state *dm_state = to_dm_atomic_state(state);
^~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4386:42: warning: unused variable 'new_acrtc_state' [-Wunused-variable]
struct dm_crtc_state *old_acrtc_state, *new_acrtc_state;
^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4386:24: warning: unused variable 'old_acrtc_state' [-Wunused-variable]
struct dm_crtc_state *old_acrtc_state, *new_acrtc_state;
^~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_check':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4677:53: error: expected ';' before '{' token
for_each_crtc_in_state(state, crtc, crtc_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4723:63: error: expected ';' before '{' token
for_each_connector_in_state(state, connector, conn_state, i) {
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_find_first_crct_matching_connector':
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:596:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c: In function 'amdgpu_dm_atomic_commit':
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4001:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
At top level:
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:4331:12: warning: 'do_aquire_global_lock' defined but not used [-Wunused-function]
static int do_aquire_global_lock(
^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3876:13: warning: 'amdgpu_dm_commit_planes' defined but not used [-Wunused-function]
static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3791:13: warning: 'amdgpu_dm_do_flip' defined but not used [-Wunused-function]
static void amdgpu_dm_do_flip(
^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3711:13: warning: 'handle_cursor_update' defined but not used [-Wunused-function]
static void handle_cursor_update(
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3653:13: warning: 'remove_stream' defined but not used [-Wunused-function]
static void remove_stream(
^~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3635:13: warning: 'is_scaling_state_different' defined but not used [-Wunused-function]
static bool is_scaling_state_different(
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:3605:13: warning: 'manage_dm_interrupts' defined but not used [-Wunused-function]
static void manage_dm_interrupts(
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:2310:32: warning: 'create_stream_for_sink' defined but not used [-Wunused-function]
static struct dc_stream_state *create_stream_for_sink(
^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:1663:13: warning: 'modereset_required' defined but not used [-Wunused-function]
static bool modereset_required(struct drm_crtc_state *crtc_state)
^~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/for_each_connector_in_state +581 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
4562236b3b Harry Wentland 2017-09-12 570
c84dec2fe8 Harry Wentland 2017-09-05 571 struct amdgpu_dm_connector *amdgpu_dm_find_first_crct_matching_connector(
4562236b3b Harry Wentland 2017-09-12 572 struct drm_atomic_state *state,
4562236b3b Harry Wentland 2017-09-12 573 struct drm_crtc *crtc,
4562236b3b Harry Wentland 2017-09-12 574 bool from_state_var)
4562236b3b Harry Wentland 2017-09-12 575 {
4562236b3b Harry Wentland 2017-09-12 576 uint32_t i;
4562236b3b Harry Wentland 2017-09-12 577 struct drm_connector_state *conn_state;
4562236b3b Harry Wentland 2017-09-12 578 struct drm_connector *connector;
4562236b3b Harry Wentland 2017-09-12 @579 struct drm_crtc *crtc_from_state;
4562236b3b Harry Wentland 2017-09-12 580
4562236b3b Harry Wentland 2017-09-12 @581 for_each_connector_in_state(
4562236b3b Harry Wentland 2017-09-12 582 state,
4562236b3b Harry Wentland 2017-09-12 583 connector,
4562236b3b Harry Wentland 2017-09-12 584 conn_state,
4562236b3b Harry Wentland 2017-09-12 @585 i) {
4562236b3b Harry Wentland 2017-09-12 586 crtc_from_state =
4562236b3b Harry Wentland 2017-09-12 587 from_state_var ?
4562236b3b Harry Wentland 2017-09-12 588 conn_state->crtc :
4562236b3b Harry Wentland 2017-09-12 589 connector->state->crtc;
4562236b3b Harry Wentland 2017-09-12 590
4562236b3b Harry Wentland 2017-09-12 591 if (crtc_from_state == crtc)
c84dec2fe8 Harry Wentland 2017-09-05 592 return to_amdgpu_dm_connector(connector);
4562236b3b Harry Wentland 2017-09-12 593 }
4562236b3b Harry Wentland 2017-09-12 594
4562236b3b Harry Wentland 2017-09-12 595 return NULL;
4562236b3b Harry Wentland 2017-09-12 @596 }
4562236b3b Harry Wentland 2017-09-12 597
4562236b3b Harry Wentland 2017-09-12 598 static int dm_resume(void *handle)
4562236b3b Harry Wentland 2017-09-12 599 {
4562236b3b Harry Wentland 2017-09-12 600 struct amdgpu_device *adev = handle;
4562236b3b Harry Wentland 2017-09-12 601 struct amdgpu_display_manager *dm = &adev->dm;
4562236b3b Harry Wentland 2017-09-12 602
4562236b3b Harry Wentland 2017-09-12 603 /* power on hardware */
4562236b3b Harry Wentland 2017-09-12 604 dc_set_power_state(
4562236b3b Harry Wentland 2017-09-12 605 dm->dc,
a36214858c Andrey Grodzovsky 2017-04-20 606 DC_ACPI_CM_POWER_STATE_D0
a36214858c Andrey Grodzovsky 2017-04-20 607 );
4562236b3b Harry Wentland 2017-09-12 608
4562236b3b Harry Wentland 2017-09-12 609 return 0;
4562236b3b Harry Wentland 2017-09-12 610 }
4562236b3b Harry Wentland 2017-09-12 611
4562236b3b Harry Wentland 2017-09-12 612 int amdgpu_dm_display_resume(struct amdgpu_device *adev)
4562236b3b Harry Wentland 2017-09-12 613 {
4562236b3b Harry Wentland 2017-09-12 614 struct drm_device *ddev = adev->ddev;
4562236b3b Harry Wentland 2017-09-12 615 struct amdgpu_display_manager *dm = &adev->dm;
c84dec2fe8 Harry Wentland 2017-09-05 616 struct amdgpu_dm_connector *aconnector;
4562236b3b Harry Wentland 2017-09-12 617 struct drm_connector *connector;
4562236b3b Harry Wentland 2017-09-12 618 struct drm_crtc *crtc;
a36214858c Andrey Grodzovsky 2017-04-20 619 struct drm_crtc_state *crtc_state;
a36214858c Andrey Grodzovsky 2017-04-20 620 int ret = 0;
a36214858c Andrey Grodzovsky 2017-04-20 621 int i;
4562236b3b Harry Wentland 2017-09-12 622
4562236b3b Harry Wentland 2017-09-12 623 /* program HPD filter */
4562236b3b Harry Wentland 2017-09-12 624 dc_resume(dm->dc);
4562236b3b Harry Wentland 2017-09-12 625
4562236b3b Harry Wentland 2017-09-12 626 /* On resume we need to rewrite the MSTM control bits to enamble MST*/
4562236b3b Harry Wentland 2017-09-12 627 s3_handle_mst(ddev, false);
4562236b3b Harry Wentland 2017-09-12 628
4562236b3b Harry Wentland 2017-09-12 629 /*
4562236b3b Harry Wentland 2017-09-12 630 * early enable HPD Rx IRQ, should be done before set mode as short
4562236b3b Harry Wentland 2017-09-12 631 * pulse interrupts are used for MST
4562236b3b Harry Wentland 2017-09-12 632 */
4562236b3b Harry Wentland 2017-09-12 633 amdgpu_dm_irq_resume_early(adev);
4562236b3b Harry Wentland 2017-09-12 634
4562236b3b Harry Wentland 2017-09-12 635 /* Do detection*/
4562236b3b Harry Wentland 2017-09-12 636 list_for_each_entry(connector,
4562236b3b Harry Wentland 2017-09-12 637 &ddev->mode_config.connector_list, head) {
c84dec2fe8 Harry Wentland 2017-09-05 638 aconnector = to_amdgpu_dm_connector(connector);
4562236b3b Harry Wentland 2017-09-12 639
4562236b3b Harry Wentland 2017-09-12 640 /*
4562236b3b Harry Wentland 2017-09-12 641 * this is the case when traversing through already created
4562236b3b Harry Wentland 2017-09-12 642 * MST connectors, should be skipped
4562236b3b Harry Wentland 2017-09-12 643 */
4562236b3b Harry Wentland 2017-09-12 644 if (aconnector->mst_port)
4562236b3b Harry Wentland 2017-09-12 645 continue;
4562236b3b Harry Wentland 2017-09-12 646
03ea364c8e Arindam Nath 2017-04-26 647 mutex_lock(&aconnector->hpd_lock);
8f38b66c82 Hersen Wu 2017-09-11 648 dc_link_detect(aconnector->dc_link, DETECT_REASON_HPD);
4562236b3b Harry Wentland 2017-09-12 649 aconnector->dc_sink = NULL;
4562236b3b Harry Wentland 2017-09-12 650 amdgpu_dm_update_connector_after_detect(aconnector);
03ea364c8e Arindam Nath 2017-04-26 651 mutex_unlock(&aconnector->hpd_lock);
4562236b3b Harry Wentland 2017-09-12 652 }
4562236b3b Harry Wentland 2017-09-12 653
a36214858c Andrey Grodzovsky 2017-04-20 654 /* Force mode set in atomic comit */
a36214858c Andrey Grodzovsky 2017-04-20 @655 for_each_crtc_in_state(adev->dm.cached_state, crtc, crtc_state, i)
a36214858c Andrey Grodzovsky 2017-04-20 @656 crtc_state->active_changed = true;
a36214858c Andrey Grodzovsky 2017-04-20 657
a36214858c Andrey Grodzovsky 2017-04-20 658 ret = drm_atomic_helper_resume(ddev, adev->dm.cached_state);
4562236b3b Harry Wentland 2017-09-12 659
0a214e2fb6 Andrey Grodzovsky 2017-07-13 660 drm_atomic_state_put(adev->dm.cached_state);
0a214e2fb6 Andrey Grodzovsky 2017-07-13 661 adev->dm.cached_state = NULL;
0a214e2fb6 Andrey Grodzovsky 2017-07-13 662
9faa423716 Andrey Grodzovsky 2017-03-31 663 amdgpu_dm_irq_resume_late(adev);
4562236b3b Harry Wentland 2017-09-12 664
4562236b3b Harry Wentland 2017-09-12 665 return ret;
4562236b3b Harry Wentland 2017-09-12 666 }
4562236b3b Harry Wentland 2017-09-12 667
:::::: The code at line 581 was first introduced by commit
:::::: 4562236b3bc0a28aeb6ee93b2d8a849a4c4e1c7c drm/amd/dc: Add dc display driver (v2)
:::::: TO: Harry Wentland <harry.wentland at amd.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: 48911 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171009/04f32215/attachment-0001.gz>
More information about the dri-devel
mailing list