Hi Sakari,
FYI, the error/warning still remains.
tree:
https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git gmsl/dev
head: 01c61f2df5d4db5bedbef75a11e7446163251cc9
commit: 2ca7a690da53c1fd40d4c52ae5d5603db8947cb5 [7/55] media: entity: Use pad as the
starting point for a pipeline
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.5.0-1) 7.5.0
reproduce:
git checkout 2ca7a690da53c1fd40d4c52ae5d5603db8947cb5
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/media/usb/au0828/au0828-core.c: In function 'au0828_disable_source':
> drivers/media/usb/au0828/au0828-core.c:504:26: error: passing
argument 1 of '__media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
__media_pipeline_stop(dev->active_link_owner);
^~~
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/usb/au0828/au0828.h:18,
from drivers/media/usb/au0828/au0828-core.c:8:
include/media/media-entity.h:980:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void __media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~~~
> drivers/media/usb/au0828/au0828-core.c:509:6: error: passing
argument 1 of '__media_pipeline_start' from incompatible pointer type
[-Werror=incompatible-pointer-types]
dev->active_link_user,
^~~
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from drivers/media/usb/au0828/au0828.h:18,
from drivers/media/usb/au0828/au0828-core.c:8:
include/media/media-entity.h:957:18: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
__must_check int __media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/stm32/stm32-dcmi.c: In function 'dcmi_start_streaming':
> drivers/media/platform/stm32/stm32-dcmi.c:739:29: error: passing
argument 1 of 'media_pipeline_start' from incompatible pointer type
[-Werror=incompatible-pointer-types]
ret =
media_pipeline_start(&dcmi->vdev->entity, &dcmi->pipeline);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/stm32/stm32-dcmi.c:836:22: error: passing
argument 1 of 'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&dcmi->vdev->entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/stm32/stm32-dcmi.c: In function 'dcmi_stop_streaming':
drivers/media/platform/stm32/stm32-dcmi.c:864:22: error: passing argument 1 of
'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&dcmi->vdev->entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/v4l2-ctrls.h:14,
from drivers/media/platform/stm32/stm32-dcmi.c:31:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c: In function
'sun4i_csi_start_streaming':
> drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:269:29: error:
passing argument 1 of 'media_pipeline_start' from incompatible pointer type
[-Werror=incompatible-pointer-types]
ret =
media_pipeline_start(&csi->vdev.entity, &csi->vdev.pipe);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:325:22: error:
passing argument 1 of 'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&csi->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c: In function
'sun4i_csi_stop_streaming':
drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:354:22: error: passing argument 1 of
'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&csi->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/media-request.h:20,
from include/media/videobuf2-core.h:20,
from include/media/videobuf2-v4l2.h:16,
from include/media/videobuf2-dma-contig.h:16,
from drivers/media/platform/sunxi/sun4i-csi/sun4i_dma.c:14:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c: In function
'sun6i_video_start_streaming':
> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:144:29:
error: passing argument 1 of 'media_pipeline_start' from incompatible pointer type
[-Werror=incompatible-pointer-types]
ret =
media_pipeline_start(&video->vdev.entity, &video->vdev.pipe);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:947:18: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
__must_check int media_pipeline_start(struct media_pad *pad,
^~~~~~~~~~~~~~~~~~~~
> drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:208:22:
error: passing argument 1 of 'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&video->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c: In function
'sun6i_video_stop_streaming':
drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:232:22: error: passing argument 1
of 'media_pipeline_stop' from incompatible pointer type
[-Werror=incompatible-pointer-types]
media_pipeline_stop(&video->vdev.entity);
^
In file included from include/media/media-device.h:18:0,
from include/media/v4l2-device.h:12,
from drivers/media/platform/sunxi/sun6i-csi/sun6i_video.c:10:
include/media/media-entity.h:971:6: note: expected 'struct media_pad *' but
argument is of type 'struct media_entity *'
void media_pipeline_stop(struct media_pad *pad);
^~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/__media_pipeline_stop +504 drivers/media/usb/au0828/au0828-core.c
c94903f1f7cc76 Shuah Khan 2016-02-11 440
90cd366bc61cd5 Shuah Khan 2016-11-29 441 /* Callers should hold graph_mutex */
c94903f1f7cc76 Shuah Khan 2016-02-11 442 static void au0828_disable_source(struct
media_entity *entity)
c94903f1f7cc76 Shuah Khan 2016-02-11 443 {
c94903f1f7cc76 Shuah Khan 2016-02-11 444 int ret = 0;
c94903f1f7cc76 Shuah Khan 2016-02-11 445 struct media_device *mdev =
entity->graph_obj.mdev;
c94903f1f7cc76 Shuah Khan 2016-02-11 446 struct au0828_dev *dev;
c94903f1f7cc76 Shuah Khan 2016-02-11 447
c94903f1f7cc76 Shuah Khan 2016-02-11 448 if (!mdev)
c94903f1f7cc76 Shuah Khan 2016-02-11 449 return;
c94903f1f7cc76 Shuah Khan 2016-02-11 450
c94903f1f7cc76 Shuah Khan 2016-02-11 451 dev = mdev->source_priv;
c94903f1f7cc76 Shuah Khan 2016-02-11 452
90cd366bc61cd5 Shuah Khan 2016-11-29 453 if (!dev->active_link)
90cd366bc61cd5 Shuah Khan 2016-11-29 454 return;
c94903f1f7cc76 Shuah Khan 2016-02-11 455
383b0e5b6ebb08 Shuah Khan 2019-04-01 456 /* link is active - stop pipeline from
source
383b0e5b6ebb08 Shuah Khan 2019-04-01 457 * (tuner/s-video/Composite) to the entity
383b0e5b6ebb08 Shuah Khan 2019-04-01 458 * When DVB/s-video/Composite owns tuner,
it won't be in
383b0e5b6ebb08 Shuah Khan 2019-04-01 459 * shared state.
383b0e5b6ebb08 Shuah Khan 2019-04-01 460 */
c94903f1f7cc76 Shuah Khan 2016-02-11 461 if (dev->active_link->sink->entity
== dev->active_sink &&
c94903f1f7cc76 Shuah Khan 2016-02-11 462
dev->active_link->source->entity == dev->active_source) {
c94903f1f7cc76 Shuah Khan 2016-02-11 463 /*
383b0e5b6ebb08 Shuah Khan 2019-04-01 464 * Prevent video from deactivating link
when audio
383b0e5b6ebb08 Shuah Khan 2019-04-01 465 * has active pipeline and vice versa. In
addition
383b0e5b6ebb08 Shuah Khan 2019-04-01 466 * handle the case when more than one
video/vbi
383b0e5b6ebb08 Shuah Khan 2019-04-01 467 * application is sharing the link.
c94903f1f7cc76 Shuah Khan 2016-02-11 468 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 469 bool owner_is_audio = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 470
383b0e5b6ebb08 Shuah Khan 2019-04-01 471 if (dev->active_link_owner->function
==
383b0e5b6ebb08 Shuah Khan 2019-04-01 472 MEDIA_ENT_F_AUDIO_CAPTURE)
383b0e5b6ebb08 Shuah Khan 2019-04-01 473 owner_is_audio = true;
383b0e5b6ebb08 Shuah Khan 2019-04-01 474
383b0e5b6ebb08 Shuah Khan 2019-04-01 475 if (dev->active_link_shared) {
383b0e5b6ebb08 Shuah Khan 2019-04-01 476 pr_debug("Shared link owner %s user
%s %d\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 477 dev->active_link_owner->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 478 entity->name, dev->users);
383b0e5b6ebb08 Shuah Khan 2019-04-01 479
383b0e5b6ebb08 Shuah Khan 2019-04-01 480 /* Handle video device users > 1
383b0e5b6ebb08 Shuah Khan 2019-04-01 481 * When audio owns the shared link with
383b0e5b6ebb08 Shuah Khan 2019-04-01 482 * more than one video users, avoid
383b0e5b6ebb08 Shuah Khan 2019-04-01 483 * disabling the source and/or switching
383b0e5b6ebb08 Shuah Khan 2019-04-01 484 * the owner until the last
disable_source
383b0e5b6ebb08 Shuah Khan 2019-04-01 485 * call from video _close(). Use
dev->users to
383b0e5b6ebb08 Shuah Khan 2019-04-01 486 * determine when to switch/disable.
383b0e5b6ebb08 Shuah Khan 2019-04-01 487 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 488 if (dev->active_link_owner != entity)
{
383b0e5b6ebb08 Shuah Khan 2019-04-01 489 /* video device has users > 1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 490 if (owner_is_audio &&
dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 491 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 492
383b0e5b6ebb08 Shuah Khan 2019-04-01 493 dev->active_link_user = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 494 dev->active_link_user_pipe = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 495 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 496 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 497 }
383b0e5b6ebb08 Shuah Khan 2019-04-01 498
383b0e5b6ebb08 Shuah Khan 2019-04-01 499 /* video owns the link and has users >
1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 500 if (!owner_is_audio &&
dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 501 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 502
383b0e5b6ebb08 Shuah Khan 2019-04-01 503 /* stop pipeline */
383b0e5b6ebb08 Shuah Khan 2019-04-01 @504
__media_pipeline_stop(dev->active_link_owner);
383b0e5b6ebb08 Shuah Khan 2019-04-01 505 pr_debug("Pipeline stop for
%s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 506 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 507
383b0e5b6ebb08 Shuah Khan 2019-04-01 508 ret = __media_pipeline_start(
383b0e5b6ebb08 Shuah Khan 2019-04-01 @509 dev->active_link_user,
383b0e5b6ebb08 Shuah Khan 2019-04-01 510 dev->active_link_user_pipe);
383b0e5b6ebb08 Shuah Khan 2019-04-01 511 if (ret) {
383b0e5b6ebb08 Shuah Khan 2019-04-01 512 pr_err("Start Pipeline: %s->%s
%d\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 513 dev->active_source->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 514 dev->active_link_user->name,
383b0e5b6ebb08 Shuah Khan 2019-04-01 515 ret);
383b0e5b6ebb08 Shuah Khan 2019-04-01 516 goto deactivate_link;
383b0e5b6ebb08 Shuah Khan 2019-04-01 517 }
383b0e5b6ebb08 Shuah Khan 2019-04-01 518 /* link user is now the owner */
383b0e5b6ebb08 Shuah Khan 2019-04-01 519 dev->active_link_owner =
dev->active_link_user;
383b0e5b6ebb08 Shuah Khan 2019-04-01 520 dev->active_link_user = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 521 dev->active_link_user_pipe = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 522 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 523
383b0e5b6ebb08 Shuah Khan 2019-04-01 524 pr_debug("Pipeline started for
%s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 525 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 526 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 527 } else if (!owner_is_audio &&
dev->users > 1)
383b0e5b6ebb08 Shuah Khan 2019-04-01 528 /* video/vbi owns the link and has users
> 1 */
383b0e5b6ebb08 Shuah Khan 2019-04-01 529 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 530
c94903f1f7cc76 Shuah Khan 2016-02-11 531 if (dev->active_link_owner != entity)
90cd366bc61cd5 Shuah Khan 2016-11-29 532 return;
383b0e5b6ebb08 Shuah Khan 2019-04-01 533
383b0e5b6ebb08 Shuah Khan 2019-04-01 534 /* stop pipeline */
2ca7a690da53c1 Sakari Ailus 2016-11-21 535
__media_pipeline_stop(dev->active_link_owner->pads);
383b0e5b6ebb08 Shuah Khan 2019-04-01 536 pr_debug("Pipeline stop for
%s\n",
383b0e5b6ebb08 Shuah Khan 2019-04-01 537 dev->active_link_owner->name);
383b0e5b6ebb08 Shuah Khan 2019-04-01 538
383b0e5b6ebb08 Shuah Khan 2019-04-01 539 deactivate_link:
c94903f1f7cc76 Shuah Khan 2016-02-11 540 ret =
__media_entity_setup_link(dev->active_link, 0);
c94903f1f7cc76 Shuah Khan 2016-02-11 541 if (ret)
c94903f1f7cc76 Shuah Khan 2016-02-11 542 pr_err("Deactivate link Error
%d\n", ret);
c94903f1f7cc76 Shuah Khan 2016-02-11 543
383b0e5b6ebb08 Shuah Khan 2019-04-01 544 pr_info("Disabled Source:
%s->%s->%s Ret %d\n",
c94903f1f7cc76 Shuah Khan 2016-02-11 545 dev->active_source->name,
dev->active_sink->name,
c94903f1f7cc76 Shuah Khan 2016-02-11 546 dev->active_link_owner->name,
ret);
c94903f1f7cc76 Shuah Khan 2016-02-11 547
c94903f1f7cc76 Shuah Khan 2016-02-11 548 dev->active_link = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 549 dev->active_link_owner = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 550 dev->active_source = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 551 dev->active_sink = NULL;
383b0e5b6ebb08 Shuah Khan 2019-04-01 552 dev->active_link_shared = false;
383b0e5b6ebb08 Shuah Khan 2019-04-01 553 dev->active_link_user = NULL;
c94903f1f7cc76 Shuah Khan 2016-02-11 554 }
c94903f1f7cc76 Shuah Khan 2016-02-11 555 }
0a82edd011f5cd Arnd Bergmann 2016-03-04 556 #endif
c94903f1f7cc76 Shuah Khan 2016-02-11 557
:::::: The code at line 504 was first introduced by commit
:::::: 383b0e5b6ebb087bde22fbb5fcd9d567c5dbdb92 media: au0828: fix enable and disable
source audio and video inconsistencies
:::::: TO: Shuah Khan <shuah(a)kernel.org>
:::::: CC: Mauro Carvalho Chehab <mchehab+samsung(a)kernel.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation