mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
d079f94c90
Switch all media platform drivers to call v4l2_async_notifier_add_subdev() to add asd's to a notifier, in place of referencing the notifier->subdevs[] array. These drivers also must now call v4l2_async_notifier_init() before adding asd's to their notifiers. There may still be cases where a platform driver maintains a list of asd's that is a duplicate of the notifier asd_list, in which case its possible the platform driver list can be removed, and can reference the notifier asd_list instead. One example of where a duplicate list has been removed in this patch is xilinx-vipp.c. If there are such cases remaining, those drivers should be optimized to remove the duplicate platform driver asd lists. None of the changes to the platform drivers in this patch have been tested. Verify that the async subdevices needed by the platform are bound at load time, and that the driver unloads and reloads correctly with no memory leaking of asd objects. Suggested-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Steve Longerbeam <slongerbeam@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
46 lines
1.2 KiB
C
46 lines
1.2 KiB
C
/*
|
|
* Xilinx Video IP Composite Device
|
|
*
|
|
* Copyright (C) 2013-2015 Ideas on Board
|
|
* Copyright (C) 2013-2015 Xilinx, Inc.
|
|
*
|
|
* Contacts: Hyun Kwon <hyun.kwon@xilinx.com>
|
|
* Laurent Pinchart <laurent.pinchart@ideasonboard.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#ifndef __XILINX_VIPP_H__
|
|
#define __XILINX_VIPP_H__
|
|
|
|
#include <linux/list.h>
|
|
#include <linux/mutex.h>
|
|
#include <media/media-device.h>
|
|
#include <media/v4l2-async.h>
|
|
#include <media/v4l2-ctrls.h>
|
|
#include <media/v4l2-device.h>
|
|
|
|
/**
|
|
* struct xvip_composite_device - Xilinx Video IP device structure
|
|
* @v4l2_dev: V4L2 device
|
|
* @media_dev: media device
|
|
* @dev: (OF) device
|
|
* @notifier: V4L2 asynchronous subdevs notifier
|
|
* @dmas: list of DMA channels at the pipeline output and input
|
|
* @v4l2_caps: V4L2 capabilities of the whole device (see VIDIOC_QUERYCAP)
|
|
*/
|
|
struct xvip_composite_device {
|
|
struct v4l2_device v4l2_dev;
|
|
struct media_device media_dev;
|
|
struct device *dev;
|
|
|
|
struct v4l2_async_notifier notifier;
|
|
|
|
struct list_head dmas;
|
|
u32 v4l2_caps;
|
|
};
|
|
|
|
#endif /* __XILINX_VIPP_H__ */
|