From 30b4e122d71cbec2944a5f8b558b88936ee42f10 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Wed, 8 Nov 2017 16:19:45 -0500 Subject: media: rc: sir_ir: detect presence of port Without this test, sir_ir clumsy claims resources for a device which does not exist. The 0-day kernel test robot reports the following errors (in a loop): sir_ir sir_ir.0: Trapped in interrupt genirq: Flags mismatch irq 4. 00000000 (ttyS0) vs. 00000000 (sir_ir) When sir_ir is loaded with the default io and irq, the following happens: - sir_ir claims irq 4 - user space opens /dev/ttyS0 - in serial8250_do_startup(), some setup is done for ttyS0, which causes irq 4 to fire (in THRE test) - sir_ir does not realise it was not for it, and spins until the "trapped in interrupt" - now serial driver calls setup_irq() and fails and we get the "Flags mismatch" error. There is no port present at 0x3e8 so simply check for the presence of a port, as suggested by Linus. Reported-by: kbuild test robot Tested-by: Fengguang Wu Signed-off-by: Sean Young Cc: # 4.12+ Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/sir_ir.c | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/sir_ir.c b/drivers/media/rc/sir_ir.c index 76120664b700..9ee2c9196b4d 100644 --- a/drivers/media/rc/sir_ir.c +++ b/drivers/media/rc/sir_ir.c @@ -57,7 +57,7 @@ static void add_read_queue(int flag, unsigned long val); static irqreturn_t sir_interrupt(int irq, void *dev_id); static void send_space(unsigned long len); static void send_pulse(unsigned long len); -static void init_hardware(void); +static int init_hardware(void); static void drop_hardware(void); /* Initialisation */ @@ -263,11 +263,36 @@ static void send_pulse(unsigned long len) } } -static void init_hardware(void) +static int init_hardware(void) { + u8 scratch, scratch2, scratch3; unsigned long flags; spin_lock_irqsave(&hardware_lock, flags); + + /* + * This is a simple port existence test, borrowed from the autoconfig + * function in drivers/tty/serial/8250/8250_port.c + */ + scratch = sinp(UART_IER); + soutp(UART_IER, 0); +#ifdef __i386__ + outb(0xff, 0x080); +#endif + scratch2 = sinp(UART_IER) & 0x0f; + soutp(UART_IER, 0x0f); +#ifdef __i386__ + outb(0x00, 0x080); +#endif + scratch3 = sinp(UART_IER) & 0x0f; + soutp(UART_IER, scratch); + if (scratch2 != 0 || scratch3 != 0x0f) { + /* we fail, there's nothing here */ + spin_unlock_irqrestore(&hardware_lock, flags); + pr_err("port existence test failed, cannot continue\n"); + return -ENODEV; + } + /* reset UART */ outb(0, io + UART_MCR); outb(0, io + UART_IER); @@ -285,6 +310,8 @@ static void init_hardware(void) /* turn on UART */ outb(UART_MCR_DTR | UART_MCR_RTS | UART_MCR_OUT2, io + UART_MCR); spin_unlock_irqrestore(&hardware_lock, flags); + + return 0; } static void drop_hardware(void) @@ -334,14 +361,19 @@ static int sir_ir_probe(struct platform_device *dev) pr_err("IRQ %d already in use.\n", irq); return retval; } + + retval = init_hardware(); + if (retval) { + del_timer_sync(&timerlist); + return retval; + } + pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq); retval = devm_rc_register_device(&sir_ir_dev->dev, rcdev); if (retval < 0) return retval; - init_hardware(); - return 0; } -- cgit v1.2.3 From 29a90b70893817e2f2bb3cea40a29f5308e21b21 Mon Sep 17 00:00:00 2001 From: Robin Murphy Date: Thu, 28 Sep 2017 15:14:01 +0100 Subject: iommu/vt-d: Fix scatterlist offset handling The intel-iommu DMA ops fail to correctly handle scatterlists where sg->offset is greater than PAGE_SIZE - the IOVA allocation is computed appropriately based on the page-aligned portion of the offset, but the mapping is set up relative to sg->page, which means it fails to actually cover the whole buffer (and in the worst case doesn't cover it at all): (sg->dma_address + sg->dma_len) ----+ sg->dma_address ---------+ | iov_pfn------+ | | | | | v v v iova: a b c d e f |--------|--------|--------|--------|--------| <...calculated....> [_____mapped______] pfn: 0 1 2 3 4 5 |--------|--------|--------|--------|--------| ^ ^ ^ | | | sg->page ----+ | | sg->offset --------------+ | (sg->offset + sg->length) ----------+ As a result, the caller ends up overrunning the mapping into whatever lies beyond, which usually goes badly: [ 429.645492] DMAR: DRHD: handling fault status reg 2 [ 429.650847] DMAR: [DMA Write] Request device [02:00.4] fault addr f2682000 ... Whilst this is a fairly rare occurrence, it can happen from the result of intermediate scatterlist processing such as scatterwalk_ffwd() in the crypto layer. Whilst that particular site could be fixed up, it still seems worthwhile to bring intel-iommu in line with other DMA API implementations in handling this robustly. To that end, fix the intel_map_sg() path to line up the mapping correctly (in units of MM pages rather than VT-d pages to match the aligned_nrpages() calculation) regardless of the offset, and use sg_phys() consistently for clarity. Reported-by: Harsh Jain Signed-off-by: Robin Murphy Reviewed by: Ashok Raj Tested by: Jacob Pan Cc: stable@vger.kernel.org Signed-off-by: Alex Williamson --- drivers/iommu/intel-iommu.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index a0babdbf7146..4a2de34895ec 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2250,10 +2250,12 @@ static int __domain_mapping(struct dmar_domain *domain, unsigned long iov_pfn, uint64_t tmp; if (!sg_res) { + unsigned int pgoff = sg->offset & ~PAGE_MASK; + sg_res = aligned_nrpages(sg->offset, sg->length); - sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + sg->offset; + sg->dma_address = ((dma_addr_t)iov_pfn << VTD_PAGE_SHIFT) + pgoff; sg->dma_length = sg->length; - pteval = page_to_phys(sg_page(sg)) | prot; + pteval = (sg_phys(sg) - pgoff) | prot; phys_pfn = pteval >> VTD_PAGE_SHIFT; } @@ -3787,7 +3789,7 @@ static int intel_nontranslate_map_sg(struct device *hddev, for_each_sg(sglist, sg, nelems, i) { BUG_ON(!sg_page(sg)); - sg->dma_address = page_to_phys(sg_page(sg)) + sg->offset; + sg->dma_address = sg_phys(sg); sg->dma_length = sg->length; } return nelems; -- cgit v1.2.3 From bd257b2f3bc68514fad19763f540fea581c12d22 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Piccoli" Date: Fri, 17 Nov 2017 19:14:53 -0200 Subject: scsi: aacraid: Check for PCI state of device in a generic way Commit 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH") introduced checks about the state of device before any PCI operations in the driver. Basically, this prevents it to perform PCI accesses when device is in the process of recover from a PCI error. In PowerPC, such mechanism is called EEH, and the aforementioned commit introduced checks that are based on EEH-specific primitives for that. The potential problems with this approach are three: first, these checks are "locked" to powerpc only - another archs could have error recovery methods too, like AER in Intel. Also, the powerpc primitives perform expensive FW accesses to validate the precise PCI state of a device. Finally, code becomes more complicated and needs ifdef validation based on arch config being set. So, this patch makes use of generic PCI state checks, which are lightweight and non-dependent of arch configs - also, it makes the code cleaner. Fixes: 16ae9dd35d37 ("scsi: aacraid: Fix for excessive prints on EEH") Signed-off-by: Guilherme G. Piccoli Reviewed-by: Dave Carroll Signed-off-by: Martin K. Petersen --- drivers/scsi/aacraid/commsup.c | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 525a652dab48..2abe8fd83494 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -467,35 +467,6 @@ int aac_queue_get(struct aac_dev * dev, u32 * index, u32 qid, struct hw_fib * hw return 0; } -#ifdef CONFIG_EEH -static inline int aac_check_eeh_failure(struct aac_dev *dev) -{ - /* Check for an EEH failure for the given - * device node. Function eeh_dev_check_failure() - * returns 0 if there has not been an EEH error - * otherwise returns a non-zero value. - * - * Need to be called before any PCI operation, - * i.e.,before aac_adapter_check_health() - */ - struct eeh_dev *edev = pci_dev_to_eeh_dev(dev->pdev); - - if (eeh_dev_check_failure(edev)) { - /* The EEH mechanisms will handle this - * error and reset the device if - * necessary. - */ - return 1; - } - return 0; -} -#else -static inline int aac_check_eeh_failure(struct aac_dev *dev) -{ - return 0; -} -#endif - /* * Define the highest level of host to adapter communication routines. * These routines will support host to adapter FS commuication. These @@ -701,7 +672,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size, return -ETIMEDOUT; } - if (aac_check_eeh_failure(dev)) + if (unlikely(pci_channel_offline(dev->pdev))) return -EFAULT; if ((blink = aac_adapter_check_health(dev)) > 0) { @@ -801,7 +772,7 @@ int aac_hba_send(u8 command, struct fib *fibptr, fib_callback callback, spin_unlock_irqrestore(&fibptr->event_lock, flags); - if (aac_check_eeh_failure(dev)) + if (unlikely(pci_channel_offline(dev->pdev))) return -EFAULT; fibptr->flags |= FIB_CONTEXT_FLAG_WAIT; -- cgit v1.2.3 From d9b6d85a38df398cfe0ba3f0fae59d58c9a6d433 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Piccoli" Date: Fri, 17 Nov 2017 19:14:54 -0200 Subject: scsi: aacraid: Perform initialization reset only once Currently the driver accepts two ways of requesting an initialization reset on the adapter: by passing aac_reset_devices module parameter, or the generic kernel parameter reset_devices. It's working as intended...but if we end up reaching a scsi hang and the scsi EH mechanism takes place, aacraid performs resets as part of the scsi error recovery procedure. These EH routines might reinitialize the device, and if we have provided some of the reset parameters in the kernel command-line, we again perform an "initialization" reset. So, to avoid this duplication of resets in case of scsi EH path, this patch adds a field to aac_dev struct to keep per-adapter track of the init reset request - once it's done, we set it to false and don't proactively reset anymore in case of reinitializations. Signed-off-by: Guilherme G. Piccoli Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen --- drivers/scsi/aacraid/aacraid.h | 1 + drivers/scsi/aacraid/linit.c | 3 +++ drivers/scsi/aacraid/rx.c | 15 ++++++++++----- drivers/scsi/aacraid/src.c | 20 ++++++++++++++------ 4 files changed, 28 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 403a639574e5..6e3d81969a77 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h @@ -1673,6 +1673,7 @@ struct aac_dev struct aac_hba_map_info hba_map[AAC_MAX_BUSES][AAC_MAX_TARGETS]; u8 adapter_shutdown; u32 handle_pci_error; + bool init_reset; }; #define aac_adapter_interrupt(dev) \ diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index c9252b138c1f..bdf127aaab41 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c @@ -1680,6 +1680,9 @@ static int aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) aac->cardtype = index; INIT_LIST_HEAD(&aac->entry); + if (aac_reset_devices || reset_devices) + aac->init_reset = true; + aac->fibs = kzalloc(sizeof(struct fib) * (shost->can_queue + AAC_NUM_MGT_FIB), GFP_KERNEL); if (!aac->fibs) goto out_free_host; diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index 93ef7c37e568..620166694171 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c @@ -561,11 +561,16 @@ int _aac_rx_init(struct aac_dev *dev) dev->a_ops.adapter_sync_cmd = rx_sync_cmd; dev->a_ops.adapter_enable_int = aac_rx_disable_interrupt; dev->OIMR = status = rx_readb (dev, MUnit.OIMR); - if ((((status & 0x0c) != 0x0c) || aac_reset_devices || reset_devices) && - !aac_rx_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) - /* Make sure the Hardware FIFO is empty */ - while ((++restart < 512) && - (rx_readl(dev, MUnit.OutboundQueue) != 0xFFFFFFFFL)); + + if (((status & 0x0c) != 0x0c) || dev->init_reset) { + dev->init_reset = false; + if (!aac_rx_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) { + /* Make sure the Hardware FIFO is empty */ + while ((++restart < 512) && + (rx_readl(dev, MUnit.OutboundQueue) != 0xFFFFFFFFL)); + } + } + /* * Check to see if the board panic'd while booting. */ diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c index 0c9361c87ec8..fde6b6aa86e3 100644 --- a/drivers/scsi/aacraid/src.c +++ b/drivers/scsi/aacraid/src.c @@ -868,9 +868,13 @@ int aac_src_init(struct aac_dev *dev) /* Failure to reset here is an option ... */ dev->a_ops.adapter_sync_cmd = src_sync_cmd; dev->a_ops.adapter_enable_int = aac_src_disable_interrupt; - if ((aac_reset_devices || reset_devices) && - !aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) - ++restart; + + if (dev->init_reset) { + dev->init_reset = false; + if (!aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) + ++restart; + } + /* * Check to see if the board panic'd while booting. */ @@ -1014,9 +1018,13 @@ int aac_srcv_init(struct aac_dev *dev) /* Failure to reset here is an option ... */ dev->a_ops.adapter_sync_cmd = src_sync_cmd; dev->a_ops.adapter_enable_int = aac_src_disable_interrupt; - if ((aac_reset_devices || reset_devices) && - !aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) - ++restart; + + if (dev->init_reset) { + dev->init_reset = false; + if (!aac_src_restart_adapter(dev, 0, IOP_HWSOFT_RESET)) + ++restart; + } + /* * Check to see if flash update is running. * Wait for the adapter to be up and running. Wait up to 5 minutes -- cgit v1.2.3 From e4717292ddebcfe231651b5aff9fa19ca158d178 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Piccoli" Date: Fri, 17 Nov 2017 19:14:55 -0200 Subject: scsi: aacraid: Prevent crash in case of free interrupt during scsi EH path As part of the scsi EH path, aacraid performs a reinitialization of the adapter, which encompass freeing resources and IRQs, NULLifying lots of pointers, and then initialize it all over again. We've identified a problem during the free IRQ portion of this path if CONFIG_DEBUG_SHIRQ is enabled on kernel config file. Happens that, in case this flag was set, right after free_irq() effectively clears the interrupt, it checks if it was requested as IRQF_SHARED. In positive case, it performs another call to the IRQ handler on driver. Problem is: since aacraid currently free some resources *before* freeing the IRQ, once free_irq() path calls the handler again (due to CONFIG_DEBUG_SHIRQ), aacraid crashes due to NULL pointer dereference with the following trace: aac_src_intr_message+0xf8/0x740 [aacraid] __free_irq+0x33c/0x4a0 free_irq+0x78/0xb0 aac_free_irq+0x13c/0x150 [aacraid] aac_reset_adapter+0x2e8/0x970 [aacraid] aac_eh_reset+0x3a8/0x5d0 [aacraid] scsi_try_host_reset+0x74/0x180 scsi_eh_ready_devs+0xc70/0x1510 scsi_error_handler+0x624/0xa20 This patch prevents the crash by changing the order of the deinitialization in this path of aacraid: first we clear the IRQ, then we free other resources. No functional change intended. Signed-off-by: Guilherme G. Piccoli Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen --- drivers/scsi/aacraid/commsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 2abe8fd83494..bec9f3193f60 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c @@ -1554,6 +1554,7 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) * will ensure that i/o is queisced and the card is flushed in that * case. */ + aac_free_irq(aac); aac_fib_map_free(aac); dma_free_coherent(&aac->pdev->dev, aac->comm_size, aac->comm_addr, aac->comm_phys); @@ -1561,7 +1562,6 @@ static int _aac_reset_adapter(struct aac_dev *aac, int forced, u8 reset_type) aac->comm_phys = 0; kfree(aac->queues); aac->queues = NULL; - aac_free_irq(aac); kfree(aac->fsa_dev); aac->fsa_dev = NULL; -- cgit v1.2.3 From 727535903bea924c4f73abb202c4b3e85fff0ca4 Mon Sep 17 00:00:00 2001 From: "Gustavo A. R. Silva" Date: Mon, 20 Nov 2017 08:12:29 -0600 Subject: scsi: ufs: ufshcd: fix potential NULL pointer dereference in ufshcd_config_vreg _vreg_ is being dereferenced before it is null checked, hence there is a potential null pointer dereference. Fix this by moving the pointer dereference after _vreg_ has been null checked. This issue was detected with the help of Coccinelle. Fixes: aa4976130934 ("ufs: Add regulator enable support") Signed-off-by: Gustavo A. R. Silva Reviewed-by: Subhash Jadavani Signed-off-by: Martin K. Petersen --- drivers/scsi/ufs/ufshcd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index 011c3369082c..a355d989b414 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6559,12 +6559,15 @@ static int ufshcd_config_vreg(struct device *dev, struct ufs_vreg *vreg, bool on) { int ret = 0; - struct regulator *reg = vreg->reg; - const char *name = vreg->name; + struct regulator *reg; + const char *name; int min_uV, uA_load; BUG_ON(!vreg); + reg = vreg->reg; + name = vreg->name; + if (regulator_count_voltages(reg) > 0) { min_uV = on ? vreg->min_uV : 0; ret = regulator_set_voltage(reg, min_uV, vreg->max_uV); -- cgit v1.2.3 From 90addc6b3c9cda0146fbd62a08e234c2b224a80c Mon Sep 17 00:00:00 2001 From: Huacai Chen Date: Tue, 21 Nov 2017 14:23:38 +0100 Subject: scsi: use dma_get_cache_alignment() as minimum DMA alignment In non-coherent DMA mode, kernel uses cache flushing operations to maintain I/O coherency, so scsi's block queue should be aligned to the value returned by dma_get_cache_alignment(). Otherwise, If a DMA buffer and a kernel structure share a same cache line, and if the kernel structure has dirty data, cache_invalidate (no writeback) will cause data corruption. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen [hch: rebased and updated the comment and changelog] Signed-off-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- drivers/scsi/scsi_lib.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 1cbc497e00bd..00742c50cd44 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2148,11 +2148,13 @@ void __scsi_init_queue(struct Scsi_Host *shost, struct request_queue *q) q->limits.cluster = 0; /* - * set a reasonable default alignment on word boundaries: the - * host and device may alter it using - * blk_queue_update_dma_alignment() later. + * Set a reasonable default alignment: The larger of 32-byte (dword), + * which is a common minimum for HBAs, and the minimum DMA alignment, + * which is set by the platform. + * + * Devices that require a bigger alignment can increase it later. */ - blk_queue_dma_alignment(q, 0x03); + blk_queue_dma_alignment(q, max(4, dma_get_cache_alignment()) - 1); } EXPORT_SYMBOL_GPL(__scsi_init_queue); -- cgit v1.2.3 From c4e45c84270798b1d51ede9a8c6810378ccfe162 Mon Sep 17 00:00:00 2001 From: Shaul Triebitz Date: Mon, 30 Oct 2017 17:38:43 +0200 Subject: iwlwifi: mvm: set correct chains in Rx status ieee80211_rx_status::chains was always set to zero. That caused rate scaling to always start with the lowest rate possible (rs_get_initial_rate). Set it correctly according to the MPDU response. Signed-off-by: Shaul Triebitz Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 76dc58381e1c..20fe23fbf040 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -213,6 +213,7 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, struct ieee80211_rx_status *rx_status) { int energy_a, energy_b, max_energy; + u32 rate_flags = le32_to_cpu(desc->rate_n_flags); energy_a = desc->energy_a; energy_a = energy_a ? -energy_a : S8_MIN; @@ -224,7 +225,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, energy_a, energy_b, max_energy); rx_status->signal = max_energy; - rx_status->chains = 0; /* TODO: phy info */ + rx_status->chains = + (rate_flags & RATE_MCS_ANT_AB_MSK) >> RATE_MCS_ANT_POS; rx_status->chain_signal[0] = energy_a; rx_status->chain_signal[1] = energy_b; rx_status->chain_signal[2] = S8_MIN; -- cgit v1.2.3 From 0b9832b712d6767d6c7b01965fd788d1ca84fc92 Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Mon, 13 Nov 2017 09:50:47 +0200 Subject: iwlwifi: mvm: don't use transmit queue hang detection when it is not possible When we act as an AP, new firmware versions handle internally the power saving clients and the driver doesn't know that the peers went to sleep. It is, hence, possible that a peer goes to sleep for a long time and stop pulling frames. This will cause its transmit queue to hang which is a condition that triggers the recovery flow in the driver. While this client is certainly buggy (it should have pulled the frame based on the TIM IE in the beacon), we can't blow up because of a buggy client. Change the current implementation to not enable the transmit queue hang detection on queues that serve peers when we act as an AP / GO. We can still enable this mechanism using the debug configuration which can come in handy when we want to debug why the client doesn't wake up. Cc: stable@vger.kernel.org # v4.13 Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index d46115e2d69e..19c1d1f76e15 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c @@ -1134,9 +1134,18 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, unsigned int default_timeout = cmd_q ? IWL_DEF_WD_TIMEOUT : mvm->cfg->base_params->wd_timeout; - if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) + if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS)) { + /* + * We can't know when the station is asleep or awake, so we + * must disable the queue hang detection. + */ + if (fw_has_capa(&mvm->fw->ucode_capa, + IWL_UCODE_TLV_CAPA_STA_PM_NOTIF) && + vif && vif->type == NL80211_IFTYPE_AP) + return IWL_WATCHDOG_DISABLED; return iwlmvm_mod_params.tfd_q_hang_detect ? default_timeout : IWL_WATCHDOG_DISABLED; + } trigger = iwl_fw_dbg_get_trigger(mvm->fw, FW_DBG_TRIGGER_TXQ_TIMERS); txq_timer = (void *)trigger->data; -- cgit v1.2.3 From d1b275ffec459c5ae12b5c7086c84175696e5a9f Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Wed, 15 Nov 2017 14:12:30 +0200 Subject: iwlwifi: mvm: fix the TX queue hang timeout for MONITOR vif type The MONITOR type is missing in the interface type switch. Add it. Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/utils.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c index 19c1d1f76e15..03ffd84786ca 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c @@ -1172,6 +1172,8 @@ unsigned int iwl_mvm_get_wd_timeout(struct iwl_mvm *mvm, return le32_to_cpu(txq_timer->p2p_go); case NL80211_IFTYPE_P2P_DEVICE: return le32_to_cpu(txq_timer->p2p_device); + case NL80211_IFTYPE_MONITOR: + return default_timeout; default: WARN_ON(1); return mvm->cfg->base_params->wd_timeout; -- cgit v1.2.3 From b13f43a48571f0cd0fda271b5046b65f1f268db5 Mon Sep 17 00:00:00 2001 From: Emmanuel Grumbach Date: Sun, 19 Nov 2017 10:35:14 +0200 Subject: iwlwifi: mvm: fix packet injection We need to have a station and a queue for the monitor interface to be able to inject traffic. We used to have this traffic routed to the auxiliary queue, but this queue isn't scheduled for the station we had linked to the monitor vif. Allocate a new queue, link it to the monitor vif's station and make that queue use the BE fifo. This fixes https://bugzilla.kernel.org/show_bug.cgi?id=196715 Cc: stable@vger.kernel.org Signed-off-by: Emmanuel Grumbach Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/api/txq.h | 4 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 1 + drivers/net/wireless/intel/iwlwifi/mvm/ops.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 53 +++++++++++++++++------ drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 3 +- 6 files changed, 49 insertions(+), 15 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h index 87b4434224a1..dfa111bb411e 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/api/txq.h @@ -68,6 +68,9 @@ * @IWL_MVM_DQA_CMD_QUEUE: a queue reserved for sending HCMDs to the FW * @IWL_MVM_DQA_AUX_QUEUE: a queue reserved for aux frames * @IWL_MVM_DQA_P2P_DEVICE_QUEUE: a queue reserved for P2P device frames + * @IWL_MVM_DQA_INJECT_MONITOR_QUEUE: a queue reserved for injection using + * monitor mode. Note this queue is the same as the queue for P2P device + * but we can't have active monitor mode along with P2P device anyway. * @IWL_MVM_DQA_GCAST_QUEUE: a queue reserved for P2P GO/SoftAP GCAST frames * @IWL_MVM_DQA_BSS_CLIENT_QUEUE: a queue reserved for BSS activity, to ensure * that we are never left without the possibility to connect to an AP. @@ -87,6 +90,7 @@ enum iwl_mvm_dqa_txq { IWL_MVM_DQA_CMD_QUEUE = 0, IWL_MVM_DQA_AUX_QUEUE = 1, IWL_MVM_DQA_P2P_DEVICE_QUEUE = 2, + IWL_MVM_DQA_INJECT_MONITOR_QUEUE = 2, IWL_MVM_DQA_GCAST_QUEUE = 3, IWL_MVM_DQA_BSS_CLIENT_QUEUE = 4, IWL_MVM_DQA_MIN_MGMT_QUEUE = 5, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c index a2bf530eeae4..2f22e14e00fe 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c @@ -787,7 +787,7 @@ static int iwl_mvm_mac_ctxt_cmd_listener(struct iwl_mvm *mvm, u32 action) { struct iwl_mac_ctx_cmd cmd = {}; - u32 tfd_queue_msk = 0; + u32 tfd_queue_msk = BIT(mvm->snif_queue); int ret; WARN_ON(vif->type != NL80211_IFTYPE_MONITOR); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 4575595ab022..6a9a25beab3f 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -972,6 +972,7 @@ struct iwl_mvm { /* Tx queues */ u16 aux_queue; + u16 snif_queue; u16 probe_queue; u16 p2p_dev_queue; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c index 7078b7e458be..45470b6b351a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/ops.c @@ -624,6 +624,7 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, mvm->fw_restart = iwlwifi_mod_params.fw_restart ? -1 : 0; mvm->aux_queue = IWL_MVM_DQA_AUX_QUEUE; + mvm->snif_queue = IWL_MVM_DQA_INJECT_MONITOR_QUEUE; mvm->probe_queue = IWL_MVM_DQA_AP_PROBE_RESP_QUEUE; mvm->p2p_dev_queue = IWL_MVM_DQA_P2P_DEVICE_QUEUE; diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index c19f98489d4e..1add5615fc3a 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -1709,29 +1709,29 @@ void iwl_mvm_dealloc_int_sta(struct iwl_mvm *mvm, struct iwl_mvm_int_sta *sta) sta->sta_id = IWL_MVM_INVALID_STA; } -static void iwl_mvm_enable_aux_queue(struct iwl_mvm *mvm) +static void iwl_mvm_enable_aux_snif_queue(struct iwl_mvm *mvm, u16 *queue, + u8 sta_id, u8 fifo) { unsigned int wdg_timeout = iwlmvm_mod_params.tfd_q_hang_detect ? mvm->cfg->base_params->wd_timeout : IWL_WATCHDOG_DISABLED; if (iwl_mvm_has_new_tx_api(mvm)) { - int queue = iwl_mvm_tvqm_enable_txq(mvm, mvm->aux_queue, - mvm->aux_sta.sta_id, - IWL_MAX_TID_COUNT, - wdg_timeout); - mvm->aux_queue = queue; + int tvqm_queue = + iwl_mvm_tvqm_enable_txq(mvm, *queue, sta_id, + IWL_MAX_TID_COUNT, + wdg_timeout); + *queue = tvqm_queue; } else { struct iwl_trans_txq_scd_cfg cfg = { - .fifo = IWL_MVM_TX_FIFO_MCAST, - .sta_id = mvm->aux_sta.sta_id, + .fifo = fifo, + .sta_id = sta_id, .tid = IWL_MAX_TID_COUNT, .aggregate = false, .frame_limit = IWL_FRAME_LIMIT, }; - iwl_mvm_enable_txq(mvm, mvm->aux_queue, mvm->aux_queue, 0, &cfg, - wdg_timeout); + iwl_mvm_enable_txq(mvm, *queue, *queue, 0, &cfg, wdg_timeout); } } @@ -1750,7 +1750,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) /* Map Aux queue to fifo - needs to happen before adding Aux station */ if (!iwl_mvm_has_new_tx_api(mvm)) - iwl_mvm_enable_aux_queue(mvm); + iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, + mvm->aux_sta.sta_id, + IWL_MVM_TX_FIFO_MCAST); ret = iwl_mvm_add_int_sta_common(mvm, &mvm->aux_sta, NULL, MAC_INDEX_AUX, 0); @@ -1764,7 +1766,9 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) * to firmware so enable queue here - after the station was added */ if (iwl_mvm_has_new_tx_api(mvm)) - iwl_mvm_enable_aux_queue(mvm); + iwl_mvm_enable_aux_snif_queue(mvm, &mvm->aux_queue, + mvm->aux_sta.sta_id, + IWL_MVM_TX_FIFO_MCAST); return 0; } @@ -1772,10 +1776,31 @@ int iwl_mvm_add_aux_sta(struct iwl_mvm *mvm) int iwl_mvm_add_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); + int ret; lockdep_assert_held(&mvm->mutex); - return iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, + + /* Map snif queue to fifo - must happen before adding snif station */ + if (!iwl_mvm_has_new_tx_api(mvm)) + iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, + mvm->snif_sta.sta_id, + IWL_MVM_TX_FIFO_BE); + + ret = iwl_mvm_add_int_sta_common(mvm, &mvm->snif_sta, vif->addr, mvmvif->id, 0); + if (ret) + return ret; + + /* + * For 22000 firmware and on we cannot add queue to a station unknown + * to firmware so enable queue here - after the station was added + */ + if (iwl_mvm_has_new_tx_api(mvm)) + iwl_mvm_enable_aux_snif_queue(mvm, &mvm->snif_queue, + mvm->snif_sta.sta_id, + IWL_MVM_TX_FIFO_BE); + + return 0; } int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) @@ -1784,6 +1809,8 @@ int iwl_mvm_rm_snif_sta(struct iwl_mvm *mvm, struct ieee80211_vif *vif) lockdep_assert_held(&mvm->mutex); + iwl_mvm_disable_txq(mvm, mvm->snif_queue, mvm->snif_queue, + IWL_MAX_TID_COUNT, 0); ret = iwl_mvm_rm_sta_common(mvm, mvm->snif_sta.sta_id); if (ret) IWL_WARN(mvm, "Failed sending remove station\n"); diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c index 593b7f97b29c..333bcb75b8af 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c @@ -657,7 +657,8 @@ int iwl_mvm_tx_skb_non_sta(struct iwl_mvm *mvm, struct sk_buff *skb) if (ap_sta_id != IWL_MVM_INVALID_STA) sta_id = ap_sta_id; } else if (info.control.vif->type == NL80211_IFTYPE_MONITOR) { - queue = mvm->aux_queue; + queue = mvm->snif_queue; + sta_id = mvm->snif_sta.sta_id; } } -- cgit v1.2.3 From f3402d6d8eb084f6c2563dee1a09385b7c0ea2d5 Mon Sep 17 00:00:00 2001 From: Sara Sharon Date: Mon, 20 Nov 2017 11:37:18 +0200 Subject: iwlwifi: pcie: fix erroneous "Read failed message" Current pci dumping code code is always falling to the error path, resulting with a constant "Read failed" message, also for the successful reads. Fixes: a5c932e41fdd ("iwlwifi: pcie: dump registers when HW becomes inaccessible") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index b7a51603465b..3dee95e6a475 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -166,6 +166,7 @@ static void iwl_trans_pcie_dump_regs(struct iwl_trans *trans) print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); } + goto out; err_read: print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET, 32, 4, buf, i, 0); -- cgit v1.2.3 From 0232d2cd7aa8e1b810fe84fb4059a0bd1eabe2ba Mon Sep 17 00:00:00 2001 From: Sara Sharon Date: Mon, 20 Nov 2017 13:25:05 +0200 Subject: iwlwifi: fix access to prph when transport is stopped When getting HW rfkill we get stop_device being called from two paths. One path is the IRQ calling stop device, and updating op mode and stack. As a result, cfg80211 is running rfkill sync work that shuts down all devices (second path). In the second path, we eventually get to iwl_mvm_stop_device which calls iwl_fw_dump_conf_clear->iwl_fw_dbg_stop_recording, that access periphery registers. The device may be stopped at this point from the first path, which will result with a failure to access those registers. Simply checking for the trans status is insufficient, since the race will still exist, only minimized. Instead, move the stop from iwl_fw_dump_conf_clear (which is getting called only from stop path) to the transport stop device function, where the access is always safe. This has the added value, of actually stopping dbgc before stopping device even when the stop is initiated from the transport. Fixes: 1efc3843a4ee ("iwlwifi: stop dbgc recording before stopping DMA") Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/fw/dbg.h | 2 -- drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 6 ++++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 9 +++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h index 9c889a32fe24..223fb77a3aa9 100644 --- a/drivers/net/wireless/intel/iwlwifi/fw/dbg.h +++ b/drivers/net/wireless/intel/iwlwifi/fw/dbg.h @@ -209,8 +209,6 @@ static inline void iwl_fw_dbg_stop_recording(struct iwl_fw_runtime *fwrt) static inline void iwl_fw_dump_conf_clear(struct iwl_fw_runtime *fwrt) { - iwl_fw_dbg_stop_recording(fwrt); - fwrt->dump.conf = FW_DBG_INVALID; } diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c index c59f4581e972..ac05fd1e74c4 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c @@ -49,6 +49,7 @@ * *****************************************************************************/ #include "iwl-trans.h" +#include "iwl-prph.h" #include "iwl-context-info.h" #include "internal.h" @@ -156,6 +157,11 @@ void _iwl_trans_pcie_gen2_stop_device(struct iwl_trans *trans, bool low_power) trans_pcie->is_down = true; + /* Stop dbgc before stopping device */ + iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); + udelay(100); + iwl_write_prph(trans, DBGC_OUT_CTRL, 0); + /* tell the device to stop sending interrupts */ iwl_disable_interrupts(trans); diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c index 3dee95e6a475..4541c86881d6 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c @@ -1227,6 +1227,15 @@ static void _iwl_trans_pcie_stop_device(struct iwl_trans *trans, bool low_power) trans_pcie->is_down = true; + /* Stop dbgc before stopping device */ + if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000) { + iwl_set_bits_prph(trans, MON_BUFF_SAMPLE_CTL, 0x100); + } else { + iwl_write_prph(trans, DBGC_IN_SAMPLE, 0); + udelay(100); + iwl_write_prph(trans, DBGC_OUT_CTRL, 0); + } + /* tell the device to stop sending interrupts */ iwl_disable_interrupts(trans); -- cgit v1.2.3 From c654b21ede93845863597de9ad774fd30db5f2ab Mon Sep 17 00:00:00 2001 From: Sebastian Sjoholm Date: Mon, 20 Nov 2017 19:29:32 +0100 Subject: USB: serial: option: add Quectel BG96 id Quectel BG96 is an Qualcomm MDM9206 based IoT modem, supporting both CAT-M and NB-IoT. Tested hardware is BG96 mounted on Quectel development board (EVB). The USB id is added to option.c to allow DIAG,GPS,AT and modem communication with the BG96. Signed-off-by: Sebastian Sjoholm Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/option.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index aaa7d901a06d..3b3513874cfd 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -238,6 +238,7 @@ static void option_instat_callback(struct urb *urb); /* These Quectel products use Quectel's vendor ID */ #define QUECTEL_PRODUCT_EC21 0x0121 #define QUECTEL_PRODUCT_EC25 0x0125 +#define QUECTEL_PRODUCT_BG96 0x0296 #define CMOTECH_VENDOR_ID 0x16d8 #define CMOTECH_PRODUCT_6001 0x6001 @@ -1182,6 +1183,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC25), .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, + { USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96), + .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6001) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_CMU_300) }, { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6003), -- cgit v1.2.3 From 30bf90ccdec1da9c8198b161ecbff39ce4e5a9ba Mon Sep 17 00:00:00 2001 From: Vincent Pelletier Date: Sun, 26 Nov 2017 06:52:53 +0000 Subject: usb: gadget: ffs: Forbid usb_ep_alloc_request from sleeping Found using DEBUG_ATOMIC_SLEEP while submitting an AIO read operation: [ 100.853642] BUG: sleeping function called from invalid context at mm/slab.h:421 [ 100.861148] in_atomic(): 1, irqs_disabled(): 1, pid: 1880, name: python [ 100.867954] 2 locks held by python/1880: [ 100.867961] #0: (&epfile->mutex){....}, at: [] ffs_mutex_lock+0x27/0x30 [usb_f_fs] [ 100.868020] #1: (&(&ffs->eps_lock)->rlock){....}, at: [] ffs_epfile_io.isra.17+0x24b/0x590 [usb_f_fs] [ 100.868076] CPU: 1 PID: 1880 Comm: python Not tainted 4.14.0-edison+ #118 [ 100.868085] Hardware name: Intel Corporation Merrifield/BODEGA BAY, BIOS 542 2015.01.21:18.19.48 [ 100.868093] Call Trace: [ 100.868122] dump_stack+0x47/0x62 [ 100.868156] ___might_sleep+0xfd/0x110 [ 100.868182] __might_sleep+0x68/0x70 [ 100.868217] kmem_cache_alloc_trace+0x4b/0x200 [ 100.868248] ? dwc3_gadget_ep_alloc_request+0x24/0xe0 [dwc3] [ 100.868302] dwc3_gadget_ep_alloc_request+0x24/0xe0 [dwc3] [ 100.868343] usb_ep_alloc_request+0x16/0xc0 [udc_core] [ 100.868386] ffs_epfile_io.isra.17+0x444/0x590 [usb_f_fs] [ 100.868424] ? _raw_spin_unlock_irqrestore+0x27/0x40 [ 100.868457] ? kiocb_set_cancel_fn+0x57/0x60 [ 100.868477] ? ffs_ep0_poll+0xc0/0xc0 [usb_f_fs] [ 100.868512] ffs_epfile_read_iter+0xfe/0x157 [usb_f_fs] [ 100.868551] ? security_file_permission+0x9c/0xd0 [ 100.868587] ? rw_verify_area+0xac/0x120 [ 100.868633] aio_read+0x9d/0x100 [ 100.868692] ? __fget+0xa2/0xd0 [ 100.868727] ? __might_sleep+0x68/0x70 [ 100.868763] SyS_io_submit+0x471/0x680 [ 100.868878] do_int80_syscall_32+0x4e/0xd0 [ 100.868921] entry_INT80_32+0x2a/0x2a [ 100.868932] EIP: 0xb7fbb676 [ 100.868941] EFLAGS: 00000292 CPU: 1 [ 100.868951] EAX: ffffffda EBX: b7aa2000 ECX: 00000002 EDX: b7af8368 [ 100.868961] ESI: b7fbb660 EDI: b7aab000 EBP: bfb6c658 ESP: bfb6c638 [ 100.868973] DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b Signed-off-by: Vincent Pelletier Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_fs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 97ea059a7aa4..9aa457b53e01 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1012,7 +1012,7 @@ static ssize_t ffs_epfile_io(struct file *file, struct ffs_io_data *io_data) else ret = ep->status; goto error_mutex; - } else if (!(req = usb_ep_alloc_request(ep->ep, GFP_KERNEL))) { + } else if (!(req = usb_ep_alloc_request(ep->ep, GFP_ATOMIC))) { ret = -ENOMEM; } else { req->buf = data; -- cgit v1.2.3 From 593e789fd4421635bde09398b8a8fb510b18414a Mon Sep 17 00:00:00 2001 From: Vasyl Gomonovych Date: Wed, 22 Nov 2017 16:28:00 +0100 Subject: usb: bdc: fix platform_no_drv_owner.cocci warnings Remove .owner field if calls are used which set it automatically drivers/usb/gadget/udc/bdc/bdc_core.c:645:3-8: No need to set .owner here. The core will do it. Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Signed-off-by: Vasyl Gomonovych Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/bdc/bdc_core.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index d39f070acbd7..01b44e159623 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -642,7 +642,6 @@ static const struct of_device_id bdc_of_match[] = { static struct platform_driver bdc_driver = { .driver = { .name = BRCM_BDC_NAME, - .owner = THIS_MODULE, .pm = &bdc_pm_ops, .of_match_table = bdc_of_match, }, -- cgit v1.2.3 From 46e42a303178ca1341d1ab3e0b5c1227b89b60ee Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 08:26:54 -0500 Subject: media: dvb_ca_en50221: fix lots of documentation warnings Building the driver with gcc 7.2.1 and: make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y W=1 CHECK='' M=drivers/media now produces a lot of warnings: drivers/media/dvb-core/dvb_ca_en50221.c:233: warning: No description found for parameter 'ca' drivers/media/dvb-core/dvb_ca_en50221.c:233: warning: No description found for parameter 'slot' drivers/media/dvb-core/dvb_ca_en50221.c:284: warning: No description found for parameter 'timeout_hz' drivers/media/dvb-core/dvb_ca_en50221.c:284: warning: Excess function parameter 'timeout_ms' description in 'dvb_ca_en50221_wait_if_status' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: No description found for parameter 'tuple_type' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: No description found for parameter 'tuple_length' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: Excess function parameter 'tupleType' description in 'dvb_ca_en50221_read_tuple' drivers/media/dvb-core/dvb_ca_en50221.c:409: warning: Excess function parameter 'tupleLength' description in 'dvb_ca_en50221_read_tuple' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: No description found for parameter 'buf' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: No description found for parameter 'bytes_write' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: Excess function parameter 'ebuf' description in 'dvb_ca_en50221_write_data' drivers/media/dvb-core/dvb_ca_en50221.c:795: warning: Excess function parameter 'count' description in 'dvb_ca_en50221_write_data' drivers/media/dvb-core/dvb_ca_en50221.c:942: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:942: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_camchange_irq' drivers/media/dvb-core/dvb_ca_en50221.c:970: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:970: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_camready_irq' drivers/media/dvb-core/dvb_ca_en50221.c:990: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:990: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_frda_irq' drivers/media/dvb-core/dvb_ca_en50221.c:1304: warning: No description found for parameter 'data' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: No description found for parameter 'parg' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: Excess function parameter 'inode' description in 'dvb_ca_en50221_io_do_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1348: warning: Excess function parameter 'arg' description in 'dvb_ca_en50221_io_do_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1432: warning: Excess function parameter 'inode' description in 'dvb_ca_en50221_io_ioctl' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter 'ca' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter 'result' drivers/media/dvb-core/dvb_ca_en50221.c:1544: warning: No description found for parameter '_slot' drivers/media/dvb-core/dvb_ca_en50221.c:1849: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:1849: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_init' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: No description found for parameter 'pubca' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: Excess function parameter 'ca_dev' description in 'dvb_ca_en50221_release' drivers/media/dvb-core/dvb_ca_en50221.c:1936: warning: Excess function parameter 'ca' description in 'dvb_ca_en50221_release' Trivially fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_ca_en50221.c | 68 ++++++++++++++++----------------- 1 file changed, 33 insertions(+), 35 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 95b3723282f4..d48b61eb01f4 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb-core/dvb_ca_en50221.c @@ -206,7 +206,7 @@ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, * @hlen: Number of bytes in haystack. * @needle: Buffer to find. * @nlen: Number of bytes in needle. - * @return Pointer into haystack needle was found at, or NULL if not found. + * return: Pointer into haystack needle was found at, or NULL if not found. */ static char *findstr(char *haystack, int hlen, char *needle, int nlen) { @@ -226,7 +226,7 @@ static char *findstr(char *haystack, int hlen, char *needle, int nlen) /* ************************************************************************** */ /* EN50221 physical interface functions */ -/** +/* * dvb_ca_en50221_check_camstatus - Check CAM status. */ static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot) @@ -275,9 +275,9 @@ static int dvb_ca_en50221_check_camstatus(struct dvb_ca_private *ca, int slot) * @ca: CA instance. * @slot: Slot on interface. * @waitfor: Flags to wait for. - * @timeout_ms: Timeout in milliseconds. + * @timeout_hz: Timeout in milliseconds. * - * @return 0 on success, nonzero on error. + * return: 0 on success, nonzero on error. */ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot, u8 waitfor, int timeout_hz) @@ -325,7 +325,7 @@ static int dvb_ca_en50221_wait_if_status(struct dvb_ca_private *ca, int slot, * @ca: CA instance. * @slot: Slot id. * - * @return 0 on success, nonzero on failure. + * return: 0 on success, nonzero on failure. */ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot) { @@ -397,11 +397,11 @@ static int dvb_ca_en50221_link_init(struct dvb_ca_private *ca, int slot) * @ca: CA instance. * @slot: Slot id. * @address: Address to read from. Updated. - * @tupleType: Tuple id byte. Updated. - * @tupleLength: Tuple length. Updated. + * @tuple_type: Tuple id byte. Updated. + * @tuple_length: Tuple length. Updated. * @tuple: Dest buffer for tuple (must be 256 bytes). Updated. * - * @return 0 on success, nonzero on error. + * return: 0 on success, nonzero on error. */ static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot, int *address, int *tuple_type, @@ -455,7 +455,7 @@ static int dvb_ca_en50221_read_tuple(struct dvb_ca_private *ca, int slot, * @ca: CA instance. * @slot: Slot id. * - * @return 0 on success, <0 on failure. + * return: 0 on success, <0 on failure. */ static int dvb_ca_en50221_parse_attributes(struct dvb_ca_private *ca, int slot) { @@ -632,10 +632,11 @@ static int dvb_ca_en50221_set_configoption(struct dvb_ca_private *ca, int slot) * @ca: CA instance. * @slot: Slot to read from. * @ebuf: If non-NULL, the data will be written to this buffer. If NULL, - * the data will be added into the buffering system as a normal fragment. + * the data will be added into the buffering system as a normal + * fragment. * @ecount: Size of ebuf. Ignored if ebuf is NULL. * - * @return Number of bytes read, or < 0 on error + * return: Number of bytes read, or < 0 on error */ static int dvb_ca_en50221_read_data(struct dvb_ca_private *ca, int slot, u8 *ebuf, int ecount) @@ -784,11 +785,11 @@ exit: * * @ca: CA instance. * @slot: Slot to write to. - * @ebuf: The data in this buffer is treated as a complete link-level packet to - * be written. - * @count: Size of ebuf. + * @buf: The data in this buffer is treated as a complete link-level packet to + * be written. + * @bytes_write: Size of ebuf. * - * @return Number of bytes written, or < 0 on error. + * return: Number of bytes written, or < 0 on error. */ static int dvb_ca_en50221_write_data(struct dvb_ca_private *ca, int slot, u8 *buf, int bytes_write) @@ -933,7 +934,7 @@ static int dvb_ca_en50221_slot_shutdown(struct dvb_ca_private *ca, int slot) /** * dvb_ca_en50221_camchange_irq - A CAMCHANGE IRQ has occurred. * - * @ca: CA instance. + * @pubca: CA instance. * @slot: Slot concerned. * @change_type: One of the DVB_CA_CAMCHANGE_* values. */ @@ -963,7 +964,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camchange_irq); /** * dvb_ca_en50221_camready_irq - A CAMREADY IRQ has occurred. * - * @ca: CA instance. + * @pubca: CA instance. * @slot: Slot concerned. */ void dvb_ca_en50221_camready_irq(struct dvb_ca_en50221 *pubca, int slot) @@ -983,7 +984,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_camready_irq); /** * dvb_ca_en50221_frda_irq - An FR or DA IRQ has occurred. * - * @ca: CA instance. + * @pubca: CA instance. * @slot: Slot concerned. */ void dvb_ca_en50221_frda_irq(struct dvb_ca_en50221 *pubca, int slot) @@ -1091,7 +1092,7 @@ static void dvb_ca_en50221_thread_update_delay(struct dvb_ca_private *ca) * * @ca: CA instance. * @slot: Slot to process. - * @return: 0 .. no change + * return:: 0 .. no change * 1 .. CAM state changed */ @@ -1296,7 +1297,7 @@ static void dvb_ca_en50221_thread_state_machine(struct dvb_ca_private *ca, mutex_unlock(&sl->slot_lock); } -/** +/* * Kernel thread which monitors CA slots for CAM changes, and performs data * transfers. */ @@ -1336,12 +1337,11 @@ static int dvb_ca_en50221_thread(void *data) * Real ioctl implementation. * NOTE: CA_SEND_MSG/CA_GET_MSG ioctls have userspace buffers passed to them. * - * @inode: Inode concerned. * @file: File concerned. * @cmd: IOCTL command. - * @arg: Associated argument. + * @parg: Associated argument. * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static int dvb_ca_en50221_io_do_ioctl(struct file *file, unsigned int cmd, void *parg) @@ -1420,12 +1420,11 @@ out_unlock: /** * Wrapper for ioctl implementation. * - * @inode: Inode concerned. * @file: File concerned. * @cmd: IOCTL command. * @arg: Associated argument. * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static long dvb_ca_en50221_io_ioctl(struct file *file, unsigned int cmd, unsigned long arg) @@ -1441,7 +1440,7 @@ static long dvb_ca_en50221_io_ioctl(struct file *file, * @count: Size of source buffer. * @ppos: Position in file (ignored). * - * @return Number of bytes read, or <0 on error. + * return: Number of bytes read, or <0 on error. */ static ssize_t dvb_ca_en50221_io_write(struct file *file, const char __user *buf, size_t count, @@ -1536,7 +1535,7 @@ exit: return status; } -/** +/* * Condition for waking up in dvb_ca_en50221_io_read_condition */ static int dvb_ca_en50221_io_read_condition(struct dvb_ca_private *ca, @@ -1593,7 +1592,7 @@ nextslot: * @count: Size of destination buffer. * @ppos: Position in file (ignored). * - * @return Number of bytes read, or <0 on error. + * return: Number of bytes read, or <0 on error. */ static ssize_t dvb_ca_en50221_io_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) @@ -1702,7 +1701,7 @@ exit: * @inode: Inode concerned. * @file: File concerned. * - * @return 0 on success, <0 on failure. + * return: 0 on success, <0 on failure. */ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) { @@ -1752,7 +1751,7 @@ static int dvb_ca_en50221_io_open(struct inode *inode, struct file *file) * @inode: Inode concerned. * @file: File concerned. * - * @return 0 on success, <0 on failure. + * return: 0 on success, <0 on failure. */ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) { @@ -1781,7 +1780,7 @@ static int dvb_ca_en50221_io_release(struct inode *inode, struct file *file) * @file: File concerned. * @wait: poll wait table. * - * @return Standard poll mask. + * return: Standard poll mask. */ static unsigned int dvb_ca_en50221_io_poll(struct file *file, poll_table *wait) { @@ -1838,11 +1837,11 @@ static const struct dvb_device dvbdev_ca = { * Initialise a new DVB CA EN50221 interface device. * * @dvb_adapter: DVB adapter to attach the new CA device to. - * @ca: The dvb_ca instance. + * @pubca: The dvb_ca instance. * @flags: Flags describing the CA device (DVB_CA_FLAG_*). * @slot_count: Number of slots supported. * - * @return 0 on success, nonzero on failure + * return: 0 on success, nonzero on failure */ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221 *pubca, int flags, int slot_count) @@ -1929,8 +1928,7 @@ EXPORT_SYMBOL(dvb_ca_en50221_init); /** * Release a DVB CA EN50221 interface device. * - * @ca_dev: The dvb_device_t instance for the CA device. - * @ca: The associated dvb_ca instance. + * @pubca: The associated dvb_ca instance. */ void dvb_ca_en50221_release(struct dvb_ca_en50221 *pubca) { -- cgit v1.2.3 From f67f366c69c8e2287cfe32a3b2406ff706b43075 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 08:35:13 -0500 Subject: media: rc: fix lots of documentation warnings Building the driver with gcc 7.2.1 and: make ARCH=i386 CF=-D__CHECK_ENDIAN__ CONFIG_DEBUG_SECTION_MISMATCH=y W=1 CHECK='' M=drivers/media now produces a lot of warnings: drivers/media/rc/rc-main.c:278: warning: No description found for parameter 'new_keycode' drivers/media/rc/rc-main.c:278: warning: Excess function parameter 'keycode' description in 'ir_update_mapping' drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'ke' drivers/media/rc/rc-main.c:387: warning: No description found for parameter 'old_keycode' drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'scancode' description in 'ir_setkeycode' drivers/media/rc/rc-main.c:387: warning: Excess function parameter 'keycode' description in 'ir_setkeycode' drivers/media/rc/rc-main.c:433: warning: Excess function parameter 'to' description in 'ir_setkeytable' drivers/media/rc/rc-main.c:506: warning: No description found for parameter 'ke' drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'scancode' description in 'ir_getkeycode' drivers/media/rc/rc-main.c:506: warning: Excess function parameter 'keycode' description in 'ir_getkeycode' drivers/media/rc/rc-main.c:634: warning: No description found for parameter 't' drivers/media/rc/rc-main.c:634: warning: Excess function parameter 'cookie' description in 'ir_timer_keyup' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/rc-main.c | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 17950e29d4e3..c4b0217bd169 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -170,10 +170,11 @@ static struct rc_map_list empty_map = { * @name: name to assign to the table * @rc_proto: ir type to assign to the new table * @size: initial size of the table - * @return: zero on success or a negative error code * * This routine will initialize the rc_map and will allocate * memory to hold at least the specified number of elements. + * + * return: zero on success or a negative error code */ static int ir_create_table(struct rc_map *rc_map, const char *name, u64 rc_proto, size_t size) @@ -216,10 +217,11 @@ static void ir_free_table(struct rc_map *rc_map) * ir_resize_table() - resizes a scancode table if necessary * @rc_map: the rc_map to resize * @gfp_flags: gfp flags to use when allocating memory - * @return: zero on success or a negative error code * * This routine will shrink the rc_map if it has lots of * unused entries and grow it if it is full. + * + * return: zero on success or a negative error code */ static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags) { @@ -265,11 +267,13 @@ static int ir_resize_table(struct rc_map *rc_map, gfp_t gfp_flags) * @dev: the struct rc_dev device descriptor * @rc_map: scancode table to be adjusted * @index: index of the mapping that needs to be updated - * @keycode: the desired keycode - * @return: previous keycode assigned to the mapping + * @new_keycode: the desired keycode * * This routine is used to update scancode->keycode mapping at given * position. + * + * return: previous keycode assigned to the mapping + * */ static unsigned int ir_update_mapping(struct rc_dev *dev, struct rc_map *rc_map, @@ -320,12 +324,13 @@ static unsigned int ir_update_mapping(struct rc_dev *dev, * @scancode: the desired scancode * @resize: controls whether we allowed to resize the table to * accommodate not yet present scancodes - * @return: index of the mapping containing scancode in question - * or -1U in case of failure. * * This routine is used to locate given scancode in rc_map. * If scancode is not yet present the routine will allocate a new slot * for it. + * + * return: index of the mapping containing scancode in question + * or -1U in case of failure. */ static unsigned int ir_establish_scancode(struct rc_dev *dev, struct rc_map *rc_map, @@ -375,11 +380,12 @@ static unsigned int ir_establish_scancode(struct rc_dev *dev, /** * ir_setkeycode() - set a keycode in the scancode->keycode table * @idev: the struct input_dev device descriptor - * @scancode: the desired scancode - * @keycode: result - * @return: -EINVAL if the keycode could not be inserted, otherwise zero. + * @ke: Input keymap entry + * @old_keycode: result * * This routine is used to handle evdev EVIOCSKEY ioctl. + * + * return: -EINVAL if the keycode could not be inserted, otherwise zero. */ static int ir_setkeycode(struct input_dev *idev, const struct input_keymap_entry *ke, @@ -422,11 +428,11 @@ out: /** * ir_setkeytable() - sets several entries in the scancode->keycode table * @dev: the struct rc_dev device descriptor - * @to: the struct rc_map to copy entries to * @from: the struct rc_map to copy entries from - * @return: -ENOMEM if all keycodes could not be inserted, otherwise zero. * * This routine is used to handle table initialization. + * + * return: -ENOMEM if all keycodes could not be inserted, otherwise zero. */ static int ir_setkeytable(struct rc_dev *dev, const struct rc_map *from) @@ -474,10 +480,11 @@ static int rc_map_cmp(const void *key, const void *elt) * ir_lookup_by_scancode() - locate mapping by scancode * @rc_map: the struct rc_map to search * @scancode: scancode to look for in the table - * @return: index in the table, -1U if not found * * This routine performs binary search in RC keykeymap table for * given scancode. + * + * return: index in the table, -1U if not found */ static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map, unsigned int scancode) @@ -495,11 +502,11 @@ static unsigned int ir_lookup_by_scancode(const struct rc_map *rc_map, /** * ir_getkeycode() - get a keycode from the scancode->keycode table * @idev: the struct input_dev device descriptor - * @scancode: the desired scancode - * @keycode: used to return the keycode, if found, or KEY_RESERVED - * @return: always returns zero. + * @ke: Input keymap entry * * This routine is used to handle evdev EVIOCGKEY ioctl. + * + * return: always returns zero. */ static int ir_getkeycode(struct input_dev *idev, struct input_keymap_entry *ke) @@ -556,11 +563,12 @@ out: * rc_g_keycode_from_table() - gets the keycode that corresponds to a scancode * @dev: the struct rc_dev descriptor of the device * @scancode: the scancode to look for - * @return: the corresponding keycode, or KEY_RESERVED * * This routine is used by drivers which need to convert a scancode to a * keycode. Normally it should not be used since drivers should have no * interest in keycodes. + * + * return: the corresponding keycode, or KEY_RESERVED */ u32 rc_g_keycode_from_table(struct rc_dev *dev, u32 scancode) { @@ -625,7 +633,8 @@ EXPORT_SYMBOL_GPL(rc_keyup); /** * ir_timer_keyup() - generates a keyup event after a timeout - * @cookie: a pointer to the struct rc_dev for the device + * + * @t: a pointer to the struct timer_list * * This routine will generate a keyup event some time after a keydown event * is generated when no further activity has been detected. @@ -780,7 +789,8 @@ EXPORT_SYMBOL_GPL(rc_keydown_notimeout); * provides sensible defaults * @dev: the struct rc_dev descriptor of the device * @filter: the scancode and mask - * @return: 0 or -EINVAL if the filter is not valid + * + * return: 0 or -EINVAL if the filter is not valid */ static int rc_validate_filter(struct rc_dev *dev, struct rc_scancode_filter *filter) -- cgit v1.2.3 From 929b99ed9b31c6de984c6cf49763eaed6767ac2e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 08:38:30 -0500 Subject: media: siano: get rid of documentation warnings The Siano driver doesn't use kernel-doc markups. While it would be wanderful to convert to use it, it is probably not worth the time. So, instead of solving all problems there, just make sure that it won't produce dozens of warnings. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/common/siano/smscoreapi.c | 66 ++++++++++++++++----------------- drivers/media/usb/siano/smsusb.c | 4 +- 2 files changed, 35 insertions(+), 35 deletions(-) (limited to 'drivers') diff --git a/drivers/media/common/siano/smscoreapi.c b/drivers/media/common/siano/smscoreapi.c index e4ea2a0c7a24..c5c827e11b64 100644 --- a/drivers/media/common/siano/smscoreapi.c +++ b/drivers/media/common/siano/smscoreapi.c @@ -521,13 +521,13 @@ static void list_add_locked(struct list_head *new, struct list_head *head, spin_unlock_irqrestore(lock, flags); } -/** +/* * register a client callback that called when device plugged in/unplugged * NOTE: if devices exist callback is called immediately for each device * * @param hotplug callback * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smscore_register_hotplug(hotplug_t hotplug) { @@ -562,7 +562,7 @@ int smscore_register_hotplug(hotplug_t hotplug) } EXPORT_SYMBOL_GPL(smscore_register_hotplug); -/** +/* * unregister a client callback that called when device plugged in/unplugged * * @param hotplug callback @@ -636,7 +636,7 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, return cb; } -/** +/* * creates coredev object for a device, prepares buffers, * creates buffer mappings, notifies registered hotplugs about new device. * @@ -644,7 +644,7 @@ smscore_buffer_t *smscore_createbuffer(u8 *buffer, void *common_buffer, * and handlers * @param coredev pointer to a value that receives created coredev object * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smscore_register_device(struct smsdevice_params_t *params, struct smscore_device_t **coredev, @@ -764,10 +764,10 @@ static int smscore_sendrequest_and_wait(struct smscore_device_t *coredev, 0 : -ETIME; } -/** +/* * Starts & enables IR operations * - * @return 0 on success, < 0 on error. + * return: 0 on success, < 0 on error. */ static int smscore_init_ir(struct smscore_device_t *coredev) { @@ -812,13 +812,13 @@ static int smscore_init_ir(struct smscore_device_t *coredev) return 0; } -/** +/* * configures device features according to board configuration structure. * * @param coredev pointer to a coredev object returned by * smscore_register_device * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static int smscore_configure_board(struct smscore_device_t *coredev) { @@ -861,13 +861,13 @@ static int smscore_configure_board(struct smscore_device_t *coredev) return 0; } -/** +/* * sets initial device mode and notifies client hotplugs that device is ready * * @param coredev pointer to a coredev object returned by * smscore_register_device * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smscore_start_device(struct smscore_device_t *coredev) { @@ -1087,7 +1087,7 @@ static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = { }, }; -/** +/* * get firmware file name from one of the two mechanisms : sms_boards or * smscore_fw_lkup. * @param coredev pointer to a coredev object returned by @@ -1096,7 +1096,7 @@ static char *smscore_fw_lkup[][DEVICE_MODE_MAX] = { * @param lookup if 1, always get the fw filename from smscore_fw_lkup * table. if 0, try first to get from sms_boards * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static char *smscore_get_fw_filename(struct smscore_device_t *coredev, int mode) @@ -1125,7 +1125,7 @@ static char *smscore_get_fw_filename(struct smscore_device_t *coredev, return fw[mode]; } -/** +/* * loads specified firmware into a buffer and calls device loadfirmware_handler * * @param coredev pointer to a coredev object returned by @@ -1133,7 +1133,7 @@ static char *smscore_get_fw_filename(struct smscore_device_t *coredev, * @param filename null-terminated string specifies firmware file name * @param loadfirmware_handler device handler that loads firmware * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, int mode, @@ -1182,14 +1182,14 @@ static int smscore_load_firmware_from_file(struct smscore_device_t *coredev, return rc; } -/** +/* * notifies all clients registered with the device, notifies hotplugs, * frees all buffers and coredev object * * @param coredev pointer to a coredev object returned by * smscore_register_device * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ void smscore_unregister_device(struct smscore_device_t *coredev) { @@ -1282,14 +1282,14 @@ static int smscore_detect_mode(struct smscore_device_t *coredev) return rc; } -/** +/* * send init device request and wait for response * * @param coredev pointer to a coredev object returned by * smscore_register_device * @param mode requested mode of operation * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ static int smscore_init_device(struct smscore_device_t *coredev, int mode) { @@ -1315,7 +1315,7 @@ static int smscore_init_device(struct smscore_device_t *coredev, int mode) return rc; } -/** +/* * calls device handler to change mode of operation * NOTE: stellar/usb may disconnect when changing mode * @@ -1323,7 +1323,7 @@ static int smscore_init_device(struct smscore_device_t *coredev, int mode) * smscore_register_device * @param mode requested mode of operation * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) { @@ -1411,13 +1411,13 @@ int smscore_set_device_mode(struct smscore_device_t *coredev, int mode) return rc; } -/** +/* * calls device handler to get current mode of operation * * @param coredev pointer to a coredev object returned by * smscore_register_device * - * @return current mode + * return: current mode */ int smscore_get_device_mode(struct smscore_device_t *coredev) { @@ -1425,7 +1425,7 @@ int smscore_get_device_mode(struct smscore_device_t *coredev) } EXPORT_SYMBOL_GPL(smscore_get_device_mode); -/** +/* * find client by response id & type within the clients list. * return client handle or NULL. * @@ -1462,7 +1462,7 @@ found: return client; } -/** +/* * find client by response id/type, call clients onresponse handler * return buffer to pool on error * @@ -1615,13 +1615,13 @@ void smscore_onresponse(struct smscore_device_t *coredev, } EXPORT_SYMBOL_GPL(smscore_onresponse); -/** +/* * return pointer to next free buffer descriptor from core pool * * @param coredev pointer to a coredev object returned by * smscore_register_device * - * @return pointer to descriptor on success, NULL on error. + * return: pointer to descriptor on success, NULL on error. */ static struct smscore_buffer_t *get_entry(struct smscore_device_t *coredev) @@ -1648,7 +1648,7 @@ struct smscore_buffer_t *smscore_getbuffer(struct smscore_device_t *coredev) } EXPORT_SYMBOL_GPL(smscore_getbuffer); -/** +/* * return buffer descriptor to a pool * * @param coredev pointer to a coredev object returned by @@ -1693,7 +1693,7 @@ static int smscore_validate_client(struct smscore_device_t *coredev, return 0; } -/** +/* * creates smsclient object, check that id is taken by another client * * @param coredev pointer to a coredev object from clients hotplug @@ -1705,7 +1705,7 @@ static int smscore_validate_client(struct smscore_device_t *coredev, * @param context client-specific context * @param client pointer to a value that receives created smsclient object * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smscore_register_client(struct smscore_device_t *coredev, struct smsclient_params_t *params, @@ -1740,7 +1740,7 @@ int smscore_register_client(struct smscore_device_t *coredev, } EXPORT_SYMBOL_GPL(smscore_register_client); -/** +/* * frees smsclient object and all subclients associated with it * * @param client pointer to smsclient object returned by @@ -1771,7 +1771,7 @@ void smscore_unregister_client(struct smscore_client_t *client) } EXPORT_SYMBOL_GPL(smscore_unregister_client); -/** +/* * verifies that source id is not taken by another client, * calls device handler to send requests to the device * @@ -1780,7 +1780,7 @@ EXPORT_SYMBOL_GPL(smscore_unregister_client); * @param buffer pointer to a request buffer * @param size size (in bytes) of request buffer * - * @return 0 on success, <0 on error. + * return: 0 on success, <0 on error. */ int smsclient_sendrequest(struct smscore_client_t *client, void *buffer, size_t size) diff --git a/drivers/media/usb/siano/smsusb.c b/drivers/media/usb/siano/smsusb.c index 8c1f926567ec..d07349cf9489 100644 --- a/drivers/media/usb/siano/smsusb.c +++ b/drivers/media/usb/siano/smsusb.c @@ -74,7 +74,7 @@ struct smsusb_device_t { static int smsusb_submit_urb(struct smsusb_device_t *dev, struct smsusb_urb_t *surb); -/** +/* * Completing URB's callback handler - bottom half (proccess context) * submits the URB prepared on smsusb_onresponse() */ @@ -86,7 +86,7 @@ static void do_submit_urb(struct work_struct *work) smsusb_submit_urb(dev, surb); } -/** +/* * Completing URB's callback handler - top half (interrupt context) * adds completing sms urb to the global surbs list and activtes the worker * thread the surb -- cgit v1.2.3 From 86850b9a0495b10326765f03b9e77fd46e83981c Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:09:03 -0500 Subject: media: img-ir-hw: fix one kernel-doc comment Needed to suppress the following warnings: drivers/media/rc/img-ir/img-ir-hw.c:351: warning: No description found for parameter 'reg_timings' drivers/media/rc/img-ir/img-ir-hw.c:351: warning: Excess function parameter 'timings' description in 'img_ir_decoder_convert' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/img-ir/img-ir-hw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/rc/img-ir/img-ir-hw.c b/drivers/media/rc/img-ir/img-ir-hw.c index f54bc5d23893..ec4ded84cd17 100644 --- a/drivers/media/rc/img-ir/img-ir-hw.c +++ b/drivers/media/rc/img-ir/img-ir-hw.c @@ -339,7 +339,7 @@ static void img_ir_decoder_preprocess(struct img_ir_decoder *decoder) /** * img_ir_decoder_convert() - Generate internal timings in decoder. * @decoder: Decoder to be converted to internal timings. - * @timings: Timing register values. + * @reg_timings: Timing register values. * @clock_hz: IR clock rate in Hz. * * Fills out the repeat timings and timing register values for a specific clock -- cgit v1.2.3 From 34eb9751ea8285c7732991a09cb8729d624f6245 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:10:28 -0500 Subject: media: drxj and drxk: don't produce kernel-doc warnings Those drivers use a different notation for comments. While it is not worth converting to kernel-doc, removing it is also not an option. So, just replace /** by /* and be happy :-) Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/drx39xyj/drxj.c | 248 ++++++++++++++-------------- drivers/media/dvb-frontends/drxk_hard.c | 32 ++-- 2 files changed, 140 insertions(+), 140 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.c b/drivers/media/dvb-frontends/drx39xyj/drxj.c index 499ccff557bf..8cbd8cc21059 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.c +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.c @@ -73,7 +73,7 @@ INCLUDE FILES #define DRX39XX_MAIN_FIRMWARE "dvb-fe-drxj-mc-1.0.8.fw" -/** +/* * \brief Maximum u32 value. */ #ifndef MAX_U32 @@ -100,8 +100,8 @@ INCLUDE FILES #ifndef OOB_DRX_DRIVE_STRENGTH #define OOB_DRX_DRIVE_STRENGTH 0x02 #endif -/**** START DJCOMBO patches to DRXJ registermap constants *********************/ -/**** registermap 200706071303 from drxj **************************************/ +/*** START DJCOMBO patches to DRXJ registermap constants *********************/ +/*** registermap 200706071303 from drxj **************************************/ #define ATV_TOP_CR_AMP_TH_FM 0x0 #define ATV_TOP_CR_AMP_TH_L 0xA #define ATV_TOP_CR_AMP_TH_LP 0xA @@ -188,7 +188,7 @@ INCLUDE FILES #define IQM_RC_ADJ_SEL_B_OFF 0x0 #define IQM_RC_ADJ_SEL_B_QAM 0x1 #define IQM_RC_ADJ_SEL_B_VSB 0x2 -/**** END DJCOMBO patches to DRXJ registermap *********************************/ +/*** END DJCOMBO patches to DRXJ registermap *********************************/ #include "drx_driver_version.h" @@ -208,25 +208,25 @@ DEFINES #define DRXJ_WAKE_UP_KEY (demod->my_i2c_dev_addr->i2c_addr) #endif -/** +/* * \def DRXJ_DEF_I2C_ADDR * \brief Default I2C address of a demodulator instance. */ #define DRXJ_DEF_I2C_ADDR (0x52) -/** +/* * \def DRXJ_DEF_DEMOD_DEV_ID * \brief Default device identifier of a demodultor instance. */ #define DRXJ_DEF_DEMOD_DEV_ID (1) -/** +/* * \def DRXJ_SCAN_TIMEOUT * \brief Timeout value for waiting on demod lock during channel scan (millisec). */ #define DRXJ_SCAN_TIMEOUT 1000 -/** +/* * \def HI_I2C_DELAY * \brief HI timing delay for I2C timing (in nano seconds) * @@ -234,7 +234,7 @@ DEFINES */ #define HI_I2C_DELAY 42 -/** +/* * \def HI_I2C_BRIDGE_DELAY * \brief HI timing delay for I2C timing (in nano seconds) * @@ -242,13 +242,13 @@ DEFINES */ #define HI_I2C_BRIDGE_DELAY 750 -/** +/* * \brief Time Window for MER and SER Measurement in Units of Segment duration. */ #define VSB_TOP_MEASUREMENT_PERIOD 64 #define SYMBOLS_PER_SEGMENT 832 -/** +/* * \brief bit rate and segment rate constants used for SER and BER. */ /* values taken from the QAM microcode */ @@ -260,21 +260,21 @@ DEFINES #define DRXJ_QAM_SL_SIG_POWER_QAM64 43008 #define DRXJ_QAM_SL_SIG_POWER_QAM128 20992 #define DRXJ_QAM_SL_SIG_POWER_QAM256 43520 -/** +/* * \brief Min supported symbolrates. */ #ifndef DRXJ_QAM_SYMBOLRATE_MIN #define DRXJ_QAM_SYMBOLRATE_MIN (520000) #endif -/** +/* * \brief Max supported symbolrates. */ #ifndef DRXJ_QAM_SYMBOLRATE_MAX #define DRXJ_QAM_SYMBOLRATE_MAX (7233000) #endif -/** +/* * \def DRXJ_QAM_MAX_WAITTIME * \brief Maximal wait time for QAM auto constellation in ms */ @@ -290,7 +290,7 @@ DEFINES #define DRXJ_QAM_DEMOD_LOCK_EXT_WAITTIME 200 #endif -/** +/* * \def SCU status and results * \brief SCU */ @@ -299,7 +299,7 @@ DEFINES #define FEC_RS_MEASUREMENT_PERIOD 12894 /* 1 sec */ #define FEC_RS_MEASUREMENT_PRESCALE 1 /* n sec */ -/** +/* * \def DRX_AUD_MAX_DEVIATION * \brief Needed for calculation of prescale feature in AUD */ @@ -307,14 +307,14 @@ DEFINES #define DRXJ_AUD_MAX_FM_DEVIATION 100 /* kHz */ #endif -/** +/* * \brief Needed for calculation of NICAM prescale feature in AUD */ #ifndef DRXJ_AUD_MAX_NICAM_PRESCALE #define DRXJ_AUD_MAX_NICAM_PRESCALE (9) /* dB */ #endif -/** +/* * \brief Needed for calculation of NICAM prescale feature in AUD */ #ifndef DRXJ_AUD_MAX_WAITTIME @@ -371,21 +371,21 @@ DEFINES /*============================================================================*/ /*=== GLOBAL VARIABLEs =======================================================*/ /*============================================================================*/ -/** +/* */ -/** +/* * \brief Temporary register definitions. * (register definitions that are not yet available in register master) */ -/******************************************************************************/ +/*****************************************************************************/ /* Audio block 0x103 is write only. To avoid shadowing in driver accessing */ /* RAM adresses directly. This must be READ ONLY to avoid problems. */ /* Writing to the interface adresses is more than only writing the RAM */ /* locations */ -/******************************************************************************/ -/** +/*****************************************************************************/ +/* * \brief RAM location of MODUS registers */ #define AUD_DEM_RAM_MODUS_HI__A 0x10204A3 @@ -394,13 +394,13 @@ DEFINES #define AUD_DEM_RAM_MODUS_LO__A 0x10204A4 #define AUD_DEM_RAM_MODUS_LO__M 0x0FFF -/** +/* * \brief RAM location of I2S config registers */ #define AUD_DEM_RAM_I2S_CONFIG1__A 0x10204B1 #define AUD_DEM_RAM_I2S_CONFIG2__A 0x10204B2 -/** +/* * \brief RAM location of DCO config registers */ #define AUD_DEM_RAM_DCO_B_HI__A 0x1020461 @@ -408,20 +408,20 @@ DEFINES #define AUD_DEM_RAM_DCO_A_HI__A 0x1020463 #define AUD_DEM_RAM_DCO_A_LO__A 0x1020464 -/** +/* * \brief RAM location of Threshold registers */ #define AUD_DEM_RAM_NICAM_THRSHLD__A 0x102045A #define AUD_DEM_RAM_A2_THRSHLD__A 0x10204BB #define AUD_DEM_RAM_BTSC_THRSHLD__A 0x10204A6 -/** +/* * \brief RAM location of Carrier Threshold registers */ #define AUD_DEM_RAM_CM_A_THRSHLD__A 0x10204AF #define AUD_DEM_RAM_CM_B_THRSHLD__A 0x10204B0 -/** +/* * \brief FM Matrix register fix */ #ifdef AUD_DEM_WR_FM_MATRIX__A @@ -430,7 +430,7 @@ DEFINES #define AUD_DEM_WR_FM_MATRIX__A 0x105006F /*============================================================================*/ -/** +/* * \brief Defines required for audio */ #define AUD_VOLUME_ZERO_DB 115 @@ -443,14 +443,14 @@ DEFINES #define AUD_I2S_FREQUENCY_MIN 12000UL #define AUD_RDS_ARRAY_SIZE 18 -/** +/* * \brief Needed for calculation of prescale feature in AUD */ #ifndef DRX_AUD_MAX_FM_DEVIATION #define DRX_AUD_MAX_FM_DEVIATION (100) /* kHz */ #endif -/** +/* * \brief Needed for calculation of NICAM prescale feature in AUD */ #ifndef DRX_AUD_MAX_NICAM_PRESCALE @@ -478,7 +478,7 @@ DEFINES /*=== REGISTER ACCESS MACROS =================================================*/ /*============================================================================*/ -/** +/* * This macro is used to create byte arrays for block writes. * Block writes speed up I2C traffic between host and demod. * The macro takes care of the required byte order in a 16 bits word. @@ -486,7 +486,7 @@ DEFINES */ #define DRXJ_16TO8(x) ((u8) (((u16)x) & 0xFF)), \ ((u8)((((u16)x)>>8)&0xFF)) -/** +/* * This macro is used to convert byte array to 16 bit register value for block read. * Block read speed up I2C traffic between host and demod. * The macro takes care of the required byte order in a 16 bits word. @@ -501,7 +501,7 @@ DEFINES /*=== HI COMMAND RELATED DEFINES =============================================*/ /*============================================================================*/ -/** +/* * \brief General maximum number of retries for ucode command interfaces */ #define DRXJ_MAX_RETRIES (100) @@ -807,7 +807,7 @@ static struct drxj_data drxj_data_g = { }, }; -/** +/* * \var drxj_default_addr_g * \brief Default I2C address and device identifier. */ @@ -816,7 +816,7 @@ static struct i2c_device_addr drxj_default_addr_g = { DRXJ_DEF_DEMOD_DEV_ID /* device id */ }; -/** +/* * \var drxj_default_comm_attr_g * \brief Default common attributes of a drxj demodulator instance. */ @@ -887,7 +887,7 @@ static struct drx_common_attr drxj_default_comm_attr_g = { 0 /* mfx */ }; -/** +/* * \var drxj_default_demod_g * \brief Default drxj demodulator instance. */ @@ -897,7 +897,7 @@ static struct drx_demod_instance drxj_default_demod_g = { &drxj_data_g /* demod device specific attributes */ }; -/** +/* * \brief Default audio data structure for DRK demodulator instance. * * This structure is DRXK specific. @@ -997,7 +997,7 @@ struct drxj_hi_cmd { /*=== MICROCODE RELATED STRUCTURES ===========================================*/ /*============================================================================*/ -/** +/* * struct drxu_code_block_hdr - Structure of the microcode block headers * * @addr: Destination address of the data in this block @@ -1086,7 +1086,7 @@ static u32 frac28(u32 N, u32 D) return Q1; } -/** +/* * \fn u32 log1_times100( u32 x) * \brief Compute: 100*log10(x) * \param x 32 bits @@ -1198,7 +1198,7 @@ static u32 log1_times100(u32 x) } -/** +/* * \fn u32 frac_times1e6( u16 N, u32 D) * \brief Compute: (N/D) * 1000000. * \param N nominator 16-bits. @@ -1235,7 +1235,7 @@ static u32 frac_times1e6(u32 N, u32 D) /*============================================================================*/ -/** +/* * \brief Values for NICAM prescaler gain. Computed from dB to integer * and rounded. For calc used formula: 16*10^(prescaleGain[dB]/20). * @@ -1280,7 +1280,7 @@ static const u16 nicam_presc_table_val[43] = { #define DRXJ_DAP_AUDTRIF_TIMEOUT 80 /* millisec */ /*============================================================================*/ -/** +/* * \fn bool is_handled_by_aud_tr_if( u32 addr ) * \brief Check if this address is handled by the audio token ring interface. * \param addr @@ -1386,7 +1386,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr, /*============================================================================*/ -/****************************** +/***************************** * * int drxdap_fasi_read_block ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1498,7 +1498,7 @@ static int drxdap_fasi_read_block(struct i2c_device_addr *dev_addr, } -/****************************** +/***************************** * * int drxdap_fasi_read_reg16 ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1531,7 +1531,7 @@ static int drxdap_fasi_read_reg16(struct i2c_device_addr *dev_addr, return rc; } -/****************************** +/***************************** * * int drxdap_fasi_read_reg32 ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1566,7 +1566,7 @@ static int drxdap_fasi_read_reg32(struct i2c_device_addr *dev_addr, return rc; } -/****************************** +/***************************** * * int drxdap_fasi_write_block ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1705,7 +1705,7 @@ static int drxdap_fasi_write_block(struct i2c_device_addr *dev_addr, return first_err; } -/****************************** +/***************************** * * int drxdap_fasi_write_reg16 ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1734,7 +1734,7 @@ static int drxdap_fasi_write_reg16(struct i2c_device_addr *dev_addr, return drxdap_fasi_write_block(dev_addr, addr, sizeof(data), buf, flags); } -/****************************** +/***************************** * * int drxdap_fasi_read_modify_write_reg16 ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1778,7 +1778,7 @@ static int drxdap_fasi_read_modify_write_reg16(struct i2c_device_addr *dev_addr, return rc; } -/****************************** +/***************************** * * int drxdap_fasi_write_reg32 ( * struct i2c_device_addr *dev_addr, -- address of I2C device @@ -1811,7 +1811,7 @@ static int drxdap_fasi_write_reg32(struct i2c_device_addr *dev_addr, /*============================================================================*/ -/** +/* * \fn int drxj_dap_rm_write_reg16short * \brief Read modify write 16 bits audio register using short format only. * \param dev_addr @@ -1890,7 +1890,7 @@ static int drxj_dap_read_modify_write_reg16(struct i2c_device_addr *dev_addr, /*============================================================================*/ -/** +/* * \fn int drxj_dap_read_aud_reg16 * \brief Read 16 bits audio register * \param dev_addr @@ -1997,7 +1997,7 @@ static int drxj_dap_read_reg16(struct i2c_device_addr *dev_addr, } /*============================================================================*/ -/** +/* * \fn int drxj_dap_write_aud_reg16 * \brief Write 16 bits audio register * \param dev_addr @@ -2086,7 +2086,7 @@ static int drxj_dap_write_reg16(struct i2c_device_addr *dev_addr, #define DRXJ_HI_ATOMIC_READ SIO_HI_RA_RAM_PAR_3_ACP_RW_READ #define DRXJ_HI_ATOMIC_WRITE SIO_HI_RA_RAM_PAR_3_ACP_RW_WRITE -/** +/* * \fn int drxj_dap_atomic_read_write_block() * \brief Basic access routine for atomic read or write access * \param dev_addr pointer to i2c dev address @@ -2168,7 +2168,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int drxj_dap_atomic_read_reg32() * \brief Atomic read of 32 bits words */ @@ -2215,7 +2215,7 @@ int drxj_dap_atomic_read_reg32(struct i2c_device_addr *dev_addr, /*============================================================================*/ /*============================================================================*/ -/** +/* * \fn int hi_cfg_command() * \brief Configure HI with settings stored in the demod structure. * \param demod Demodulator. @@ -2258,7 +2258,7 @@ rw_error: return rc; } -/** +/* * \fn int hi_command() * \brief Configure HI with settings stored in the demod structure. * \param dev_addr I2C address. @@ -2369,7 +2369,7 @@ rw_error: return rc; } -/** +/* * \fn int init_hi( const struct drx_demod_instance *demod ) * \brief Initialise and configurate HI. * \param demod pointer to demod data. @@ -2450,7 +2450,7 @@ rw_error: /*============================================================================*/ /*============================================================================*/ -/** +/* * \fn int get_device_capabilities() * \brief Get and store device capabilities. * \param demod Pointer to demodulator instance. @@ -2656,7 +2656,7 @@ rw_error: return rc; } -/** +/* * \fn int power_up_device() * \brief Power up device. * \param demod Pointer to demodulator instance. @@ -2710,7 +2710,7 @@ static int power_up_device(struct drx_demod_instance *demod) /*----------------------------------------------------------------------------*/ /* MPEG Output Configuration Functions - begin */ /*----------------------------------------------------------------------------*/ -/** +/* * \fn int ctrl_set_cfg_mpeg_output() * \brief Set MPEG output configuration of the device. * \param devmod Pointer to demodulator instance. @@ -3356,7 +3356,7 @@ rw_error: /* miscellaneous configurations - begin */ /*----------------------------------------------------------------------------*/ -/** +/* * \fn int set_mpegtei_handling() * \brief Activate MPEG TEI handling settings. * \param devmod Pointer to demodulator instance. @@ -3429,7 +3429,7 @@ rw_error: } /*----------------------------------------------------------------------------*/ -/** +/* * \fn int bit_reverse_mpeg_output() * \brief Set MPEG output bit-endian settings. * \param devmod Pointer to demodulator instance. @@ -3472,7 +3472,7 @@ rw_error: } /*----------------------------------------------------------------------------*/ -/** +/* * \fn int set_mpeg_start_width() * \brief Set MPEG start width. * \param devmod Pointer to demodulator instance. @@ -3522,7 +3522,7 @@ rw_error: /*----------------------------------------------------------------------------*/ /* UIO Configuration Functions - begin */ /*----------------------------------------------------------------------------*/ -/** +/* * \fn int ctrl_set_uio_cfg() * \brief Configure modus oprandi UIO. * \param demod Pointer to demodulator instance. @@ -3659,7 +3659,7 @@ rw_error: return rc; } -/** +/* * \fn int ctrl_uio_write() * \brief Write to a UIO. * \param demod Pointer to demodulator instance. @@ -3868,7 +3868,7 @@ rw_error: /*----------------------------------------------------------------------------*/ /* I2C Bridge Functions - begin */ /*----------------------------------------------------------------------------*/ -/** +/* * \fn int ctrl_i2c_bridge() * \brief Open or close the I2C switch to tuner. * \param demod Pointer to demodulator instance. @@ -3903,7 +3903,7 @@ ctrl_i2c_bridge(struct drx_demod_instance *demod, bool *bridge_closed) /*----------------------------------------------------------------------------*/ /* Smart antenna Functions - begin */ /*----------------------------------------------------------------------------*/ -/** +/* * \fn int smart_ant_init() * \brief Initialize Smart Antenna. * \param pointer to struct drx_demod_instance. @@ -4116,7 +4116,7 @@ rw_error: return rc; } -/** +/* * \fn int DRXJ_DAP_SCUAtomicReadWriteBlock() * \brief Basic access routine for SCU atomic read or write access * \param dev_addr pointer to i2c dev address @@ -4188,7 +4188,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int DRXJ_DAP_AtomicReadReg16() * \brief Atomic read of 16 bits words */ @@ -4216,7 +4216,7 @@ int drxj_dap_scu_atomic_read_reg16(struct i2c_device_addr *dev_addr, } /*============================================================================*/ -/** +/* * \fn int drxj_dap_scu_atomic_write_reg16() * \brief Atomic read of 16 bits words */ @@ -4237,7 +4237,7 @@ int drxj_dap_scu_atomic_write_reg16(struct i2c_device_addr *dev_addr, } /* -------------------------------------------------------------------------- */ -/** +/* * \brief Measure result of ADC synchronisation * \param demod demod instance * \param count (returned) count @@ -4297,7 +4297,7 @@ rw_error: return rc; } -/** +/* * \brief Synchronize analog and digital clock domains * \param demod demod instance * \return int. @@ -4365,7 +4365,7 @@ rw_error: /*== 8VSB & QAM COMMON DATAPATH FUNCTIONS ==*/ /*============================================================================*/ /*============================================================================*/ -/** +/* * \fn int init_agc () * \brief Initialize AGC for all standards. * \param demod instance of demodulator. @@ -4741,7 +4741,7 @@ rw_error: return rc; } -/** +/* * \fn int set_frequency () * \brief Set frequency shift. * \param demod instance of demodulator. @@ -4839,7 +4839,7 @@ rw_error: return rc; } -/** +/* * \fn int get_acc_pkt_err() * \brief Retrieve signal strength for VSB and QAM. * \param demod Pointer to demod instance @@ -4891,7 +4891,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_agc_rf () * \brief Configure RF AGC * \param demod instance of demodulator. @@ -5105,7 +5105,7 @@ rw_error: return rc; } -/** +/* * \fn int set_agc_if () * \brief Configure If AGC * \param demod instance of demodulator. @@ -5334,7 +5334,7 @@ rw_error: return rc; } -/** +/* * \fn int set_iqm_af () * \brief Configure IQM AF registers * \param demod instance of demodulator. @@ -5380,7 +5380,7 @@ rw_error: /*============================================================================*/ /*============================================================================*/ -/** +/* * \fn int power_down_vsb () * \brief Powr down QAM related blocks. * \param demod instance of demodulator. @@ -5478,7 +5478,7 @@ rw_error: return rc; } -/** +/* * \fn int set_vsb_leak_n_gain () * \brief Set ATSC demod. * \param demod instance of demodulator. @@ -5694,7 +5694,7 @@ rw_error: return rc; } -/** +/* * \fn int set_vsb() * \brief Set 8VSB demod. * \param demod instance of demodulator. @@ -6200,7 +6200,7 @@ rw_error: return rc; } -/** +/* * \fn static short get_vsb_post_rs_pck_err(struct i2c_device_addr *dev_addr, u16 *PckErrs) * \brief Get the values of packet error in 8VSB mode * \return Error code @@ -6239,7 +6239,7 @@ rw_error: return rc; } -/** +/* * \fn static short GetVSBBer(struct i2c_device_addr *dev_addr, u32 *ber) * \brief Get the values of ber in VSB mode * \return Error code @@ -6284,7 +6284,7 @@ rw_error: return rc; } -/** +/* * \fn static short get_vs_bpre_viterbi_ber(struct i2c_device_addr *dev_addr, u32 *ber) * \brief Get the values of ber in VSB mode * \return Error code @@ -6306,7 +6306,7 @@ static int get_vs_bpre_viterbi_ber(struct i2c_device_addr *dev_addr, return 0; } -/** +/* * \fn static int get_vsbmer(struct i2c_device_addr *dev_addr, u16 *mer) * \brief Get the values of MER * \return Error code @@ -6340,7 +6340,7 @@ rw_error: /*============================================================================*/ /*============================================================================*/ -/** +/* * \fn int power_down_qam () * \brief Powr down QAM related blocks. * \param demod instance of demodulator. @@ -6444,7 +6444,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam_measurement () * \brief Setup of the QAM Measuremnt intervals for signal quality * \param demod instance of demod. @@ -6656,7 +6656,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam16 () * \brief QAM16 specific setup * \param demod instance of demod. @@ -6891,7 +6891,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam32 () * \brief QAM32 specific setup * \param demod instance of demod. @@ -7126,7 +7126,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam64 () * \brief QAM64 specific setup * \param demod instance of demod. @@ -7362,7 +7362,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam128 () * \brief QAM128 specific setup * \param demod: instance of demod. @@ -7597,7 +7597,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int set_qam256 () * \brief QAM256 specific setup * \param demod: instance of demod. @@ -7835,7 +7835,7 @@ rw_error: #define QAM_SET_OP_CONSTELLATION 0x2 #define QAM_SET_OP_SPECTRUM 0X4 -/** +/* * \fn int set_qam () * \brief Set QAM demod. * \param demod: instance of demod. @@ -8845,7 +8845,7 @@ rw_error: #define DEMOD_LOCKED 0x1 #define SYNC_FLIPPED 0x2 #define SPEC_MIRRORED 0x4 -/** +/* * \fn int qam64auto () * \brief auto do sync pattern switching and mirroring. * \param demod: instance of demod. @@ -8993,7 +8993,7 @@ rw_error: return rc; } -/** +/* * \fn int qam256auto () * \brief auto do sync pattern switching and mirroring. * \param demod: instance of demod. @@ -9077,7 +9077,7 @@ rw_error: return rc; } -/** +/* * \fn int set_qam_channel () * \brief Set QAM channel according to the requested constellation. * \param demod: instance of demod. @@ -9284,7 +9284,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn static short get_qamrs_err_count(struct i2c_device_addr *dev_addr) * \brief Get RS error count in QAM mode (used for post RS BER calculation) * \return Error code @@ -9355,7 +9355,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int get_sig_strength() * \brief Retrieve signal strength for VSB and QAM. * \param demod Pointer to demod instance @@ -9435,7 +9435,7 @@ rw_error: return rc; } -/** +/* * \fn int ctrl_get_qam_sig_quality() * \brief Retrieve QAM signal quality from device. * \param devmod Pointer to demodulator instance. @@ -9721,7 +9721,7 @@ rw_error: */ /* -------------------------------------------------------------------------- */ -/** +/* * \fn int power_down_atv () * \brief Power down ATV. * \param demod instance of demodulator @@ -9822,7 +9822,7 @@ rw_error: /*============================================================================*/ -/** +/* * \brief Power up AUD. * \param demod instance of demodulator * \return int. @@ -9850,7 +9850,7 @@ rw_error: return rc; } -/** +/* * \fn int set_orx_nsu_aox() * \brief Configure OrxNsuAox for OOB * \param demod instance of demodulator. @@ -9884,7 +9884,7 @@ rw_error: return rc; } -/** +/* * \fn int ctrl_set_oob() * \brief Set OOB channel to be used. * \param demod instance of demodulator @@ -9986,9 +9986,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par 20; } - /*********/ + /********/ /* Stop */ - /*********/ + /********/ rc = drxj_dap_write_reg16(dev_addr, ORX_COMM_EXEC__A, ORX_COMM_EXEC_STOP, 0); if (rc != 0) { pr_err("error %d\n", rc); @@ -10004,9 +10004,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par pr_err("error %d\n", rc); goto rw_error; } - /*********/ + /********/ /* Reset */ - /*********/ + /********/ scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB | SCU_RAM_COMMAND_CMD_DEMOD_RESET; scu_cmd.parameter_len = 0; @@ -10017,9 +10017,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par pr_err("error %d\n", rc); goto rw_error; } - /***********/ + /**********/ /* SET_ENV */ - /***********/ + /**********/ /* set frequency, spectrum inversion and data rate */ scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB | SCU_RAM_COMMAND_CMD_DEMOD_SET_ENV; @@ -10376,9 +10376,9 @@ static int ctrl_set_oob(struct drx_demod_instance *demod, struct drxoob *oob_par pr_err("error %d\n", rc); goto rw_error; } - /*********/ + /********/ /* Start */ - /*********/ + /********/ scu_cmd.command = SCU_RAM_COMMAND_STANDARD_OOB | SCU_RAM_COMMAND_CMD_DEMOD_START; scu_cmd.parameter_len = 0; @@ -10419,7 +10419,7 @@ rw_error: /*============================================================================= ===== ctrl_set_channel() ========================================================== ===========================================================================*/ -/** +/* * \fn int ctrl_set_channel() * \brief Select a new transmission channel. * \param demod instance of demod. @@ -10652,7 +10652,7 @@ rw_error: ===== SigQuality() ========================================================== ===========================================================================*/ -/** +/* * \fn int ctrl_sig_quality() * \brief Retrieve signal quality form device. * \param devmod Pointer to demodulator instance. @@ -10768,7 +10768,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int ctrl_lock_status() * \brief Retrieve lock status . * \param dev_addr Pointer to demodulator device address. @@ -10856,7 +10856,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int ctrl_set_standard() * \brief Set modulation standard to be used. * \param standard Modulation standard. @@ -11012,7 +11012,7 @@ static void drxj_reset_mode(struct drxj_data *ext_attr) ext_attr->vsb_pre_saw_cfg.use_pre_saw = true; } -/** +/* * \fn int ctrl_power_mode() * \brief Set the power mode of the device to the specified power mode * \param demod Pointer to demodulator instance. @@ -11171,7 +11171,7 @@ rw_error: /*== CTRL Set/Get Config related functions ===================================*/ /*============================================================================*/ -/** +/* * \fn int ctrl_set_cfg_pre_saw() * \brief Set Pre-saw reference. * \param demod demod instance @@ -11234,7 +11234,7 @@ rw_error: /*============================================================================*/ -/** +/* * \fn int ctrl_set_cfg_afe_gain() * \brief Set AFE Gain. * \param demod demod instance @@ -11324,7 +11324,7 @@ static int drx_ctrl_u_code(struct drx_demod_instance *demod, enum drxu_code_action action); static int drxj_set_lna_state(struct drx_demod_instance *demod, bool state); -/** +/* * \fn drxj_open() * \brief Open the demod instance, configure device, configure drxdriver * \return Status_t Return status. @@ -11543,7 +11543,7 @@ rw_error: } /*============================================================================*/ -/** +/* * \fn drxj_close() * \brief Close the demod instance, power down the device * \return Status_t Return status. @@ -11594,7 +11594,7 @@ rw_error: * Microcode related functions */ -/** +/* * drx_u_code_compute_crc - Compute CRC of block of microcode data. * @block_data: Pointer to microcode data. * @nr_words: Size of microcode block (number of 16 bits words). @@ -11622,7 +11622,7 @@ static u16 drx_u_code_compute_crc(u8 *block_data, u16 nr_words) return (u16)(crc_word >> 16); } -/** +/* * drx_check_firmware - checks if the loaded firmware is valid * * @demod: demod structure @@ -11708,7 +11708,7 @@ eof: return -EINVAL; } -/** +/* * drx_ctrl_u_code - Handle microcode upload or verify. * @dev_addr: Address of device. * @mc_info: Pointer to information about microcode data. diff --git a/drivers/media/dvb-frontends/drxk_hard.c b/drivers/media/dvb-frontends/drxk_hard.c index 48a8aad47a74..f59ac2e91c59 100644 --- a/drivers/media/dvb-frontends/drxk_hard.c +++ b/drivers/media/dvb-frontends/drxk_hard.c @@ -207,9 +207,9 @@ static inline u32 log10times100(u32 value) return (100L * intlog10(value)) >> 24; } -/****************************************************************************/ +/***************************************************************************/ /* I2C **********************************************************************/ -/****************************************************************************/ +/***************************************************************************/ static int drxk_i2c_lock(struct drxk_state *state) { @@ -3444,7 +3444,7 @@ error: /*============================================================================*/ -/** +/* * \brief Activate DVBT specific presets * \param demod instance of demodulator. * \return DRXStatus_t. @@ -3484,7 +3484,7 @@ error: /*============================================================================*/ -/** +/* * \brief Initialize channelswitch-independent settings for DVBT. * \param demod instance of demodulator. * \return DRXStatus_t. @@ -3696,7 +3696,7 @@ error: } /*============================================================================*/ -/** +/* * \brief start dvbt demodulating for channel. * \param demod instance of demodulator. * \return DRXStatus_t. @@ -3732,7 +3732,7 @@ error: /*============================================================================*/ -/** +/* * \brief Set up dvbt demodulator for channel. * \param demod instance of demodulator. * \return DRXStatus_t. @@ -4086,7 +4086,7 @@ error: /*============================================================================*/ -/** +/* * \brief Retrieve lock status . * \param demod Pointer to demodulator instance. * \param lockStat Pointer to lock status structure. @@ -4148,7 +4148,7 @@ static int power_up_qam(struct drxk_state *state) } -/** Power Down QAM */ +/* Power Down QAM */ static int power_down_qam(struct drxk_state *state) { u16 data = 0; @@ -4186,7 +4186,7 @@ error: /*============================================================================*/ -/** +/* * \brief Setup of the QAM Measurement intervals for signal quality * \param demod instance of demod. * \param modulation current modulation. @@ -4461,7 +4461,7 @@ error: /*============================================================================*/ -/** +/* * \brief QAM32 specific setup * \param demod instance of demod. * \return DRXStatus_t. @@ -4657,7 +4657,7 @@ error: /*============================================================================*/ -/** +/* * \brief QAM64 specific setup * \param demod instance of demod. * \return DRXStatus_t. @@ -4852,7 +4852,7 @@ error: /*============================================================================*/ -/** +/* * \brief QAM128 specific setup * \param demod: instance of demod. * \return DRXStatus_t. @@ -5049,7 +5049,7 @@ error: /*============================================================================*/ -/** +/* * \brief QAM256 specific setup * \param demod: instance of demod. * \return DRXStatus_t. @@ -5244,7 +5244,7 @@ error: /*============================================================================*/ -/** +/* * \brief Reset QAM block. * \param demod: instance of demod. * \param channel: pointer to channel data. @@ -5272,7 +5272,7 @@ error: /*============================================================================*/ -/** +/* * \brief Set QAM symbolrate. * \param demod: instance of demod. * \param channel: pointer to channel data. @@ -5341,7 +5341,7 @@ error: /*============================================================================*/ -/** +/* * \brief Get QAM lock status. * \param demod: instance of demod. * \param channel: pointer to channel data. -- cgit v1.2.3 From 159308106aa0aa0873ee6e000b05db08a9413f58 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:14:25 -0500 Subject: media: vpif: don't generate a kernel-doc warning on a constant Constants documentation is not supported by kernel-doc markups. So, change the comment label to avoid this warning: drivers/media/platform/davinci/vpif.c:54: warning: cannot understand function prototype: 'const struct vpif_channel_config_params vpif_ch_params[] = ' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/platform/davinci/vpif.c b/drivers/media/platform/davinci/vpif.c index 07e89a4985a6..16352e2263d2 100644 --- a/drivers/media/platform/davinci/vpif.c +++ b/drivers/media/platform/davinci/vpif.c @@ -47,8 +47,9 @@ EXPORT_SYMBOL_GPL(vpif_lock); void __iomem *vpif_base; EXPORT_SYMBOL_GPL(vpif_base); -/** +/* * vpif_ch_params: video standard configuration parameters for vpif + * * The table must include all presets from supported subdevices. */ const struct vpif_channel_config_params vpif_ch_params[] = { -- cgit v1.2.3 From 771a0997ef305cd4a763877a9fd2caa6d4a4276f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:18:02 -0500 Subject: media: dvb_frontend fix kernel_doc markups There were some troubles there: drivers/media/dvb-core/dvb_frontend.c:379: warning: No description found for parameter 'fe' drivers/media/dvb-core/dvb_frontend.c:379: warning: No description found for parameter 'check_wrapped' drivers/media/dvb-core/dvb_frontend.c:1265: warning: No description found for parameter 'p_out' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_frontend.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c index 3ad83359098b..2afaa8226342 100644 --- a/drivers/media/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb-core/dvb_frontend.c @@ -369,11 +369,14 @@ static void dvb_frontend_swzigzag_update_delay(struct dvb_frontend_private *fepr } /** - * Performs automatic twiddling of frontend parameters. + * dvb_frontend_swzigzag_autotune - Performs automatic twiddling of frontend + * parameters. * - * @param fe The frontend concerned. - * @param check_wrapped Checks if an iteration has completed. DO NOT SET ON THE FIRST ATTEMPT - * @returns Number of complete iterations that have been performed. + * @fe: The frontend concerned. + * @check_wrapped: Checks if an iteration has completed. + * DO NOT SET ON THE FIRST ATTEMPT. + * + * return: Number of complete iterations that have been performed. */ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wrapped) { @@ -1253,7 +1256,7 @@ dtv_property_legacy_params_sync(struct dvb_frontend *fe, * dtv_get_frontend - calls a callback for retrieving DTV parameters * @fe: struct dvb_frontend pointer * @c: struct dtv_frontend_properties pointer (DVBv5 cache) - * @p_out struct dvb_frontend_parameters pointer (DVBv3 FE struct) + * @p_out: struct dvb_frontend_parameters pointer (DVBv3 FE struct) * * This routine calls either the DVBv3 or DVBv5 get_frontend call. * If c is not null, it will update the DVBv5 cache struct pointed by it. -- cgit v1.2.3 From c4365922d5cd9720cb114f75089bc290571993a3 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:19:38 -0500 Subject: media: rc-ir-raw: cleanup kernel-doc markups Cleanup those warnings: drivers/media/rc/rc-ir-raw.c:141: warning: No description found for parameter 'ev' drivers/media/rc/rc-ir-raw.c:141: warning: Excess function parameter 'type' description in 'ir_raw_event_store_with_filter' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/rc-ir-raw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c index f6e5ba4fbb49..d78483a504c9 100644 --- a/drivers/media/rc/rc-ir-raw.c +++ b/drivers/media/rc/rc-ir-raw.c @@ -128,7 +128,7 @@ EXPORT_SYMBOL_GPL(ir_raw_event_store_edge); /** * ir_raw_event_store_with_filter() - pass next pulse/space to decoders with some processing * @dev: the struct rc_dev device descriptor - * @type: the type of the event that has occurred + * @ev: the event that has occurred * * This routine (which may be called from an interrupt context) works * in similar manner to ir_raw_event_store_edge. -- cgit v1.2.3 From 461afb273947098b5760fe27ba90f0cfa71578b5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:21:28 -0500 Subject: media: dvb_net: stop abusing /** for comments The comments that start with "/**" aren't kernel-doc stuff. So, just start them with "/*". Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-core/dvb_net.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-core/dvb_net.c b/drivers/media/dvb-core/dvb_net.c index 06b0dcc13695..c018e3c06d5d 100644 --- a/drivers/media/dvb-core/dvb_net.c +++ b/drivers/media/dvb-core/dvb_net.c @@ -125,7 +125,7 @@ struct dvb_net_priv { }; -/** +/* * Determine the packet's protocol ID. The rule here is that we * assume 802.3 if the type field is short enough to be a length. * This is normal practice and works for any 'now in use' protocol. @@ -155,7 +155,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb, rawp = skb->data; - /** + /* * This is a magic hack to spot IPX packets. Older Novell breaks * the protocol design and runs IPX over 802.3 without an 802.2 LLC * layer. We look for FFFF which isn't a used 802.2 SSAP/DSAP. This @@ -164,7 +164,7 @@ static __be16 dvb_net_eth_type_trans(struct sk_buff *skb, if (*(unsigned short *)rawp == 0xFFFF) return htons(ETH_P_802_3); - /** + /* * Real 802.2 LLC */ return htons(ETH_P_802_2); @@ -215,7 +215,8 @@ static int ule_exthdr_padding(struct dvb_net_priv *p) return 0; } -/** Handle ULE extension headers. +/* + * Handle ULE extension headers. * Function is called after a successful CRC32 verification of an ULE SNDU to complete its decoding. * Returns: >= 0: nr. of bytes consumed by next extension header * -1: Mandatory extension header that is not recognized or TEST SNDU; discard. @@ -291,7 +292,7 @@ static int handle_ule_extensions( struct dvb_net_priv *p ) } -/** Prepare for a new ULE SNDU: reset the decoder state. */ +/* Prepare for a new ULE SNDU: reset the decoder state. */ static inline void reset_ule( struct dvb_net_priv *p ) { p->ule_skb = NULL; @@ -304,7 +305,7 @@ static inline void reset_ule( struct dvb_net_priv *p ) p->ule_bridged = 0; } -/** +/* * Decode ULE SNDUs according to draft-ietf-ipdvb-ule-03.txt from a sequence of * TS cells of a single PID. */ @@ -1005,7 +1006,7 @@ static int dvb_net_sec_callback(const u8 *buffer1, size_t buffer1_len, { struct net_device *dev = filter->priv; - /** + /* * we rely on the DVB API definition where exactly one complete * section is delivered in buffer1 */ -- cgit v1.2.3 From 64dc6829a0080e3c8e70d52a98e9b0e30d968bd8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:23:07 -0500 Subject: media: ir-nec-decoder: fix kernel-doc parameters Some parameters aren't correctly identified, as noticed by those warnings: drivers/media/rc/ir-nec-decoder.c:49: warning: No description found for parameter 'ev' drivers/media/rc/ir-nec-decoder.c:49: warning: Excess function parameter 'duration' description in 'ir_nec_decode' drivers/media/rc/ir-nec-decoder.c:189: warning: Excess function parameter 'raw' description in 'ir_nec_scancode_to_raw' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/ir-nec-decoder.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/ir-nec-decoder.c b/drivers/media/rc/ir-nec-decoder.c index a95d09acc22a..6880c190dcd2 100644 --- a/drivers/media/rc/ir-nec-decoder.c +++ b/drivers/media/rc/ir-nec-decoder.c @@ -41,7 +41,7 @@ enum nec_state { /** * ir_nec_decode() - Decode one NEC pulse or space * @dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the pulse violates the state machine */ @@ -183,7 +183,6 @@ static int ir_nec_decode(struct rc_dev *dev, struct ir_raw_event ev) * ir_nec_scancode_to_raw() - encode an NEC scancode ready for modulation. * @protocol: specific protocol to use * @scancode: a single NEC scancode. - * @raw: raw data to be modulated. */ static u32 ir_nec_scancode_to_raw(enum rc_proto protocol, u32 scancode) { -- cgit v1.2.3 From 255940e642387ffe886fd881ffc9917f31fe0564 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:27:54 -0500 Subject: media: imon: don't use kernel-doc "/**" markups The function documentation here doesn't follow kernel-doc, as parameters aren't documented. So, stop abusing on "/**" markups. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/imon.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index b25b35b3f6da..eb943e862515 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -492,7 +492,7 @@ static void free_imon_context(struct imon_context *ictx) dev_dbg(dev, "%s: iMON context freed\n", __func__); } -/** +/* * Called when the Display device (e.g. /dev/lcd0) * is opened by the application. */ @@ -542,7 +542,7 @@ exit: return retval; } -/** +/* * Called when the display device (e.g. /dev/lcd0) * is closed by the application. */ @@ -575,7 +575,7 @@ static int display_close(struct inode *inode, struct file *file) return retval; } -/** +/* * Sends a packet to the device -- this function must be called with * ictx->lock held, or its unlock/lock sequence while waiting for tx * to complete can/will lead to a deadlock. @@ -664,7 +664,7 @@ static int send_packet(struct imon_context *ictx) return retval; } -/** +/* * Sends an associate packet to the iMON 2.4G. * * This might not be such a good idea, since it has an id collision with @@ -694,7 +694,7 @@ static int send_associate_24g(struct imon_context *ictx) return retval; } -/** +/* * Sends packets to setup and show clock on iMON display * * Arguments: year - last 2 digits of year, month - 1..12, @@ -781,7 +781,7 @@ static int send_set_imon_clock(struct imon_context *ictx, return retval; } -/** +/* * These are the sysfs functions to handle the association on the iMON 2.4G LT. */ static ssize_t show_associate_remote(struct device *d, @@ -823,7 +823,7 @@ static ssize_t store_associate_remote(struct device *d, return count; } -/** +/* * sysfs functions to control internal imon clock */ static ssize_t show_imon_clock(struct device *d, @@ -923,7 +923,7 @@ static const struct attribute_group imon_rf_attr_group = { .attrs = imon_rf_sysfs_entries }; -/** +/* * Writes data to the VFD. The iMON VFD is 2x16 characters * and requires data in 5 consecutive USB interrupt packets, * each packet but the last carrying 7 bytes. @@ -1008,7 +1008,7 @@ exit: return (!retval) ? n_bytes : retval; } -/** +/* * Writes data to the LCD. The iMON OEM LCD screen expects 8-byte * packets. We accept data as 16 hexadecimal digits, followed by a * newline (to make it easy to drive the device from a command-line @@ -1066,7 +1066,7 @@ exit: return (!retval) ? n_bytes : retval; } -/** +/* * Callback function for USB core API: transmit data */ static void usb_tx_callback(struct urb *urb) @@ -1087,7 +1087,7 @@ static void usb_tx_callback(struct urb *urb) complete(&ictx->tx.finished); } -/** +/* * report touchscreen input */ static void imon_touch_display_timeout(struct timer_list *t) @@ -1103,7 +1103,7 @@ static void imon_touch_display_timeout(struct timer_list *t) input_sync(ictx->touch); } -/** +/* * iMON IR receivers support two different signal sets -- those used by * the iMON remotes, and those used by the Windows MCE remotes (which is * really just RC-6), but only one or the other at a time, as the signals @@ -1191,7 +1191,7 @@ static inline int tv2int(const struct timeval *a, const struct timeval *b) return sec; } -/** +/* * The directional pad behaves a bit differently, depending on whether this is * one of the older ffdc devices or a newer device. Newer devices appear to * have a higher resolution matrix for more precise mouse movement, but it @@ -1543,7 +1543,7 @@ static void imon_pad_to_keys(struct imon_context *ictx, unsigned char *buf) } } -/** +/* * figure out if these is a press or a release. We don't actually * care about repeats, as those will be auto-generated within the IR * subsystem for repeating scancodes. @@ -1592,10 +1592,10 @@ static int imon_parse_press_type(struct imon_context *ictx, return press_type; } -/** +/* * Process the incoming packet */ -/** +/* * Convert bit count to time duration (in us) and submit * the value to lirc_dev. */ @@ -1608,7 +1608,7 @@ static void submit_data(struct imon_context *context) ir_raw_event_store_with_filter(context->rdev, &ev); } -/** +/* * Process the incoming packet */ static void imon_incoming_ir_raw(struct imon_context *context, @@ -1831,7 +1831,7 @@ not_input_data: } } -/** +/* * Callback function for USB core API: receive data */ static void usb_rx_callback_intf0(struct urb *urb) @@ -2485,7 +2485,7 @@ static void imon_init_display(struct imon_context *ictx, } -/** +/* * Callback function for USB core API: Probe */ static int imon_probe(struct usb_interface *interface, @@ -2583,7 +2583,7 @@ fail: return ret; } -/** +/* * Callback function for USB core API: disconnect */ static void imon_disconnect(struct usb_interface *interface) -- cgit v1.2.3 From 2a87af6ba1b9df4dda91d7e1a7d750f295ce1e57 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 27 Nov 2017 10:38:03 -0500 Subject: media: videobuf2: don't use kernel-doc "/**" markups While it would be very cool to have those functions using kernel-doc markups, the reality right now is that they don't follow kernel-doc rules, as parameters aren't documented. So, stop abusing on "/**" markups. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/videobuf2-core.c | 56 ++++++++++++++++---------------- drivers/media/v4l2-core/videobuf2-v4l2.c | 10 +++--- 2 files changed, 33 insertions(+), 33 deletions(-) (limited to 'drivers') diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index cb115ba6a1d2..a8589d96ef72 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -188,7 +188,7 @@ module_param(debug, int, 0644); static void __vb2_queue_cancel(struct vb2_queue *q); static void __enqueue_in_driver(struct vb2_buffer *vb); -/** +/* * __vb2_buf_mem_alloc() - allocate video memory for the given buffer */ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb) @@ -229,7 +229,7 @@ free: return ret; } -/** +/* * __vb2_buf_mem_free() - free memory of the given buffer */ static void __vb2_buf_mem_free(struct vb2_buffer *vb) @@ -243,7 +243,7 @@ static void __vb2_buf_mem_free(struct vb2_buffer *vb) } } -/** +/* * __vb2_buf_userptr_put() - release userspace memory associated with * a USERPTR buffer */ @@ -258,7 +258,7 @@ static void __vb2_buf_userptr_put(struct vb2_buffer *vb) } } -/** +/* * __vb2_plane_dmabuf_put() - release memory associated with * a DMABUF shared plane */ @@ -277,7 +277,7 @@ static void __vb2_plane_dmabuf_put(struct vb2_buffer *vb, struct vb2_plane *p) p->dbuf_mapped = 0; } -/** +/* * __vb2_buf_dmabuf_put() - release memory associated with * a DMABUF shared buffer */ @@ -289,7 +289,7 @@ static void __vb2_buf_dmabuf_put(struct vb2_buffer *vb) __vb2_plane_dmabuf_put(vb, &vb->planes[plane]); } -/** +/* * __setup_offsets() - setup unique offsets ("cookies") for every plane in * the buffer. */ @@ -317,7 +317,7 @@ static void __setup_offsets(struct vb2_buffer *vb) } } -/** +/* * __vb2_queue_alloc() - allocate videobuf buffer structures and (for MMAP type) * video buffer memory for all buffers/planes on the queue and initializes the * queue @@ -386,7 +386,7 @@ static int __vb2_queue_alloc(struct vb2_queue *q, enum vb2_memory memory, return buffer; } -/** +/* * __vb2_free_mem() - release all video buffer memory for a given queue */ static void __vb2_free_mem(struct vb2_queue *q, unsigned int buffers) @@ -410,7 +410,7 @@ static void __vb2_free_mem(struct vb2_queue *q, unsigned int buffers) } } -/** +/* * __vb2_queue_free() - free buffers at the end of the queue - video memory and * related information, if no buffers are left return the queue to an * uninitialized state. Might be called even if the queue has already been freed. @@ -544,7 +544,7 @@ bool vb2_buffer_in_use(struct vb2_queue *q, struct vb2_buffer *vb) } EXPORT_SYMBOL(vb2_buffer_in_use); -/** +/* * __buffers_in_use() - return true if any buffers on the queue are in use and * the queue cannot be freed (by the means of REQBUFS(0)) call */ @@ -564,7 +564,7 @@ void vb2_core_querybuf(struct vb2_queue *q, unsigned int index, void *pb) } EXPORT_SYMBOL_GPL(vb2_core_querybuf); -/** +/* * __verify_userptr_ops() - verify that all memory operations required for * USERPTR queue type have been provided */ @@ -577,7 +577,7 @@ static int __verify_userptr_ops(struct vb2_queue *q) return 0; } -/** +/* * __verify_mmap_ops() - verify that all memory operations required for * MMAP queue type have been provided */ @@ -590,7 +590,7 @@ static int __verify_mmap_ops(struct vb2_queue *q) return 0; } -/** +/* * __verify_dmabuf_ops() - verify that all memory operations required for * DMABUF queue type have been provided */ @@ -953,7 +953,7 @@ void vb2_discard_done(struct vb2_queue *q) } EXPORT_SYMBOL_GPL(vb2_discard_done); -/** +/* * __prepare_mmap() - prepare an MMAP buffer */ static int __prepare_mmap(struct vb2_buffer *vb, const void *pb) @@ -966,7 +966,7 @@ static int __prepare_mmap(struct vb2_buffer *vb, const void *pb) return ret ? ret : call_vb_qop(vb, buf_prepare, vb); } -/** +/* * __prepare_userptr() - prepare a USERPTR buffer */ static int __prepare_userptr(struct vb2_buffer *vb, const void *pb) @@ -1082,7 +1082,7 @@ err: return ret; } -/** +/* * __prepare_dmabuf() - prepare a DMABUF buffer */ static int __prepare_dmabuf(struct vb2_buffer *vb, const void *pb) @@ -1215,7 +1215,7 @@ err: return ret; } -/** +/* * __enqueue_in_driver() - enqueue a vb2_buffer in driver for processing */ static void __enqueue_in_driver(struct vb2_buffer *vb) @@ -1298,7 +1298,7 @@ int vb2_core_prepare_buf(struct vb2_queue *q, unsigned int index, void *pb) } EXPORT_SYMBOL_GPL(vb2_core_prepare_buf); -/** +/* * vb2_start_streaming() - Attempt to start streaming. * @q: videobuf2 queue * @@ -1427,7 +1427,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb) } EXPORT_SYMBOL_GPL(vb2_core_qbuf); -/** +/* * __vb2_wait_for_done_vb() - wait for a buffer to become available * for dequeuing * @@ -1502,7 +1502,7 @@ static int __vb2_wait_for_done_vb(struct vb2_queue *q, int nonblocking) return 0; } -/** +/* * __vb2_get_done_vb() - get a buffer ready for dequeuing * * Will sleep if required for nonblocking == false. @@ -1553,7 +1553,7 @@ int vb2_wait_for_all_buffers(struct vb2_queue *q) } EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers); -/** +/* * __vb2_dqbuf() - bring back the buffer to the DEQUEUED state */ static void __vb2_dqbuf(struct vb2_buffer *vb) @@ -1625,7 +1625,7 @@ int vb2_core_dqbuf(struct vb2_queue *q, unsigned int *pindex, void *pb, } EXPORT_SYMBOL_GPL(vb2_core_dqbuf); -/** +/* * __vb2_queue_cancel() - cancel and stop (pause) streaming * * Removes all queued buffers from driver's queue and all buffers queued by @@ -1773,7 +1773,7 @@ int vb2_core_streamoff(struct vb2_queue *q, unsigned int type) } EXPORT_SYMBOL_GPL(vb2_core_streamoff); -/** +/* * __find_plane_by_offset() - find plane associated with the given offset off */ static int __find_plane_by_offset(struct vb2_queue *q, unsigned long off, @@ -2104,7 +2104,7 @@ unsigned int vb2_core_poll(struct vb2_queue *q, struct file *file, } EXPORT_SYMBOL_GPL(vb2_core_poll); -/** +/* * struct vb2_fileio_buf - buffer context used by file io emulator * * vb2 provides a compatibility layer and emulator of file io (read and @@ -2118,7 +2118,7 @@ struct vb2_fileio_buf { unsigned int queued:1; }; -/** +/* * struct vb2_fileio_data - queue context used by file io emulator * * @cur_index: the index of the buffer currently being read from or @@ -2155,7 +2155,7 @@ struct vb2_fileio_data { unsigned write_immediately:1; }; -/** +/* * __vb2_init_fileio() - initialize file io emulator * @q: videobuf2 queue * @read: mode selector (1 means read, 0 means write) @@ -2274,7 +2274,7 @@ err_kfree: return ret; } -/** +/* * __vb2_cleanup_fileio() - free resourced used by file io emulator * @q: videobuf2 queue */ @@ -2293,7 +2293,7 @@ static int __vb2_cleanup_fileio(struct vb2_queue *q) return 0; } -/** +/* * __vb2_perform_fileio() - perform a single file io (read or write) operation * @q: videobuf2 queue * @data: pointed to target userspace buffer diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 0c0669976bdc..4075314a6989 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -49,7 +49,7 @@ module_param(debug, int, 0644); #define V4L2_BUFFER_OUT_FLAGS (V4L2_BUF_FLAG_PFRAME | V4L2_BUF_FLAG_BFRAME | \ V4L2_BUF_FLAG_KEYFRAME | V4L2_BUF_FLAG_TIMECODE) -/** +/* * __verify_planes_array() - verify that the planes array passed in struct * v4l2_buffer from userspace can be safely used */ @@ -78,7 +78,7 @@ static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb) return __verify_planes_array(vb, pb); } -/** +/* * __verify_length() - Verify that the bytesused value for each plane fits in * the plane length and that the data offset doesn't exceed the bytesused value. */ @@ -181,7 +181,7 @@ static int vb2_queue_or_prepare_buf(struct vb2_queue *q, struct v4l2_buffer *b, return __verify_planes_array(q->bufs[b->index], b); } -/** +/* * __fill_v4l2_buffer() - fill in a struct v4l2_buffer with information to be * returned to userspace */ @@ -286,7 +286,7 @@ static void __fill_v4l2_buffer(struct vb2_buffer *vb, void *pb) q->last_buffer_dequeued = true; } -/** +/* * __fill_vb2_buffer() - fill a vb2_buffer with information provided in a * v4l2_buffer by the userspace. It also verifies that struct * v4l2_buffer has a valid number of planes. @@ -446,7 +446,7 @@ static const struct vb2_buf_ops v4l2_buf_ops = { .copy_timestamp = __copy_timestamp, }; -/** +/* * vb2_querybuf() - query video buffer information * @q: videobuf queue * @b: buffer struct passed from userspace to vidioc_querybuf handler -- cgit v1.2.3 From 04226916d2360f56d57ad00bc48d2d1854d1e0b0 Mon Sep 17 00:00:00 2001 From: Icenowy Zheng Date: Sun, 16 Apr 2017 02:51:16 -0400 Subject: media: usbtv: add a new usbid A new usbid of UTV007 is found in a newly bought device. The usbid is 1f71:3301. The ID on the chip is: UTV007 A89029.1 1520L18K1 Both video and audio is tested with the modified usbtv driver. Signed-off-by: Icenowy Zheng Acked-by: Lubomir Rintel Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/usbtv/usbtv-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/usb/usbtv/usbtv-core.c b/drivers/media/usb/usbtv/usbtv-core.c index b55b79b8e921..127f8a0c098b 100644 --- a/drivers/media/usb/usbtv/usbtv-core.c +++ b/drivers/media/usb/usbtv/usbtv-core.c @@ -144,6 +144,7 @@ static void usbtv_disconnect(struct usb_interface *intf) static const struct usb_device_id usbtv_id_table[] = { { USB_DEVICE(0x1b71, 0x3002) }, + { USB_DEVICE(0x1f71, 0x3301) }, {} }; MODULE_DEVICE_TABLE(usb, usbtv_id_table); -- cgit v1.2.3 From 762ff4678e89a5e3f8b2237533e04d3ef2737e78 Mon Sep 17 00:00:00 2001 From: Lu Baolu Date: Tue, 28 Nov 2017 12:40:59 +0800 Subject: USB: serial: usb_debug: add new USB device id USB vendor id and product id for Linux USB Debug Target is added. Signed-off-by: Lu Baolu Cc: stable Signed-off-by: Johan Hovold --- drivers/usb/serial/usb_debug.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index ab5a2ac4993a..aaf4813e4971 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c @@ -31,12 +31,14 @@ static const struct usb_device_id id_table[] = { }; static const struct usb_device_id dbc_id_table[] = { + { USB_DEVICE(0x1d6b, 0x0010) }, { USB_DEVICE(0x1d6b, 0x0011) }, { }, }; static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(0x0525, 0x127a) }, + { USB_DEVICE(0x1d6b, 0x0010) }, { USB_DEVICE(0x1d6b, 0x0011) }, { }, }; -- cgit v1.2.3 From b2fc059fa549fe6881d4c1f8d698b0f50bcd16ec Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 14 Nov 2017 16:18:28 +0000 Subject: usb: gadget: don't dereference g until after it has been null checked Avoid dereferencing pointer g until after g has been sanity null checked; move the assignment of cdev much later when it is required into a more local scope. Detected by CoverityScan, CID#1222135 ("Dereference before null check") Fixes: b785ea7ce662 ("usb: gadget: composite: fix ep->maxburst initialization") Signed-off-by: Colin Ian King Signed-off-by: Felipe Balbi --- drivers/usb/gadget/composite.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index eec14e6ed20b..77c7ecca816a 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -146,7 +146,6 @@ int config_ep_by_speed(struct usb_gadget *g, struct usb_function *f, struct usb_ep *_ep) { - struct usb_composite_dev *cdev = get_gadget_data(g); struct usb_endpoint_descriptor *chosen_desc = NULL; struct usb_descriptor_header **speed_desc = NULL; @@ -226,8 +225,12 @@ ep_found: _ep->maxburst = comp_desc->bMaxBurst + 1; break; default: - if (comp_desc->bMaxBurst != 0) + if (comp_desc->bMaxBurst != 0) { + struct usb_composite_dev *cdev; + + cdev = get_gadget_data(g); ERROR(cdev, "ep0 bMaxBurst must be 0\n"); + } _ep->maxburst = 1; break; } -- cgit v1.2.3 From a58204ab91ad8cae4d8474aa0ba5d1fc504860c9 Mon Sep 17 00:00:00 2001 From: Yoshihiro Shimoda Date: Mon, 13 Nov 2017 17:59:18 +0900 Subject: usb: gadget: udc: renesas_usb3: fix number of the pipes This controller on R-Car Gen3 has 6 pipes that included PIPE 0 for control actually. But, the datasheet has error in writing as it has 31 pipes. (However, the previous code defined 30 pipes wrongly...) Anyway, this patch fixes it. Fixes: 746bfe63bba3 ("usb: gadget: renesas_usb3: add support for Renesas USB3.0 peripheral controller") Cc: # v4.5+ Signed-off-by: Yoshihiro Shimoda Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/renesas_usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/udc/renesas_usb3.c b/drivers/usb/gadget/udc/renesas_usb3.c index bc37f40baacf..6e87af248367 100644 --- a/drivers/usb/gadget/udc/renesas_usb3.c +++ b/drivers/usb/gadget/udc/renesas_usb3.c @@ -252,7 +252,7 @@ #define USB3_EP0_SS_MAX_PACKET_SIZE 512 #define USB3_EP0_HSFS_MAX_PACKET_SIZE 64 #define USB3_EP0_BUF_SIZE 8 -#define USB3_MAX_NUM_PIPES 30 +#define USB3_MAX_NUM_PIPES 6 /* This includes PIPE 0 */ #define USB3_WAIT_US 3 #define USB3_DMA_NUM_SETTING_AREA 4 /* -- cgit v1.2.3 From 7a9618a22aadffb55027d665491adf466bced61a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 31 Oct 2017 11:03:19 -0700 Subject: usb: gadget: allow to enable legacy drivers without USB_ETH Considerable time ago the legacy gadget menu was added inside the USB_ETH choice. I think this was a mistake and that the legacy gadget menu should have been added after "endchoice" instead of before. Hence this patch. Fixes: commit 8443f2d2b778 ("usb: gadget: Gadget directory cleanup - group legacy gadgets") Signed-off-by: Bart Van Assche Reviewed-by: Hannes Reinecke Cc: Nicholas Bellinger Cc: Andrzej Pietrasiewicz Cc: linux-usb@vger.kernel.org Signed-off-by: Felipe Balbi --- drivers/usb/gadget/Kconfig | 4 ++-- drivers/usb/gadget/legacy/Kconfig | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig index 31cce7805eb2..0a19a76645ad 100644 --- a/drivers/usb/gadget/Kconfig +++ b/drivers/usb/gadget/Kconfig @@ -508,8 +508,8 @@ choice controller, and the relevant drivers for each function declared by the device. -source "drivers/usb/gadget/legacy/Kconfig" - endchoice +source "drivers/usb/gadget/legacy/Kconfig" + endif # USB_GADGET diff --git a/drivers/usb/gadget/legacy/Kconfig b/drivers/usb/gadget/legacy/Kconfig index a12fb459dbd9..9570bbeced4f 100644 --- a/drivers/usb/gadget/legacy/Kconfig +++ b/drivers/usb/gadget/legacy/Kconfig @@ -13,6 +13,14 @@ # both kinds of controller can also support "USB On-the-Go" (CONFIG_USB_OTG). # +menuconfig USB_GADGET_LEGACY + bool "Legacy USB Gadget Support" + help + Legacy USB gadgets are USB gadgets that do not use the USB gadget + configfs interface. + +if USB_GADGET_LEGACY + config USB_ZERO tristate "Gadget Zero (DEVELOPMENT)" select USB_LIBCOMPOSITE @@ -490,3 +498,5 @@ config USB_G_WEBCAM Say "y" to link the driver statically, or "m" to build a dynamically linked module called "g_webcam". + +endif -- cgit v1.2.3 From a4f0927ef588cf62bb864707261482c874352942 Mon Sep 17 00:00:00 2001 From: Roger Quadros Date: Tue, 31 Oct 2017 15:56:29 +0200 Subject: usb: gadget: core: Fix ->udc_set_speed() speed handling Currently UDC core calls ->udc_set_speed() with the speed parameter containing the maximum speed supported by the gadget function driver. This might very well be more than that supported by the UDC controller driver. Select the lesser of the 2 speeds so both UDC and gadget function driver are operating within limits. This fixes PHY Erratic errors and 2 second enumeration delay on TI's AM437x platforms. Fixes: 6099eca796ae ("usb: gadget: core: introduce ->udc_set_speed() method") Cc: # v4.13+ Reported-by: Dylan Howey Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi --- drivers/usb/gadget/udc/core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/udc/core.c b/drivers/usb/gadget/udc/core.c index 61422d624ad0..93eff7dec2f5 100644 --- a/drivers/usb/gadget/udc/core.c +++ b/drivers/usb/gadget/udc/core.c @@ -1069,8 +1069,12 @@ static inline void usb_gadget_udc_stop(struct usb_udc *udc) static inline void usb_gadget_udc_set_speed(struct usb_udc *udc, enum usb_device_speed speed) { - if (udc->gadget->ops->udc_set_speed) - udc->gadget->ops->udc_set_speed(udc->gadget, speed); + if (udc->gadget->ops->udc_set_speed) { + enum usb_device_speed s; + + s = min(speed, udc->gadget->max_speed); + udc->gadget->ops->udc_set_speed(udc->gadget, s); + } } /** -- cgit v1.2.3 From a3acc696085e112733d191a77b106e67a4fa110b Mon Sep 17 00:00:00 2001 From: John Keeping Date: Mon, 27 Nov 2017 18:15:40 +0000 Subject: usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT The specification says that the Reserved1 field in OS_DESC_EXT_COMPAT must have the value "1", but when this feature was first implemented we rejected any non-zero values. This was adjusted to accept all non-zero values (while now rejecting zero) in commit 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT"), but that breaks any userspace programs that worked previously by returning EINVAL when Reserved1 == 0 which was previously the only value that succeeded! If we just set the field to "1" ourselves, both old and new userspace programs continue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: Signed-off-by: John Keeping Signed-off-by: Felipe Balbi --- drivers/usb/gadget/function/f_fs.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 9aa457b53e01..b6cf5ab5a0a1 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -2282,9 +2282,18 @@ static int __ffs_data_do_os_desc(enum ffs_os_desc_type type, int i; if (len < sizeof(*d) || - d->bFirstInterfaceNumber >= ffs->interfaces_count || - !d->Reserved1) + d->bFirstInterfaceNumber >= ffs->interfaces_count) return -EINVAL; + if (d->Reserved1 != 1) { + /* + * According to the spec, Reserved1 must be set to 1 + * but older kernels incorrectly rejected non-zero + * values. We fix it here to avoid returning EINVAL + * in response to values we used to accept. + */ + pr_debug("usb_ext_compat_desc::Reserved1 forced to 1\n"); + d->Reserved1 = 1; + } for (i = 0; i < ARRAY_SIZE(d->Reserved2); ++i) if (d->Reserved2[i]) return -EINVAL; -- cgit v1.2.3 From 02d69c0359f7069c626cef6541f94a3a22dc5ed9 Mon Sep 17 00:00:00 2001 From: Matthew Giassa Date: Sat, 18 Nov 2017 08:26:17 -0800 Subject: staging: comedi: ni_atmio: fix license warning. Resolving license check warning for drivers/staging/comedi. Added the license definitions present in the rest of the module and made sure it's aligned with the license (GPL) in the comments for the affected file (ni_atmio.c). Original warning: WARNING: modpost: missing MODULE_LICENSE() in drivers/staging/comedi//drivers/ni_atmio.o see include/linux/module.h for more information. No longer present after change. Signed-off-by: Matthew Giassa Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/drivers/ni_atmio.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/staging/comedi/drivers/ni_atmio.c b/drivers/staging/comedi/drivers/ni_atmio.c index 2d62a8c57332..ae6ed96d7874 100644 --- a/drivers/staging/comedi/drivers/ni_atmio.c +++ b/drivers/staging/comedi/drivers/ni_atmio.c @@ -361,3 +361,8 @@ static struct comedi_driver ni_atmio_driver = { .detach = ni_atmio_detach, }; module_comedi_driver(ni_atmio_driver); + +MODULE_AUTHOR("Comedi http://www.comedi.org"); +MODULE_DESCRIPTION("Comedi low-level driver"); +MODULE_LICENSE("GPL"); + -- cgit v1.2.3 From c5f39d07860c35e5e4c63188139465af790f86ce Mon Sep 17 00:00:00 2001 From: Gilad Ben-Yossef Date: Thu, 9 Nov 2017 09:16:09 +0000 Subject: staging: ccree: fix leak of import() after init() crypto_ahash_import() may be called either after crypto_ahash_init() or without such call. Right now we always internally call init() as part of import(), thus leaking memory and mappings if the user has already called init() herself. Fix this by only calling init() internally if the state is not already initialized. Fixes: commit 454527d0d94f ("staging: ccree: fix hash import/export") Cc: stable Signed-off-by: Gilad Ben-Yossef Reviewed-by: Dan Carpenter Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ccree/ssi_hash.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/ccree/ssi_hash.c b/drivers/staging/ccree/ssi_hash.c index d79090ed7f9c..1799d3f26a9e 100644 --- a/drivers/staging/ccree/ssi_hash.c +++ b/drivers/staging/ccree/ssi_hash.c @@ -1778,9 +1778,12 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in) } in += sizeof(u32); - rc = ssi_hash_init(state, ctx); - if (rc) - goto out; + /* call init() to allocate bufs if the user hasn't */ + if (!state->digest_buff) { + rc = ssi_hash_init(state, ctx); + if (rc) + goto out; + } dma_sync_single_for_cpu(dev, state->digest_buff_dma_addr, ctx->inter_digestsize, DMA_BIDIRECTIONAL); -- cgit v1.2.3 From b77992d2df9e47144354d1b25328b180afa33442 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Sat, 25 Nov 2017 13:32:38 -0600 Subject: staging: rtl8188eu: Fix incorrect response to SIOCGIWESSID When not associated with an AP, wifi device drivers should respond to the SIOCGIWESSID ioctl with a zero-length string for the SSID, which is the behavior expected by dhcpcd. Currently, this driver returns an error code (-1) from the ioctl call, which causes dhcpcd to assume that the device is not a wireless interface and therefore it fails to work correctly with it thereafter. This problem was reported and tested at https://github.com/lwfinger/rtl8188eu/issues/234. Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtl8188eu/os_dep/ioctl_linux.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c index c0664dc80bf2..446310775e90 100644 --- a/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c +++ b/drivers/staging/rtl8188eu/os_dep/ioctl_linux.c @@ -1395,19 +1395,13 @@ static int rtw_wx_get_essid(struct net_device *dev, if ((check_fwstate(pmlmepriv, _FW_LINKED)) || (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) { len = pcur_bss->Ssid.SsidLength; - - wrqu->essid.length = len; - memcpy(extra, pcur_bss->Ssid.Ssid, len); - - wrqu->essid.flags = 1; } else { - ret = -1; - goto exit; + len = 0; + *extra = 0; } - -exit: - + wrqu->essid.length = len; + wrqu->essid.flags = 1; return ret; } -- cgit v1.2.3 From 0590cdfead8cd6319cc58b5dbe8ab9fbaabae131 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Fri, 17 Nov 2017 09:50:10 +0200 Subject: staging: octeon-usb: use __delay() instead of cvmx_wait() Commit edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait() everywhere.") deleted cvmx_wait() but forgot to update OCTEON USB staging driver. Fix that to allow driver build. Fixes: edf188bee1d9 ("MIPS: Octeon: Remove usage of cvmx_wait() everywhere.") Signed-off-by: Aaro Koskinen Reviewed-by: James Hogan Signed-off-by: Greg Kroah-Hartman --- drivers/staging/octeon-usb/octeon-hcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c index 068aece25d37..cded30f145aa 100644 --- a/drivers/staging/octeon-usb/octeon-hcd.c +++ b/drivers/staging/octeon-usb/octeon-hcd.c @@ -394,7 +394,7 @@ struct octeon_hcd { result = -1; \ break; \ } else \ - cvmx_wait(100); \ + __delay(100); \ } \ } while (0); \ result; }) @@ -774,7 +774,7 @@ retry: usbn_clk_ctl.s.hclk_rst = 1; cvmx_write64_uint64(CVMX_USBNX_CLK_CTL(usb->index), usbn_clk_ctl.u64); /* 2e. Wait 64 core-clock cycles for HCLK to stabilize */ - cvmx_wait(64); + __delay(64); /* * 3. Program the power-on reset field in the USBN clock-control * register: @@ -795,7 +795,7 @@ retry: cvmx_write64_uint64(CVMX_USBNX_USBP_CTL_STATUS(usb->index), usbn_usbp_ctl_status.u64); /* 6. Wait 10 cycles */ - cvmx_wait(10); + __delay(10); /* * 7. Clear ATE_RESET field in the USBN clock-control register: * USBN_USBP_CTL_STATUS[ATE_RESET] = 0 -- cgit v1.2.3 From a7c42106ead7041b99662a125b408deb68a3e6aa Mon Sep 17 00:00:00 2001 From: Heikki Krogerus Date: Tue, 14 Nov 2017 14:45:27 +0300 Subject: usb: add user selectable option for the whole USB Type-C Support It is more clear from user perspective to wrap the whole USB Type-C support under a single option that the user can select, then it is to always ask the user for every USB Type-C and USB Power Delivery driver separately. Reported-by: Linus Torvalds Signed-off-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/Kconfig | 54 +++++++++++++++++++++++++++++++++++------- drivers/usb/typec/ucsi/Kconfig | 1 - 2 files changed, 46 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/typec/Kconfig b/drivers/usb/typec/Kconfig index 465d7da849c3..bcb2744c5977 100644 --- a/drivers/usb/typec/Kconfig +++ b/drivers/usb/typec/Kconfig @@ -1,13 +1,53 @@ -menu "USB Power Delivery and Type-C drivers" +menuconfig TYPEC + tristate "USB Type-C Support" + help + USB Type-C Specification defines a cable and connector for USB where + only one type of plug is supported on both ends, i.e. there will not + be Type-A plug on one end of the cable and Type-B plug on the other. + Determination of the host-to-device relationship happens through a + specific Configuration Channel (CC) which goes through the USB Type-C + cable. The Configuration Channel may also be used to detect optional + Accessory Modes - Analog Audio and Debug - and if USB Power Delivery + is supported, the Alternate Modes, where the connector is used for + something else then USB communication. + + USB Power Delivery Specification defines a protocol that can be used + to negotiate the voltage and current levels with the connected + partners. USB Power Delivery allows higher voltages then the normal + 5V, up to 20V, and current up to 5A over the cable. The USB Power + Delivery protocol is also used to negotiate the optional Alternate + Modes when they are supported. USB Power Delivery does not depend on + USB Type-C connector, however it is mostly used together with USB + Type-C connectors. + + USB Type-C and USB Power Delivery Specifications define a set of state + machines that need to be implemented in either software or firmware. + Simple USB Type-C PHYs, for example USB Type-C Port Controller + Interface Specification compliant "Port Controllers" need the state + machines to be handled in the OS, but stand-alone USB Type-C and Power + Delivery controllers handle the state machines inside their firmware. + The USB Type-C and Power Delivery controllers usually function + autonomously, and do not necessarily require drivers. + + Enable this configurations option if you have USB Type-C connectors on + your system and 1) you know your USB Type-C hardware requires OS + control (a driver) to function, or 2) if you need to be able to read + the status of the USB Type-C ports in your system, or 3) if you need + to be able to swap the power role (decide are you supplying or + consuming power over the cable) or data role (host or device) when + both roles are supported. + + For more information, see the kernel documentation for USB Type-C + Connector Class API (Documentation/driver-api/usb/typec.rst) + + and ABI (Documentation/ABI/testing/sysfs-class-typec). -config TYPEC - tristate +if TYPEC config TYPEC_TCPM tristate "USB Type-C Port Controller Manager" depends on USB - select TYPEC help The Type-C Port Controller Manager provides a USB PD and USB Type-C state machine for use with Type-C Port Controllers. @@ -22,7 +62,6 @@ config TYPEC_WCOVE depends on INTEL_SOC_PMIC depends on INTEL_PMC_IPC depends on BXT_WC_PMIC_OPREGION - select TYPEC help This driver adds support for USB Type-C detection on Intel Broxton platforms that have Intel Whiskey Cove PMIC. The driver can detect the @@ -31,14 +70,13 @@ config TYPEC_WCOVE To compile this driver as module, choose M here: the module will be called typec_wcove -endif +endif # TYPEC_TCPM source "drivers/usb/typec/ucsi/Kconfig" config TYPEC_TPS6598X tristate "TI TPS6598x USB Power Delivery controller driver" depends on I2C - select TYPEC help Say Y or M here if your system has TI TPS65982 or TPS65983 USB Power Delivery controller. @@ -46,4 +84,4 @@ config TYPEC_TPS6598X If you choose to build this driver as a dynamically linked module, the module will be called tps6598x.ko. -endmenu +endif # TYPEC diff --git a/drivers/usb/typec/ucsi/Kconfig b/drivers/usb/typec/ucsi/Kconfig index d0c31cee4720..e36d6c73c4a4 100644 --- a/drivers/usb/typec/ucsi/Kconfig +++ b/drivers/usb/typec/ucsi/Kconfig @@ -1,7 +1,6 @@ config TYPEC_UCSI tristate "USB Type-C Connector System Software Interface driver" depends on !CPU_BIG_ENDIAN - select TYPEC help USB Type-C Connector System Software Interface (UCSI) is a specification for an interface that allows the operating system to -- cgit v1.2.3 From 446f666da9f019ce2ffd03800995487e79a91462 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Thu, 23 Nov 2017 16:39:52 +0100 Subject: USB: usbfs: Filter flags passed in from user space USBDEVFS_URB_ISO_ASAP must be accepted only for ISO endpoints. Improve sanity checking. Reported-by: Andrey Konovalov Signed-off-by: Oliver Neukum Cc: stable Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/devio.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 705c573d0257..a3fad4ec9870 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1442,14 +1442,18 @@ static int proc_do_submiturb(struct usb_dev_state *ps, struct usbdevfs_urb *uurb int number_of_packets = 0; unsigned int stream_id = 0; void *buf; - - if (uurb->flags & ~(USBDEVFS_URB_ISO_ASAP | - USBDEVFS_URB_SHORT_NOT_OK | + unsigned long mask = USBDEVFS_URB_SHORT_NOT_OK | USBDEVFS_URB_BULK_CONTINUATION | USBDEVFS_URB_NO_FSBR | USBDEVFS_URB_ZERO_PACKET | - USBDEVFS_URB_NO_INTERRUPT)) - return -EINVAL; + USBDEVFS_URB_NO_INTERRUPT; + /* USBDEVFS_URB_ISO_ASAP is a special case */ + if (uurb->type == USBDEVFS_URB_TYPE_ISO) + mask |= USBDEVFS_URB_ISO_ASAP; + + if (uurb->flags & ~mask) + return -EINVAL; + if ((unsigned int)uurb->buffer_length >= USBFS_XFER_MAX) return -EINVAL; if (uurb->buffer_length > 0 && !uurb->buffer) -- cgit v1.2.3 From 33c309ebc797b908029fd3a0851aefe697e9b598 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Sat, 11 Nov 2017 16:31:18 +0100 Subject: USB: ulpi: fix bus-node lookup Fix bus-node lookup during registration, which ended up searching the whole device tree depth-first starting at the parent (or grand parent) rather than just matching on its children. To make things worse, the parent (or grand-parent) node could end being prematurely freed as well. Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") Reported-by: Peter Robinson Reported-by: Stephen Boyd Cc: stable # 4.10 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/usb/common/ulpi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c index 8b351444cc40..9a2ab6751a23 100644 --- a/drivers/usb/common/ulpi.c +++ b/drivers/usb/common/ulpi.c @@ -180,9 +180,9 @@ static int ulpi_of_register(struct ulpi *ulpi) /* Find a ulpi bus underneath the parent or the grandparent */ parent = ulpi->dev.parent; if (parent->of_node) - np = of_find_node_by_name(parent->of_node, "ulpi"); + np = of_get_child_by_name(parent->of_node, "ulpi"); else if (parent->parent && parent->parent->of_node) - np = of_find_node_by_name(parent->parent->of_node, "ulpi"); + np = of_get_child_by_name(parent->parent->of_node, "ulpi"); if (!np) return 0; -- cgit v1.2.3 From 1d5a31582ef046d3b233f0da1a68ae26519b2f0a Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Tue, 7 Nov 2017 16:45:04 +0000 Subject: usb: host: fix incorrect updating of offset The variable temp is incorrectly being updated, instead it should be offset otherwise the loop just reads the same capability value and loops forever. Thanks to Alan Stern for pointing out the correct fix to my original fix. Fix also cleans up clang warning: drivers/usb/host/ehci-dbg.c:840:4: warning: Value stored to 'temp' is never read Fixes: d49d43174400 ("USB: misc ehci updates") Cc: stable Signed-off-by: Colin Ian King Acked-by: Alan Stern Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/ehci-dbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/host/ehci-dbg.c b/drivers/usb/host/ehci-dbg.c index 19f00424f53e..3ed75aaa09d9 100644 --- a/drivers/usb/host/ehci-dbg.c +++ b/drivers/usb/host/ehci-dbg.c @@ -827,7 +827,7 @@ static ssize_t fill_registers_buffer(struct debug_buffer *buf) default: /* unknown */ break; } - temp = (cap >> 8) & 0xff; + offset = (cap >> 8) & 0xff; } } #endif -- cgit v1.2.3 From 81cf4a45360f70528f1f64ba018d61cb5767249a Mon Sep 17 00:00:00 2001 From: Masakazu Mokuno Date: Fri, 10 Nov 2017 01:25:50 +0900 Subject: USB: core: Add type-specific length check of BOS descriptors As most of BOS descriptors are longer in length than their header 'struct usb_dev_cap_header', comparing solely with it is not sufficient to avoid out-of-bounds access to BOS descriptors. This patch adds descriptor type specific length check in usb_get_bos_descriptor() to fix the issue. Signed-off-by: Masakazu Mokuno Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/config.c | 28 ++++++++++++++++++++++++---- include/uapi/linux/usb/ch9.h | 3 +++ 2 files changed, 27 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/core/config.c b/drivers/usb/core/config.c index da8acd980fc6..55b198ba629b 100644 --- a/drivers/usb/core/config.c +++ b/drivers/usb/core/config.c @@ -905,14 +905,25 @@ void usb_release_bos_descriptor(struct usb_device *dev) } } +static const __u8 bos_desc_len[256] = { + [USB_CAP_TYPE_WIRELESS_USB] = USB_DT_USB_WIRELESS_CAP_SIZE, + [USB_CAP_TYPE_EXT] = USB_DT_USB_EXT_CAP_SIZE, + [USB_SS_CAP_TYPE] = USB_DT_USB_SS_CAP_SIZE, + [USB_SSP_CAP_TYPE] = USB_DT_USB_SSP_CAP_SIZE(1), + [CONTAINER_ID_TYPE] = USB_DT_USB_SS_CONTN_ID_SIZE, + [USB_PTM_CAP_TYPE] = USB_DT_USB_PTM_ID_SIZE, +}; + /* Get BOS descriptor set */ int usb_get_bos_descriptor(struct usb_device *dev) { struct device *ddev = &dev->dev; struct usb_bos_descriptor *bos; struct usb_dev_cap_header *cap; + struct usb_ssp_cap_descriptor *ssp_cap; unsigned char *buffer; - int length, total_len, num, i; + int length, total_len, num, i, ssac; + __u8 cap_type; int ret; bos = kzalloc(sizeof(struct usb_bos_descriptor), GFP_KERNEL); @@ -965,7 +976,13 @@ int usb_get_bos_descriptor(struct usb_device *dev) dev->bos->desc->bNumDeviceCaps = i; break; } + cap_type = cap->bDevCapabilityType; length = cap->bLength; + if (bos_desc_len[cap_type] && length < bos_desc_len[cap_type]) { + dev->bos->desc->bNumDeviceCaps = i; + break; + } + total_len -= length; if (cap->bDescriptorType != USB_DT_DEVICE_CAPABILITY) { @@ -973,7 +990,7 @@ int usb_get_bos_descriptor(struct usb_device *dev) continue; } - switch (cap->bDevCapabilityType) { + switch (cap_type) { case USB_CAP_TYPE_WIRELESS_USB: /* Wireless USB cap descriptor is handled by wusb */ break; @@ -986,8 +1003,11 @@ int usb_get_bos_descriptor(struct usb_device *dev) (struct usb_ss_cap_descriptor *)buffer; break; case USB_SSP_CAP_TYPE: - dev->bos->ssp_cap = - (struct usb_ssp_cap_descriptor *)buffer; + ssp_cap = (struct usb_ssp_cap_descriptor *)buffer; + ssac = (le32_to_cpu(ssp_cap->bmAttributes) & + USB_SSP_SUBLINK_SPEED_ATTRIBS) + 1; + if (length >= USB_DT_USB_SSP_CAP_SIZE(ssac)) + dev->bos->ssp_cap = ssp_cap; break; case CONTAINER_ID_TYPE: dev->bos->ss_id = diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 41a0a81b01e6..c4c79aa331bd 100644 --- a/include/uapi/linux/usb/ch9.h +++ b/include/uapi/linux/usb/ch9.h @@ -880,6 +880,8 @@ struct usb_wireless_cap_descriptor { /* Ultra Wide Band */ __u8 bReserved; } __attribute__((packed)); +#define USB_DT_USB_WIRELESS_CAP_SIZE 11 + /* USB 2.0 Extension descriptor */ #define USB_CAP_TYPE_EXT 2 @@ -1072,6 +1074,7 @@ struct usb_ptm_cap_descriptor { __u8 bDevCapabilityType; } __attribute__((packed)); +#define USB_DT_USB_PTM_ID_SIZE 3 /* * The size of the descriptor for the Sublink Speed Attribute Count * (SSAC) specified in bmAttributes[4:0]. -- cgit v1.2.3 From 973593a960ddac0f14f0d8877d2d0abe0afda795 Mon Sep 17 00:00:00 2001 From: Mike Looijmans Date: Thu, 9 Nov 2017 13:16:46 +0100 Subject: usb: hub: Cycle HUB power when initialization fails Sometimes the USB device gets confused about the state of the initialization and the connection fails. In particular, the device thinks that it's already set up and running while the host thinks the device still needs to be configured. To work around this issue, power-cycle the hub's output to issue a sort of "reset" to the device. This makes the device restart its state machine and then the initialization succeeds. This fixes problems where the kernel reports a list of errors like this: usb 1-1.3: device not accepting address 19, error -71 The end result is a non-functioning device. After this patch, the sequence becomes like this: usb 1-1.3: new high-speed USB device number 18 using ci_hdrc usb 1-1.3: device not accepting address 18, error -71 usb 1-1.3: new high-speed USB device number 19 using ci_hdrc usb 1-1.3: device not accepting address 19, error -71 usb 1-1-port3: attempt power cycle usb 1-1.3: new high-speed USB device number 21 using ci_hdrc usb-storage 1-1.3:1.2: USB Mass Storage device detected Signed-off-by: Mike Looijmans Acked-by: Alan Stern Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/hub.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 7ccdd3d4db84..cf7bbcb9a63c 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -4948,6 +4948,15 @@ loop: usb_put_dev(udev); if ((status == -ENOTCONN) || (status == -ENOTSUPP)) break; + + /* When halfway through our retry count, power-cycle the port */ + if (i == (SET_CONFIG_TRIES / 2) - 1) { + dev_info(&port_dev->dev, "attempt power cycle\n"); + usb_hub_set_port_power(hdev, hub, port1, false); + msleep(2 * hub_power_on_good_delay(hub)); + usb_hub_set_port_power(hdev, hub, port1, true); + msleep(hub_power_on_good_delay(hub)); + } } if (hub->hdev->parent || !hcd->driver->port_handed_over || -- cgit v1.2.3 From c9d24f78268be444e803fb2bb138a2f598de9c23 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Fri, 17 Nov 2017 11:00:45 -0800 Subject: usb: build drivers/usb/common/ when USB_SUPPORT is set PHY drivers can use ULPI interfaces when CONFIG_USB (which is host side support) is not enabled, so also build drivers/usb/ when CONFIG_USB_SUPPORT is enabled so that drivers/usb/common/ is built. ERROR: "ulpi_unregister_driver" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "__ulpi_register_driver" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_read" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_write" [drivers/phy/ti/phy-tusb1210.ko] undefined! ERROR: "ulpi_unregister_driver" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! ERROR: "__ulpi_register_driver" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! ERROR: "ulpi_write" [drivers/phy/qualcomm/phy-qcom-usb-hs.ko] undefined! Signed-off-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/Makefile b/drivers/Makefile index 1d034b680431..e06f7f633f73 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -105,6 +105,7 @@ obj-$(CONFIG_TC) += tc/ obj-$(CONFIG_UWB) += uwb/ obj-$(CONFIG_USB_PHY) += usb/ obj-$(CONFIG_USB) += usb/ +obj-$(CONFIG_USB_SUPPORT) += usb/ obj-$(CONFIG_PCI) += usb/ obj-$(CONFIG_USB_GADGET) += usb/ obj-$(CONFIG_OF) += usb/ -- cgit v1.2.3 From e43a12f1793ae1fe006e26fe9327a8840a92233c Mon Sep 17 00:00:00 2001 From: Kai-Heng Feng Date: Tue, 14 Nov 2017 01:31:15 -0500 Subject: usb: quirks: Add no-lpm quirk for KY-688 USB 3.1 Type-C Hub KY-688 USB 3.1 Type-C Hub internally uses a Genesys Logic hub to connect to Realtek r8153. Similar to commit ("7496cfe5431f2 usb: quirks: Add no-lpm quirk for Moshi USB to Ethernet Adapter"), no-lpm can make r8153 ethernet work. Signed-off-by: Kai-Heng Feng Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/core/quirks.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/core/quirks.c b/drivers/usb/core/quirks.c index f1dbab6f798f..a10b346b9777 100644 --- a/drivers/usb/core/quirks.c +++ b/drivers/usb/core/quirks.c @@ -146,6 +146,9 @@ static const struct usb_device_id usb_quirk_list[] = { /* appletouch */ { USB_DEVICE(0x05ac, 0x021a), .driver_info = USB_QUIRK_RESET_RESUME }, + /* Genesys Logic hub, internally used by KY-688 USB 3.1 Type-C Hub */ + { USB_DEVICE(0x05e3, 0x0612), .driver_info = USB_QUIRK_NO_LPM }, + /* Genesys Logic hub, internally used by Moshi USB to Ethernet Adapter */ { USB_DEVICE(0x05e3, 0x0616), .driver_info = USB_QUIRK_NO_LPM }, -- cgit v1.2.3 From 7fee72d5e8f1e7b8d8212e28291b1a0243ecf2f1 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Tue, 14 Nov 2017 19:27:22 +0100 Subject: uas: Always apply US_FL_NO_ATA_1X quirk to Seagate devices We've been adding this as a quirk on a per device basis hoping that newer disk enclosures would do better, but that has not happened, so simply apply this quirk to all Seagate devices. Signed-off-by: Hans de Goede Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/usb/storage/uas-detect.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h index 1fcd758a961f..3734a25e09e5 100644 --- a/drivers/usb/storage/uas-detect.h +++ b/drivers/usb/storage/uas-detect.h @@ -112,6 +112,10 @@ static int uas_use_uas_driver(struct usb_interface *intf, } } + /* All Seagate disk enclosures have broken ATA pass-through support */ + if (le16_to_cpu(udev->descriptor.idVendor) == 0x0bc2) + flags |= US_FL_NO_ATA_1X; + usb_stor_adjust_quirks(udev, &flags); if (flags & US_FL_IGNORE_UAS) { -- cgit v1.2.3 From 3bfd1300abfe3adb18e84a89d97a0e82a22124bb Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Mon, 13 Nov 2017 11:31:31 -0800 Subject: serial: 8250_pci: Add Amazon PCI serial device ID This device will be used in future Amazon EC2 instances as the primary serial port (i.e., data sent to this port will be available via the GetConsoleOuput [1] EC2 API). [1] http://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_GetConsoleOutput.html Cc: stable Signed-off-by: Matt Wilson Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_pci.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index b7e0e3416641..54adf8d56350 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c @@ -5135,6 +5135,9 @@ static const struct pci_device_id serial_pci_tbl[] = { { PCI_DEVICE(0x1601, 0x0800), .driver_data = pbn_b0_4_1250000 }, { PCI_DEVICE(0x1601, 0xa801), .driver_data = pbn_b0_4_1250000 }, + /* Amazon PCI serial device */ + { PCI_DEVICE(0x1d0f, 0x8250), .driver_data = pbn_b0_1_115200 }, + /* * These entries match devices with class COMMUNICATION_SERIAL, * COMMUNICATION_MODEM or COMMUNICATION_MULTISERIAL -- cgit v1.2.3 From 0ff3ab701963a845d52337ded7eebf2d1a14fe00 Mon Sep 17 00:00:00 2001 From: Matt Redfearn Date: Wed, 22 Nov 2017 09:57:28 +0000 Subject: serial: 8250_early: Only set divisor if valid clk & baud If either uartclk or baud are 0, avoid calculating and setting a divisor based on them since the output will almost certainly be garbage. This also allows platforms such as the MIPS generic kernel, which has no way to know a valid BASE_BASE for the board it is actually booted on at compile time, to set BASE_BAUD to 0 and avoid early_8250 setting a bad divisor. This fixes a regression caused by commit 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure"), which changed the behavior of of_setup_earlycon such that it sets a baud rate in the earlycon structure where previously it was left as 0. All boards supported by the MIPS generic kernel started outputting garbage from the boot console due to an incorrect divisor being set. Fixes: 31cb9a8575ca ("earlycon: initialise baud field of earlycon device structure") Cc: stable # 4.14 Signed-off-by: Matt Redfearn Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/8250/8250_early.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index 362c25ff188a..ae6a256524d8 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -122,12 +122,14 @@ static void __init init_port(struct earlycon_device *device) serial8250_early_out(port, UART_FCR, 0); /* no fifo */ serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */ - divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); - c = serial8250_early_in(port, UART_LCR); - serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB); - serial8250_early_out(port, UART_DLL, divisor & 0xff); - serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff); - serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB); + if (port->uartclk && device->baud) { + divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); + c = serial8250_early_in(port, UART_LCR); + serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB); + serial8250_early_out(port, UART_DLL, divisor & 0xff); + serial8250_early_out(port, UART_DLM, (divisor >> 8) & 0xff); + serial8250_early_out(port, UART_LCR, c & ~UART_LCR_DLAB); + } } int __init early_serial8250_setup(struct earlycon_device *device, -- cgit v1.2.3 From eb281683621b71ab9710d9dccbbef0c2e1769c97 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 3 Nov 2017 15:30:52 +0100 Subject: serdev: ttyport: add missing receive_buf sanity checks The receive_buf tty-port callback should return the number of bytes accepted and must specifically never return a negative errno (or a value larger than the buffer size) to the tty layer. A serdev driver not providing a receive_buf callback would currently cause the flush_to_ldisc() worker to spin in a tight loop when the tty buffer pointers are incremented with -EINVAL (-22) after data has been received. A serdev driver occasionally returning a negative errno (or a too large byte count) could cause information leaks or crashes when accessing memory outside the tty buffers in consecutive callbacks. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Cc: stable # 4.11 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serdev/serdev-ttyport.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index ce7ad0acee7a..09fbdd52a561 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -27,11 +27,22 @@ static int ttyport_receive_buf(struct tty_port *port, const unsigned char *cp, { struct serdev_controller *ctrl = port->client_data; struct serport *serport = serdev_controller_get_drvdata(ctrl); + int ret; if (!test_bit(SERPORT_ACTIVE, &serport->flags)) return 0; - return serdev_controller_receive_buf(ctrl, cp, count); + ret = serdev_controller_receive_buf(ctrl, cp, count); + + dev_WARN_ONCE(&ctrl->dev, ret < 0 || ret > count, + "receive_buf returns %d (count = %zu)\n", + ret, count); + if (ret < 0) + return 0; + else if (ret > count) + return count; + + return ret; } static void ttyport_write_wakeup(struct tty_port *port) -- cgit v1.2.3 From 8bcd4e6a8decac251d55c4377e2e67f052777ce0 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 3 Nov 2017 15:30:55 +0100 Subject: serdev: ttyport: fix NULL-deref on hangup Make sure to use a properly refcounted tty_struct in write_wake up to avoid dereferencing a NULL-pointer when a port is being hung up. Fixes: bed35c6dfa6a ("serdev: add a tty port controller driver") Cc: stable # 4.11 Signed-off-by: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serdev/serdev-ttyport.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index 09fbdd52a561..12cb9139073e 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -49,12 +49,19 @@ static void ttyport_write_wakeup(struct tty_port *port) { struct serdev_controller *ctrl = port->client_data; struct serport *serport = serdev_controller_get_drvdata(ctrl); + struct tty_struct *tty; + + tty = tty_port_tty_get(port); + if (!tty) + return; - if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &port->tty->flags) && + if (test_and_clear_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) && test_bit(SERPORT_ACTIVE, &serport->flags)) serdev_controller_write_wakeup(ctrl); - wake_up_interruptible_poll(&port->tty->write_wait, POLLOUT); + wake_up_interruptible_poll(&tty->write_wait, POLLOUT); + + tty_kref_put(tty); } static const struct tty_port_client_operations client_ops = { -- cgit v1.2.3 From 90dbad8cd6efccbdce109d5ef0724f8434a6cdde Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Fri, 3 Nov 2017 15:30:56 +0100 Subject: serdev: ttyport: fix tty locking in close Make sure to hold the tty lock as required when calling tty-driver close() (e.g. to avoid racing with hangup()). Note that the serport active flag is currently set under the lock at controller open, but really isn't protected by it. Fixes: cd6484e1830b ("serdev: Introduce new bus for serial attached devices") Signed-off-by: Johan Hovold Cc: stable Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serdev/serdev-ttyport.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/tty/serdev/serdev-ttyport.c b/drivers/tty/serdev/serdev-ttyport.c index 12cb9139073e..247788a16f0b 100644 --- a/drivers/tty/serdev/serdev-ttyport.c +++ b/drivers/tty/serdev/serdev-ttyport.c @@ -154,8 +154,10 @@ static void ttyport_close(struct serdev_controller *ctrl) clear_bit(SERPORT_ACTIVE, &serport->flags); + tty_lock(tty); if (tty->ops->close) tty->ops->close(tty, NULL); + tty_unlock(tty); tty_release_struct(tty, serport->tty_idx); } -- cgit v1.2.3 From 5a244727f428a06634f22bb890e78024ab0c89f3 Mon Sep 17 00:00:00 2001 From: William Breathitt Gray Date: Wed, 8 Nov 2017 10:23:11 -0500 Subject: isa: Prevent NULL dereference in isa_bus driver callbacks The isa_driver structure for an isa_bus device is stored in the device platform_data member of the respective device structure. This platform_data member may be reset to NULL if isa_driver match callback for the device fails, indicating a device unsupported by the ISA driver. This patch fixes a possible NULL pointer dereference if one of the isa_driver callbacks to attempted for an unsupported device. This error should not occur in practice since ISA devices are typically manually configured and loaded by the users, but we may as well prevent this error from popping up for the 0day testers. Fixes: a5117ba7da37 ("[PATCH] Driver model: add ISA bus") Signed-off-by: William Breathitt Gray Cc: stable Acked-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- drivers/base/isa.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/base/isa.c b/drivers/base/isa.c index cd6ccdcf9df0..372d10af2600 100644 --- a/drivers/base/isa.c +++ b/drivers/base/isa.c @@ -39,7 +39,7 @@ static int isa_bus_probe(struct device *dev) { struct isa_driver *isa_driver = dev->platform_data; - if (isa_driver->probe) + if (isa_driver && isa_driver->probe) return isa_driver->probe(dev, to_isa_dev(dev)->id); return 0; @@ -49,7 +49,7 @@ static int isa_bus_remove(struct device *dev) { struct isa_driver *isa_driver = dev->platform_data; - if (isa_driver->remove) + if (isa_driver && isa_driver->remove) return isa_driver->remove(dev, to_isa_dev(dev)->id); return 0; @@ -59,7 +59,7 @@ static void isa_bus_shutdown(struct device *dev) { struct isa_driver *isa_driver = dev->platform_data; - if (isa_driver->shutdown) + if (isa_driver && isa_driver->shutdown) isa_driver->shutdown(dev, to_isa_dev(dev)->id); } @@ -67,7 +67,7 @@ static int isa_bus_suspend(struct device *dev, pm_message_t state) { struct isa_driver *isa_driver = dev->platform_data; - if (isa_driver->suspend) + if (isa_driver && isa_driver->suspend) return isa_driver->suspend(dev, to_isa_dev(dev)->id, state); return 0; @@ -77,7 +77,7 @@ static int isa_bus_resume(struct device *dev) { struct isa_driver *isa_driver = dev->platform_data; - if (isa_driver->resume) + if (isa_driver && isa_driver->resume) return isa_driver->resume(dev, to_isa_dev(dev)->id); return 0; -- cgit v1.2.3 From 0946b2fb38fdb6585a5ac3ca84ac73924f645952 Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Thu, 16 Nov 2017 14:36:12 -0800 Subject: firmware: cleanup FIRMWARE_IN_KERNEL message The help for FIRMWARE_IN_KERNEL still references the firmware_install command that was recently removed by commit 5620a0d1aacd ("firmware: delete in-kernel firmware"). Clean up the message to direct the user to their distribution's linux-firmware package, and remove any reference to firmware being included in the kernel source tree. Fixes: 5620a0d1aacd ("firmware: delete in-kernel firmware"). Cc: Masahiro Yamada Cc: stable Cc: David Woodhouse Signed-off-by: Robin H. Johnson Signed-off-by: Greg Kroah-Hartman --- drivers/base/Kconfig | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/base/Kconfig b/drivers/base/Kconfig index 2f6614c9a229..bdc87907d6a1 100644 --- a/drivers/base/Kconfig +++ b/drivers/base/Kconfig @@ -91,22 +91,23 @@ config FIRMWARE_IN_KERNEL depends on FW_LOADER default y help - The kernel source tree includes a number of firmware 'blobs' - that are used by various drivers. The recommended way to - use these is to run "make firmware_install", which, after - converting ihex files to binary, copies all of the needed - binary files in firmware/ to /lib/firmware/ on your system so - that they can be loaded by userspace helpers on request. + Various drivers in the kernel source tree may require firmware, + which is generally available in your distribution's linux-firmware + package. + + The linux-firmware package should install firmware into + /lib/firmware/ on your system, so they can be loaded by userspace + helpers on request. Enabling this option will build each required firmware blob - into the kernel directly, where request_firmware() will find - them without having to call out to userspace. This may be - useful if your root file system requires a device that uses - such firmware and do not wish to use an initrd. + specified by EXTRA_FIRMWARE into the kernel directly, where + request_firmware() will find them without having to call out to + userspace. This may be useful if your root file system requires a + device that uses such firmware and you do not wish to use an + initrd. This single option controls the inclusion of firmware for - every driver that uses request_firmware() and ships its - firmware in the kernel source tree, which avoids a + every driver that uses request_firmware(), which avoids a proliferation of 'Include firmware for xxx device' options. Say 'N' and let firmware be loaded from userspace. -- cgit v1.2.3 From fb2c445277e7b0b4ffe10de8114bad4eccaca948 Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Mon, 13 Nov 2017 10:06:08 +0100 Subject: ANDROID: binder: fix transaction leak. If a call to put_user() fails, we failed to properly free a transaction and send a failed reply (if necessary). Signed-off-by: Martijn Coenen Cc: stable # 4.14 Signed-off-by: Greg Kroah-Hartman --- drivers/android/binder.c | 40 +++++++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/android/binder.c b/drivers/android/binder.c index a73596a4f804..bccec9de0533 100644 --- a/drivers/android/binder.c +++ b/drivers/android/binder.c @@ -1947,6 +1947,26 @@ static void binder_send_failed_reply(struct binder_transaction *t, } } +/** + * binder_cleanup_transaction() - cleans up undelivered transaction + * @t: transaction that needs to be cleaned up + * @reason: reason the transaction wasn't delivered + * @error_code: error to return to caller (if synchronous call) + */ +static void binder_cleanup_transaction(struct binder_transaction *t, + const char *reason, + uint32_t error_code) +{ + if (t->buffer->target_node && !(t->flags & TF_ONE_WAY)) { + binder_send_failed_reply(t, error_code); + } else { + binder_debug(BINDER_DEBUG_DEAD_TRANSACTION, + "undelivered transaction %d, %s\n", + t->debug_id, reason); + binder_free_transaction(t); + } +} + /** * binder_validate_object() - checks for a valid metadata object in a buffer. * @buffer: binder_buffer that we're parsing. @@ -4015,12 +4035,20 @@ retry: if (put_user(cmd, (uint32_t __user *)ptr)) { if (t_from) binder_thread_dec_tmpref(t_from); + + binder_cleanup_transaction(t, "put_user failed", + BR_FAILED_REPLY); + return -EFAULT; } ptr += sizeof(uint32_t); if (copy_to_user(ptr, &tr, sizeof(tr))) { if (t_from) binder_thread_dec_tmpref(t_from); + + binder_cleanup_transaction(t, "copy_to_user failed", + BR_FAILED_REPLY); + return -EFAULT; } ptr += sizeof(tr); @@ -4090,15 +4118,9 @@ static void binder_release_work(struct binder_proc *proc, struct binder_transaction *t; t = container_of(w, struct binder_transaction, work); - if (t->buffer->target_node && - !(t->flags & TF_ONE_WAY)) { - binder_send_failed_reply(t, BR_DEAD_REPLY); - } else { - binder_debug(BINDER_DEBUG_DEAD_TRANSACTION, - "undelivered transaction %d\n", - t->debug_id); - binder_free_transaction(t); - } + + binder_cleanup_transaction(t, "process died.", + BR_DEAD_REPLY); } break; case BINDER_WORK_RETURN_ERROR: { struct binder_error *e = container_of( -- cgit v1.2.3 From 7fa32e5ec28b1609abc0b797b58267f725fc3964 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Tue, 14 Nov 2017 06:53:33 -0700 Subject: Drivers: hv: vmbus: Fix a rescind issue The current rescind processing code will not correctly handle the case where the host immediately rescinds a channel that has been offerred. In this case, we could be blocked in the open call and since the channel is rescinded, the host will not respond and we could be blocked forever in the vmbus open call.i Fix this problem. Signed-off-by: K. Y. Srinivasan Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/hv/channel.c | 10 ++++++++-- drivers/hv/channel_mgmt.c | 7 ++++--- include/linux/hyperv.h | 1 + 3 files changed, 13 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 19f0cf37e0ed..ba0a092ae085 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -659,22 +659,28 @@ void vmbus_close(struct vmbus_channel *channel) */ return; } - mutex_lock(&vmbus_connection.channel_mutex); /* * Close all the sub-channels first and then close the * primary channel. */ list_for_each_safe(cur, tmp, &channel->sc_list) { cur_channel = list_entry(cur, struct vmbus_channel, sc_list); - vmbus_close_internal(cur_channel); if (cur_channel->rescind) { + wait_for_completion(&cur_channel->rescind_event); + mutex_lock(&vmbus_connection.channel_mutex); + vmbus_close_internal(cur_channel); hv_process_channel_removal( cur_channel->offermsg.child_relid); + } else { + mutex_lock(&vmbus_connection.channel_mutex); + vmbus_close_internal(cur_channel); } + mutex_unlock(&vmbus_connection.channel_mutex); } /* * Now close the primary. */ + mutex_lock(&vmbus_connection.channel_mutex); vmbus_close_internal(channel); mutex_unlock(&vmbus_connection.channel_mutex); } diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index ec5454f3f4a6..c21020b69114 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -333,6 +333,7 @@ static struct vmbus_channel *alloc_channel(void) return NULL; spin_lock_init(&channel->lock); + init_completion(&channel->rescind_event); INIT_LIST_HEAD(&channel->sc_list); INIT_LIST_HEAD(&channel->percpu_list); @@ -898,6 +899,7 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr) /* * Now wait for offer handling to complete. */ + vmbus_rescind_cleanup(channel); while (READ_ONCE(channel->probe_done) == false) { /* * We wait here until any channel offer is currently @@ -913,7 +915,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr) if (channel->device_obj) { if (channel->chn_rescind_callback) { channel->chn_rescind_callback(channel); - vmbus_rescind_cleanup(channel); return; } /* @@ -922,7 +923,6 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr) */ dev = get_device(&channel->device_obj->device); if (dev) { - vmbus_rescind_cleanup(channel); vmbus_device_unregister(channel->device_obj); put_device(dev); } @@ -936,13 +936,14 @@ static void vmbus_onoffer_rescind(struct vmbus_channel_message_header *hdr) * 2. Then close the primary channel. */ mutex_lock(&vmbus_connection.channel_mutex); - vmbus_rescind_cleanup(channel); if (channel->state == CHANNEL_OPEN_STATE) { /* * The channel is currently not open; * it is safe for us to cleanup the channel. */ hv_process_channel_removal(rescind->child_relid); + } else { + complete(&channel->rescind_event); } mutex_unlock(&vmbus_connection.channel_mutex); } diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index f3e97c5f94c9..6c9336626592 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h @@ -708,6 +708,7 @@ struct vmbus_channel { u8 monitor_bit; bool rescind; /* got rescind msg */ + struct completion rescind_event; u32 ringbuffer_gpadlhandle; -- cgit v1.2.3 From 811d7e0215fb738fb9a9f0bcb1276516ad161ed1 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 15 Nov 2017 13:00:43 -0800 Subject: firmware: vpd: Destroy vpd sections in remove function vpd sections are initialized during probe and thus should be destroyed in the remove function. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Cc: stable Signed-off-by: Guenter Roeck Reviewed-by: Dmitry Torokhov Tested-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/google/vpd.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index 35e553b3b190..84217172297b 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -298,8 +298,17 @@ static int vpd_probe(struct platform_device *pdev) return vpd_sections_init(entry.cbmem_addr); } +static int vpd_remove(struct platform_device *pdev) +{ + vpd_section_destroy(&ro_vpd); + vpd_section_destroy(&rw_vpd); + + return 0; +} + static struct platform_driver vpd_driver = { .probe = vpd_probe, + .remove = vpd_remove, .driver = { .name = "vpd", }, @@ -324,8 +333,6 @@ static int __init vpd_platform_init(void) static void __exit vpd_platform_exit(void) { - vpd_section_destroy(&ro_vpd); - vpd_section_destroy(&rw_vpd); kobject_put(vpd_kobj); } -- cgit v1.2.3 From e4b28b3c3a405b251fa25db58abe1512814a680a Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 15 Nov 2017 13:00:44 -0800 Subject: firmware: vpd: Tie firmware kobject to device lifetime It doesn't make sense to have /sys/firmware/vpd if the device is not instantiated, so tie its lifetime to the device. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Guenter Roeck Cc: stable Reviewed-by: Dmitry Torokhov Tested-by: Randy Dunlap Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/google/vpd.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index 84217172297b..942e358efa60 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -295,7 +295,17 @@ static int vpd_probe(struct platform_device *pdev) if (ret) return ret; - return vpd_sections_init(entry.cbmem_addr); + vpd_kobj = kobject_create_and_add("vpd", firmware_kobj); + if (!vpd_kobj) + return -ENOMEM; + + ret = vpd_sections_init(entry.cbmem_addr); + if (ret) { + kobject_put(vpd_kobj); + return ret; + } + + return 0; } static int vpd_remove(struct platform_device *pdev) @@ -303,6 +313,8 @@ static int vpd_remove(struct platform_device *pdev) vpd_section_destroy(&ro_vpd); vpd_section_destroy(&rw_vpd); + kobject_put(vpd_kobj); + return 0; } @@ -322,10 +334,6 @@ static int __init vpd_platform_init(void) if (IS_ERR(pdev)) return PTR_ERR(pdev); - vpd_kobj = kobject_create_and_add("vpd", firmware_kobj); - if (!vpd_kobj) - return -ENOMEM; - platform_driver_register(&vpd_driver); return 0; @@ -333,7 +341,6 @@ static int __init vpd_platform_init(void) static void __exit vpd_platform_exit(void) { - kobject_put(vpd_kobj); } module_init(vpd_platform_init); -- cgit v1.2.3 From 0631fb8b027f5968c2f5031f0b3ff7be3e4bebcc Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Wed, 15 Nov 2017 13:00:45 -0800 Subject: firmware: vpd: Fix platform driver and device registration/unregistration The driver exit function needs to unregister both platform device and driver. Also, during registration, register driver first and perform error checks. Fixes: 049a59db34eb ("firmware: Google VPD sysfs driver") Signed-off-by: Guenter Roeck Cc: stable Tested-by: Randy Dunlap Reviewed-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/firmware/google/vpd.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/firmware/google/vpd.c b/drivers/firmware/google/vpd.c index 942e358efa60..e4b40f2b4627 100644 --- a/drivers/firmware/google/vpd.c +++ b/drivers/firmware/google/vpd.c @@ -326,21 +326,29 @@ static struct platform_driver vpd_driver = { }, }; +static struct platform_device *vpd_pdev; + static int __init vpd_platform_init(void) { - struct platform_device *pdev; + int ret; - pdev = platform_device_register_simple("vpd", -1, NULL, 0); - if (IS_ERR(pdev)) - return PTR_ERR(pdev); + ret = platform_driver_register(&vpd_driver); + if (ret) + return ret; - platform_driver_register(&vpd_driver); + vpd_pdev = platform_device_register_simple("vpd", -1, NULL, 0); + if (IS_ERR(vpd_pdev)) { + platform_driver_unregister(&vpd_driver); + return PTR_ERR(vpd_pdev); + } return 0; } static void __exit vpd_platform_exit(void) { + platform_device_unregister(vpd_pdev); + platform_driver_unregister(&vpd_driver); } module_init(vpd_platform_init); -- cgit v1.2.3 From 4bd6683da2e64590bdc27ecf7e61ad8376861768 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 10 Nov 2017 19:55:18 +0200 Subject: pinctrl: denverton: Fix UART2 RTS pin mode UART2 RTS is mode 2 of the pin. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Linus Walleij --- drivers/pinctrl/intel/pinctrl-denverton.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/pinctrl/intel/pinctrl-denverton.c b/drivers/pinctrl/intel/pinctrl-denverton.c index 4500880240f2..6572550cfe78 100644 --- a/drivers/pinctrl/intel/pinctrl-denverton.c +++ b/drivers/pinctrl/intel/pinctrl-denverton.c @@ -207,7 +207,7 @@ static const unsigned int dnv_uart0_pins[] = { 60, 61, 64, 65 }; static const unsigned int dnv_uart0_modes[] = { 2, 3, 1, 1 }; static const unsigned int dnv_uart1_pins[] = { 94, 95, 96, 97 }; static const unsigned int dnv_uart2_pins[] = { 60, 61, 62, 63 }; -static const unsigned int dnv_uart2_modes[] = { 1, 1, 2, 2 }; +static const unsigned int dnv_uart2_modes[] = { 1, 2, 2, 2 }; static const unsigned int dnv_emmc_pins[] = { 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, }; -- cgit v1.2.3 From 6702abb3bf2394f250af0ee04070227bb5dda788 Mon Sep 17 00:00:00 2001 From: Gregory CLEMENT Date: Tue, 14 Nov 2017 17:51:50 +0100 Subject: pinctrl: armada-37xx: Fix direction_output() callback behavior The direction_output callback of the gpio_chip structure is supposed to set the output direction but also to set the value of the gpio. For the armada-37xx driver this callback acted as the gpio_set_direction callback for the pinctrl. This patch fixes the behavior of the direction_output callback by also applying the value received as parameter. Cc: stable@vger.kernel.org Fixes: 5715092a458c ("pinctrl: armada-37xx: Add gpio support") Reported-by: Alexandre Belloni Signed-off-by: Gregory CLEMENT Signed-off-by: Linus Walleij --- drivers/pinctrl/mvebu/pinctrl-armada-37xx.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c index d45af31b86b4..bdb8d174efef 100644 --- a/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c +++ b/drivers/pinctrl/mvebu/pinctrl-armada-37xx.c @@ -408,12 +408,21 @@ static int armada_37xx_gpio_direction_output(struct gpio_chip *chip, { struct armada_37xx_pinctrl *info = gpiochip_get_data(chip); unsigned int reg = OUTPUT_EN; - unsigned int mask; + unsigned int mask, val, ret; armada_37xx_update_reg(®, offset); mask = BIT(offset); - return regmap_update_bits(info->regmap, reg, mask, mask); + ret = regmap_update_bits(info->regmap, reg, mask, mask); + + if (ret) + return ret; + + reg = OUTPUT_VAL; + val = value ? mask : 0; + regmap_update_bits(info->regmap, reg, mask, val); + + return 0; } static int armada_37xx_gpio_get(struct gpio_chip *chip, unsigned int offset) -- cgit v1.2.3 From d929fb4e16b9635dfefa95afe77462de68557af0 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 03:16:17 -0500 Subject: media: atomisp: stop producing hundreds of kernel-doc warnings A recent change on Kernel 4.15-rc1 causes all tags with /** to be handled as kernel-doc markups. Well, several atomisp modules, it doesn't use kernel-doc, but some other documentation markup (doxygen?). So, suppress all those warns by: - replacing /**< by /**. - replacing /** by /*. The core changes were done with: for i in $(find drivers/staging/media/atomisp -type f); do sed 's,/\*\* ,/\*, ' -i $i; done for i in $(find drivers/staging/media/atomisp -type f); do sed 's,/\*\*<,/\**,' -i $i; done for i in drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/debug/src/ia_css_debug.c drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c; do perl -ne 's,\/\*\*$,/*,g; print $_' $i > a && mv a $i; done; A few manual adjustments were made, where needed. Signed-off-by: Mauro Carvalho Chehab Acked-by: Sakari Ailus --- .../staging/media/atomisp/include/linux/atomisp.h | 34 +-- .../media/atomisp/pci/atomisp2/atomisp_cmd.c | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_css20.c | 2 +- .../atomisp/pci/atomisp2/atomisp_compat_ioctl32.h | 16 +- .../media/atomisp/pci/atomisp2/atomisp_subdev.h | 2 +- .../atomisp2/css2400/base/circbuf/src/circbuf.c | 26 +-- .../camera/pipe/interface/ia_css_pipe_binarydesc.h | 34 +-- .../camera/pipe/interface/ia_css_pipe_util.h | 2 +- .../css2400/camera/util/interface/ia_css_util.h | 18 +- .../css_2401_csi2p_system/host/csi_rx_private.h | 2 +- .../css_2401_csi2p_system/host/ibuf_ctrl_private.h | 4 +- .../css2400/css_2401_csi2p_system/host/isys_irq.c | 2 +- .../css_2401_csi2p_system/host/isys_irq_private.h | 4 +- .../host/isys_stream2mmio_private.h | 4 +- .../css_2401_csi2p_system/host/pixelgen_private.h | 2 +- .../css_2401_csi2p_system/isys_dma_global.h | 4 +- .../css_2401_csi2p_system/pixelgen_global.h | 2 +- .../css2400/css_2401_csi2p_system/system_global.h | 8 +- .../atomisp/pci/atomisp2/css2400/css_api_version.h | 2 +- .../css2400/hive_isp_css_common/host/gp_timer.c | 2 +- .../hive_isp_css_include/host/csi_rx_public.h | 4 +- .../hive_isp_css_include/host/ibuf_ctrl_public.h | 4 +- .../css2400/hive_isp_css_include/host/isp_op1w.h | 98 ++++---- .../css2400/hive_isp_css_include/host/isp_op2w.h | 78 +++---- .../host/isys_stream2mmio_public.h | 4 +- .../hive_isp_css_include/host/pixelgen_public.h | 4 +- .../hive_isp_css_include/host/ref_vector_func.h | 144 ++++++------ .../css2400/hive_isp_css_include/math_support.h | 2 +- .../css2400/hive_isp_css_include/string_support.h | 8 +- .../css2400/hive_isp_css_shared/host/tag.c | 4 +- .../media/atomisp/pci/atomisp2/css2400/ia_css.h | 2 +- .../media/atomisp/pci/atomisp2/css2400/ia_css_3a.h | 38 +-- .../pci/atomisp2/css2400/ia_css_acc_types.h | 216 ++++++++--------- .../atomisp/pci/atomisp2/css2400/ia_css_buffer.h | 32 +-- .../atomisp/pci/atomisp2/css2400/ia_css_control.h | 22 +- .../pci/atomisp2/css2400/ia_css_device_access.h | 2 +- .../atomisp/pci/atomisp2/css2400/ia_css_dvs.h | 52 ++--- .../atomisp/pci/atomisp2/css2400/ia_css_env.h | 40 ++-- .../atomisp/pci/atomisp2/css2400/ia_css_err.h | 18 +- .../pci/atomisp2/css2400/ia_css_event_public.h | 68 +++--- .../atomisp/pci/atomisp2/css2400/ia_css_firmware.h | 14 +- .../atomisp/pci/atomisp2/css2400/ia_css_frac.h | 10 +- .../pci/atomisp2/css2400/ia_css_frame_format.h | 62 ++--- .../pci/atomisp2/css2400/ia_css_frame_public.h | 120 +++++----- .../pci/atomisp2/css2400/ia_css_input_port.h | 32 +-- .../atomisp/pci/atomisp2/css2400/ia_css_irq.h | 112 ++++----- .../atomisp/pci/atomisp2/css2400/ia_css_metadata.h | 24 +- .../atomisp/pci/atomisp2/css2400/ia_css_mipi.h | 10 +- .../atomisp/pci/atomisp2/css2400/ia_css_mmu.h | 4 +- .../atomisp/pci/atomisp2/css2400/ia_css_morph.h | 6 +- .../pci/atomisp2/css2400/ia_css_pipe_public.h | 128 +++++----- .../atomisp/pci/atomisp2/css2400/ia_css_prbs.h | 12 +- .../pci/atomisp2/css2400/ia_css_properties.h | 6 +- .../atomisp/pci/atomisp2/css2400/ia_css_shading.h | 6 +- .../atomisp/pci/atomisp2/css2400/ia_css_stream.h | 4 +- .../pci/atomisp2/css2400/ia_css_stream_format.h | 90 +++---- .../pci/atomisp2/css2400/ia_css_stream_public.h | 148 ++++++------ .../atomisp/pci/atomisp2/css2400/ia_css_timer.h | 30 +-- .../atomisp/pci/atomisp2/css2400/ia_css_tpg.h | 8 +- .../atomisp/pci/atomisp2/css2400/ia_css_types.h | 258 ++++++++++----------- .../atomisp/pci/atomisp2/css2400/ia_css_version.h | 6 +- .../css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h | 6 +- .../isp/kernels/anr/anr_1.0/ia_css_anr_types.h | 6 +- .../isp/kernels/anr/anr_2/ia_css_anr2_types.h | 4 +- .../isp/kernels/anr/anr_2/ia_css_anr_param.h | 2 +- .../bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h | 2 +- .../css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h | 4 +- .../css2400/isp/kernels/bnlm/ia_css_bnlm_types.h | 36 +-- .../isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h | 34 +-- .../isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h | 20 +- .../conversion_1.0/ia_css_conversion_types.h | 8 +- .../isp/kernels/crop/crop_1.0/ia_css_crop_param.h | 2 +- .../isp/kernels/crop/crop_1.0/ia_css_crop_types.h | 2 +- .../isp/kernels/csc/csc_1.0/ia_css_csc_types.h | 8 +- .../isp/kernels/ctc/ctc2/ia_css_ctc2_param.h | 12 +- .../isp/kernels/ctc/ctc2/ia_css_ctc2_types.h | 10 +- .../isp/kernels/ctc/ctc_1.0/ia_css_ctc_types.h | 38 +-- .../isp/kernels/de/de_1.0/ia_css_de_types.h | 10 +- .../css2400/isp/kernels/de/de_2/ia_css_de2_types.h | 10 +- .../isp/kernels/dp/dp_1.0/ia_css_dp_types.h | 8 +- .../css2400/isp/kernels/dpc2/ia_css_dpc2_types.h | 6 +- .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_param.h | 2 +- .../isp/kernels/dvs/dvs_1.0/ia_css_dvs_types.h | 2 +- .../isp/kernels/eed1_8/ia_css_eed1_8_types.h | 82 +++---- .../isp/kernels/fc/fc_1.0/ia_css_formats_types.h | 6 +- .../isp/kernels/fpn/fpn_1.0/ia_css_fpn_types.h | 14 +- .../isp/kernels/gc/gc_1.0/ia_css_gc_types.h | 32 +-- .../css2400/isp/kernels/gc/gc_2/ia_css_gc2_types.h | 14 +- .../css2400/isp/kernels/hdr/ia_css_hdr_types.h | 26 +-- .../ipu2_io_ls/bayer_io_ls/ia_css_bayer_io.host.c | 2 +- .../yuv444_io_ls/ia_css_yuv444_io.host.c | 2 +- .../kernels/macc/macc1_5/ia_css_macc1_5_types.h | 16 +- .../isp/kernels/macc/macc_1.0/ia_css_macc_types.h | 12 +- .../css2400/isp/kernels/ob/ob2/ia_css_ob2_types.h | 12 +- .../isp/kernels/ob/ob_1.0/ia_css_ob_types.h | 26 +-- .../output/output_1.0/ia_css_output_param.h | 2 +- .../output/output_1.0/ia_css_output_types.h | 8 +- .../kernels/qplane/qplane_2/ia_css_qplane_types.h | 2 +- .../isp/kernels/raw/raw_1.0/ia_css_raw_types.h | 2 +- .../isp/kernels/ref/ref_1.0/ia_css_ref_param.h | 2 +- .../isp/kernels/ref/ref_1.0/ia_css_ref_types.h | 2 +- .../isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h | 98 ++++---- .../kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h | 2 +- .../css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h | 4 +- .../isp/kernels/sc/sc_1.0/ia_css_sc_types.h | 42 ++-- .../kernels/sdis/common/ia_css_sdis_common_types.h | 104 ++++----- .../isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h | 20 +- .../isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h | 40 ++-- .../isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h | 38 +-- .../isp/kernels/tnr/tnr3/ia_css_tnr3_types.h | 26 +-- .../isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h | 10 +- .../isp/kernels/vf/vf_1.0/ia_css_vf_param.h | 4 +- .../isp/kernels/vf/vf_1.0/ia_css_vf_types.h | 4 +- .../isp/kernels/wb/wb_1.0/ia_css_wb_types.h | 14 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c | 2 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h | 2 +- .../isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h | 20 +- .../isp/kernels/xnr/xnr_3.0/ia_css_xnr3_types.h | 30 +-- .../isp/kernels/ynr/ynr_1.0/ia_css_ynr_types.h | 28 +-- .../isp/kernels/ynr/ynr_2/ia_css_ynr2_types.h | 40 ++-- .../yuv_ls/yuv_ls_1.0/ia_css_yuv_ls_param.h | 2 +- .../atomisp/pci/atomisp2/css2400/memory_realloc.c | 2 +- .../runtime/binary/interface/ia_css_binary.h | 2 +- .../atomisp2/css2400/runtime/binary/src/binary.c | 2 +- .../pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 2 +- .../css2400/runtime/debug/interface/ia_css_debug.h | 30 +-- .../css2400/runtime/debug/src/ia_css_debug.c | 10 +- .../pci/atomisp2/css2400/runtime/event/src/event.c | 4 +- .../atomisp2/css2400/runtime/eventq/src/eventq.c | 2 +- .../css2400/runtime/frame/interface/ia_css_frame.h | 22 +- .../pci/atomisp2/css2400/runtime/frame/src/frame.c | 2 +- .../pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c | 2 +- .../css2400/runtime/inputfifo/src/inputfifo.c | 2 +- .../isp_param/interface/ia_css_isp_param_types.h | 6 +- .../css2400/runtime/isp_param/src/isp_param.c | 2 +- .../css2400/runtime/isys/interface/ia_css_isys.h | 6 +- .../css2400/runtime/isys/src/csi_rx_rmgr.c | 2 +- .../css2400/runtime/isys/src/ibuf_ctrl_rmgr.c | 2 +- .../css2400/runtime/isys/src/isys_dma_rmgr.c | 2 +- .../atomisp2/css2400/runtime/isys/src/isys_init.c | 2 +- .../runtime/isys/src/isys_stream2mmio_rmgr.c | 2 +- .../pci/atomisp2/css2400/runtime/isys/src/rx.c | 2 +- .../css2400/runtime/isys/src/virtual_isys.c | 8 +- .../runtime/pipeline/interface/ia_css_pipeline.h | 28 +-- .../css2400/runtime/pipeline/src/pipeline.c | 8 +- .../css2400/runtime/queue/interface/ia_css_queue.h | 22 +- .../css2400/runtime/queue/src/queue_access.c | 2 +- .../pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c | 4 +- .../atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c | 26 +-- .../runtime/spctrl/interface/ia_css_spctrl.h | 20 +- .../runtime/spctrl/interface/ia_css_spctrl_comm.h | 14 +- .../atomisp2/css2400/runtime/spctrl/src/spctrl.c | 4 +- .../pci/atomisp2/css2400/runtime/timer/src/timer.c | 2 +- .../media/atomisp/pci/atomisp2/css2400/sh_css.c | 68 +++--- .../atomisp/pci/atomisp2/css2400/sh_css_internal.h | 22 +- .../atomisp/pci/atomisp2/css2400/sh_css_legacy.h | 2 +- .../atomisp/pci/atomisp2/css2400/sh_css_mipi.c | 4 +- .../atomisp/pci/atomisp2/css2400/sh_css_params.h | 4 +- .../media/atomisp/pci/atomisp2/css2400/sh_css_sp.c | 18 +- .../atomisp/pci/atomisp2/css2400/sh_css_struct.h | 2 +- 160 files changed, 1746 insertions(+), 1746 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/media/atomisp/include/linux/atomisp.h b/drivers/staging/media/atomisp/include/linux/atomisp.h index b5533197226d..15fa5679bae7 100644 --- a/drivers/staging/media/atomisp/include/linux/atomisp.h +++ b/drivers/staging/media/atomisp/include/linux/atomisp.h @@ -208,14 +208,14 @@ struct atomisp_dis_vector { }; -/** DVS 2.0 Coefficient types. This structure contains 4 pointers to +/* DVS 2.0 Coefficient types. This structure contains 4 pointers to * arrays that contain the coeffients for each type. */ struct atomisp_dvs2_coef_types { - short __user *odd_real; /**< real part of the odd coefficients*/ - short __user *odd_imag; /**< imaginary part of the odd coefficients*/ - short __user *even_real;/**< real part of the even coefficients*/ - short __user *even_imag;/**< imaginary part of the even coefficients*/ + short __user *odd_real; /** real part of the odd coefficients*/ + short __user *odd_imag; /** imaginary part of the odd coefficients*/ + short __user *even_real;/** real part of the even coefficients*/ + short __user *even_imag;/** imaginary part of the even coefficients*/ }; /* @@ -223,10 +223,10 @@ struct atomisp_dvs2_coef_types { * arrays that contain the statistics for each type. */ struct atomisp_dvs2_stat_types { - int __user *odd_real; /**< real part of the odd statistics*/ - int __user *odd_imag; /**< imaginary part of the odd statistics*/ - int __user *even_real;/**< real part of the even statistics*/ - int __user *even_imag;/**< imaginary part of the even statistics*/ + int __user *odd_real; /** real part of the odd statistics*/ + int __user *odd_imag; /** imaginary part of the odd statistics*/ + int __user *even_real;/** real part of the even statistics*/ + int __user *even_imag;/** imaginary part of the even statistics*/ }; struct atomisp_dis_coefficients { @@ -390,16 +390,16 @@ struct atomisp_metadata_config { * Generic resolution structure. */ struct atomisp_resolution { - uint32_t width; /**< Width */ - uint32_t height; /**< Height */ + uint32_t width; /** Width */ + uint32_t height; /** Height */ }; /* * This specifies the coordinates (x,y) */ struct atomisp_zoom_point { - int32_t x; /**< x coordinate */ - int32_t y; /**< y coordinate */ + int32_t x; /** x coordinate */ + int32_t y; /** y coordinate */ }; /* @@ -411,9 +411,9 @@ struct atomisp_zoom_region { }; struct atomisp_dz_config { - uint32_t dx; /**< Horizontal zoom factor */ - uint32_t dy; /**< Vertical zoom factor */ - struct atomisp_zoom_region zoom_region; /**< region for zoom */ + uint32_t dx; /** Horizontal zoom factor */ + uint32_t dy; /** Vertical zoom factor */ + struct atomisp_zoom_region zoom_region; /** region for zoom */ }; struct atomisp_parm { @@ -758,7 +758,7 @@ enum atomisp_acc_arg_type { ATOMISP_ACC_ARG_FRAME /* Frame argument */ }; -/** ISP memories, isp2400 */ +/* ISP memories, isp2400 */ enum atomisp_acc_memory { ATOMISP_ACC_MEMORY_PMEM0 = 0, ATOMISP_ACC_MEMORY_DMEM0, diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c index 8a18c528cad4..debf0e3853ff 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c @@ -5187,7 +5187,7 @@ int get_frame_info_nop(struct atomisp_sub_device *asd, return 0; } -/** +/* * Resets CSS parameters that depend on input resolution. * * Update params like CSS RAW binning, 2ppc mode and pp_input diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c index 6e87aa5aab4c..b7f9da014641 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_css20.c @@ -4051,7 +4051,7 @@ int atomisp_css_get_formats_config(struct atomisp_sub_device *asd, int atomisp_css_get_zoom_factor(struct atomisp_sub_device *asd, unsigned int *zoom) { - struct ia_css_dz_config dz_config; /**< Digital Zoom */ + struct ia_css_dz_config dz_config; /** Digital Zoom */ struct ia_css_isp_config isp_config; struct atomisp_device *isp = asd->isp; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h index 685da0f48bab..95669eedaad1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_compat_ioctl32.h @@ -28,17 +28,17 @@ struct atomisp_histogram32 { }; struct atomisp_dvs2_stat_types32 { - compat_uptr_t odd_real; /**< real part of the odd statistics*/ - compat_uptr_t odd_imag; /**< imaginary part of the odd statistics*/ - compat_uptr_t even_real;/**< real part of the even statistics*/ - compat_uptr_t even_imag;/**< imaginary part of the even statistics*/ + compat_uptr_t odd_real; /** real part of the odd statistics*/ + compat_uptr_t odd_imag; /** imaginary part of the odd statistics*/ + compat_uptr_t even_real;/** real part of the even statistics*/ + compat_uptr_t even_imag;/** imaginary part of the even statistics*/ }; struct atomisp_dvs2_coef_types32 { - compat_uptr_t odd_real; /**< real part of the odd coefficients*/ - compat_uptr_t odd_imag; /**< imaginary part of the odd coefficients*/ - compat_uptr_t even_real;/**< real part of the even coefficients*/ - compat_uptr_t even_imag;/**< imaginary part of the even coefficients*/ + compat_uptr_t odd_real; /** real part of the odd coefficients*/ + compat_uptr_t odd_imag; /** imaginary part of the odd coefficients*/ + compat_uptr_t even_real;/** real part of the even coefficients*/ + compat_uptr_t even_imag;/** imaginary part of the even coefficients*/ }; struct atomisp_dvs2_statistics32 { diff --git a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h index f3d61827ae8c..c3eba675da06 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/atomisp_subdev.h @@ -223,7 +223,7 @@ struct atomisp_subdev_params { bool dis_proj_data_valid; - struct ia_css_dz_config dz_config; /**< Digital Zoom */ + struct ia_css_dz_config dz_config; /** Digital Zoom */ struct ia_css_capture_config capture_config; struct atomisp_css_isp_config config; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c index 19bae1610fb6..050d60f0894f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/base/circbuf/src/circbuf.c @@ -21,7 +21,7 @@ * Forward declarations. * **********************************************************************/ -/** +/* * @brief Read the oldest element from the circular buffer. * Read the oldest element WITHOUT checking whehter the * circular buffer is empty or not. The oldest element is @@ -34,7 +34,7 @@ static inline ia_css_circbuf_elem_t ia_css_circbuf_read(ia_css_circbuf_t *cb); -/** +/* * @brief Shift a chunk of elements in the circular buffer. * A chunk of elements (i.e. the ones from the "start" position * to the "chunk_src" position) are shifted in the circular buffer, @@ -48,7 +48,7 @@ static inline void ia_css_circbuf_shift_chunk(ia_css_circbuf_t *cb, uint32_t chunk_src, uint32_t chunk_dest); -/** +/* * @brief Get the "val" field in the element. * * @param elem The pointer to the element. @@ -63,7 +63,7 @@ ia_css_circbuf_elem_get_val(ia_css_circbuf_elem_t *elem); * Non-inline functions. * **********************************************************************/ -/** +/* * @brief Create the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -88,7 +88,7 @@ ia_css_circbuf_create(ia_css_circbuf_t *cb, cb->elems = elems; } -/** +/* * @brief Destroy the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -99,7 +99,7 @@ void ia_css_circbuf_destroy(ia_css_circbuf_t *cb) cb->elems = NULL; } -/** +/* * @brief Pop a value out of the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -116,7 +116,7 @@ uint32_t ia_css_circbuf_pop(ia_css_circbuf_t *cb) return ret; } -/** +/* * @brief Extract a value out of the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -166,7 +166,7 @@ uint32_t ia_css_circbuf_extract(ia_css_circbuf_t *cb, int offset) return val; } -/** +/* * @brief Peek an element from the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -180,7 +180,7 @@ uint32_t ia_css_circbuf_peek(ia_css_circbuf_t *cb, int offset) return cb->elems[pos].val; } -/** +/* * @brief Get the value of an element from the circular buffer. * Refer to "ia_css_circbuf.h" for details. */ @@ -194,7 +194,7 @@ uint32_t ia_css_circbuf_peek_from_start(ia_css_circbuf_t *cb, int offset) return cb->elems[pos].val; } -/** @brief increase size of a circular buffer. +/* @brief increase size of a circular buffer. * Use 'CAUTION' before using this function. This was added to * support / fix issue with increasing size for tagger only * Please refer to "ia_css_circbuf.h" for details. @@ -252,7 +252,7 @@ bool ia_css_circbuf_increase_size( * Inline functions. * ****************************************************************/ -/** +/* * @brief Get the "val" field in the element. * Refer to "Forward declarations" for details. */ @@ -262,7 +262,7 @@ ia_css_circbuf_elem_get_val(ia_css_circbuf_elem_t *elem) return elem->val; } -/** +/* * @brief Read the oldest element from the circular buffer. * Refer to "Forward declarations" for details. */ @@ -282,7 +282,7 @@ ia_css_circbuf_read(ia_css_circbuf_t *cb) return elem; } -/** +/* * @brief Shift a chunk of elements in the circular buffer. * Refer to "Forward declarations" for details. */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h index 616789d9b3f6..a6d650a9a1f4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_binarydesc.h @@ -19,7 +19,7 @@ #include /* ia_css_frame_info */ #include /* ia_css_binary_descr */ -/** @brief Get a binary descriptor for copy. +/* @brief Get a binary descriptor for copy. * * @param[in] pipe * @param[out] copy_desc @@ -36,7 +36,7 @@ extern void ia_css_pipe_get_copy_binarydesc( struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for vfpp. +/* @brief Get a binary descriptor for vfpp. * * @param[in] pipe * @param[out] vfpp_descr @@ -51,7 +51,7 @@ extern void ia_css_pipe_get_vfpp_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get numerator and denominator of bayer downscaling factor. +/* @brief Get numerator and denominator of bayer downscaling factor. * * @param[in] bds_factor: The bayer downscaling factor. * (= The bds_factor member in the sh_css_bds_factor structure.) @@ -67,7 +67,7 @@ extern enum ia_css_err sh_css_bds_factor_get_numerator_denominator( unsigned int *bds_factor_numerator, unsigned int *bds_factor_denominator); -/** @brief Get a binary descriptor for preview stage. +/* @brief Get a binary descriptor for preview stage. * * @param[in] pipe * @param[out] preview_descr @@ -86,7 +86,7 @@ extern enum ia_css_err ia_css_pipe_get_preview_binarydesc( struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for video stage. +/* @brief Get a binary descriptor for video stage. * * @param[in/out] pipe * @param[out] video_descr @@ -105,7 +105,7 @@ extern enum ia_css_err ia_css_pipe_get_video_binarydesc( struct ia_css_frame_info *vf_info, int stream_config_left_padding); -/** @brief Get a binary descriptor for yuv scaler stage. +/* @brief Get a binary descriptor for yuv scaler stage. * * @param[in/out] pipe * @param[out] yuv_scaler_descr @@ -124,7 +124,7 @@ void ia_css_pipe_get_yuvscaler_binarydesc( struct ia_css_frame_info *internal_out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for capture pp stage. +/* @brief Get a binary descriptor for capture pp stage. * * @param[in/out] pipe * @param[out] capture_pp_descr @@ -140,7 +140,7 @@ extern void ia_css_pipe_get_capturepp_binarydesc( struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for primary capture. +/* @brief Get a binary descriptor for primary capture. * * @param[in] pipe * @param[out] prim_descr @@ -158,7 +158,7 @@ extern void ia_css_pipe_get_primary_binarydesc( struct ia_css_frame_info *vf_info, unsigned int stage_idx); -/** @brief Get a binary descriptor for pre gdc stage. +/* @brief Get a binary descriptor for pre gdc stage. * * @param[in] pipe * @param[out] pre_gdc_descr @@ -173,7 +173,7 @@ extern void ia_css_pipe_get_pre_gdc_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get a binary descriptor for gdc stage. +/* @brief Get a binary descriptor for gdc stage. * * @param[in] pipe * @param[out] gdc_descr @@ -188,7 +188,7 @@ extern void ia_css_pipe_get_gdc_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get a binary descriptor for post gdc. +/* @brief Get a binary descriptor for post gdc. * * @param[in] pipe * @param[out] post_gdc_descr @@ -205,7 +205,7 @@ extern void ia_css_pipe_get_post_gdc_binarydesc( struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for de. +/* @brief Get a binary descriptor for de. * * @param[in] pipe * @param[out] pre_de_descr @@ -220,7 +220,7 @@ extern void ia_css_pipe_get_pre_de_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get a binary descriptor for pre anr stage. +/* @brief Get a binary descriptor for pre anr stage. * * @param[in] pipe * @param[out] pre_anr_descr @@ -235,7 +235,7 @@ extern void ia_css_pipe_get_pre_anr_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get a binary descriptor for ANR stage. +/* @brief Get a binary descriptor for ANR stage. * * @param[in] pipe * @param[out] anr_descr @@ -250,7 +250,7 @@ extern void ia_css_pipe_get_anr_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Get a binary descriptor for post anr stage. +/* @brief Get a binary descriptor for post anr stage. * * @param[in] pipe * @param[out] post_anr_descr @@ -267,7 +267,7 @@ extern void ia_css_pipe_get_post_anr_binarydesc( struct ia_css_frame_info *out_info, struct ia_css_frame_info *vf_info); -/** @brief Get a binary descriptor for ldc stage. +/* @brief Get a binary descriptor for ldc stage. * * @param[in/out] pipe * @param[out] capture_pp_descr @@ -282,7 +282,7 @@ extern void ia_css_pipe_get_ldc_binarydesc( struct ia_css_frame_info *in_info, struct ia_css_frame_info *out_info); -/** @brief Calculates the required BDS factor +/* @brief Calculates the required BDS factor * * @param[in] input_res * @param[in] output_res diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h index ba8858759b30..155b6fb4722b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/pipe/interface/ia_css_pipe_util.h @@ -18,7 +18,7 @@ #include #include -/** @brief Get Input format bits per pixel based on stream configuration of this +/* @brief Get Input format bits per pixel based on stream configuration of this * pipe. * * @param[in] pipe diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h index f8b2e458f876..a8c27676a38b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/camera/util/interface/ia_css_util.h @@ -22,7 +22,7 @@ #include #include -/** @brief convert "errno" error code to "ia_css_err" error code +/* @brief convert "errno" error code to "ia_css_err" error code * * @param[in] "errno" error code * @return "ia_css_err" error code @@ -31,7 +31,7 @@ enum ia_css_err ia_css_convert_errno( int in_err); -/** @brief check vf frame info. +/* @brief check vf frame info. * * @param[in] info * @return IA_CSS_SUCCESS or error code upon error. @@ -40,7 +40,7 @@ enum ia_css_err ia_css_convert_errno( extern enum ia_css_err ia_css_util_check_vf_info( const struct ia_css_frame_info * const info); -/** @brief check input configuration. +/* @brief check input configuration. * * @param[in] stream_config * @param[in] must_be_raw @@ -52,7 +52,7 @@ extern enum ia_css_err ia_css_util_check_input( bool must_be_raw, bool must_be_yuv); -/** @brief check vf and out frame info. +/* @brief check vf and out frame info. * * @param[in] out_info * @param[in] vf_info @@ -63,7 +63,7 @@ extern enum ia_css_err ia_css_util_check_vf_out_info( const struct ia_css_frame_info * const out_info, const struct ia_css_frame_info * const vf_info); -/** @brief check width and height +/* @brief check width and height * * @param[in] width * @param[in] height @@ -75,7 +75,7 @@ extern enum ia_css_err ia_css_util_check_res( unsigned int height); #ifdef ISP2401 -/** @brief compare resolutions (less or equal) +/* @brief compare resolutions (less or equal) * * @param[in] a resolution * @param[in] b resolution @@ -108,7 +108,7 @@ extern bool ia_css_util_resolution_is_even( const struct ia_css_resolution resolution); #endif -/** @brief check width and height +/* @brief check width and height * * @param[in] stream_format * @param[in] two_ppc @@ -119,7 +119,7 @@ extern unsigned int ia_css_util_input_format_bpp( enum ia_css_stream_format stream_format, bool two_ppc); -/** @brief check if input format it raw +/* @brief check if input format it raw * * @param[in] stream_format * @return true if the input format is raw or false otherwise @@ -128,7 +128,7 @@ extern unsigned int ia_css_util_input_format_bpp( extern bool ia_css_util_is_input_format_raw( enum ia_css_stream_format stream_format); -/** @brief check if input format it yuv +/* @brief check if input format it yuv * * @param[in] stream_format * @return true if the input format is yuv or false otherwise diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h index 6720ab55d6f5..9c0cb4a63862 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/csi_rx_private.h @@ -277,6 +277,6 @@ static inline void csi_rx_be_ctrl_reg_store( ia_css_device_store_uint32(CSI_RX_BE_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); } -/** end of DLI */ +/* end of DLI */ #endif /* __CSI_RX_PRIVATE_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h index 470c92d287fe..4d07c2fe1469 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/ibuf_ctrl_private.h @@ -192,7 +192,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_dump_state( ia_css_print("IBUF controller ID %d Process ID %d isp_sync_state 0x%x\n", ID, i, state->proc_state[i].isp_sync_state); } } -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -227,7 +227,7 @@ STORAGE_CLASS_IBUF_CTRL_C void ibuf_ctrl_reg_store( ia_css_device_store_uint32(IBUF_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); } -/** end of DLI */ +/* end of DLI */ #endif /* __IBUF_CTRL_PRIVATE_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c index 14d1d3b627a9..842ae340ae13 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq.c @@ -26,7 +26,7 @@ #include "isys_irq_private.h" #endif -/** Public interface */ +/* Public interface */ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_status_enable( const isys_irq_ID_t isys_irqc_id) { diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h index c17ce131c9e1..e69f39893bd2 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_irq_private.h @@ -59,7 +59,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C void isys_irqc_state_dump( state->status, state->edge, state->mask, state->enable, state->level_no); } -/** end of NCI */ +/* end of NCI */ /* -------------------------------------------------------+ | Device level interface (DLI) | @@ -101,7 +101,7 @@ STORAGE_CLASS_ISYS2401_IRQ_C hrt_data isys_irqc_reg_load( return value; } -/** end of DLI */ +/* end of DLI */ #endif /* defined(USE_INPUT_SYSTEM_VERSION_2401) */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h index 1603a09b621a..f946105ddf43 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/isys_stream2mmio_private.h @@ -122,7 +122,7 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_dump_state( stream2mmio_print_sid_state(&(state->sid_state[i])); } } -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -163,6 +163,6 @@ STORAGE_CLASS_STREAM2MMIO_C void stream2mmio_reg_store( ia_css_device_store_uint32(STREAM2MMIO_CTRL_BASE[ID] + reg * sizeof(hrt_data), value); } -/** end of DLI */ +/* end of DLI */ #endif /* __ISYS_STREAM2MMIO_PRIVATE_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h index 3f34b508f0bf..c5bf540eadf1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/host/pixelgen_private.h @@ -160,5 +160,5 @@ STORAGE_CLASS_PIXELGEN_C void pixelgen_ctrl_reg_store( ia_css_device_store_uint32(PIXELGEN_CTRL_BASE[ID] + reg*sizeof(hrt_data), value); } -/** end of DLI */ +/* end of DLI */ #endif /* __PIXELGEN_PRIVATE_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h index e7a734a9fc43..1be5c6956d65 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/isys_dma_global.h @@ -46,7 +46,7 @@ struct isys2401_dma_port_cfg_s { uint32_t cropping; uint32_t width; }; -/** end of DMA Port */ +/* end of DMA Port */ /************************************************ * @@ -79,7 +79,7 @@ struct isys2401_dma_cfg_s { isys2401_dma_extension extension; uint32_t height; }; -/** end of DMA Device */ +/* end of DMA Device */ /* isys2401_dma_channel limits per DMA ID */ extern const isys2401_dma_channel N_ISYS2401_DMA_CHANNEL_PROCS[N_ISYS2401_DMA_ID]; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h index 216813e42a0a..0bf2feb8bbfb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/pixelgen_global.h @@ -86,6 +86,6 @@ struct pixelgen_prbs_cfg_s { sync_generator_cfg_t sync_gen_cfg; }; -/** end of Pixel-generator: TPG. ("pixelgen_global.h") */ +/* end of Pixel-generator: TPG. ("pixelgen_global.h") */ #endif /* __PIXELGEN_GLOBAL_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h index 9f7ecac46273..d2e3a2deea2e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_2401_csi2p_system/system_global.h @@ -331,7 +331,7 @@ typedef enum { IBUF_CTRL2_ID, /* map ISYS2401_IBUF_CNTRL_C */ N_IBUF_CTRL_ID } ibuf_ctrl_ID_t; -/** end of Input-buffer Controller */ +/* end of Input-buffer Controller */ /* * Stream2MMIO. @@ -364,7 +364,7 @@ typedef enum { STREAM2MMIO_SID7_ID, N_STREAM2MMIO_SID_ID } stream2mmio_sid_ID_t; -/** end of Stream2MMIO */ +/* end of Stream2MMIO */ /** * Input System 2401: CSI-MIPI recevier. @@ -390,7 +390,7 @@ typedef enum { CSI_RX_DLANE3_ID, /* map to DLANE3 in CSI RX */ N_CSI_RX_DLANE_ID } csi_rx_fe_dlane_ID_t; -/** end of CSI-MIPI receiver */ +/* end of CSI-MIPI receiver */ typedef enum { ISYS2401_DMA0_ID = 0, @@ -406,7 +406,7 @@ typedef enum { PIXELGEN2_ID, N_PIXELGEN_ID } pixelgen_ID_t; -/** end of pixel-generator. ("system_global.h") */ +/* end of pixel-generator. ("system_global.h") */ typedef enum { INPUT_SYSTEM_CSI_PORT0_ID = 0, diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h index 1f6a55ff5db8..efcd6e1679e8 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/css_api_version.h @@ -31,7 +31,7 @@ more details. #ifndef __CSS_API_VERSION_H #define __CSS_API_VERSION_H -/** @file +/* @file * CSS API version file. This file contains the version number of the CSS-API. * * This file is generated from a set of input files describing the CSS-API diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c index 5a4eabf79ee2..bcfd443f5202 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/gp_timer.c @@ -21,7 +21,7 @@ #endif /* __INLINE_GP_TIMER__ */ #include "system_local.h" -/** FIXME: not sure if reg_load(), reg_store() should be API. +/* FIXME: not sure if reg_load(), reg_store() should be API. */ static uint32_t gp_timer_reg_load(uint32_t reg); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h index 3b5df85fc510..426d022d3a26 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/csi_rx_public.h @@ -73,7 +73,7 @@ extern void csi_rx_be_ctrl_get_state( extern void csi_rx_be_ctrl_dump_state( const csi_rx_backend_ID_t ID, csi_rx_be_ctrl_state_t *state); -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -130,6 +130,6 @@ extern void csi_rx_be_ctrl_reg_store( const csi_rx_backend_ID_t ID, const hrt_address reg, const hrt_data value); -/** end of DLI */ +/* end of DLI */ #endif /* USE_INPUT_SYSTEM_VERSION_2401 */ #endif /* __CSI_RX_PUBLIC_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h index 1ac0e64e539c..98ee9947fb8e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ibuf_ctrl_public.h @@ -54,7 +54,7 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_get_proc_state( STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_dump_state( const ibuf_ctrl_ID_t ID, ibuf_ctrl_state_t *state); -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -87,7 +87,7 @@ STORAGE_CLASS_IBUF_CTRL_H void ibuf_ctrl_reg_store( const ibuf_ctrl_ID_t ID, const hrt_address reg, const hrt_data value); -/** end of DLI */ +/* end of DLI */ #endif /* USE_INPUT_SYSTEM_VERSION_2401 */ #endif /* __IBUF_CTRL_PUBLIC_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h index a025ad562bd2..0d978e5911c0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op1w.h @@ -49,7 +49,7 @@ /* Arithmetic */ -/** @brief bitwise AND +/* @brief bitwise AND * * @param[in] _a first argument * @param[in] _b second argument @@ -63,7 +63,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_and( const tvector1w _a, const tvector1w _b); -/** @brief bitwise OR +/* @brief bitwise OR * * @param[in] _a first argument * @param[in] _b second argument @@ -77,7 +77,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_or( const tvector1w _a, const tvector1w _b); -/** @brief bitwise XOR +/* @brief bitwise XOR * * @param[in] _a first argument * @param[in] _b second argument @@ -91,7 +91,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_xor( const tvector1w _a, const tvector1w _b); -/** @brief bitwise inverse +/* @brief bitwise inverse * * @param[in] _a first argument * @@ -105,7 +105,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_inv( /* Additive */ -/** @brief addition +/* @brief addition * * @param[in] _a first argument * @param[in] _b second argument @@ -120,7 +120,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_add( const tvector1w _a, const tvector1w _b); -/** @brief subtraction +/* @brief subtraction * * @param[in] _a first argument * @param[in] _b second argument @@ -135,7 +135,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_sub( const tvector1w _a, const tvector1w _b); -/** @brief saturated addition +/* @brief saturated addition * * @param[in] _a first argument * @param[in] _b second argument @@ -150,7 +150,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_addsat( const tvector1w _a, const tvector1w _b); -/** @brief saturated subtraction +/* @brief saturated subtraction * * @param[in] _a first argument * @param[in] _b second argument @@ -166,7 +166,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subsat( const tvector1w _b); #ifdef ISP2401 -/** @brief Unsigned saturated subtraction +/* @brief Unsigned saturated subtraction * * @param[in] _a first argument * @param[in] _b second argument @@ -182,7 +182,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w_unsigned OP_1w_subsat_u( const tvector1w_unsigned _b); #endif -/** @brief subtraction with shift right and rounding +/* @brief subtraction with shift right and rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -202,7 +202,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subasr1( const tvector1w _a, const tvector1w _b); -/** @brief Subtraction with shift right and rounding +/* @brief Subtraction with shift right and rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -217,7 +217,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalfrnd( const tvector1w _a, const tvector1w _b); -/** @brief Subtraction with shift right and no rounding +/* @brief Subtraction with shift right and no rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -233,7 +233,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalf( const tvector1w _b); -/** @brief saturated absolute value +/* @brief saturated absolute value * * @param[in] _a input * @@ -247,7 +247,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subhalf( STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_abs( const tvector1w _a); -/** @brief saturated absolute difference +/* @brief saturated absolute difference * * @param[in] _a first argument * @param[in] _b second argument @@ -264,7 +264,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_subabssat( /* Multiplicative */ -/** @brief doubling multiply +/* @brief doubling multiply * * @param[in] _a first argument * @param[in] _b second argument @@ -281,7 +281,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector2w OP_1w_muld( const tvector1w _a, const tvector1w _b); -/** @brief integer multiply +/* @brief integer multiply * * @param[in] _a first argument * @param[in] _b second argument @@ -298,7 +298,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mul( const tvector1w _a, const tvector1w _b); -/** @brief fractional saturating multiply +/* @brief fractional saturating multiply * * @param[in] _a first argument * @param[in] _b second argument @@ -316,7 +316,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qmul( const tvector1w _a, const tvector1w _b); -/** @brief fractional saturating multiply with rounding +/* @brief fractional saturating multiply with rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -337,7 +337,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qrmul( /* Comparative */ -/** @brief equal +/* @brief equal * * @param[in] _a first argument * @param[in] _b second argument @@ -351,7 +351,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_eq( const tvector1w _a, const tvector1w _b); -/** @brief not equal +/* @brief not equal * * @param[in] _a first argument * @param[in] _b second argument @@ -365,7 +365,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_ne( const tvector1w _a, const tvector1w _b); -/** @brief less or equal +/* @brief less or equal * * @param[in] _a first argument * @param[in] _b second argument @@ -379,7 +379,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_le( const tvector1w _a, const tvector1w _b); -/** @brief less then +/* @brief less then * * @param[in] _a first argument * @param[in] _b second argument @@ -393,7 +393,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_lt( const tvector1w _a, const tvector1w _b); -/** @brief greater or equal +/* @brief greater or equal * * @param[in] _a first argument * @param[in] _b second argument @@ -407,7 +407,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_ge( const tvector1w _a, const tvector1w _b); -/** @brief greater than +/* @brief greater than * * @param[in] _a first argument * @param[in] _b second argument @@ -423,7 +423,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tflags OP_1w_gt( /* Shift */ -/** @brief aritmetic shift right +/* @brief aritmetic shift right * * @param[in] _a input * @param[in] _b shift amount @@ -441,7 +441,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asr( const tvector1w _a, const tvector1w _b); -/** @brief aritmetic shift right with rounding +/* @brief aritmetic shift right with rounding * * @param[in] _a input * @param[in] _b shift amount @@ -460,7 +460,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asrrnd( const tvector1w _a, const tvector1w _b); -/** @brief saturating arithmetic shift left +/* @brief saturating arithmetic shift left * * @param[in] _a input * @param[in] _b shift amount @@ -480,7 +480,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_asl( const tvector1w _a, const tvector1w _b); -/** @brief saturating aritmetic shift left +/* @brief saturating aritmetic shift left * * @param[in] _a input * @param[in] _b shift amount @@ -493,7 +493,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_aslsat( const tvector1w _a, const tvector1w _b); -/** @brief logical shift left +/* @brief logical shift left * * @param[in] _a input * @param[in] _b shift amount @@ -510,7 +510,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lsl( const tvector1w _a, const tvector1w _b); -/** @brief logical shift right +/* @brief logical shift right * * @param[in] _a input * @param[in] _b shift amount @@ -528,7 +528,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lsr( const tvector1w _b); #ifdef ISP2401 -/** @brief bidirectional saturating arithmetic shift +/* @brief bidirectional saturating arithmetic shift * * @param[in] _a input * @param[in] _b shift amount @@ -546,7 +546,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_ashift_sat( const tvector1w _a, const tvector1w _b); -/** @brief bidirectional non-saturating arithmetic shift +/* @brief bidirectional non-saturating arithmetic shift * * @param[in] _a input * @param[in] _b shift amount @@ -565,7 +565,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_ashift( const tvector1w _b); -/** @brief bidirectional logical shift +/* @brief bidirectional logical shift * * @param[in] _a input * @param[in] _b shift amount @@ -588,7 +588,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lshift( #endif /* Cast */ -/** @brief Cast from int to 1w +/* @brief Cast from int to 1w * * @param[in] _a input * @@ -601,7 +601,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_lshift( STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_int_cast_to_1w( const int _a); -/** @brief Cast from 1w to int +/* @brief Cast from 1w to int * * @param[in] _a input * @@ -614,7 +614,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_int_cast_to_1w( STORAGE_CLASS_ISP_OP1W_FUNC_H int OP_1w_cast_to_int( const tvector1w _a); -/** @brief Cast from 1w to 2w +/* @brief Cast from 1w to 2w * * @param[in] _a input * @@ -627,7 +627,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H int OP_1w_cast_to_int( STORAGE_CLASS_ISP_OP1W_FUNC_H tvector2w OP_1w_cast_to_2w( const tvector1w _a); -/** @brief Cast from 2w to 1w +/* @brief Cast from 2w to 1w * * @param[in] _a input * @@ -641,7 +641,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_2w_cast_to_1w( const tvector2w _a); -/** @brief Cast from 2w to 1w with saturation +/* @brief Cast from 2w to 1w with saturation * * @param[in] _a input * @@ -657,7 +657,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_2w_sat_cast_to_1w( /* clipping */ -/** @brief Clip asymmetrical +/* @brief Clip asymmetrical * * @param[in] _a first argument * @param[in] _b second argument @@ -673,7 +673,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_clip_asym( const tvector1w _a, const tvector1w _b); -/** @brief Clip zero +/* @brief Clip zero * * @param[in] _a first argument * @param[in] _b second argument @@ -691,7 +691,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_clipz( /* division */ -/** @brief Truncated division +/* @brief Truncated division * * @param[in] _a first argument * @param[in] _b second argument @@ -708,7 +708,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_div( const tvector1w _a, const tvector1w _b); -/** @brief Fractional saturating divide +/* @brief Fractional saturating divide * * @param[in] _a first argument * @param[in] _b second argument @@ -726,7 +726,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_qdiv( const tvector1w _a, const tvector1w _b); -/** @brief Modulo +/* @brief Modulo * * @param[in] _a first argument * @param[in] _b second argument @@ -741,7 +741,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mod( const tvector1w _a, const tvector1w _b); -/** @brief Unsigned integer Square root +/* @brief Unsigned integer Square root * * @param[in] _a input * @@ -754,7 +754,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w_unsigned OP_1w_sqrt_u( /* Miscellaneous */ -/** @brief Multiplexer +/* @brief Multiplexer * * @param[in] _a first argument * @param[in] _b second argument @@ -770,7 +770,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_mux( const tvector1w _b, const tflags _c); -/** @brief Average without rounding +/* @brief Average without rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -786,7 +786,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_avg( const tvector1w _a, const tvector1w _b); -/** @brief Average with rounding +/* @brief Average with rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -802,7 +802,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_avgrnd( const tvector1w _a, const tvector1w _b); -/** @brief Minimum +/* @brief Minimum * * @param[in] _a first argument * @param[in] _b second argument @@ -816,7 +816,7 @@ STORAGE_CLASS_ISP_OP1W_FUNC_H tvector1w OP_1w_min( const tvector1w _a, const tvector1w _b); -/** @brief Maximum +/* @brief Maximum * * @param[in] _a first argument * @param[in] _b second argument diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h index cf7e7314842d..7575d260b837 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isp_op2w.h @@ -48,7 +48,7 @@ /* Arithmetic */ -/** @brief bitwise AND +/* @brief bitwise AND * * @param[in] _a first argument * @param[in] _b second argument @@ -62,7 +62,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_and( const tvector2w _a, const tvector2w _b); -/** @brief bitwise OR +/* @brief bitwise OR * * @param[in] _a first argument * @param[in] _b second argument @@ -76,7 +76,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_or( const tvector2w _a, const tvector2w _b); -/** @brief bitwise XOR +/* @brief bitwise XOR * * @param[in] _a first argument * @param[in] _b second argument @@ -90,7 +90,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_xor( const tvector2w _a, const tvector2w _b); -/** @brief bitwise inverse +/* @brief bitwise inverse * * @param[in] _a first argument * @@ -104,7 +104,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_inv( /* Additive */ -/** @brief addition +/* @brief addition * * @param[in] _a first argument * @param[in] _b second argument @@ -119,7 +119,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_add( const tvector2w _a, const tvector2w _b); -/** @brief subtraction +/* @brief subtraction * * @param[in] _a first argument * @param[in] _b second argument @@ -134,7 +134,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_sub( const tvector2w _a, const tvector2w _b); -/** @brief saturated addition +/* @brief saturated addition * * @param[in] _a first argument * @param[in] _b second argument @@ -149,7 +149,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_addsat( const tvector2w _a, const tvector2w _b); -/** @brief saturated subtraction +/* @brief saturated subtraction * * @param[in] _a first argument * @param[in] _b second argument @@ -164,7 +164,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subsat( const tvector2w _a, const tvector2w _b); -/** @brief subtraction with shift right and rounding +/* @brief subtraction with shift right and rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -184,7 +184,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subasr1( const tvector2w _a, const tvector2w _b); -/** @brief Subtraction with shift right and rounding +/* @brief Subtraction with shift right and rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -199,7 +199,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalfrnd( const tvector2w _a, const tvector2w _b); -/** @brief Subtraction with shift right and no rounding +/* @brief Subtraction with shift right and no rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -214,7 +214,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalf( const tvector2w _a, const tvector2w _b); -/** @brief saturated absolute value +/* @brief saturated absolute value * * @param[in] _a input * @@ -228,7 +228,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subhalf( STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_abs( const tvector2w _a); -/** @brief saturated absolute difference +/* @brief saturated absolute difference * * @param[in] _a first argument * @param[in] _b second argument @@ -245,7 +245,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_subabssat( /* Multiplicative */ -/** @brief integer multiply +/* @brief integer multiply * * @param[in] _a first argument * @param[in] _b second argument @@ -262,7 +262,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mul( const tvector2w _a, const tvector2w _b); -/** @brief fractional saturating multiply +/* @brief fractional saturating multiply * * @param[in] _a first argument * @param[in] _b second argument @@ -279,7 +279,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qmul( const tvector2w _a, const tvector2w _b); -/** @brief fractional saturating multiply with rounding +/* @brief fractional saturating multiply with rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -301,7 +301,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_qrmul( /* Comparative */ -/** @brief equal +/* @brief equal * * @param[in] _a first argument * @param[in] _b second argument @@ -315,7 +315,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_eq( const tvector2w _a, const tvector2w _b); -/** @brief not equal +/* @brief not equal * * @param[in] _a first argument * @param[in] _b second argument @@ -329,7 +329,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ne( const tvector2w _a, const tvector2w _b); -/** @brief less or equal +/* @brief less or equal * * @param[in] _a first argument * @param[in] _b second argument @@ -343,7 +343,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_le( const tvector2w _a, const tvector2w _b); -/** @brief less then +/* @brief less then * * @param[in] _a first argument * @param[in] _b second argument @@ -357,7 +357,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_lt( const tvector2w _a, const tvector2w _b); -/** @brief greater or equal +/* @brief greater or equal * * @param[in] _a first argument * @param[in] _b second argument @@ -371,7 +371,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_ge( const tvector2w _a, const tvector2w _b); -/** @brief greater than +/* @brief greater than * * @param[in] _a first argument * @param[in] _b second argument @@ -387,7 +387,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tflags OP_2w_gt( /* Shift */ -/** @brief aritmetic shift right +/* @brief aritmetic shift right * * @param[in] _a input * @param[in] _b shift amount @@ -404,7 +404,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asr( const tvector2w _a, const tvector2w _b); -/** @brief aritmetic shift right with rounding +/* @brief aritmetic shift right with rounding * * @param[in] _a input * @param[in] _b shift amount @@ -423,7 +423,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asrrnd( const tvector2w _a, const tvector2w _b); -/** @brief saturating aritmetic shift left +/* @brief saturating aritmetic shift left * * @param[in] _a input * @param[in] _b shift amount @@ -443,7 +443,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_asl( const tvector2w _a, const tvector2w _b); -/** @brief saturating aritmetic shift left +/* @brief saturating aritmetic shift left * * @param[in] _a input * @param[in] _b shift amount @@ -456,7 +456,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_aslsat( const tvector2w _a, const tvector2w _b); -/** @brief logical shift left +/* @brief logical shift left * * @param[in] _a input * @param[in] _b shift amount @@ -473,7 +473,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsl( const tvector2w _a, const tvector2w _b); -/** @brief logical shift right +/* @brief logical shift right * * @param[in] _a input * @param[in] _b shift amount @@ -492,7 +492,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_lsr( /* clipping */ -/** @brief Clip asymmetrical +/* @brief Clip asymmetrical * * @param[in] _a first argument * @param[in] _b second argument @@ -507,7 +507,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clip_asym( const tvector2w _a, const tvector2w _b); -/** @brief Clip zero +/* @brief Clip zero * * @param[in] _a first argument * @param[in] _b second argument @@ -524,7 +524,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_clipz( /* division */ -/** @brief Truncated division +/* @brief Truncated division * * @param[in] _a first argument * @param[in] _b second argument @@ -541,7 +541,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_div( const tvector2w _a, const tvector2w _b); -/** @brief Saturating truncated division +/* @brief Saturating truncated division * * @param[in] _a first argument * @param[in] _b second argument @@ -559,7 +559,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w OP_2w_divh( const tvector2w _a, const tvector1w _b); -/** @brief Modulo +/* @brief Modulo * * @param[in] _a first argument * @param[in] _b second argument @@ -572,7 +572,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mod( const tvector2w _a, const tvector2w _b); -/** @brief Unsigned Integer Square root +/* @brief Unsigned Integer Square root * * @param[in] _a input * @@ -585,7 +585,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector1w_unsigned OP_2w_sqrt_u( /* Miscellaneous */ -/** @brief Multiplexer +/* @brief Multiplexer * * @param[in] _a first argument * @param[in] _b second argument @@ -601,7 +601,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_mux( const tvector2w _b, const tflags _c); -/** @brief Average without rounding +/* @brief Average without rounding * * @param[in] _a first operand * @param[in] _b second operand @@ -617,7 +617,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avg( const tvector2w _a, const tvector2w _b); -/** @brief Average with rounding +/* @brief Average with rounding * * @param[in] _a first argument * @param[in] _b second argument @@ -633,7 +633,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_avgrnd( const tvector2w _a, const tvector2w _b); -/** @brief Minimum +/* @brief Minimum * * @param[in] _a first argument * @param[in] _b second argument @@ -647,7 +647,7 @@ STORAGE_CLASS_ISP_OP2W_FUNC_H tvector2w OP_2w_min( const tvector2w _a, const tvector2w _b); -/** @brief Maximum +/* @brief Maximum * * @param[in] _a first argument * @param[in] _b second argument diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h index 5624cfcfa015..6c53ca9df96c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/isys_stream2mmio_public.h @@ -43,7 +43,7 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_get_sid_state( const stream2mmio_ID_t ID, const stream2mmio_sid_ID_t sid_id, stream2mmio_sid_state_t *state); -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -96,6 +96,6 @@ STORAGE_CLASS_STREAM2MMIO_H void stream2mmio_reg_store( const stream2mmio_ID_t ID, const hrt_address reg, const hrt_data value); -/** end of DLI */ +/* end of DLI */ #endif /* __ISYS_STREAM2MMIO_PUBLIC_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h index c0f3f3ea32d7..f597e07d7c4f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/pixelgen_public.h @@ -41,7 +41,7 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_get_state( STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_dump_state( const pixelgen_ID_t ID, pixelgen_ctrl_state_t *state); -/** end of NCI */ +/* end of NCI */ /***************************************************** * @@ -73,7 +73,7 @@ STORAGE_CLASS_PIXELGEN_H void pixelgen_ctrl_reg_store( const pixelgen_ID_t ID, const hrt_address reg, const hrt_data value); -/** end of DLI */ +/* end of DLI */ #endif /* USE_INPUT_SYSTEM_VERSION_2401 */ #endif /* __PIXELGEN_PUBLIC_H_INCLUDED__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h index a202d6dce106..c1638c06407d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/host/ref_vector_func.h @@ -27,7 +27,7 @@ #include "ref_vector_func_types.h" -/** @brief Doubling multiply accumulate with saturation +/* @brief Doubling multiply accumulate with saturation * * @param[in] acc accumulator * @param[in] a multiply input @@ -44,7 +44,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector2w OP_1w_maccd_sat( tvector1w a, tvector1w b ); -/** @brief Doubling multiply accumulate +/* @brief Doubling multiply accumulate * * @param[in] acc accumulator * @param[in] a multiply input @@ -61,7 +61,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector2w OP_1w_maccd( tvector1w a, tvector1w b ); -/** @brief Re-aligning multiply +/* @brief Re-aligning multiply * * @param[in] a multiply input * @param[in] b multiply input @@ -78,7 +78,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_mul_realigning( tvector1w b, tscalar1w shift ); -/** @brief Leading bit index +/* @brief Leading bit index * * @param[in] a input * @@ -92,7 +92,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_mul_realigning( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_lod( tvector1w a); -/** @brief Config Unit Input Processing +/* @brief Config Unit Input Processing * * @param[in] a input * @param[in] input_scale input scaling factor @@ -111,7 +111,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_input_scaling_offset_clamping( tscalar1w_5bit_signed input_scale, tscalar1w_5bit_signed input_offset); -/** @brief Config Unit Output Processing +/* @brief Config Unit Output Processing * * @param[in] a output * @param[in] output_scale output scaling factor @@ -127,7 +127,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_output_scaling_clamping( tvector1w a, tscalar1w_5bit_signed output_scale); -/** @brief Config Unit Piecewiselinear estimation +/* @brief Config Unit Piecewiselinear estimation * * @param[in] a input * @param[in] config_points config parameter structure @@ -143,7 +143,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_piecewise_estimation( tvector1w a, ref_config_points config_points); -/** @brief Fast Config Unit +/* @brief Fast Config Unit * * @param[in] x input * @param[in] init_vectors LUT data structure @@ -161,7 +161,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_XCU( xcu_ref_init_vectors init_vectors); -/** @brief LXCU +/* @brief LXCU * * @param[in] x input * @param[in] init_vectors LUT data structure @@ -180,7 +180,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_LXCU( tvector1w x, xcu_ref_init_vectors init_vectors); -/** @brief Coring +/* @brief Coring * * @param[in] coring_vec Amount of coring based on brightness level * @param[in] filt_input Vector of input pixels on which Coring is applied @@ -196,7 +196,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w coring( tvector1w filt_input, tscalar1w m_CnrCoring0 ); -/** @brief Normalised FIR with coefficients [3,4,1] +/* @brief Normalised FIR with coefficients [3,4,1] * * @param[in] m 1x3 matrix with pixels * @@ -209,7 +209,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w coring( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_m90_nrm ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [1,4,3] +/* @brief Normalised FIR with coefficients [1,4,3] * * @param[in] m 1x3 matrix with pixels * @@ -222,7 +222,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_m90_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_p90_nrm ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [1,2,1] +/* @brief Normalised FIR with coefficients [1,2,1] * * @param[in] m 1x3 matrix with pixels * @@ -234,7 +234,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_5dB_p90_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [13,16,3] +/* @brief Normalised FIR with coefficients [13,16,3] * * @param[in] m 1x3 matrix with pixels * @@ -246,7 +246,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph0 ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [9,16,7] +/* @brief Normalised FIR with coefficients [9,16,7] * * @param[in] m 1x3 matrix with pixels * @@ -258,7 +258,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph0 ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph1 ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [5,16,11] +/* @brief Normalised FIR with coefficients [5,16,11] * * @param[in] m 1x3 matrix with pixels * @@ -270,7 +270,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph1 ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph2 ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with coefficients [1,16,15] +/* @brief Normalised FIR with coefficients [1,16,15] * * @param[in] m 1x3 matrix with pixels * @@ -282,7 +282,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph2 ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph3 ( const s_1w_1x3_matrix m); -/** @brief Normalised FIR with programable phase shift +/* @brief Normalised FIR with programable phase shift * * @param[in] m 1x3 matrix with pixels * @param[in] coeff phase shift @@ -295,7 +295,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_ph3 ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_6dB_nrm_calc_coeff ( const s_1w_1x3_matrix m, tscalar1w_3bit coeff); -/** @brief 3 tap FIR with coefficients [1,1,1] +/* @brief 3 tap FIR with coefficients [1,1,1] * * @param[in] m 1x3 matrix with pixels * @@ -308,7 +308,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_9dB_nrm ( const s_1w_1x3_matrix m); #ifdef ISP2401 -/** @brief symmetric 3 tap FIR acts as LPF or BSF +/* @brief symmetric 3 tap FIR acts as LPF or BSF * * @param[in] m 1x3 matrix with pixels * @param[in] k filter coefficient shift @@ -336,7 +336,7 @@ sym_fir1x3m_lpf_bsf(s_1w_1x3_matrix m, tscalar_bool bsf_flag); #endif -/** @brief Normalised 2D FIR with coefficients [1;2;1] * [1,2,1] +/* @brief Normalised 2D FIR with coefficients [1;2;1] * [1,2,1] * * @param[in] m 3x3 matrix with pixels * @@ -353,7 +353,7 @@ sym_fir1x3m_lpf_bsf(s_1w_1x3_matrix m, STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_6dB_nrm ( const s_1w_3x3_matrix m); -/** @brief Normalised 2D FIR with coefficients [1;1;1] * [1,1,1] +/* @brief Normalised 2D FIR with coefficients [1;1;1] * [1,1,1] * * @param[in] m 3x3 matrix with pixels * @@ -371,7 +371,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_6dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm ( const s_1w_3x3_matrix m); -/** @brief Normalised dual output 2D FIR with coefficients [1;2;1] * [1,2,1] +/* @brief Normalised dual output 2D FIR with coefficients [1;2;1] * [1,2,1] * * @param[in] m 4x3 matrix with pixels * @@ -391,7 +391,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_6dB_out2x1_nrm ( const s_1w_4x3_matrix m); -/** @brief Normalised dual output 2D FIR with coefficients [1;1;1] * [1,1,1] +/* @brief Normalised dual output 2D FIR with coefficients [1;1;1] * [1,1,1] * * @param[in] m 4x3 matrix with pixels * @@ -411,7 +411,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir3x3m_9dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_9dB_out2x1_nrm ( const s_1w_4x3_matrix m); -/** @brief Normalised 2D FIR 5x5 +/* @brief Normalised 2D FIR 5x5 * * @param[in] m 5x5 matrix with pixels * @@ -429,7 +429,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H s_1w_2x1_matrix fir3x3m_9dB_out2x1_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_15dB_nrm ( const s_1w_5x5_matrix m); -/** @brief Normalised FIR 1x5 +/* @brief Normalised FIR 1x5 * * @param[in] m 1x5 matrix with pixels * @@ -447,7 +447,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_15dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_12dB_nrm ( const s_1w_1x5_matrix m); -/** @brief Normalised 2D FIR 5x5 +/* @brief Normalised 2D FIR 5x5 * * @param[in] m 5x5 matrix with pixels * @@ -465,7 +465,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_12dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_12dB_nrm ( const s_1w_5x5_matrix m); -/** @brief Approximate averaging FIR 1x5 +/* @brief Approximate averaging FIR 1x5 * * @param[in] m 1x5 matrix with pixels * @@ -479,7 +479,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir5x5m_12dB_nrm ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_box ( s_1w_1x5_matrix m); -/** @brief Approximate averaging FIR 1x9 +/* @brief Approximate averaging FIR 1x9 * * @param[in] m 1x9 matrix with pixels * @@ -493,7 +493,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x5m_box ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x9m_box ( s_1w_1x9_matrix m); -/** @brief Approximate averaging FIR 1x11 +/* @brief Approximate averaging FIR 1x11 * * @param[in] m 1x11 matrix with pixels * @@ -507,7 +507,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x9m_box ( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x11m_box ( s_1w_1x11_matrix m); -/** @brief Symmetric 7 tap filter with normalization +/* @brief Symmetric 7 tap filter with normalization * * @param[in] in 1x7 matrix with pixels * @param[in] coeff 1x4 matrix with coefficients @@ -528,7 +528,7 @@ fir1x7m_sym_nrm(s_1w_1x7_matrix in, s_1w_1x4_matrix coeff, tvector1w out_shift); -/** @brief Symmetric 7 tap filter with normalization at input side +/* @brief Symmetric 7 tap filter with normalization at input side * * @param[in] in 1x7 matrix with pixels * @param[in] coeff 1x4 matrix with coefficients @@ -549,7 +549,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x7m_sym_innrm_approx(s_1w_1x7_matrix in, s_1w_1x4_matrix coeff); -/** @brief Symmetric 7 tap filter with normalization at output side +/* @brief Symmetric 7 tap filter with normalization at output side * * @param[in] in 1x7 matrix with pixels * @param[in] coeff 1x4 matrix with coefficients @@ -571,7 +571,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x7m_sym_outnrm_approx(s_1w_1x7_matrix in, s_1w_1x4_matrix coeff); -/** @brief 4 tap filter with normalization +/* @brief 4 tap filter with normalization * * @param[in] in 1x4 matrix with pixels * @param[in] coeff 1x4 matrix with coefficients @@ -588,7 +588,7 @@ fir1x4m_nrm(s_1w_1x4_matrix in, s_1w_1x4_matrix coeff, tvector1w out_shift); -/** @brief 4 tap filter with normalization for half pixel interpolation +/* @brief 4 tap filter with normalization for half pixel interpolation * * @param[in] in 1x4 matrix with pixels * @@ -604,7 +604,7 @@ fir1x4m_nrm(s_1w_1x4_matrix in, STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x4m_bicubic_bezier_half(s_1w_1x4_matrix in); -/** @brief 4 tap filter with normalization for quarter pixel interpolation +/* @brief 4 tap filter with normalization for quarter pixel interpolation * * @param[in] in 1x4 matrix with pixels * @param[in] coeff 1x4 matrix with coefficients @@ -626,7 +626,7 @@ fir1x4m_bicubic_bezier_quarter(s_1w_1x4_matrix in, s_1w_1x4_matrix coeff); -/** @brief Symmetric 3 tap filter with normalization +/* @brief Symmetric 3 tap filter with normalization * * @param[in] in 1x3 matrix with pixels * @param[in] coeff 1x2 matrix with coefficients @@ -646,7 +646,7 @@ fir1x3m_sym_nrm(s_1w_1x3_matrix in, s_1w_1x2_matrix coeff, tvector1w out_shift); -/** @brief Symmetric 3 tap filter with normalization +/* @brief Symmetric 3 tap filter with normalization * * @param[in] in 1x3 matrix with pixels * @param[in] coeff 1x2 matrix with coefficients @@ -666,7 +666,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w fir1x3m_sym_nrm_approx(s_1w_1x3_matrix in, s_1w_1x2_matrix coeff); -/** @brief Mean of 1x3 matrix +/* @brief Mean of 1x3 matrix * * @param[in] m 1x3 matrix with pixels * @@ -678,7 +678,7 @@ fir1x3m_sym_nrm_approx(s_1w_1x3_matrix in, STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x3m( s_1w_1x3_matrix m); -/** @brief Mean of 3x3 matrix +/* @brief Mean of 3x3 matrix * * @param[in] m 3x3 matrix with pixels * @@ -690,7 +690,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x3m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean3x3m( s_1w_3x3_matrix m); -/** @brief Mean of 1x4 matrix +/* @brief Mean of 1x4 matrix * * @param[in] m 1x4 matrix with pixels * @@ -701,7 +701,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean3x3m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x4m( s_1w_1x4_matrix m); -/** @brief Mean of 4x4 matrix +/* @brief Mean of 4x4 matrix * * @param[in] m 4x4 matrix with pixels * @@ -712,7 +712,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x4m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean4x4m( s_1w_4x4_matrix m); -/** @brief Mean of 2x3 matrix +/* @brief Mean of 2x3 matrix * * @param[in] m 2x3 matrix with pixels * @@ -724,7 +724,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean4x4m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean2x3m( s_1w_2x3_matrix m); -/** @brief Mean of 1x5 matrix +/* @brief Mean of 1x5 matrix * * @param[in] m 1x5 matrix with pixels * @@ -735,7 +735,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean2x3m( */ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x5m(s_1w_1x5_matrix m); -/** @brief Mean of 1x6 matrix +/* @brief Mean of 1x6 matrix * * @param[in] m 1x6 matrix with pixels * @@ -747,7 +747,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x5m(s_1w_1x5_matrix m); STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x6m( s_1w_1x6_matrix m); -/** @brief Mean of 5x5 matrix +/* @brief Mean of 5x5 matrix * * @param[in] m 5x5 matrix with pixels * @@ -759,7 +759,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean1x6m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean5x5m( s_1w_5x5_matrix m); -/** @brief Mean of 6x6 matrix +/* @brief Mean of 6x6 matrix * * @param[in] m 6x6 matrix with pixels * @@ -771,7 +771,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean5x5m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean6x6m( s_1w_6x6_matrix m); -/** @brief Minimum of 4x4 matrix +/* @brief Minimum of 4x4 matrix * * @param[in] m 4x4 matrix with pixels * @@ -783,7 +783,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w mean6x6m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w min4x4m( s_1w_4x4_matrix m); -/** @brief Maximum of 4x4 matrix +/* @brief Maximum of 4x4 matrix * * @param[in] m 4x4 matrix with pixels * @@ -795,7 +795,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w min4x4m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w max4x4m( s_1w_4x4_matrix m); -/** @brief SAD between two 3x3 matrices +/* @brief SAD between two 3x3 matrices * * @param[in] a 3x3 matrix with pixels * @@ -813,7 +813,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad3x3m_precise( s_1w_3x3_matrix a, s_1w_3x3_matrix b); -/** @brief SAD between two 3x3 matrices +/* @brief SAD between two 3x3 matrices * * @param[in] a 3x3 matrix with pixels * @@ -833,7 +833,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad3x3m( s_1w_3x3_matrix a, s_1w_3x3_matrix b); -/** @brief SAD between two 5x5 matrices +/* @brief SAD between two 5x5 matrices * * @param[in] a 5x5 matrix with pixels * @@ -847,7 +847,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad5x5m( s_1w_5x5_matrix a, s_1w_5x5_matrix b); -/** @brief Absolute gradient between two sets of 1x5 matrices +/* @brief Absolute gradient between two sets of 1x5 matrices * * @param[in] m0 first set of 1x5 matrix with pixels * @param[in] m1 second set of 1x5 matrix with pixels @@ -860,7 +860,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w sad5x5m( STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w absgrad1x5m(s_1w_1x5_matrix m0, s_1w_1x5_matrix m1); -/** @brief Bi-linear Interpolation optimized(approximate) +/* @brief Bi-linear Interpolation optimized(approximate) * * @param[in] a input0 * @param[in] b input1 @@ -882,7 +882,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol_approx_c( tvector1w b, tscalar1w_weight c); -/** @brief Bi-linear Interpolation optimized(approximate) +/* @brief Bi-linear Interpolation optimized(approximate) * * @param[in] a input0 * @param[in] b input1 @@ -904,7 +904,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol_approx( tvector1w b, tvector1w_weight c); -/** @brief Bi-linear Interpolation +/* @brief Bi-linear Interpolation * * @param[in] a input0 * @param[in] b input1 @@ -925,7 +925,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_bilinear_interpol( tvector1w b, tscalar1w_weight c); -/** @brief Generic Block Matching Algorithm +/* @brief Generic Block Matching Algorithm * @param[in] search_window pointer to input search window of 16x16 pixels * @param[in] ref_block pointer to input reference block of 8x8 pixels, where N<=M * @param[in] output pointer to output sads @@ -954,9 +954,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H int generic_block_matching_algorithm( tscalar1w_4bit_bma_shift shift); #ifndef ISP2401 -/** @brief OP_1w_asp_bma_16_1_32way +/* @brief OP_1w_asp_bma_16_1_32way #else -/** @brief OP_1w_asp_bma_16_1_32way_nomask +/* @brief OP_1w_asp_bma_16_1_32way_nomask #endif * * @param[in] search_area input search window of 16x16 pixels @@ -984,9 +984,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_16_1 OP_1w_asp_bma_16_1_32way_nomask( tscalar1w_4bit_bma_shift shift); #ifndef ISP2401 -/** @brief OP_1w_asp_bma_16_2_32way +/* @brief OP_1w_asp_bma_16_2_32way #else -/** @brief OP_1w_asp_bma_16_2_32way_nomask +/* @brief OP_1w_asp_bma_16_2_32way_nomask #endif * * @param[in] search_area input search window of 16x16 pixels @@ -1011,9 +1011,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_16_2 OP_1w_asp_bma_16_2_32way_nomask( ref_block_8x8 input_block, tscalar1w_4bit_bma_shift shift); #ifndef ISP2401 -/** @brief OP_1w_asp_bma_14_1_32way +/* @brief OP_1w_asp_bma_14_1_32way #else -/** @brief OP_1w_asp_bma_14_1_32way_nomask +/* @brief OP_1w_asp_bma_14_1_32way_nomask #endif * * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels @@ -1041,9 +1041,9 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_14_1 OP_1w_asp_bma_14_1_32way_nomask( tscalar1w_4bit_bma_shift shift); #ifndef ISP2401 -/** @brief OP_1w_asp_bma_14_2_32way +/* @brief OP_1w_asp_bma_14_2_32way #else -/** @brief OP_1w_asp_bma_14_2_32way_nomask +/* @brief OP_1w_asp_bma_14_2_32way_nomask #endif * * @param[in] search_area input search block of 16x16 pixels with search window of 14x14 pixels @@ -1069,7 +1069,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bma_output_14_2 OP_1w_asp_bma_14_2_32way_nomask( tscalar1w_4bit_bma_shift shift); #ifdef ISP2401 -/** @brief multiplex addition and passing +/* @brief multiplex addition and passing * * @param[in] _a first pixel * @param[in] _b second pixel @@ -1087,7 +1087,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H tvector1w OP_1w_cond_add( #endif #ifdef HAS_bfa_unit -/** @brief OP_1w_single_bfa_7x7 +/* @brief OP_1w_single_bfa_7x7 * * @param[in] weights - spatial and range weight lut * @param[in] threshold - threshold plane, for range weight scaling @@ -1115,7 +1115,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bfa_7x7_output OP_1w_single_bfa_7x7( tvector1w central_pix, s_1w_7x7_matrix src_plane); -/** @brief OP_1w_joint_bfa_7x7 +/* @brief OP_1w_joint_bfa_7x7 * * @param[in] weights - spatial and range weight lut * @param[in] threshold0 - 1st threshold plane, for range weight scaling @@ -1149,7 +1149,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H bfa_7x7_output OP_1w_joint_bfa_7x7( tvector1w central_pix1, s_1w_7x7_matrix src1_plane); -/** @brief bbb_bfa_gen_spatial_weight_lut +/* @brief bbb_bfa_gen_spatial_weight_lut * * @param[in] in - 7x7 matrix of spatial weights * @param[in] out - generated LUT @@ -1163,7 +1163,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_spatial_weight_lut( s_1w_7x7_matrix in, tvector1w out[BFA_MAX_KWAY]); -/** @brief bbb_bfa_gen_range_weight_lut +/* @brief bbb_bfa_gen_range_weight_lut * * @param[in] in - input range weight, * @param[in] out - generated LUT @@ -1184,7 +1184,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_range_weight_lut( #endif #ifdef ISP2401 -/** @brief OP_1w_imax32 +/* @brief OP_1w_imax32 * * @param[in] src - structure that holds an array of 32 elements. * @@ -1195,7 +1195,7 @@ STORAGE_CLASS_REF_VECTOR_FUNC_H void bbb_bfa_gen_range_weight_lut( STORAGE_CLASS_REF_VECTOR_FUNC_H int OP_1w_imax32( imax32_ref_in_vector src); -/** @brief OP_1w_imaxidx32 +/* @brief OP_1w_imaxidx32 * * @param[in] src - structure that holds a vector of elements. * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h index e85e5c889c15..6436dae0007e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/math_support.h @@ -168,7 +168,7 @@ static inline unsigned int round_half_down_mul(unsigned int a, unsigned int b) } #endif -/** @brief Next Power of Two +/* @brief Next Power of Two * * @param[in] unsigned number * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h index d80437c58bde..f4d9674cdab6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_include/string_support.h @@ -23,7 +23,7 @@ */ -/** @brief Copy from src_buf to dest_buf. +/* @brief Copy from src_buf to dest_buf. * * @param[out] dest_buf. Destination buffer to copy to * @param[in] dest_size. The size of the destination buffer in bytes @@ -53,7 +53,7 @@ static inline int memcpy_s( return 0; } -/** @brief Get the length of the string, excluding the null terminator +/* @brief Get the length of the string, excluding the null terminator * * @param[in] src_str. The source string * @param[in] max_len. Look only for max_len bytes in the string @@ -78,7 +78,7 @@ static size_t strnlen_s( return ix; } -/** @brief Copy string from src_str to dest_str +/* @brief Copy string from src_str to dest_str * * @param[out] dest_str. Destination buffer to copy to * @param[in] dest_size. The size of the destination buffer in bytes @@ -120,7 +120,7 @@ static inline int strncpy_s( return 0; } -/** @brief Copy string from src_str to dest_str +/* @brief Copy string from src_str to dest_str * * @param[out] dest_str. Destination buffer to copy to * @param[in] dest_size. The size of the destination buffer in bytes diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c index 9aa8c168a803..2cf1d58941bf 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_shared/host/tag.c @@ -17,7 +17,7 @@ #include #include "tag_local.h" -/** +/* * @brief Creates the tag description from the given parameters. * @param[in] num_captures * @param[in] skip @@ -39,7 +39,7 @@ sh_css_create_tag_descr(int num_captures, tag_descr->exp_id = exp_id; } -/** +/* * @brief Encodes the members of tag description into a 32-bit value. * @param[in] tag Pointer to the tag description * @return (unsigned int) Encoded 32-bit tag-info diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h index 2458b3767c90..e44df6916d90 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css.h @@ -16,7 +16,7 @@ #ifndef _IA_CSS_H_ #define _IA_CSS_H_ -/** @file +/* @file * This file is the starting point of the CSS-API. It includes all CSS-API * header files. */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h index a80a7dbaf712..080198796ad0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_3a.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_3A_H #define __IA_CSS_3A_H -/** @file +/* @file * This file contains types used for 3A statistics */ @@ -31,7 +31,7 @@ enum ia_css_3a_tables { IA_CSS_NUM_3A_TABLES }; -/** Structure that holds 3A statistics in the ISP internal +/* Structure that holds 3A statistics in the ISP internal * format. Use ia_css_get_3a_statistics() to translate * this to the format used on the host (3A library). * */ @@ -48,13 +48,13 @@ struct ia_css_isp_3a_statistics { struct { ia_css_ptr rgby_tbl; } data_hmem; - uint32_t exp_id; /**< exposure id, to match statistics to a frame, + uint32_t exp_id; /** exposure id, to match statistics to a frame, see ia_css_event_public.h for more detail. */ - uint32_t isp_config_id;/**< Unique ID to track which config was actually applied to a particular frame */ - ia_css_ptr data_ptr; /**< pointer to base of all data */ - uint32_t size; /**< total size of all data */ + uint32_t isp_config_id;/** Unique ID to track which config was actually applied to a particular frame */ + ia_css_ptr data_ptr; /** pointer to base of all data */ + uint32_t size; /** total size of all data */ uint32_t dmem_size; - uint32_t vmem_size; /**< both lo and hi have this size */ + uint32_t vmem_size; /** both lo and hi have this size */ uint32_t hmem_size; }; #define SIZE_OF_DMEM_STRUCT \ @@ -77,7 +77,7 @@ struct ia_css_isp_3a_statistics { SIZE_OF_IA_CSS_PTR + \ 4 * sizeof(uint32_t)) -/** Map with host-side pointers to ISP-format statistics. +/* Map with host-side pointers to ISP-format statistics. * These pointers can either be copies of ISP data or memory mapped * ISP pointers. * All of the data behind these pointers is allocated contiguously, the @@ -85,17 +85,17 @@ struct ia_css_isp_3a_statistics { * point into this one block of data. */ struct ia_css_isp_3a_statistics_map { - void *data_ptr; /**< Pointer to start of memory */ + void *data_ptr; /** Pointer to start of memory */ struct ia_css_3a_output *dmem_stats; uint16_t *vmem_stats_hi; uint16_t *vmem_stats_lo; struct ia_css_bh_table *hmem_stats; - uint32_t size; /**< total size in bytes of data_ptr */ - uint32_t data_allocated; /**< indicate whether data_ptr + uint32_t size; /** total size in bytes of data_ptr */ + uint32_t data_allocated; /** indicate whether data_ptr was allocated or not. */ }; -/** @brief Copy and translate 3A statistics from an ISP buffer to a host buffer +/* @brief Copy and translate 3A statistics from an ISP buffer to a host buffer * @param[out] host_stats Host buffer. * @param[in] isp_stats ISP buffer. * @return error value if temporary memory cannot be allocated @@ -109,7 +109,7 @@ enum ia_css_err ia_css_get_3a_statistics(struct ia_css_3a_statistics *host_stats, const struct ia_css_isp_3a_statistics *isp_stats); -/** @brief Translate 3A statistics from ISP format to host format. +/* @brief Translate 3A statistics from ISP format to host format. * @param[out] host_stats host-format statistics * @param[in] isp_stats ISP-format statistics * @return None @@ -125,35 +125,35 @@ ia_css_translate_3a_statistics( /* Convenience functions for alloc/free of certain datatypes */ -/** @brief Allocate memory for the 3a statistics on the ISP +/* @brief Allocate memory for the 3a statistics on the ISP * @param[in] grid The grid. * @return Pointer to the allocated 3a statistics buffer on the ISP */ struct ia_css_isp_3a_statistics * ia_css_isp_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); -/** @brief Free the 3a statistics memory on the isp +/* @brief Free the 3a statistics memory on the isp * @param[in] me Pointer to the 3a statistics buffer on the ISP. * @return None */ void ia_css_isp_3a_statistics_free(struct ia_css_isp_3a_statistics *me); -/** @brief Allocate memory for the 3a statistics on the host +/* @brief Allocate memory for the 3a statistics on the host * @param[in] grid The grid. * @return Pointer to the allocated 3a statistics buffer on the host */ struct ia_css_3a_statistics * ia_css_3a_statistics_allocate(const struct ia_css_3a_grid_info *grid); -/** @brief Free the 3a statistics memory on the host +/* @brief Free the 3a statistics memory on the host * @param[in] me Pointer to the 3a statistics buffer on the host. * @return None */ void ia_css_3a_statistics_free(struct ia_css_3a_statistics *me); -/** @brief Allocate a 3a statistics map structure +/* @brief Allocate a 3a statistics map structure * @param[in] isp_stats pointer to ISP 3a statistis struct * @param[in] data_ptr host-side pointer to ISP 3a statistics. * @return Pointer to the allocated 3a statistics map @@ -174,7 +174,7 @@ ia_css_isp_3a_statistics_map_allocate( const struct ia_css_isp_3a_statistics *isp_stats, void *data_ptr); -/** @brief Free the 3a statistics map +/* @brief Free the 3a statistics map * @param[in] me Pointer to the 3a statistics map * @return None * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h index a2a1873aca83..138bc3bb4627 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_acc_types.h @@ -15,7 +15,7 @@ #ifndef _IA_CSS_ACC_TYPES_H #define _IA_CSS_ACC_TYPES_H -/** @file +/* @file * This file contains types used for acceleration */ @@ -40,16 +40,16 @@ * in the kernel and HAL. */ -/** Type of acceleration. +/* Type of acceleration. */ enum ia_css_acc_type { - IA_CSS_ACC_NONE, /**< Normal binary */ - IA_CSS_ACC_OUTPUT, /**< Accelerator stage on output frame */ - IA_CSS_ACC_VIEWFINDER, /**< Accelerator stage on viewfinder frame */ - IA_CSS_ACC_STANDALONE, /**< Stand-alone acceleration */ + IA_CSS_ACC_NONE, /** Normal binary */ + IA_CSS_ACC_OUTPUT, /** Accelerator stage on output frame */ + IA_CSS_ACC_VIEWFINDER, /** Accelerator stage on viewfinder frame */ + IA_CSS_ACC_STANDALONE, /** Stand-alone acceleration */ }; -/** Cells types +/* Cells types */ enum ia_css_cell_type { IA_CSS_SP0 = 0, @@ -58,45 +58,45 @@ enum ia_css_cell_type { MAX_NUM_OF_CELLS }; -/** Firmware types. +/* Firmware types. */ enum ia_css_fw_type { - ia_css_sp_firmware, /**< Firmware for the SP */ - ia_css_isp_firmware, /**< Firmware for the ISP */ - ia_css_bootloader_firmware, /**< Firmware for the BootLoader */ - ia_css_acc_firmware /**< Firmware for accelrations */ + ia_css_sp_firmware, /** Firmware for the SP */ + ia_css_isp_firmware, /** Firmware for the ISP */ + ia_css_bootloader_firmware, /** Firmware for the BootLoader */ + ia_css_acc_firmware /** Firmware for accelrations */ }; struct ia_css_blob_descr; -/** Blob descriptor. +/* Blob descriptor. * This structure describes an SP or ISP blob. * It describes the test, data and bss sections as well as position in a * firmware file. * For convenience, it contains dynamic data after loading. */ struct ia_css_blob_info { - /**< Static blob data */ - uint32_t offset; /**< Blob offset in fw file */ - struct ia_css_isp_param_memory_offsets memory_offsets; /**< offset wrt hdr in bytes */ - uint32_t prog_name_offset; /**< offset wrt hdr in bytes */ - uint32_t size; /**< Size of blob */ - uint32_t padding_size; /**< total cummulative of bytes added due to section alignment */ - uint32_t icache_source; /**< Position of icache in blob */ - uint32_t icache_size; /**< Size of icache section */ - uint32_t icache_padding;/**< bytes added due to icache section alignment */ - uint32_t text_source; /**< Position of text in blob */ - uint32_t text_size; /**< Size of text section */ - uint32_t text_padding; /**< bytes added due to text section alignment */ - uint32_t data_source; /**< Position of data in blob */ - uint32_t data_target; /**< Start of data in SP dmem */ - uint32_t data_size; /**< Size of text section */ - uint32_t data_padding; /**< bytes added due to data section alignment */ - uint32_t bss_target; /**< Start position of bss in SP dmem */ - uint32_t bss_size; /**< Size of bss section */ - /**< Dynamic data filled by loader */ - CSS_ALIGN(const void *code, 8); /**< Code section absolute pointer within fw, code = icache + text */ - CSS_ALIGN(const void *data, 8); /**< Data section absolute pointer within fw, data = data + bss */ + /** Static blob data */ + uint32_t offset; /** Blob offset in fw file */ + struct ia_css_isp_param_memory_offsets memory_offsets; /** offset wrt hdr in bytes */ + uint32_t prog_name_offset; /** offset wrt hdr in bytes */ + uint32_t size; /** Size of blob */ + uint32_t padding_size; /** total cummulative of bytes added due to section alignment */ + uint32_t icache_source; /** Position of icache in blob */ + uint32_t icache_size; /** Size of icache section */ + uint32_t icache_padding;/** bytes added due to icache section alignment */ + uint32_t text_source; /** Position of text in blob */ + uint32_t text_size; /** Size of text section */ + uint32_t text_padding; /** bytes added due to text section alignment */ + uint32_t data_source; /** Position of data in blob */ + uint32_t data_target; /** Start of data in SP dmem */ + uint32_t data_size; /** Size of text section */ + uint32_t data_padding; /** bytes added due to data section alignment */ + uint32_t bss_target; /** Start position of bss in SP dmem */ + uint32_t bss_size; /** Size of bss section */ + /** Dynamic data filled by loader */ + CSS_ALIGN(const void *code, 8); /** Code section absolute pointer within fw, code = icache + text */ + CSS_ALIGN(const void *data, 8); /** Data section absolute pointer within fw, data = data + bss */ }; struct ia_css_binary_input_info { @@ -140,9 +140,9 @@ struct ia_css_binary_s3a_info { uint32_t fixed_s3a_deci_log; }; -/** DPC related binary info */ +/* DPC related binary info */ struct ia_css_binary_dpc_info { - uint32_t bnr_lite; /**< bnr lite enable flag */ + uint32_t bnr_lite; /** bnr lite enable flag */ }; struct ia_css_binary_iterator_info { @@ -193,7 +193,7 @@ struct ia_css_binary_block_info { uint32_t output_block_height; }; -/** Structure describing an ISP binary. +/* Structure describing an ISP binary. * It describes the capabilities of a binary, like the maximum resolution, * support features, dma channels, uds features, etc. * This part is to be used by the SP. @@ -210,7 +210,7 @@ struct ia_css_binary_info { struct ia_css_binary_dvs_info dvs; struct ia_css_binary_vf_dec_info vf_dec; struct ia_css_binary_s3a_info s3a; - struct ia_css_binary_dpc_info dpc_bnr; /**< DPC related binary info */ + struct ia_css_binary_dpc_info dpc_bnr; /** DPC related binary info */ struct ia_css_binary_iterator_info iterator; struct ia_css_binary_address_info addresses; struct ia_css_binary_uds_info uds; @@ -269,7 +269,7 @@ struct ia_css_binary_info { } dma; }; -/** Structure describing an ISP binary. +/* Structure describing an ISP binary. * It describes the capabilities of a binary, like the maximum resolution, * support features, dma channels, uds features, etc. */ @@ -281,8 +281,8 @@ struct ia_css_binary_xinfo { enum ia_css_acc_type type; CSS_ALIGN(int32_t num_output_formats, 8); enum ia_css_frame_format output_formats[IA_CSS_FRAME_FORMAT_NUM]; - CSS_ALIGN(int32_t num_vf_formats, 8); /**< number of supported vf formats */ - enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /**< types of supported vf formats */ + CSS_ALIGN(int32_t num_vf_formats, 8); /** number of supported vf formats */ + enum ia_css_frame_format vf_formats[IA_CSS_FRAME_FORMAT_NUM]; /** types of supported vf formats */ uint8_t num_output_pins; ia_css_ptr xmem_addr; CSS_ALIGN(const struct ia_css_blob_descr *blob, 8); @@ -291,55 +291,55 @@ struct ia_css_binary_xinfo { CSS_ALIGN(struct ia_css_binary_xinfo *next, 8); }; -/** Structure describing the Bootloader (an ISP binary). +/* Structure describing the Bootloader (an ISP binary). * It contains several address, either in ddr, isp_dmem or * the entry function in icache. */ struct ia_css_bl_info { - uint32_t num_dma_cmds; /**< Number of cmds sent by CSS */ - uint32_t dma_cmd_list; /**< Dma command list sent by CSS */ - uint32_t sw_state; /**< Polled from css */ + uint32_t num_dma_cmds; /** Number of cmds sent by CSS */ + uint32_t dma_cmd_list; /** Dma command list sent by CSS */ + uint32_t sw_state; /** Polled from css */ /* Entry functions */ - uint32_t bl_entry; /**< The SP entry function */ + uint32_t bl_entry; /** The SP entry function */ }; -/** Structure describing the SP binary. +/* Structure describing the SP binary. * It contains several address, either in ddr, sp_dmem or * the entry function in pmem. */ struct ia_css_sp_info { - uint32_t init_dmem_data; /**< data sect config, stored to dmem */ - uint32_t per_frame_data; /**< Per frame data, stored to dmem */ - uint32_t group; /**< Per pipeline data, loaded by dma */ - uint32_t output; /**< SP output data, loaded by dmem */ - uint32_t host_sp_queue; /**< Host <-> SP queues */ - uint32_t host_sp_com;/**< Host <-> SP commands */ - uint32_t isp_started; /**< Polled from sensor thread, csim only */ - uint32_t sw_state; /**< Polled from css */ - uint32_t host_sp_queues_initialized; /**< Polled from the SP */ - uint32_t sleep_mode; /**< different mode to halt SP */ - uint32_t invalidate_tlb; /**< inform SP to invalidate mmu TLB */ + uint32_t init_dmem_data; /** data sect config, stored to dmem */ + uint32_t per_frame_data; /** Per frame data, stored to dmem */ + uint32_t group; /** Per pipeline data, loaded by dma */ + uint32_t output; /** SP output data, loaded by dmem */ + uint32_t host_sp_queue; /** Host <-> SP queues */ + uint32_t host_sp_com;/** Host <-> SP commands */ + uint32_t isp_started; /** Polled from sensor thread, csim only */ + uint32_t sw_state; /** Polled from css */ + uint32_t host_sp_queues_initialized; /** Polled from the SP */ + uint32_t sleep_mode; /** different mode to halt SP */ + uint32_t invalidate_tlb; /** inform SP to invalidate mmu TLB */ #ifndef ISP2401 - uint32_t stop_copy_preview; /**< suspend copy and preview pipe when capture */ + uint32_t stop_copy_preview; /** suspend copy and preview pipe when capture */ #endif - uint32_t debug_buffer_ddr_address; /**< inform SP the address + uint32_t debug_buffer_ddr_address; /** inform SP the address of DDR debug queue */ - uint32_t perf_counter_input_system_error; /**< input system perf + uint32_t perf_counter_input_system_error; /** input system perf counter array */ #ifdef HAS_WATCHDOG_SP_THREAD_DEBUG - uint32_t debug_wait; /**< thread/pipe post mortem debug */ - uint32_t debug_stage; /**< thread/pipe post mortem debug */ - uint32_t debug_stripe; /**< thread/pipe post mortem debug */ + uint32_t debug_wait; /** thread/pipe post mortem debug */ + uint32_t debug_stage; /** thread/pipe post mortem debug */ + uint32_t debug_stripe; /** thread/pipe post mortem debug */ #endif - uint32_t threads_stack; /**< sp thread's stack pointers */ - uint32_t threads_stack_size; /**< sp thread's stack sizes */ - uint32_t curr_binary_id; /**< current binary id */ - uint32_t raw_copy_line_count; /**< raw copy line counter */ - uint32_t ddr_parameter_address; /**< acc param ddrptr, sp dmem */ - uint32_t ddr_parameter_size; /**< acc param size, sp dmem */ + uint32_t threads_stack; /** sp thread's stack pointers */ + uint32_t threads_stack_size; /** sp thread's stack sizes */ + uint32_t curr_binary_id; /** current binary id */ + uint32_t raw_copy_line_count; /** raw copy line counter */ + uint32_t ddr_parameter_address; /** acc param ddrptr, sp dmem */ + uint32_t ddr_parameter_size; /** acc param size, sp dmem */ /* Entry functions */ - uint32_t sp_entry; /**< The SP entry function */ - uint32_t tagger_frames_addr; /**< Base address of tagger state */ + uint32_t sp_entry; /** The SP entry function */ + uint32_t tagger_frames_addr; /** Base address of tagger state */ }; /* The following #if is there because this header file is also included @@ -348,37 +348,37 @@ struct ia_css_sp_info { More permanent solution will be to refactor this include. */ #if !defined(__ISP) -/** Accelerator firmware information. +/* Accelerator firmware information. */ struct ia_css_acc_info { - uint32_t per_frame_data; /**< Dummy for now */ + uint32_t per_frame_data; /** Dummy for now */ }; -/** Firmware information. +/* Firmware information. */ union ia_css_fw_union { - struct ia_css_binary_xinfo isp; /**< ISP info */ - struct ia_css_sp_info sp; /**< SP info */ - struct ia_css_bl_info bl; /**< Bootloader info */ - struct ia_css_acc_info acc; /**< Accelerator info */ + struct ia_css_binary_xinfo isp; /** ISP info */ + struct ia_css_sp_info sp; /** SP info */ + struct ia_css_bl_info bl; /** Bootloader info */ + struct ia_css_acc_info acc; /** Accelerator info */ }; -/** Firmware information. +/* Firmware information. */ struct ia_css_fw_info { - size_t header_size; /**< size of fw header */ + size_t header_size; /** size of fw header */ CSS_ALIGN(uint32_t type, 8); - union ia_css_fw_union info; /**< Binary info */ - struct ia_css_blob_info blob; /**< Blob info */ + union ia_css_fw_union info; /** Binary info */ + struct ia_css_blob_info blob; /** Blob info */ /* Dynamic part */ struct ia_css_fw_info *next; - CSS_ALIGN(uint32_t loaded, 8); /**< Firmware has been loaded */ - CSS_ALIGN(const uint8_t *isp_code, 8); /**< ISP pointer to code */ - /**< Firmware handle between user space and kernel */ + CSS_ALIGN(uint32_t loaded, 8); /** Firmware has been loaded */ + CSS_ALIGN(const uint8_t *isp_code, 8); /** ISP pointer to code */ + /** Firmware handle between user space and kernel */ CSS_ALIGN(uint32_t handle, 8); - /**< Sections to copy from/to ISP */ + /** Sections to copy from/to ISP */ struct ia_css_isp_param_css_segments mem_initializers; - /**< Initializer for local ISP memories */ + /** Initializer for local ISP memories */ }; struct ia_css_blob_descr { @@ -390,39 +390,39 @@ struct ia_css_blob_descr { struct ia_css_acc_fw; -/** Structure describing the SP binary of a stand-alone accelerator. +/* Structure describing the SP binary of a stand-alone accelerator. */ struct ia_css_acc_sp { - void (*init)(struct ia_css_acc_fw *); /**< init for crun */ - uint32_t sp_prog_name_offset; /**< program name offset wrt hdr in bytes */ - uint32_t sp_blob_offset; /**< blob offset wrt hdr in bytes */ - void *entry; /**< Address of sp entry point */ - uint32_t *css_abort; /**< SP dmem abort flag */ - void *isp_code; /**< SP dmem address holding xmem + void (*init)(struct ia_css_acc_fw *); /** init for crun */ + uint32_t sp_prog_name_offset; /** program name offset wrt hdr in bytes */ + uint32_t sp_blob_offset; /** blob offset wrt hdr in bytes */ + void *entry; /** Address of sp entry point */ + uint32_t *css_abort; /** SP dmem abort flag */ + void *isp_code; /** SP dmem address holding xmem address of isp code */ - struct ia_css_fw_info fw; /**< SP fw descriptor */ - const uint8_t *code; /**< ISP pointer of allocated SP code */ + struct ia_css_fw_info fw; /** SP fw descriptor */ + const uint8_t *code; /** ISP pointer of allocated SP code */ }; -/** Acceleration firmware descriptor. +/* Acceleration firmware descriptor. * This descriptor descibes either SP code (stand-alone), or * ISP code (a separate pipeline stage). */ struct ia_css_acc_fw_hdr { - enum ia_css_acc_type type; /**< Type of accelerator */ - uint32_t isp_prog_name_offset; /**< program name offset wrt + enum ia_css_acc_type type; /** Type of accelerator */ + uint32_t isp_prog_name_offset; /** program name offset wrt header in bytes */ - uint32_t isp_blob_offset; /**< blob offset wrt header + uint32_t isp_blob_offset; /** blob offset wrt header in bytes */ - uint32_t isp_size; /**< Size of isp blob */ - const uint8_t *isp_code; /**< ISP pointer to code */ - struct ia_css_acc_sp sp; /**< Standalone sp code */ - /**< Firmware handle between user space and kernel */ + uint32_t isp_size; /** Size of isp blob */ + const uint8_t *isp_code; /** ISP pointer to code */ + struct ia_css_acc_sp sp; /** Standalone sp code */ + /** Firmware handle between user space and kernel */ uint32_t handle; - struct ia_css_data parameters; /**< Current SP parameters */ + struct ia_css_data parameters; /** Current SP parameters */ }; -/** Firmware structure. +/* Firmware structure. * This contains the header and actual blobs. * For standalone, it contains SP and ISP blob. * For a pipeline stage accelerator, it contains ISP code only. @@ -430,7 +430,7 @@ struct ia_css_acc_fw_hdr { * header and computed using the access macros below. */ struct ia_css_acc_fw { - struct ia_css_acc_fw_hdr header; /**< firmware header */ + struct ia_css_acc_fw_hdr header; /** firmware header */ /* int8_t isp_progname[]; **< ISP program name int8_t sp_progname[]; **< SP program name, stand-alone only diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h index b2ecf3618c15..a0058eac7d5a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_buffer.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_BUFFER_H #define __IA_CSS_BUFFER_H -/** @file +/* @file * This file contains datastructures and types for buffers used in CSS */ @@ -23,7 +23,7 @@ #include "ia_css_types.h" #include "ia_css_timer.h" -/** Enumeration of buffer types. Buffers can be queued and de-queued +/* Enumeration of buffer types. Buffers can be queued and de-queued * to hand them over between IA and ISP. */ enum ia_css_buffer_type { @@ -48,28 +48,28 @@ enum ia_css_buffer_type { /* Driver API is not SP/ISP visible, 64 bit types not supported on hivecc */ #if !defined(__ISP) -/** Buffer structure. This is a container structure that enables content +/* Buffer structure. This is a container structure that enables content * independent buffer queues and access functions. */ struct ia_css_buffer { - enum ia_css_buffer_type type; /**< Buffer type. */ + enum ia_css_buffer_type type; /** Buffer type. */ unsigned int exp_id; - /**< exposure id for this buffer; 0 = not available + /** exposure id for this buffer; 0 = not available see ia_css_event_public.h for more detail. */ union { - struct ia_css_isp_3a_statistics *stats_3a; /**< 3A statistics & optionally RGBY statistics. */ - struct ia_css_isp_dvs_statistics *stats_dvs; /**< DVS statistics. */ - struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /**< SKC DVS statistics. */ - struct ia_css_frame *frame; /**< Frame buffer. */ - struct ia_css_acc_param *custom_data; /**< Custom buffer. */ - struct ia_css_metadata *metadata; /**< Sensor metadata. */ - } data; /**< Buffer data pointer. */ - uint64_t driver_cookie; /**< cookie for the driver */ - struct ia_css_time_meas timing_data; /**< timing data (readings from the timer) */ - struct ia_css_clock_tick isys_eof_clock_tick; /**< ISYS's end of frame timer tick*/ + struct ia_css_isp_3a_statistics *stats_3a; /** 3A statistics & optionally RGBY statistics. */ + struct ia_css_isp_dvs_statistics *stats_dvs; /** DVS statistics. */ + struct ia_css_isp_skc_dvs_statistics *stats_skc_dvs; /** SKC DVS statistics. */ + struct ia_css_frame *frame; /** Frame buffer. */ + struct ia_css_acc_param *custom_data; /** Custom buffer. */ + struct ia_css_metadata *metadata; /** Sensor metadata. */ + } data; /** Buffer data pointer. */ + uint64_t driver_cookie; /** cookie for the driver */ + struct ia_css_time_meas timing_data; /** timing data (readings from the timer) */ + struct ia_css_clock_tick isys_eof_clock_tick; /** ISYS's end of frame timer tick*/ }; -/** @brief Dequeue param buffers from sp2host_queue +/* @brief Dequeue param buffers from sp2host_queue * * @return None * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h index a15d3e368341..021a313fab85 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_control.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_CONTROL_H #define __IA_CSS_CONTROL_H -/** @file +/* @file * This file contains functionality for starting and controlling CSS */ @@ -24,7 +24,7 @@ #include #include -/** @brief Initialize the CSS API. +/* @brief Initialize the CSS API. * @param[in] env Environment, provides functions to access the * environment in which the CSS code runs. This is * used for host side memory access and message @@ -51,7 +51,7 @@ enum ia_css_err ia_css_init( uint32_t l1_base, enum ia_css_irq_type irq_type); -/** @brief Un-initialize the CSS API. +/* @brief Un-initialize the CSS API. * @return None * * This function deallocates all memory that has been allocated by the CSS API @@ -66,7 +66,7 @@ enum ia_css_err ia_css_init( void ia_css_uninit(void); -/** @brief Suspend CSS API for power down +/* @brief Suspend CSS API for power down * @return success or faulure code * * suspend shuts down the system by: @@ -80,7 +80,7 @@ ia_css_uninit(void); enum ia_css_err ia_css_suspend(void); -/** @brief Resume CSS API from power down +/* @brief Resume CSS API from power down * @return success or failure code * * After a power cycle, this function will bring the CSS API back into @@ -91,7 +91,7 @@ ia_css_suspend(void); enum ia_css_err ia_css_resume(void); -/** @brief Enable use of a separate queue for ISYS events. +/* @brief Enable use of a separate queue for ISYS events. * * @param[in] enable: enable or disable use of separate ISYS event queues. * @return error if called when SP is running. @@ -105,7 +105,7 @@ ia_css_resume(void); enum ia_css_err ia_css_enable_isys_event_queue(bool enable); -/** @brief Test whether the ISP has started. +/* @brief Test whether the ISP has started. * * @return Boolean flag true if the ISP has started or false otherwise. * @@ -114,7 +114,7 @@ ia_css_enable_isys_event_queue(bool enable); bool ia_css_isp_has_started(void); -/** @brief Test whether the SP has initialized. +/* @brief Test whether the SP has initialized. * * @return Boolean flag true if the SP has initialized or false otherwise. * @@ -123,7 +123,7 @@ ia_css_isp_has_started(void); bool ia_css_sp_has_initialized(void); -/** @brief Test whether the SP has terminated. +/* @brief Test whether the SP has terminated. * * @return Boolean flag true if the SP has terminated or false otherwise. * @@ -132,7 +132,7 @@ ia_css_sp_has_initialized(void); bool ia_css_sp_has_terminated(void); -/** @brief start SP hardware +/* @brief start SP hardware * * @return IA_CSS_SUCCESS or error code upon error. * @@ -144,7 +144,7 @@ enum ia_css_err ia_css_start_sp(void); -/** @brief stop SP hardware +/* @brief stop SP hardware * * @return IA_CSS_SUCCESS or error code upon error. * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h index 59459f7a9876..84a960b7abbc 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_device_access.h @@ -15,7 +15,7 @@ #ifndef _IA_CSS_DEVICE_ACCESS_H #define _IA_CSS_DEVICE_ACCESS_H -/** @file +/* @file * File containing internal functions for the CSS-API to access the CSS device. */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h index 147bf81959d3..1f01534964e3 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_dvs.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_DVS_H #define __IA_CSS_DVS_H -/** @file +/* @file * This file contains types for DVS statistics */ @@ -31,7 +31,7 @@ enum dvs_statistics_type { }; -/** Structure that holds DVS statistics in the ISP internal +/* Structure that holds DVS statistics in the ISP internal * format. Use ia_css_get_dvs_statistics() to translate * this to the format used on the host (DVS engine). * */ @@ -40,12 +40,12 @@ struct ia_css_isp_dvs_statistics { ia_css_ptr ver_proj; uint32_t hor_size; uint32_t ver_size; - uint32_t exp_id; /**< see ia_css_event_public.h for more detail */ + uint32_t exp_id; /** see ia_css_event_public.h for more detail */ ia_css_ptr data_ptr; /* base pointer containing all memory */ uint32_t size; /* size of allocated memory in data_ptr */ }; -/** Structure that holds SKC DVS statistics in the ISP internal +/* Structure that holds SKC DVS statistics in the ISP internal * format. Use ia_css_dvs_statistics_get() to translate this to * the format used on the host. * */ @@ -82,7 +82,7 @@ union ia_css_dvs_statistics_host { struct ia_css_skc_dvs_statistics *p_skc_dvs_statistics_host; }; -/** @brief Copy DVS statistics from an ISP buffer to a host buffer. +/* @brief Copy DVS statistics from an ISP buffer to a host buffer. * @param[in] host_stats Host buffer * @param[in] isp_stats ISP buffer * @return error value if temporary memory cannot be allocated @@ -100,7 +100,7 @@ enum ia_css_err ia_css_get_dvs_statistics(struct ia_css_dvs_statistics *host_stats, const struct ia_css_isp_dvs_statistics *isp_stats); -/** @brief Translate DVS statistics from ISP format to host format +/* @brief Translate DVS statistics from ISP format to host format * @param[in] host_stats Host buffer * @param[in] isp_stats ISP buffer * @return None @@ -116,7 +116,7 @@ ia_css_translate_dvs_statistics( struct ia_css_dvs_statistics *host_stats, const struct ia_css_isp_dvs_statistics_map *isp_stats); -/** @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer. +/* @brief Copy DVS 2.0 statistics from an ISP buffer to a host buffer. * @param[in] host_stats Host buffer * @param[in] isp_stats ISP buffer * @return error value if temporary memory cannot be allocated @@ -134,7 +134,7 @@ enum ia_css_err ia_css_get_dvs2_statistics(struct ia_css_dvs2_statistics *host_stats, const struct ia_css_isp_dvs_statistics *isp_stats); -/** @brief Translate DVS2 statistics from ISP format to host format +/* @brief Translate DVS2 statistics from ISP format to host format * @param[in] host_stats Host buffer * @param[in] isp_stats ISP buffer * @return None @@ -150,7 +150,7 @@ ia_css_translate_dvs2_statistics( struct ia_css_dvs2_statistics *host_stats, const struct ia_css_isp_dvs_statistics_map *isp_stats); -/** @brief Copy DVS statistics from an ISP buffer to a host buffer. +/* @brief Copy DVS statistics from an ISP buffer to a host buffer. * @param[in] type - DVS statistics type * @param[in] host_stats Host buffer * @param[in] isp_stats ISP buffer @@ -161,105 +161,105 @@ ia_css_dvs_statistics_get(enum dvs_statistics_type type, union ia_css_dvs_statistics_host *host_stats, const union ia_css_dvs_statistics_isp *isp_stats); -/** @brief Allocate the DVS statistics memory on the ISP +/* @brief Allocate the DVS statistics memory on the ISP * @param[in] grid The grid. * @return Pointer to the allocated DVS statistics buffer on the ISP */ struct ia_css_isp_dvs_statistics * ia_css_isp_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS statistics memory on the ISP +/* @brief Free the DVS statistics memory on the ISP * @param[in] me Pointer to the DVS statistics buffer on the ISP. * @return None */ void ia_css_isp_dvs_statistics_free(struct ia_css_isp_dvs_statistics *me); -/** @brief Allocate the DVS 2.0 statistics memory +/* @brief Allocate the DVS 2.0 statistics memory * @param[in] grid The grid. * @return Pointer to the allocated DVS statistics buffer on the ISP */ struct ia_css_isp_dvs_statistics * ia_css_isp_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS 2.0 statistics memory +/* @brief Free the DVS 2.0 statistics memory * @param[in] me Pointer to the DVS statistics buffer on the ISP. * @return None */ void ia_css_isp_dvs2_statistics_free(struct ia_css_isp_dvs_statistics *me); -/** @brief Allocate the DVS statistics memory on the host +/* @brief Allocate the DVS statistics memory on the host * @param[in] grid The grid. * @return Pointer to the allocated DVS statistics buffer on the host */ struct ia_css_dvs_statistics * ia_css_dvs_statistics_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS statistics memory on the host +/* @brief Free the DVS statistics memory on the host * @param[in] me Pointer to the DVS statistics buffer on the host. * @return None */ void ia_css_dvs_statistics_free(struct ia_css_dvs_statistics *me); -/** @brief Allocate the DVS coefficients memory +/* @brief Allocate the DVS coefficients memory * @param[in] grid The grid. * @return Pointer to the allocated DVS coefficients buffer */ struct ia_css_dvs_coefficients * ia_css_dvs_coefficients_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS coefficients memory +/* @brief Free the DVS coefficients memory * @param[in] me Pointer to the DVS coefficients buffer. * @return None */ void ia_css_dvs_coefficients_free(struct ia_css_dvs_coefficients *me); -/** @brief Allocate the DVS 2.0 statistics memory on the host +/* @brief Allocate the DVS 2.0 statistics memory on the host * @param[in] grid The grid. * @return Pointer to the allocated DVS 2.0 statistics buffer on the host */ struct ia_css_dvs2_statistics * ia_css_dvs2_statistics_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS 2.0 statistics memory +/* @brief Free the DVS 2.0 statistics memory * @param[in] me Pointer to the DVS 2.0 statistics buffer on the host. * @return None */ void ia_css_dvs2_statistics_free(struct ia_css_dvs2_statistics *me); -/** @brief Allocate the DVS 2.0 coefficients memory +/* @brief Allocate the DVS 2.0 coefficients memory * @param[in] grid The grid. * @return Pointer to the allocated DVS 2.0 coefficients buffer */ struct ia_css_dvs2_coefficients * ia_css_dvs2_coefficients_allocate(const struct ia_css_dvs_grid_info *grid); -/** @brief Free the DVS 2.0 coefficients memory +/* @brief Free the DVS 2.0 coefficients memory * @param[in] me Pointer to the DVS 2.0 coefficients buffer. * @return None */ void ia_css_dvs2_coefficients_free(struct ia_css_dvs2_coefficients *me); -/** @brief Allocate the DVS 2.0 6-axis config memory +/* @brief Allocate the DVS 2.0 6-axis config memory * @param[in] stream The stream. * @return Pointer to the allocated DVS 6axis configuration buffer */ struct ia_css_dvs_6axis_config * ia_css_dvs2_6axis_config_allocate(const struct ia_css_stream *stream); -/** @brief Free the DVS 2.0 6-axis config memory +/* @brief Free the DVS 2.0 6-axis config memory * @param[in] dvs_6axis_config Pointer to the DVS 6axis configuration buffer * @return None */ void ia_css_dvs2_6axis_config_free(struct ia_css_dvs_6axis_config *dvs_6axis_config); -/** @brief Allocate a dvs statistics map structure +/* @brief Allocate a dvs statistics map structure * @param[in] isp_stats pointer to ISP dvs statistis struct * @param[in] data_ptr host-side pointer to ISP dvs statistics. * @return Pointer to the allocated dvs statistics map @@ -280,7 +280,7 @@ ia_css_isp_dvs_statistics_map_allocate( const struct ia_css_isp_dvs_statistics *isp_stats, void *data_ptr); -/** @brief Free the dvs statistics map +/* @brief Free the dvs statistics map * @param[in] me Pointer to the dvs statistics map * @return None * @@ -291,7 +291,7 @@ ia_css_isp_dvs_statistics_map_allocate( void ia_css_isp_dvs_statistics_map_free(struct ia_css_isp_dvs_statistics_map *me); -/** @brief Allocate memory for the SKC DVS statistics on the ISP +/* @brief Allocate memory for the SKC DVS statistics on the ISP * @return Pointer to the allocated ACC DVS statistics buffer on the ISP */ struct ia_css_isp_skc_dvs_statistics *ia_css_skc_dvs_statistics_allocate(void); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h index 1ae9daf0be76..8b0218ee658d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_env.h @@ -20,12 +20,12 @@ #include "ia_css_types.h" #include "ia_css_acc_types.h" -/** @file +/* @file * This file contains prototypes for functions that need to be provided to the * CSS-API host-code by the environment in which the CSS-API code runs. */ -/** Memory allocation attributes, for use in ia_css_css_mem_env. */ +/* Memory allocation attributes, for use in ia_css_css_mem_env. */ enum ia_css_mem_attr { IA_CSS_MEM_ATTR_CACHED = 1 << 0, IA_CSS_MEM_ATTR_ZEROED = 1 << 1, @@ -33,62 +33,62 @@ enum ia_css_mem_attr { IA_CSS_MEM_ATTR_CONTIGUOUS = 1 << 3, }; -/** Environment with function pointers for local IA memory allocation. +/* Environment with function pointers for local IA memory allocation. * This provides the CSS code with environment specific functionality * for memory allocation of small local buffers such as local data structures. * This is never expected to allocate more than one page of memory (4K bytes). */ struct ia_css_cpu_mem_env { void (*flush)(struct ia_css_acc_fw *fw); - /**< Flush function to flush the cache for given accelerator. */ + /** Flush function to flush the cache for given accelerator. */ }; -/** Environment with function pointers to access the CSS hardware. This includes +/* Environment with function pointers to access the CSS hardware. This includes * registers and local memories. */ struct ia_css_hw_access_env { void (*store_8)(hrt_address addr, uint8_t data); - /**< Store an 8 bit value into an address in the CSS HW address space. + /** Store an 8 bit value into an address in the CSS HW address space. The address must be an 8 bit aligned address. */ void (*store_16)(hrt_address addr, uint16_t data); - /**< Store a 16 bit value into an address in the CSS HW address space. + /** Store a 16 bit value into an address in the CSS HW address space. The address must be a 16 bit aligned address. */ void (*store_32)(hrt_address addr, uint32_t data); - /**< Store a 32 bit value into an address in the CSS HW address space. + /** Store a 32 bit value into an address in the CSS HW address space. The address must be a 32 bit aligned address. */ uint8_t (*load_8)(hrt_address addr); - /**< Load an 8 bit value from an address in the CSS HW address + /** Load an 8 bit value from an address in the CSS HW address space. The address must be an 8 bit aligned address. */ uint16_t (*load_16)(hrt_address addr); - /**< Load a 16 bit value from an address in the CSS HW address + /** Load a 16 bit value from an address in the CSS HW address space. The address must be a 16 bit aligned address. */ uint32_t (*load_32)(hrt_address addr); - /**< Load a 32 bit value from an address in the CSS HW address + /** Load a 32 bit value from an address in the CSS HW address space. The address must be a 32 bit aligned address. */ void (*store)(hrt_address addr, const void *data, uint32_t bytes); - /**< Store a number of bytes into a byte-aligned address in the CSS HW address space. */ + /** Store a number of bytes into a byte-aligned address in the CSS HW address space. */ void (*load)(hrt_address addr, void *data, uint32_t bytes); - /**< Load a number of bytes from a byte-aligned address in the CSS HW address space. */ + /** Load a number of bytes from a byte-aligned address in the CSS HW address space. */ }; -/** Environment with function pointers to print error and debug messages. +/* Environment with function pointers to print error and debug messages. */ struct ia_css_print_env { int (*debug_print)(const char *fmt, va_list args); - /**< Print a debug message. */ + /** Print a debug message. */ int (*error_print)(const char *fmt, va_list args); - /**< Print an error message.*/ + /** Print an error message.*/ }; -/** Environment structure. This includes function pointers to access several +/* Environment structure. This includes function pointers to access several * features provided by the environment in which the CSS API is used. * This is used to run the camera IP in multiple platforms such as Linux, * Windows and several simulation environments. */ struct ia_css_env { - struct ia_css_cpu_mem_env cpu_mem_env; /**< local flush. */ - struct ia_css_hw_access_env hw_access_env; /**< CSS HW access functions */ - struct ia_css_print_env print_env; /**< Message printing env. */ + struct ia_css_cpu_mem_env cpu_mem_env; /** local flush. */ + struct ia_css_hw_access_env hw_access_env; /** CSS HW access functions */ + struct ia_css_print_env print_env; /** Message printing env. */ }; #endif /* __IA_CSS_ENV_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h index 572e4e55c69e..cf895815ea31 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_err.h @@ -15,12 +15,12 @@ #ifndef __IA_CSS_ERR_H #define __IA_CSS_ERR_H -/** @file +/* @file * This file contains possible return values for most * functions in the CSS-API. */ -/** Errors, these values are used as the return value for most +/* Errors, these values are used as the return value for most * functions in this API. */ enum ia_css_err { @@ -41,22 +41,22 @@ enum ia_css_err { IA_CSS_ERR_NOT_SUPPORTED }; -/** FW warnings. This enum contains a value for each warning that +/* FW warnings. This enum contains a value for each warning that * the SP FW could indicate potential performance issue */ enum ia_css_fw_warning { IA_CSS_FW_WARNING_NONE, - IA_CSS_FW_WARNING_ISYS_QUEUE_FULL, /** < CSS system delayed because of insufficient space in the ISys queue. + IA_CSS_FW_WARNING_ISYS_QUEUE_FULL, /* < CSS system delayed because of insufficient space in the ISys queue. This warning can be avoided by de-queing ISYS buffers more timely. */ - IA_CSS_FW_WARNING_PSYS_QUEUE_FULL, /** < CSS system delayed because of insufficient space in the PSys queue. + IA_CSS_FW_WARNING_PSYS_QUEUE_FULL, /* < CSS system delayed because of insufficient space in the PSys queue. This warning can be avoided by de-queing PSYS buffers more timely. */ - IA_CSS_FW_WARNING_CIRCBUF_ALL_LOCKED, /** < CSS system delayed because of insufficient available buffers. + IA_CSS_FW_WARNING_CIRCBUF_ALL_LOCKED, /* < CSS system delayed because of insufficient available buffers. This warning can be avoided by unlocking locked frame-buffers more timely. */ - IA_CSS_FW_WARNING_EXP_ID_LOCKED, /** < Exposure ID skipped because the frame associated to it was still locked. + IA_CSS_FW_WARNING_EXP_ID_LOCKED, /* < Exposure ID skipped because the frame associated to it was still locked. This warning can be avoided by unlocking locked frame-buffers more timely. */ - IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED, /** < Exposure ID cannot be found on the circular buffer. + IA_CSS_FW_WARNING_TAG_EXP_ID_FAILED, /* < Exposure ID cannot be found on the circular buffer. This warning can be avoided by unlocking locked frame-buffers more timely. */ - IA_CSS_FW_WARNING_FRAME_PARAM_MISMATCH, /** < Frame and param pair mismatched in tagger. + IA_CSS_FW_WARNING_FRAME_PARAM_MISMATCH, /* < Frame and param pair mismatched in tagger. This warning can be avoided by providing a param set for each frame. */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h index aaf349772abe..036a2f03d3bd 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_event_public.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_EVENT_PUBLIC_H #define __IA_CSS_EVENT_PUBLIC_H -/** @file +/* @file * This file contains CSS-API events functionality */ @@ -24,7 +24,7 @@ #include /* ia_css_pipe */ #include /* ia_css_timer */ -/** The event type, distinguishes the kind of events that +/* The event type, distinguishes the kind of events that * can are generated by the CSS system. * * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC: @@ -35,43 +35,43 @@ */ enum ia_css_event_type { IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE = 1 << 0, - /**< Output frame ready. */ + /** Output frame ready. */ IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE = 1 << 1, - /**< Second output frame ready. */ + /** Second output frame ready. */ IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE = 1 << 2, - /**< Viewfinder Output frame ready. */ + /** Viewfinder Output frame ready. */ IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE = 1 << 3, - /**< Second viewfinder Output frame ready. */ + /** Second viewfinder Output frame ready. */ IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE = 1 << 4, - /**< Indication that 3A statistics are available. */ + /** Indication that 3A statistics are available. */ IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE = 1 << 5, - /**< Indication that DIS statistics are available. */ + /** Indication that DIS statistics are available. */ IA_CSS_EVENT_TYPE_PIPELINE_DONE = 1 << 6, - /**< Pipeline Done event, sent after last pipeline stage. */ + /** Pipeline Done event, sent after last pipeline stage. */ IA_CSS_EVENT_TYPE_FRAME_TAGGED = 1 << 7, - /**< Frame tagged. */ + /** Frame tagged. */ IA_CSS_EVENT_TYPE_INPUT_FRAME_DONE = 1 << 8, - /**< Input frame ready. */ + /** Input frame ready. */ IA_CSS_EVENT_TYPE_METADATA_DONE = 1 << 9, - /**< Metadata ready. */ + /** Metadata ready. */ IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE = 1 << 10, - /**< Indication that LACE statistics are available. */ + /** Indication that LACE statistics are available. */ IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE = 1 << 11, - /**< Extension stage complete. */ + /** Extension stage complete. */ IA_CSS_EVENT_TYPE_TIMER = 1 << 12, - /**< Timer event for measuring the SP side latencies. It contains the + /** Timer event for measuring the SP side latencies. It contains the 32-bit timer value from the SP */ IA_CSS_EVENT_TYPE_PORT_EOF = 1 << 13, - /**< End Of Frame event, sent when in buffered sensor mode. */ + /** End Of Frame event, sent when in buffered sensor mode. */ IA_CSS_EVENT_TYPE_FW_WARNING = 1 << 14, - /**< Performance warning encounter by FW */ + /** Performance warning encounter by FW */ IA_CSS_EVENT_TYPE_FW_ASSERT = 1 << 15, - /**< Assertion hit by FW */ + /** Assertion hit by FW */ }; #define IA_CSS_EVENT_TYPE_NONE 0 -/** IA_CSS_EVENT_TYPE_ALL is a mask for all pipe related events. +/* IA_CSS_EVENT_TYPE_ALL is a mask for all pipe related events. * The other events (such as PORT_EOF) cannot be enabled/disabled * and are hence excluded from this macro. */ @@ -89,7 +89,7 @@ enum ia_css_event_type { IA_CSS_EVENT_TYPE_LACE_STATISTICS_DONE | \ IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE) -/** The event struct, container for the event type and its related values. +/* The event struct, container for the event type and its related values. * Depending on the event type, either pipe or port will be filled. * Pipeline related events (like buffer/frame events) will return a valid and filled pipe handle. * For non pipeline related events (but i.e. stream specific, like EOF event), the port will be @@ -97,14 +97,14 @@ enum ia_css_event_type { */ struct ia_css_event { struct ia_css_pipe *pipe; - /**< Pipe handle on which event happened, NULL for non pipe related + /** Pipe handle on which event happened, NULL for non pipe related events. */ enum ia_css_event_type type; - /**< Type of Event, always valid/filled. */ + /** Type of Event, always valid/filled. */ uint8_t port; - /**< Port number for EOF event (not valid for other events). */ + /** Port number for EOF event (not valid for other events). */ uint8_t exp_id; - /**< Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events) + /** Exposure id for EOF/FRAME_TAGGED/FW_WARNING event (not valid for other events) The exposure ID is unique only within a logical stream and it is only generated on systems that have an input system (such as 2400 and 2401). @@ -120,26 +120,26 @@ struct ia_css_event { in the exposure IDs. Therefor applications should not use this to detect frame drops. */ uint32_t fw_handle; - /**< Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other + /** Firmware Handle for ACC_STAGE_COMPLETE event (not valid for other events). */ enum ia_css_fw_warning fw_warning; - /**< Firmware warning code, only for WARNING events. */ + /** Firmware warning code, only for WARNING events. */ uint8_t fw_assert_module_id; - /**< Firmware module id, only for ASSERT events, should be logged by driver. */ + /** Firmware module id, only for ASSERT events, should be logged by driver. */ uint16_t fw_assert_line_no; - /**< Firmware line number, only for ASSERT events, should be logged by driver. */ + /** Firmware line number, only for ASSERT events, should be logged by driver. */ clock_value_t timer_data; - /**< For storing the full 32-bit of the timer value. Valid only for TIMER + /** For storing the full 32-bit of the timer value. Valid only for TIMER event */ uint8_t timer_code; - /**< For storing the code of the TIMER event. Valid only for + /** For storing the code of the TIMER event. Valid only for TIMER event */ uint8_t timer_subcode; - /**< For storing the subcode of the TIMER event. Valid only + /** For storing the subcode of the TIMER event. Valid only for TIMER event */ }; -/** @brief Dequeue a PSYS event from the CSS system. +/* @brief Dequeue a PSYS event from the CSS system. * * @param[out] event Pointer to the event struct which will be filled by * this function if an event is available. @@ -156,7 +156,7 @@ struct ia_css_event { enum ia_css_err ia_css_dequeue_psys_event(struct ia_css_event *event); -/** @brief Dequeue an event from the CSS system. +/* @brief Dequeue an event from the CSS system. * * @param[out] event Pointer to the event struct which will be filled by * this function if an event is available. @@ -171,7 +171,7 @@ ia_css_dequeue_psys_event(struct ia_css_event *event); enum ia_css_err ia_css_dequeue_event(struct ia_css_event *event); -/** @brief Dequeue an ISYS event from the CSS system. +/* @brief Dequeue an ISYS event from the CSS system. * * @param[out] event Pointer to the event struct which will be filled by * this function if an event is available. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h index 06d375a09be2..d7d7f0a995e5 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_firmware.h @@ -15,21 +15,21 @@ #ifndef __IA_CSS_FIRMWARE_H #define __IA_CSS_FIRMWARE_H -/** @file +/* @file * This file contains firmware loading/unloading support functionality */ #include "ia_css_err.h" #include "ia_css_env.h" -/** CSS firmware package structure. +/* CSS firmware package structure. */ struct ia_css_fw { - void *data; /**< pointer to the firmware data */ - unsigned int bytes; /**< length in bytes of firmware data */ + void *data; /** pointer to the firmware data */ + unsigned int bytes; /** length in bytes of firmware data */ }; -/** @brief Loads the firmware +/* @brief Loads the firmware * @param[in] env Environment, provides functions to access the * environment in which the CSS code runs. This is * used for host side memory access and message @@ -51,7 +51,7 @@ enum ia_css_err ia_css_load_firmware(const struct ia_css_env *env, const struct ia_css_fw *fw); -/** @brief Unloads the firmware +/* @brief Unloads the firmware * @return None * * This function unloads the firmware loaded by ia_css_load_firmware. @@ -61,7 +61,7 @@ ia_css_load_firmware(const struct ia_css_env *env, void ia_css_unload_firmware(void); -/** @brief Checks firmware version +/* @brief Checks firmware version * @param[in] fw Firmware package containing the firmware for all * predefined ISP binaries. * @return Returns true when the firmware version matches with the CSS diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h index da9c60144c6d..e5ffc579aef1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frac.h @@ -15,7 +15,7 @@ #ifndef _IA_CSS_FRAC_H #define _IA_CSS_FRAC_H -/** @file +/* @file * This file contains typedefs used for fractional numbers */ @@ -25,13 +25,13 @@ * NOTE: the 16 bit fixed point types actually occupy 32 bits * to save on extension operations in the ISP code. */ -/** Unsigned fixed point value, 0 integer bits, 16 fractional bits */ +/* Unsigned fixed point value, 0 integer bits, 16 fractional bits */ typedef uint32_t ia_css_u0_16; -/** Unsigned fixed point value, 5 integer bits, 11 fractional bits */ +/* Unsigned fixed point value, 5 integer bits, 11 fractional bits */ typedef uint32_t ia_css_u5_11; -/** Unsigned fixed point value, 8 integer bits, 8 fractional bits */ +/* Unsigned fixed point value, 8 integer bits, 8 fractional bits */ typedef uint32_t ia_css_u8_8; -/** Signed fixed point value, 0 integer bits, 15 fractional bits */ +/* Signed fixed point value, 0 integer bits, 15 fractional bits */ typedef int32_t ia_css_s0_15; #endif /* _IA_CSS_FRAC_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h index d534fbd91380..2f177edc36ac 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_format.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_FRAME_FORMAT_H #define __IA_CSS_FRAME_FORMAT_H -/** @file +/* @file * This file contains information about formats supported in the ISP */ -/** Frame formats, some of these come from fourcc.org, others are +/* Frame formats, some of these come from fourcc.org, others are better explained by video4linux2. The NV11 seems to be described only on MSDN pages, but even those seem to be gone now. Frames can come in many forms, the main categories are RAW, RGB and YUV @@ -48,45 +48,45 @@ - css/bxt_sandbox/isysapi/interface/ia_css_isysapi_fw_types.h */ enum ia_css_frame_format { - IA_CSS_FRAME_FORMAT_NV11 = 0, /**< 12 bit YUV 411, Y, UV plane */ - IA_CSS_FRAME_FORMAT_NV12, /**< 12 bit YUV 420, Y, UV plane */ - IA_CSS_FRAME_FORMAT_NV12_16, /**< 16 bit YUV 420, Y, UV plane */ - IA_CSS_FRAME_FORMAT_NV12_TILEY, /**< 12 bit YUV 420, Intel proprietary tiled format, TileY */ - IA_CSS_FRAME_FORMAT_NV16, /**< 16 bit YUV 422, Y, UV plane */ - IA_CSS_FRAME_FORMAT_NV21, /**< 12 bit YUV 420, Y, VU plane */ - IA_CSS_FRAME_FORMAT_NV61, /**< 16 bit YUV 422, Y, VU plane */ - IA_CSS_FRAME_FORMAT_YV12, /**< 12 bit YUV 420, Y, V, U plane */ - IA_CSS_FRAME_FORMAT_YV16, /**< 16 bit YUV 422, Y, V, U plane */ - IA_CSS_FRAME_FORMAT_YUV420, /**< 12 bit YUV 420, Y, U, V plane */ - IA_CSS_FRAME_FORMAT_YUV420_16, /**< yuv420, 16 bits per subpixel */ - IA_CSS_FRAME_FORMAT_YUV422, /**< 16 bit YUV 422, Y, U, V plane */ - IA_CSS_FRAME_FORMAT_YUV422_16, /**< yuv422, 16 bits per subpixel */ - IA_CSS_FRAME_FORMAT_UYVY, /**< 16 bit YUV 422, UYVY interleaved */ - IA_CSS_FRAME_FORMAT_YUYV, /**< 16 bit YUV 422, YUYV interleaved */ - IA_CSS_FRAME_FORMAT_YUV444, /**< 24 bit YUV 444, Y, U, V plane */ - IA_CSS_FRAME_FORMAT_YUV_LINE, /**< Internal format, 2 y lines followed + IA_CSS_FRAME_FORMAT_NV11 = 0, /** 12 bit YUV 411, Y, UV plane */ + IA_CSS_FRAME_FORMAT_NV12, /** 12 bit YUV 420, Y, UV plane */ + IA_CSS_FRAME_FORMAT_NV12_16, /** 16 bit YUV 420, Y, UV plane */ + IA_CSS_FRAME_FORMAT_NV12_TILEY, /** 12 bit YUV 420, Intel proprietary tiled format, TileY */ + IA_CSS_FRAME_FORMAT_NV16, /** 16 bit YUV 422, Y, UV plane */ + IA_CSS_FRAME_FORMAT_NV21, /** 12 bit YUV 420, Y, VU plane */ + IA_CSS_FRAME_FORMAT_NV61, /** 16 bit YUV 422, Y, VU plane */ + IA_CSS_FRAME_FORMAT_YV12, /** 12 bit YUV 420, Y, V, U plane */ + IA_CSS_FRAME_FORMAT_YV16, /** 16 bit YUV 422, Y, V, U plane */ + IA_CSS_FRAME_FORMAT_YUV420, /** 12 bit YUV 420, Y, U, V plane */ + IA_CSS_FRAME_FORMAT_YUV420_16, /** yuv420, 16 bits per subpixel */ + IA_CSS_FRAME_FORMAT_YUV422, /** 16 bit YUV 422, Y, U, V plane */ + IA_CSS_FRAME_FORMAT_YUV422_16, /** yuv422, 16 bits per subpixel */ + IA_CSS_FRAME_FORMAT_UYVY, /** 16 bit YUV 422, UYVY interleaved */ + IA_CSS_FRAME_FORMAT_YUYV, /** 16 bit YUV 422, YUYV interleaved */ + IA_CSS_FRAME_FORMAT_YUV444, /** 24 bit YUV 444, Y, U, V plane */ + IA_CSS_FRAME_FORMAT_YUV_LINE, /** Internal format, 2 y lines followed by a uvinterleaved line */ - IA_CSS_FRAME_FORMAT_RAW, /**< RAW, 1 plane */ - IA_CSS_FRAME_FORMAT_RGB565, /**< 16 bit RGB, 1 plane. Each 3 sub + IA_CSS_FRAME_FORMAT_RAW, /** RAW, 1 plane */ + IA_CSS_FRAME_FORMAT_RGB565, /** 16 bit RGB, 1 plane. Each 3 sub pixels are packed into one 16 bit value, 5 bits for R, 6 bits for G and 5 bits for B. */ - IA_CSS_FRAME_FORMAT_PLANAR_RGB888, /**< 24 bit RGB, 3 planes */ - IA_CSS_FRAME_FORMAT_RGBA888, /**< 32 bit RGBA, 1 plane, A=Alpha + IA_CSS_FRAME_FORMAT_PLANAR_RGB888, /** 24 bit RGB, 3 planes */ + IA_CSS_FRAME_FORMAT_RGBA888, /** 32 bit RGBA, 1 plane, A=Alpha (alpha is unused) */ - IA_CSS_FRAME_FORMAT_QPLANE6, /**< Internal, for advanced ISP */ - IA_CSS_FRAME_FORMAT_BINARY_8, /**< byte stream, used for jpeg. For + IA_CSS_FRAME_FORMAT_QPLANE6, /** Internal, for advanced ISP */ + IA_CSS_FRAME_FORMAT_BINARY_8, /** byte stream, used for jpeg. For frames of this type, we set the height to 1 and the width to the number of allocated bytes. */ - IA_CSS_FRAME_FORMAT_MIPI, /**< MIPI frame, 1 plane */ - IA_CSS_FRAME_FORMAT_RAW_PACKED, /**< RAW, 1 plane, packed */ - IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8, /**< 8 bit per Y/U/V. + IA_CSS_FRAME_FORMAT_MIPI, /** MIPI frame, 1 plane */ + IA_CSS_FRAME_FORMAT_RAW_PACKED, /** RAW, 1 plane, packed */ + IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_8, /** 8 bit per Y/U/V. Y odd line; UYVY interleaved even line */ - IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8, /**< Legacy YUV420. UY odd + IA_CSS_FRAME_FORMAT_CSI_MIPI_LEGACY_YUV420_8, /** Legacy YUV420. UY odd line; VY even line */ - IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 /**< 10 bit per Y/U/V. Y odd + IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 /** 10 bit per Y/U/V. Y odd line; UYVY interleaved even line */ }; @@ -95,7 +95,7 @@ enum ia_css_frame_format { /* because of issues this would cause with the Clockwork code checking tool. */ #define IA_CSS_FRAME_FORMAT_NUM (IA_CSS_FRAME_FORMAT_CSI_MIPI_YUV420_10 + 1) -/** Number of valid output frame formats for ISP **/ +/* Number of valid output frame formats for ISP **/ #define IA_CSS_FRAME_OUT_FORMAT_NUM (IA_CSS_FRAME_FORMAT_RGBA888 + 1) #endif /* __IA_CSS_FRAME_FORMAT_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h index 92f2389176b2..ba7a076c3afa 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_frame_public.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_FRAME_PUBLIC_H #define __IA_CSS_FRAME_PUBLIC_H -/** @file +/* @file * This file contains structs to describe various frame-formats supported by the ISP. */ @@ -25,73 +25,73 @@ #include "ia_css_frame_format.h" #include "ia_css_buffer.h" -/** For RAW input, the bayer order needs to be specified separately. There +/* For RAW input, the bayer order needs to be specified separately. There * are 4 possible orders. The name is constructed by taking the first two * colors on the first line and the first two colors from the second line. */ enum ia_css_bayer_order { - IA_CSS_BAYER_ORDER_GRBG, /**< GRGRGRGRGR .. BGBGBGBGBG */ - IA_CSS_BAYER_ORDER_RGGB, /**< RGRGRGRGRG .. GBGBGBGBGB */ - IA_CSS_BAYER_ORDER_BGGR, /**< BGBGBGBGBG .. GRGRGRGRGR */ - IA_CSS_BAYER_ORDER_GBRG, /**< GBGBGBGBGB .. RGRGRGRGRG */ + IA_CSS_BAYER_ORDER_GRBG, /** GRGRGRGRGR .. BGBGBGBGBG */ + IA_CSS_BAYER_ORDER_RGGB, /** RGRGRGRGRG .. GBGBGBGBGB */ + IA_CSS_BAYER_ORDER_BGGR, /** BGBGBGBGBG .. GRGRGRGRGR */ + IA_CSS_BAYER_ORDER_GBRG, /** GBGBGBGBGB .. RGRGRGRGRG */ }; #define IA_CSS_BAYER_ORDER_NUM (IA_CSS_BAYER_ORDER_GBRG + 1) -/** Frame plane structure. This describes one plane in an image +/* Frame plane structure. This describes one plane in an image * frame buffer. */ struct ia_css_frame_plane { - unsigned int height; /**< height of a plane in lines */ - unsigned int width; /**< width of a line, in DMA elements, note that + unsigned int height; /** height of a plane in lines */ + unsigned int width; /** width of a line, in DMA elements, note that for RGB565 the three subpixels are stored in one element. For all other formats this is the number of subpixels per line. */ - unsigned int stride; /**< stride of a line in bytes */ - unsigned int offset; /**< offset in bytes to start of frame data. + unsigned int stride; /** stride of a line in bytes */ + unsigned int offset; /** offset in bytes to start of frame data. offset is wrt data field in ia_css_frame */ }; -/** Binary "plane". This is used to story binary streams such as jpeg +/* Binary "plane". This is used to story binary streams such as jpeg * images. This is not actually a real plane. */ struct ia_css_frame_binary_plane { - unsigned int size; /**< number of bytes in the stream */ - struct ia_css_frame_plane data; /**< plane */ + unsigned int size; /** number of bytes in the stream */ + struct ia_css_frame_plane data; /** plane */ }; -/** Container for planar YUV frames. This contains 3 planes. +/* Container for planar YUV frames. This contains 3 planes. */ struct ia_css_frame_yuv_planes { - struct ia_css_frame_plane y; /**< Y plane */ - struct ia_css_frame_plane u; /**< U plane */ - struct ia_css_frame_plane v; /**< V plane */ + struct ia_css_frame_plane y; /** Y plane */ + struct ia_css_frame_plane u; /** U plane */ + struct ia_css_frame_plane v; /** V plane */ }; -/** Container for semi-planar YUV frames. +/* Container for semi-planar YUV frames. */ struct ia_css_frame_nv_planes { - struct ia_css_frame_plane y; /**< Y plane */ - struct ia_css_frame_plane uv; /**< UV plane */ + struct ia_css_frame_plane y; /** Y plane */ + struct ia_css_frame_plane uv; /** UV plane */ }; -/** Container for planar RGB frames. Each color has its own plane. +/* Container for planar RGB frames. Each color has its own plane. */ struct ia_css_frame_rgb_planes { - struct ia_css_frame_plane r; /**< Red plane */ - struct ia_css_frame_plane g; /**< Green plane */ - struct ia_css_frame_plane b; /**< Blue plane */ + struct ia_css_frame_plane r; /** Red plane */ + struct ia_css_frame_plane g; /** Green plane */ + struct ia_css_frame_plane b; /** Blue plane */ }; -/** Container for 6-plane frames. These frames are used internally +/* Container for 6-plane frames. These frames are used internally * in the advanced ISP only. */ struct ia_css_frame_plane6_planes { - struct ia_css_frame_plane r; /**< Red plane */ - struct ia_css_frame_plane r_at_b; /**< Red at blue plane */ - struct ia_css_frame_plane gr; /**< Red-green plane */ - struct ia_css_frame_plane gb; /**< Blue-green plane */ - struct ia_css_frame_plane b; /**< Blue plane */ - struct ia_css_frame_plane b_at_r; /**< Blue at red plane */ + struct ia_css_frame_plane r; /** Red plane */ + struct ia_css_frame_plane r_at_b; /** Red at blue plane */ + struct ia_css_frame_plane gr; /** Red-green plane */ + struct ia_css_frame_plane gb; /** Blue-green plane */ + struct ia_css_frame_plane b; /** Blue plane */ + struct ia_css_frame_plane b_at_r; /** Blue at red plane */ }; /* Crop info struct - stores the lines to be cropped in isp */ @@ -103,15 +103,15 @@ struct ia_css_crop_info { unsigned int start_line; }; -/** Frame info struct. This describes the contents of an image frame buffer. +/* Frame info struct. This describes the contents of an image frame buffer. */ struct ia_css_frame_info { - struct ia_css_resolution res; /**< Frame resolution (valid data) */ - unsigned int padded_width; /**< stride of line in memory (in pixels) */ - enum ia_css_frame_format format; /**< format of the frame data */ - unsigned int raw_bit_depth; /**< number of valid bits per pixel, + struct ia_css_resolution res; /** Frame resolution (valid data) */ + unsigned int padded_width; /** stride of line in memory (in pixels) */ + enum ia_css_frame_format format; /** format of the frame data */ + unsigned int raw_bit_depth; /** number of valid bits per pixel, only valid for RAW bayer frames */ - enum ia_css_bayer_order raw_bayer_order; /**< bayer order, only valid + enum ia_css_bayer_order raw_bayer_order; /** bayer order, only valid for RAW bayer frames */ /* the params below are computed based on bayer_order * we can remove the raw_bayer_order if it is redundant @@ -136,9 +136,9 @@ struct ia_css_frame_info { * Specifies the DVS loop delay in "frame periods" */ enum ia_css_frame_delay { - IA_CSS_FRAME_DELAY_0, /**< Frame delay = 0 */ - IA_CSS_FRAME_DELAY_1, /**< Frame delay = 1 */ - IA_CSS_FRAME_DELAY_2 /**< Frame delay = 2 */ + IA_CSS_FRAME_DELAY_0, /** Frame delay = 0 */ + IA_CSS_FRAME_DELAY_1, /** Frame delay = 1 */ + IA_CSS_FRAME_DELAY_2 /** Frame delay = 2 */ }; enum ia_css_frame_flash_state { @@ -147,13 +147,13 @@ enum ia_css_frame_flash_state { IA_CSS_FRAME_FLASH_STATE_FULL }; -/** Frame structure. This structure describes an image buffer or frame. +/* Frame structure. This structure describes an image buffer or frame. * This is the main structure used for all input and output images. */ struct ia_css_frame { - struct ia_css_frame_info info; /**< info struct describing the frame */ - ia_css_ptr data; /**< pointer to start of image data */ - unsigned int data_bytes; /**< size of image data in bytes */ + struct ia_css_frame_info info; /** info struct describing the frame */ + ia_css_ptr data; /** pointer to start of image data */ + unsigned int data_bytes; /** size of image data in bytes */ /* LA: move this to ia_css_buffer */ /* * -1 if data address is static during life time of pipeline @@ -171,10 +171,10 @@ struct ia_css_frame { enum ia_css_buffer_type buf_type; enum ia_css_frame_flash_state flash_state; unsigned int exp_id; - /**< exposure id, see ia_css_event_public.h for more detail */ - uint32_t isp_config_id; /**< Unique ID to track which config was actually applied to a particular frame */ - bool valid; /**< First video output frame is not valid */ - bool contiguous; /**< memory is allocated physically contiguously */ + /** exposure id, see ia_css_event_public.h for more detail */ + uint32_t isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */ + bool valid; /** First video output frame is not valid */ + bool contiguous; /** memory is allocated physically contiguously */ union { unsigned int _initialisation_dummy; struct ia_css_frame_plane raw; @@ -185,7 +185,7 @@ struct ia_css_frame { struct ia_css_frame_nv_planes nv; struct ia_css_frame_plane6_planes plane6; struct ia_css_frame_binary_plane binary; - } planes; /**< frame planes, select the right one based on + } planes; /** frame planes, select the right one based on info.format */ }; @@ -204,7 +204,7 @@ struct ia_css_frame { { 0 } /* planes */ \ } -/** @brief Fill a frame with zeros +/* @brief Fill a frame with zeros * * @param frame The frame. * @return None @@ -213,7 +213,7 @@ struct ia_css_frame { */ void ia_css_frame_zero(struct ia_css_frame *frame); -/** @brief Allocate a CSS frame structure +/* @brief Allocate a CSS frame structure * * @param frame The allocated frame. * @param width The width (in pixels) of the frame. @@ -234,7 +234,7 @@ ia_css_frame_allocate(struct ia_css_frame **frame, unsigned int stride, unsigned int raw_bit_depth); -/** @brief Allocate a CSS frame structure using a frame info structure. +/* @brief Allocate a CSS frame structure using a frame info structure. * * @param frame The allocated frame. * @param[in] info The frame info structure. @@ -247,7 +247,7 @@ ia_css_frame_allocate(struct ia_css_frame **frame, enum ia_css_err ia_css_frame_allocate_from_info(struct ia_css_frame **frame, const struct ia_css_frame_info *info); -/** @brief Free a CSS frame structure. +/* @brief Free a CSS frame structure. * * @param[in] frame Pointer to the frame. * @return None @@ -258,7 +258,7 @@ ia_css_frame_allocate_from_info(struct ia_css_frame **frame, void ia_css_frame_free(struct ia_css_frame *frame); -/** @brief Allocate a contiguous CSS frame structure +/* @brief Allocate a contiguous CSS frame structure * * @param frame The allocated frame. * @param width The width (in pixels) of the frame. @@ -280,7 +280,7 @@ ia_css_frame_allocate_contiguous(struct ia_css_frame **frame, unsigned int stride, unsigned int raw_bit_depth); -/** @brief Allocate a contiguous CSS frame from a frame info structure. +/* @brief Allocate a contiguous CSS frame from a frame info structure. * * @param frame The allocated frame. * @param[in] info The frame info structure. @@ -296,7 +296,7 @@ enum ia_css_err ia_css_frame_allocate_contiguous_from_info(struct ia_css_frame **frame, const struct ia_css_frame_info *info); -/** @brief Allocate a CSS frame structure using a frame info structure. +/* @brief Allocate a CSS frame structure using a frame info structure. * * @param frame The allocated frame. * @param[in] info The frame info structure. @@ -309,7 +309,7 @@ enum ia_css_err ia_css_frame_create_from_info(struct ia_css_frame **frame, const struct ia_css_frame_info *info); -/** @brief Set a mapped data buffer to a CSS frame +/* @brief Set a mapped data buffer to a CSS frame * * @param[in] frame Valid CSS frame pointer * @param[in] mapped_data Mapped data buffer to be assigned to the CSS frame @@ -327,7 +327,7 @@ ia_css_frame_set_data(struct ia_css_frame *frame, const ia_css_ptr mapped_data, size_t data_size_bytes); -/** @brief Map an existing frame data pointer to a CSS frame. +/* @brief Map an existing frame data pointer to a CSS frame. * * @param frame Pointer to the frame to be initialized * @param[in] info The frame info. @@ -350,7 +350,7 @@ ia_css_frame_map(struct ia_css_frame **frame, uint16_t attribute, void *context); -/** @brief Unmap a CSS frame structure. +/* @brief Unmap a CSS frame structure. * * @param[in] frame Pointer to the CSS frame. * @return None diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h index 8a17c3346caa..f415570a3da9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_input_port.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_INPUT_PORT_H #define __IA_CSS_INPUT_PORT_H -/** @file +/* @file * This file contains information about the possible input ports for CSS */ -/** Enumeration of the physical input ports on the CSS hardware. +/* Enumeration of the physical input ports on the CSS hardware. * There are 3 MIPI CSI-2 ports. */ enum ia_css_csi2_port { @@ -28,39 +28,39 @@ enum ia_css_csi2_port { IA_CSS_CSI2_PORT2 /* Implicitly map to MIPI_PORT2_ID */ }; -/** Backward compatible for CSS API 2.0 only +/* Backward compatible for CSS API 2.0 only * TO BE REMOVED when all drivers move to CSS API 2.1 */ #define IA_CSS_CSI2_PORT_4LANE IA_CSS_CSI2_PORT0 #define IA_CSS_CSI2_PORT_1LANE IA_CSS_CSI2_PORT1 #define IA_CSS_CSI2_PORT_2LANE IA_CSS_CSI2_PORT2 -/** The CSI2 interface supports 2 types of compression or can +/* The CSI2 interface supports 2 types of compression or can * be run without compression. */ enum ia_css_csi2_compression_type { - IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /**< No compression */ - IA_CSS_CSI2_COMPRESSION_TYPE_1, /**< Compression scheme 1 */ - IA_CSS_CSI2_COMPRESSION_TYPE_2 /**< Compression scheme 2 */ + IA_CSS_CSI2_COMPRESSION_TYPE_NONE, /** No compression */ + IA_CSS_CSI2_COMPRESSION_TYPE_1, /** Compression scheme 1 */ + IA_CSS_CSI2_COMPRESSION_TYPE_2 /** Compression scheme 2 */ }; struct ia_css_csi2_compression { enum ia_css_csi2_compression_type type; - /**< Compression used */ + /** Compression used */ unsigned int compressed_bits_per_pixel; - /**< Compressed bits per pixel (only when compression is enabled) */ + /** Compressed bits per pixel (only when compression is enabled) */ unsigned int uncompressed_bits_per_pixel; - /**< Uncompressed bits per pixel (only when compression is enabled) */ + /** Uncompressed bits per pixel (only when compression is enabled) */ }; -/** Input port structure. +/* Input port structure. */ struct ia_css_input_port { - enum ia_css_csi2_port port; /**< Physical CSI-2 port */ - unsigned int num_lanes; /**< Number of lanes used (4-lane port only) */ - unsigned int timeout; /**< Timeout value */ - unsigned int rxcount; /**< Register value, should include all lanes */ - struct ia_css_csi2_compression compression; /**< Compression used */ + enum ia_css_csi2_port port; /** Physical CSI-2 port */ + unsigned int num_lanes; /** Number of lanes used (4-lane port only) */ + unsigned int timeout; /** Timeout value */ + unsigned int rxcount; /** Register value, should include all lanes */ + struct ia_css_csi2_compression compression; /** Compression used */ }; #endif /* __IA_CSS_INPUT_PORT_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h index 416ca4d28732..10ef61178bb2 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_irq.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_IRQ_H #define __IA_CSS_IRQ_H -/** @file +/* @file * This file contains information for Interrupts/IRQs from CSS */ @@ -23,14 +23,14 @@ #include "ia_css_pipe_public.h" #include "ia_css_input_port.h" -/** Interrupt types, these enumerate all supported interrupt types. +/* Interrupt types, these enumerate all supported interrupt types. */ enum ia_css_irq_type { - IA_CSS_IRQ_TYPE_EDGE, /**< Edge (level) sensitive interrupt */ - IA_CSS_IRQ_TYPE_PULSE /**< Pulse-shaped interrupt */ + IA_CSS_IRQ_TYPE_EDGE, /** Edge (level) sensitive interrupt */ + IA_CSS_IRQ_TYPE_PULSE /** Pulse-shaped interrupt */ }; -/** Interrupt request type. +/* Interrupt request type. * When the CSS hardware generates an interrupt, a function in this API * needs to be called to retrieve information about the interrupt. * This interrupt type is part of this information and indicates what @@ -46,55 +46,55 @@ enum ia_css_irq_type { */ enum ia_css_irq_info { IA_CSS_IRQ_INFO_CSS_RECEIVER_ERROR = 1 << 0, - /**< the css receiver has encountered an error */ + /** the css receiver has encountered an error */ IA_CSS_IRQ_INFO_CSS_RECEIVER_FIFO_OVERFLOW = 1 << 1, - /**< the FIFO in the csi receiver has overflown */ + /** the FIFO in the csi receiver has overflown */ IA_CSS_IRQ_INFO_CSS_RECEIVER_SOF = 1 << 2, - /**< the css receiver received the start of frame */ + /** the css receiver received the start of frame */ IA_CSS_IRQ_INFO_CSS_RECEIVER_EOF = 1 << 3, - /**< the css receiver received the end of frame */ + /** the css receiver received the end of frame */ IA_CSS_IRQ_INFO_CSS_RECEIVER_SOL = 1 << 4, - /**< the css receiver received the start of line */ + /** the css receiver received the start of line */ IA_CSS_IRQ_INFO_PSYS_EVENTS_READY = 1 << 5, - /**< One or more events are available in the PSYS event queue */ + /** One or more events are available in the PSYS event queue */ IA_CSS_IRQ_INFO_EVENTS_READY = IA_CSS_IRQ_INFO_PSYS_EVENTS_READY, - /**< deprecated{obsolete version of IA_CSS_IRQ_INFO_PSYS_EVENTS_READY, + /** deprecated{obsolete version of IA_CSS_IRQ_INFO_PSYS_EVENTS_READY, * same functionality.} */ IA_CSS_IRQ_INFO_CSS_RECEIVER_EOL = 1 << 6, - /**< the css receiver received the end of line */ + /** the css receiver received the end of line */ IA_CSS_IRQ_INFO_CSS_RECEIVER_SIDEBAND_CHANGED = 1 << 7, - /**< the css receiver received a change in side band signals */ + /** the css receiver received a change in side band signals */ IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_0 = 1 << 8, - /**< generic short packets (0) */ + /** generic short packets (0) */ IA_CSS_IRQ_INFO_CSS_RECEIVER_GEN_SHORT_1 = 1 << 9, - /**< generic short packets (1) */ + /** generic short packets (1) */ IA_CSS_IRQ_INFO_IF_PRIM_ERROR = 1 << 10, - /**< the primary input formatter (A) has encountered an error */ + /** the primary input formatter (A) has encountered an error */ IA_CSS_IRQ_INFO_IF_PRIM_B_ERROR = 1 << 11, - /**< the primary input formatter (B) has encountered an error */ + /** the primary input formatter (B) has encountered an error */ IA_CSS_IRQ_INFO_IF_SEC_ERROR = 1 << 12, - /**< the secondary input formatter has encountered an error */ + /** the secondary input formatter has encountered an error */ IA_CSS_IRQ_INFO_STREAM_TO_MEM_ERROR = 1 << 13, - /**< the stream-to-memory device has encountered an error */ + /** the stream-to-memory device has encountered an error */ IA_CSS_IRQ_INFO_SW_0 = 1 << 14, - /**< software interrupt 0 */ + /** software interrupt 0 */ IA_CSS_IRQ_INFO_SW_1 = 1 << 15, - /**< software interrupt 1 */ + /** software interrupt 1 */ IA_CSS_IRQ_INFO_SW_2 = 1 << 16, - /**< software interrupt 2 */ + /** software interrupt 2 */ IA_CSS_IRQ_INFO_ISP_BINARY_STATISTICS_READY = 1 << 17, - /**< ISP binary statistics are ready */ + /** ISP binary statistics are ready */ IA_CSS_IRQ_INFO_INPUT_SYSTEM_ERROR = 1 << 18, - /**< the input system in in error */ + /** the input system in in error */ IA_CSS_IRQ_INFO_IF_ERROR = 1 << 19, - /**< the input formatter in in error */ + /** the input formatter in in error */ IA_CSS_IRQ_INFO_DMA_ERROR = 1 << 20, - /**< the dma in in error */ + /** the dma in in error */ IA_CSS_IRQ_INFO_ISYS_EVENTS_READY = 1 << 21, - /**< end-of-frame events are ready in the isys_event queue */ + /** end-of-frame events are ready in the isys_event queue */ }; -/** CSS receiver error types. Whenever the CSS receiver has encountered +/* CSS receiver error types. Whenever the CSS receiver has encountered * an error, this enumeration is used to indicate which errors have occurred. * * Note that multiple error flags can be enabled at once and that this is in @@ -105,39 +105,39 @@ enum ia_css_irq_info { * different receiver types, or possibly none in case of tests systems. */ enum ia_css_rx_irq_info { - IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN = 1U << 0, /**< buffer overrun */ - IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE = 1U << 1, /**< entering sleep mode */ - IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE = 1U << 2, /**< exited sleep mode */ - IA_CSS_RX_IRQ_INFO_ECC_CORRECTED = 1U << 3, /**< ECC corrected */ + IA_CSS_RX_IRQ_INFO_BUFFER_OVERRUN = 1U << 0, /** buffer overrun */ + IA_CSS_RX_IRQ_INFO_ENTER_SLEEP_MODE = 1U << 1, /** entering sleep mode */ + IA_CSS_RX_IRQ_INFO_EXIT_SLEEP_MODE = 1U << 2, /** exited sleep mode */ + IA_CSS_RX_IRQ_INFO_ECC_CORRECTED = 1U << 3, /** ECC corrected */ IA_CSS_RX_IRQ_INFO_ERR_SOT = 1U << 4, - /**< Start of transmission */ - IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC = 1U << 5, /**< SOT sync (??) */ - IA_CSS_RX_IRQ_INFO_ERR_CONTROL = 1U << 6, /**< Control (??) */ - IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE = 1U << 7, /**< Double ECC */ - IA_CSS_RX_IRQ_INFO_ERR_CRC = 1U << 8, /**< CRC error */ - IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ID = 1U << 9, /**< Unknown ID */ - IA_CSS_RX_IRQ_INFO_ERR_FRAME_SYNC = 1U << 10,/**< Frame sync error */ - IA_CSS_RX_IRQ_INFO_ERR_FRAME_DATA = 1U << 11,/**< Frame data error */ - IA_CSS_RX_IRQ_INFO_ERR_DATA_TIMEOUT = 1U << 12,/**< Timeout occurred */ - IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ESC = 1U << 13,/**< Unknown escape seq. */ - IA_CSS_RX_IRQ_INFO_ERR_LINE_SYNC = 1U << 14,/**< Line Sync error */ + /** Start of transmission */ + IA_CSS_RX_IRQ_INFO_ERR_SOT_SYNC = 1U << 5, /** SOT sync (??) */ + IA_CSS_RX_IRQ_INFO_ERR_CONTROL = 1U << 6, /** Control (??) */ + IA_CSS_RX_IRQ_INFO_ERR_ECC_DOUBLE = 1U << 7, /** Double ECC */ + IA_CSS_RX_IRQ_INFO_ERR_CRC = 1U << 8, /** CRC error */ + IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ID = 1U << 9, /** Unknown ID */ + IA_CSS_RX_IRQ_INFO_ERR_FRAME_SYNC = 1U << 10,/** Frame sync error */ + IA_CSS_RX_IRQ_INFO_ERR_FRAME_DATA = 1U << 11,/** Frame data error */ + IA_CSS_RX_IRQ_INFO_ERR_DATA_TIMEOUT = 1U << 12,/** Timeout occurred */ + IA_CSS_RX_IRQ_INFO_ERR_UNKNOWN_ESC = 1U << 13,/** Unknown escape seq. */ + IA_CSS_RX_IRQ_INFO_ERR_LINE_SYNC = 1U << 14,/** Line Sync error */ IA_CSS_RX_IRQ_INFO_INIT_TIMEOUT = 1U << 15, }; -/** Interrupt info structure. This structure contains information about an +/* Interrupt info structure. This structure contains information about an * interrupt. This needs to be used after an interrupt is received on the IA * to perform the correct action. */ struct ia_css_irq { - enum ia_css_irq_info type; /**< Interrupt type. */ - unsigned int sw_irq_0_val; /**< In case of SW interrupt 0, value. */ - unsigned int sw_irq_1_val; /**< In case of SW interrupt 1, value. */ - unsigned int sw_irq_2_val; /**< In case of SW interrupt 2, value. */ + enum ia_css_irq_info type; /** Interrupt type. */ + unsigned int sw_irq_0_val; /** In case of SW interrupt 0, value. */ + unsigned int sw_irq_1_val; /** In case of SW interrupt 1, value. */ + unsigned int sw_irq_2_val; /** In case of SW interrupt 2, value. */ struct ia_css_pipe *pipe; - /**< The image pipe that generated the interrupt. */ + /** The image pipe that generated the interrupt. */ }; -/** @brief Obtain interrupt information. +/* @brief Obtain interrupt information. * * @param[out] info Pointer to the interrupt info. The interrupt * information wil be written to this info. @@ -154,7 +154,7 @@ struct ia_css_irq { enum ia_css_err ia_css_irq_translate(unsigned int *info); -/** @brief Get CSI receiver error info. +/* @brief Get CSI receiver error info. * * @param[out] irq_bits Pointer to the interrupt bits. The interrupt * bits will be written this info. @@ -172,7 +172,7 @@ ia_css_irq_translate(unsigned int *info); void ia_css_rx_get_irq_info(unsigned int *irq_bits); -/** @brief Get CSI receiver error info. +/* @brief Get CSI receiver error info. * * @param[in] port Input port identifier. * @param[out] irq_bits Pointer to the interrupt bits. The interrupt @@ -188,7 +188,7 @@ ia_css_rx_get_irq_info(unsigned int *irq_bits); void ia_css_rx_port_get_irq_info(enum ia_css_csi2_port port, unsigned int *irq_bits); -/** @brief Clear CSI receiver error info. +/* @brief Clear CSI receiver error info. * * @param[in] irq_bits The bits that should be cleared from the CSI receiver * interrupt bits register. @@ -205,7 +205,7 @@ ia_css_rx_port_get_irq_info(enum ia_css_csi2_port port, unsigned int *irq_bits); void ia_css_rx_clear_irq_info(unsigned int irq_bits); -/** @brief Clear CSI receiver error info. +/* @brief Clear CSI receiver error info. * * @param[in] port Input port identifier. * @param[in] irq_bits The bits that should be cleared from the CSI receiver @@ -220,7 +220,7 @@ ia_css_rx_clear_irq_info(unsigned int irq_bits); void ia_css_rx_port_clear_irq_info(enum ia_css_csi2_port port, unsigned int irq_bits); -/** @brief Enable or disable specific interrupts. +/* @brief Enable or disable specific interrupts. * * @param[in] type The interrupt type that will be enabled/disabled. * @param[in] enable enable or disable. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h index c40c5a19bfe1..8b674c98224c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_metadata.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_METADATA_H #define __IA_CSS_METADATA_H -/** @file +/* @file * This file contains structure for processing sensor metadata. */ @@ -23,32 +23,32 @@ #include "ia_css_types.h" #include "ia_css_stream_format.h" -/** Metadata configuration. This data structure contains necessary info +/* Metadata configuration. This data structure contains necessary info * to process sensor metadata. */ struct ia_css_metadata_config { - enum ia_css_stream_format data_type; /**< Data type of CSI-2 embedded + enum ia_css_stream_format data_type; /** Data type of CSI-2 embedded data. The default value is IA_CSS_STREAM_FORMAT_EMBEDDED. For certain sensors, user can choose non-default data type for embedded data. */ - struct ia_css_resolution resolution; /**< Resolution */ + struct ia_css_resolution resolution; /** Resolution */ }; struct ia_css_metadata_info { - struct ia_css_resolution resolution; /**< Resolution */ - uint32_t stride; /**< Stride in bytes */ - uint32_t size; /**< Total size in bytes */ + struct ia_css_resolution resolution; /** Resolution */ + uint32_t stride; /** Stride in bytes */ + uint32_t size; /** Total size in bytes */ }; struct ia_css_metadata { - struct ia_css_metadata_info info; /**< Layout info */ - ia_css_ptr address; /**< CSS virtual address */ + struct ia_css_metadata_info info; /** Layout info */ + ia_css_ptr address; /** CSS virtual address */ uint32_t exp_id; - /**< Exposure ID, see ia_css_event_public.h for more detail */ + /** Exposure ID, see ia_css_event_public.h for more detail */ }; #define SIZE_OF_IA_CSS_METADATA_STRUCT sizeof(struct ia_css_metadata) -/** @brief Allocate a metadata buffer. +/* @brief Allocate a metadata buffer. * @param[in] metadata_info Metadata info struct, contains details on metadata buffers. * @return Pointer of metadata buffer or NULL (if error) * @@ -58,7 +58,7 @@ struct ia_css_metadata { struct ia_css_metadata * ia_css_metadata_allocate(const struct ia_css_metadata_info *metadata_info); -/** @brief Free a metadata buffer. +/* @brief Free a metadata buffer. * * @param[in] metadata Pointer of metadata buffer. * @return None diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h index fd2c01b60b28..f9c9cd76be97 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mipi.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_MIPI_H #define __IA_CSS_MIPI_H -/** @file +/* @file * This file contains MIPI support functionality */ @@ -24,10 +24,10 @@ #include "ia_css_stream_format.h" #include "ia_css_input_port.h" -/** Backward compatible for CSS API 2.0 only +/* Backward compatible for CSS API 2.0 only * TO BE REMOVED when all drivers move to CSS API 2.1. */ -/** @brief Specify a CSS MIPI frame buffer. +/* @brief Specify a CSS MIPI frame buffer. * * @param[in] size_mem_words The frame size in memory words (32B). * @param[in] contiguous Allocate memory physically contiguously or not. @@ -42,7 +42,7 @@ ia_css_mipi_frame_specify(const unsigned int size_mem_words, const bool contiguous); #if !defined(HAS_NO_INPUT_SYSTEM) -/** @brief Register size of a CSS MIPI frame for check during capturing. +/* @brief Register size of a CSS MIPI frame for check during capturing. * * @param[in] port CSI-2 port this check is registered. * @param[in] size_mem_words The frame size in memory words (32B). @@ -59,7 +59,7 @@ ia_css_mipi_frame_enable_check_on_size(const enum ia_css_csi2_port port, const unsigned int size_mem_words); #endif -/** @brief Calculate the size of a mipi frame. +/* @brief Calculate the size of a mipi frame. * * @param[in] width The width (in pixels) of the frame. * @param[in] height The height (in lines) of the frame. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h index 48f8855d61f6..13c21056bfbf 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_mmu.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_MMU_H #define __IA_CSS_MMU_H -/** @file +/* @file * This file contains one support function for invalidating the CSS MMU cache */ -/** @brief Invalidate the MMU internal cache. +/* @brief Invalidate the MMU internal cache. * @return None * * This function triggers an invalidation of the translate-look-aside diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h index 969840da52b2..de409638d009 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_morph.h @@ -15,13 +15,13 @@ #ifndef __IA_CSS_MORPH_H #define __IA_CSS_MORPH_H -/** @file +/* @file * This file contains supporting for morphing table */ #include -/** @brief Morphing table +/* @brief Morphing table * @param[in] width Width of the morphing table. * @param[in] height Height of the morphing table. * @return Pointer to the morphing table @@ -29,7 +29,7 @@ struct ia_css_morph_table * ia_css_morph_table_allocate(unsigned int width, unsigned int height); -/** @brief Free the morph table +/* @brief Free the morph table * @param[in] me Pointer to the morph table. * @return None */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h index 733e0ef3afe8..df0aad9a6ab9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_pipe_public.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_PIPE_PUBLIC_H #define __IA_CSS_PIPE_PUBLIC_H -/** @file +/* @file * This file contains the public interface for CSS pipes. */ @@ -34,7 +34,7 @@ enum { IA_CSS_PIPE_MAX_OUTPUT_STAGE, }; -/** Enumeration of pipe modes. This mode can be used to create +/* Enumeration of pipe modes. This mode can be used to create * an image pipe for this mode. These pipes can be combined * to configure and run streams on the ISP. * @@ -42,12 +42,12 @@ enum { * create a continuous capture stream. */ enum ia_css_pipe_mode { - IA_CSS_PIPE_MODE_PREVIEW, /**< Preview pipe */ - IA_CSS_PIPE_MODE_VIDEO, /**< Video pipe */ - IA_CSS_PIPE_MODE_CAPTURE, /**< Still capture pipe */ - IA_CSS_PIPE_MODE_ACC, /**< Accelerated pipe */ - IA_CSS_PIPE_MODE_COPY, /**< Copy pipe, only used for embedded/image data copying */ - IA_CSS_PIPE_MODE_YUVPP, /**< YUV post processing pipe, used for all use cases with YUV input, + IA_CSS_PIPE_MODE_PREVIEW, /** Preview pipe */ + IA_CSS_PIPE_MODE_VIDEO, /** Video pipe */ + IA_CSS_PIPE_MODE_CAPTURE, /** Still capture pipe */ + IA_CSS_PIPE_MODE_ACC, /** Accelerated pipe */ + IA_CSS_PIPE_MODE_COPY, /** Copy pipe, only used for embedded/image data copying */ + IA_CSS_PIPE_MODE_YUVPP, /** YUV post processing pipe, used for all use cases with YUV input, for SoC sensor and external ISP */ }; /* Temporary define */ @@ -58,10 +58,10 @@ enum ia_css_pipe_mode { * the order should match with definition in sh_css_defs.h */ enum ia_css_pipe_version { - IA_CSS_PIPE_VERSION_1 = 1, /**< ISP1.0 pipe */ - IA_CSS_PIPE_VERSION_2_2 = 2, /**< ISP2.2 pipe */ - IA_CSS_PIPE_VERSION_2_6_1 = 3, /**< ISP2.6.1 pipe */ - IA_CSS_PIPE_VERSION_2_7 = 4 /**< ISP2.7 pipe */ + IA_CSS_PIPE_VERSION_1 = 1, /** ISP1.0 pipe */ + IA_CSS_PIPE_VERSION_2_2 = 2, /** ISP2.2 pipe */ + IA_CSS_PIPE_VERSION_2_6_1 = 3, /** ISP2.6.1 pipe */ + IA_CSS_PIPE_VERSION_2_7 = 4 /** ISP2.7 pipe */ }; /** @@ -71,79 +71,79 @@ enum ia_css_pipe_version { */ struct ia_css_pipe_config { enum ia_css_pipe_mode mode; - /**< mode, indicates which mode the pipe should use. */ + /** mode, indicates which mode the pipe should use. */ enum ia_css_pipe_version isp_pipe_version; - /**< pipe version, indicates which imaging pipeline the pipe should use. */ + /** pipe version, indicates which imaging pipeline the pipe should use. */ struct ia_css_resolution input_effective_res; - /**< input effective resolution */ + /** input effective resolution */ struct ia_css_resolution bayer_ds_out_res; - /**< bayer down scaling */ + /** bayer down scaling */ struct ia_css_resolution capt_pp_in_res; #ifndef ISP2401 - /**< bayer down scaling */ + /** bayer down scaling */ #else - /**< capture post processing input resolution */ + /** capture post processing input resolution */ #endif struct ia_css_resolution vf_pp_in_res; #ifndef ISP2401 - /**< bayer down scaling */ + /** bayer down scaling */ #else - /**< view finder post processing input resolution */ + /** view finder post processing input resolution */ struct ia_css_resolution output_system_in_res; - /**< For IPU3 only: use output_system_in_res to specify what input resolution + /** For IPU3 only: use output_system_in_res to specify what input resolution will OSYS receive, this resolution is equal to the output resolution of GDC if not determined CSS will set output_system_in_res with main osys output pin resolution All other IPUs may ignore this property */ #endif struct ia_css_resolution dvs_crop_out_res; - /**< dvs crop, video only, not in use yet. Use dvs_envelope below. */ + /** dvs crop, video only, not in use yet. Use dvs_envelope below. */ struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; - /**< output of YUV scaling */ + /** output of YUV scaling */ struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; - /**< output of VF YUV scaling */ + /** output of VF YUV scaling */ struct ia_css_fw_info *acc_extension; - /**< Pipeline extension accelerator */ + /** Pipeline extension accelerator */ struct ia_css_fw_info **acc_stages; - /**< Standalone accelerator stages */ + /** Standalone accelerator stages */ uint32_t num_acc_stages; - /**< Number of standalone accelerator stages */ + /** Number of standalone accelerator stages */ struct ia_css_capture_config default_capture_config; - /**< Default capture config for initial capture pipe configuration. */ - struct ia_css_resolution dvs_envelope; /**< temporary */ + /** Default capture config for initial capture pipe configuration. */ + struct ia_css_resolution dvs_envelope; /** temporary */ enum ia_css_frame_delay dvs_frame_delay; - /**< indicates the DVS loop delay in frame periods */ + /** indicates the DVS loop delay in frame periods */ int acc_num_execs; - /**< For acceleration pipes only: determine how many times the pipe + /** For acceleration pipes only: determine how many times the pipe should be run. Setting this to -1 means it will run until stopped. */ bool enable_dz; - /**< Disabling digital zoom for a pipeline, if this is set to false, + /** Disabling digital zoom for a pipeline, if this is set to false, then setting a zoom factor will have no effect. In some use cases this provides better performance. */ bool enable_dpc; - /**< Disabling "Defect Pixel Correction" for a pipeline, if this is set + /** Disabling "Defect Pixel Correction" for a pipeline, if this is set to false. In some use cases this provides better performance. */ bool enable_vfpp_bci; - /**< Enabling BCI mode will cause yuv_scale binary to be picked up + /** Enabling BCI mode will cause yuv_scale binary to be picked up instead of vf_pp. This only applies to viewfinder post processing stages. */ #ifdef ISP2401 bool enable_luma_only; - /**< Enabling of monochrome mode for a pipeline. If enabled only luma processing + /** Enabling of monochrome mode for a pipeline. If enabled only luma processing will be done. */ bool enable_tnr; - /**< Enabling of TNR (temporal noise reduction). This is only applicable to video + /** Enabling of TNR (temporal noise reduction). This is only applicable to video pipes. Non video-pipes should always set this parameter to false. */ #endif struct ia_css_isp_config *p_isp_config; - /**< Pointer to ISP configuration */ + /** Pointer to ISP configuration */ struct ia_css_resolution gdc_in_buffer_res; - /**< GDC in buffer resolution. */ + /** GDC in buffer resolution. */ struct ia_css_point gdc_in_buffer_offset; - /**< GDC in buffer offset - indicates the pixel coordinates of the first valid pixel inside the buffer */ + /** GDC in buffer offset - indicates the pixel coordinates of the first valid pixel inside the buffer */ #ifdef ISP2401 struct ia_css_coordinate internal_frame_origin_bqs_on_sctbl; - /**< Origin of internal frame positioned on shading table at shading correction in ISP. + /** Origin of internal frame positioned on shading table at shading correction in ISP. NOTE: Shading table is larger than or equal to internal frame. Shading table has shading gains and internal frame has bayer data. The origin of internal frame is used in shading correction in ISP @@ -228,20 +228,20 @@ struct ia_css_pipe_config { #endif -/** Pipe info, this struct describes properties of a pipe after it's stream has +/* Pipe info, this struct describes properties of a pipe after it's stream has * been created. * ~~~** DO NOT ADD NEW FIELD **~~~ This structure will be deprecated. * - On the Behalf of CSS-API Committee. */ struct ia_css_pipe_info { struct ia_css_frame_info output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; - /**< Info about output resolution. This contains the stride which + /** Info about output resolution. This contains the stride which should be used for memory allocation. */ struct ia_css_frame_info vf_output_info[IA_CSS_PIPE_MAX_OUTPUT_STAGE]; - /**< Info about viewfinder output resolution (optional). This contains + /** Info about viewfinder output resolution (optional). This contains the stride that should be used for memory allocation. */ struct ia_css_frame_info raw_output_info; - /**< Raw output resolution. This indicates the resolution of the + /** Raw output resolution. This indicates the resolution of the RAW bayer output for pipes that support this. Currently, only the still capture pipes support this feature. When this resolution is smaller than the input resolution, cropping will be performed by @@ -252,17 +252,17 @@ struct ia_css_pipe_info { the input resolution - 8x8. */ #ifdef ISP2401 struct ia_css_resolution output_system_in_res_info; - /**< For IPU3 only. Info about output system in resolution which is considered + /** For IPU3 only. Info about output system in resolution which is considered as gdc out resolution. */ #endif struct ia_css_shading_info shading_info; - /**< After an image pipe is created, this field will contain the info + /** After an image pipe is created, this field will contain the info for the shading correction. */ struct ia_css_grid_info grid_info; - /**< After an image pipe is created, this field will contain the grid + /** After an image pipe is created, this field will contain the grid info for 3A and DVS. */ int num_invalid_frames; - /**< The very first frames in a started stream do not contain valid data. + /** The very first frames in a started stream do not contain valid data. In this field, the CSS-firmware communicates to the host-driver how many initial frames will contain invalid data; this allows the host-driver to discard those initial invalid frames and start it's @@ -299,7 +299,7 @@ struct ia_css_pipe_info { #endif -/** @brief Load default pipe configuration +/* @brief Load default pipe configuration * @param[out] pipe_config The pipe configuration. * @return None * @@ -334,7 +334,7 @@ struct ia_css_pipe_info { */ void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config); -/** @brief Create a pipe +/* @brief Create a pipe * @param[in] config The pipe configuration. * @param[out] pipe The pipe. * @return IA_CSS_SUCCESS or the error code. @@ -346,7 +346,7 @@ enum ia_css_err ia_css_pipe_create(const struct ia_css_pipe_config *config, struct ia_css_pipe **pipe); -/** @brief Destroy a pipe +/* @brief Destroy a pipe * @param[in] pipe The pipe. * @return IA_CSS_SUCCESS or the error code. * @@ -355,7 +355,7 @@ ia_css_pipe_create(const struct ia_css_pipe_config *config, enum ia_css_err ia_css_pipe_destroy(struct ia_css_pipe *pipe); -/** @brief Provides information about a pipe +/* @brief Provides information about a pipe * @param[in] pipe The pipe. * @param[out] pipe_info The pipe information. * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS. @@ -366,7 +366,7 @@ enum ia_css_err ia_css_pipe_get_info(const struct ia_css_pipe *pipe, struct ia_css_pipe_info *pipe_info); -/** @brief Configure a pipe with filter coefficients. +/* @brief Configure a pipe with filter coefficients. * @param[in] pipe The pipe. * @param[in] config The pointer to ISP configuration. * @return IA_CSS_SUCCESS or error code upon error. @@ -378,7 +378,7 @@ enum ia_css_err ia_css_pipe_set_isp_config(struct ia_css_pipe *pipe, struct ia_css_isp_config *config); -/** @brief Controls when the Event generator raises an IRQ to the Host. +/* @brief Controls when the Event generator raises an IRQ to the Host. * * @param[in] pipe The pipe. * @param[in] or_mask Binary or of enum ia_css_event_irq_mask_type. Each pipe @@ -455,7 +455,7 @@ ia_css_pipe_set_irq_mask(struct ia_css_pipe *pipe, unsigned int or_mask, unsigned int and_mask); -/** @brief Reads the current event IRQ mask from the CSS. +/* @brief Reads the current event IRQ mask from the CSS. * * @param[in] pipe The pipe. * @param[out] or_mask Current or_mask. The bits in this mask are a binary or @@ -476,7 +476,7 @@ ia_css_event_get_irq_mask(const struct ia_css_pipe *pipe, unsigned int *or_mask, unsigned int *and_mask); -/** @brief Queue a buffer for an image pipe. +/* @brief Queue a buffer for an image pipe. * * @param[in] pipe The pipe that will own the buffer. * @param[in] buffer Pointer to the buffer. @@ -498,7 +498,7 @@ enum ia_css_err ia_css_pipe_enqueue_buffer(struct ia_css_pipe *pipe, const struct ia_css_buffer *buffer); -/** @brief Dequeue a buffer from an image pipe. +/* @brief Dequeue a buffer from an image pipe. * * @param[in] pipe The pipeline that the buffer queue belongs to. * @param[in,out] buffer The buffer is used to lookup the type which determines @@ -519,7 +519,7 @@ ia_css_pipe_dequeue_buffer(struct ia_css_pipe *pipe, struct ia_css_buffer *buffer); -/** @brief Set the state (Enable or Disable) of the Extension stage in the +/* @brief Set the state (Enable or Disable) of the Extension stage in the * given pipe. * @param[in] pipe Pipe handle. * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle) @@ -546,7 +546,7 @@ ia_css_pipe_set_qos_ext_state (struct ia_css_pipe *pipe, uint32_t fw_handle, bool enable); -/** @brief Get the state (Enable or Disable) of the Extension stage in the +/* @brief Get the state (Enable or Disable) of the Extension stage in the * given pipe. * @param[in] pipe Pipe handle. * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle) @@ -573,7 +573,7 @@ ia_css_pipe_get_qos_ext_state (struct ia_css_pipe *pipe, bool * enable); #ifdef ISP2401 -/** @brief Update mapped CSS and ISP arguments for QoS pipe during SP runtime. +/* @brief Update mapped CSS and ISP arguments for QoS pipe during SP runtime. * @param[in] pipe Pipe handle. * @param[in] fw_handle Extension firmware Handle (ia_css_fw_info.handle). * @param[in] css_seg Parameter memory descriptors for CSS segments. @@ -595,7 +595,7 @@ ia_css_pipe_update_qos_ext_mapped_arg(struct ia_css_pipe *pipe, uint32_t fw_hand struct ia_css_isp_param_isp_segments *isp_seg); #endif -/** @brief Get selected configuration settings +/* @brief Get selected configuration settings * @param[in] pipe The pipe. * @param[out] config Configuration settings. * @return None @@ -604,7 +604,7 @@ void ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe, struct ia_css_isp_config *config); -/** @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit +/* @brief Set the scaler lut on this pipe. A copy of lut is made in the inuit * address space. So the LUT can be freed by caller. * @param[in] pipe Pipe handle. * @param[in] lut Look up tabel @@ -623,7 +623,7 @@ ia_css_pipe_get_isp_config(struct ia_css_pipe *pipe, enum ia_css_err ia_css_pipe_set_bci_scaler_lut( struct ia_css_pipe *pipe, const void *lut); -/** @brief Checking of DVS statistics ability +/* @brief Checking of DVS statistics ability * @param[in] pipe_info The pipe info. * @return true - has DVS statistics ability * false - otherwise @@ -631,7 +631,7 @@ ia_css_pipe_set_bci_scaler_lut( struct ia_css_pipe *pipe, bool ia_css_pipe_has_dvs_stats(struct ia_css_pipe_info *pipe_info); #ifdef ISP2401 -/** @brief Override the frameformat set on the output pins. +/* @brief Override the frameformat set on the output pins. * @param[in] pipe Pipe handle. * @param[in] output_pin Pin index to set the format on * 0 - main output pin diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h index 9b0eeb08ca04..6f24656b6cb4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_prbs.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_PRBS_H #define __IA_CSS_PRBS_H -/** @file +/* @file * This file contains support for Pseudo Random Bit Sequence (PRBS) inputs */ -/** Enumerate the PRBS IDs. +/* Enumerate the PRBS IDs. */ enum ia_css_prbs_id { IA_CSS_PRBS_ID0, @@ -44,10 +44,10 @@ enum ia_css_prbs_id { */ struct ia_css_prbs_config { enum ia_css_prbs_id id; - unsigned int h_blank; /**< horizontal blank */ - unsigned int v_blank; /**< vertical blank */ - int seed; /**< random seed for the 1st 2-pixel-components/clock */ - int seed1; /**< random seed for the 2nd 2-pixel-components/clock */ + unsigned int h_blank; /** horizontal blank */ + unsigned int v_blank; /** vertical blank */ + int seed; /** random seed for the 1st 2-pixel-components/clock */ + int seed1; /** random seed for the 2nd 2-pixel-components/clock */ }; #endif /* __IA_CSS_PRBS_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h index 19af4021b24c..9a167306611c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_properties.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_PROPERTIES_H #define __IA_CSS_PROPERTIES_H -/** @file +/* @file * This file contains support for retrieving properties of some hardware the CSS system */ @@ -24,12 +24,12 @@ struct ia_css_properties { int gdc_coord_one; - bool l1_base_is_index; /**< Indicate whether the L1 page base + bool l1_base_is_index; /** Indicate whether the L1 page base is a page index or a byte address. */ enum ia_css_vamem_type vamem_type; }; -/** @brief Get hardware properties +/* @brief Get hardware properties * @param[in,out] properties The hardware properties * @return None * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h index cb0f249e98c8..588f53d32b72 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_shading.h @@ -15,13 +15,13 @@ #ifndef __IA_CSS_SHADING_H #define __IA_CSS_SHADING_H -/** @file +/* @file * This file contains support for setting the shading table for CSS */ #include -/** @brief Shading table +/* @brief Shading table * @param[in] width Width of the shading table. * @param[in] height Height of the shading table. * @return Pointer to the shading table @@ -30,7 +30,7 @@ struct ia_css_shading_table * ia_css_shading_table_alloc(unsigned int width, unsigned int height); -/** @brief Free shading table +/* @brief Free shading table * @param[in] table Pointer to the shading table. * @return None */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h index 453fe4db0133..fb6e8c2ca8bf 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream.h @@ -48,7 +48,7 @@ struct ia_css_stream { bool started; }; -/** @brief Get a binary in the stream, which binary has the shading correction. +/* @brief Get a binary in the stream, which binary has the shading correction. * * @param[in] stream: The stream. * @return The binary which has the shading correction. @@ -76,7 +76,7 @@ sh_css_invalidate_params(struct ia_css_stream *stream); const struct ia_css_fpn_table * ia_css_get_fpn_table(struct ia_css_stream *stream); -/** @brief Get a pointer to the shading table. +/* @brief Get a pointer to the shading table. * * @param[in] stream: The stream. * @return The pointer to the shading table. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h index ae608a9c9051..f7e9020a86e1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_format.h @@ -15,74 +15,74 @@ #ifndef __IA_CSS_STREAM_FORMAT_H #define __IA_CSS_STREAM_FORMAT_H -/** @file +/* @file * This file contains formats usable for ISP streaming input */ #include /* bool */ -/** The ISP streaming input interface supports the following formats. +/* The ISP streaming input interface supports the following formats. * These match the corresponding MIPI formats. */ enum ia_css_stream_format { - IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, /**< 8 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV420_8, /**< 8 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV420_10, /**< 10 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV420_16, /**< 16 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV422_8, /**< UYVY..UYVY, 8 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV422_10, /**< UYVY..UYVY, 10 bits per subpixel */ - IA_CSS_STREAM_FORMAT_YUV422_16, /**< UYVY..UYVY, 16 bits per subpixel */ - IA_CSS_STREAM_FORMAT_RGB_444, /**< BGR..BGR, 4 bits per subpixel */ - IA_CSS_STREAM_FORMAT_RGB_555, /**< BGR..BGR, 5 bits per subpixel */ - IA_CSS_STREAM_FORMAT_RGB_565, /**< BGR..BGR, 5 bits B and R, 6 bits G */ - IA_CSS_STREAM_FORMAT_RGB_666, /**< BGR..BGR, 6 bits per subpixel */ - IA_CSS_STREAM_FORMAT_RGB_888, /**< BGR..BGR, 8 bits per subpixel */ - IA_CSS_STREAM_FORMAT_RAW_6, /**< RAW data, 6 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_7, /**< RAW data, 7 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_8, /**< RAW data, 8 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_10, /**< RAW data, 10 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_12, /**< RAW data, 12 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_14, /**< RAW data, 14 bits per pixel */ - IA_CSS_STREAM_FORMAT_RAW_16, /**< RAW data, 16 bits per pixel, which is + IA_CSS_STREAM_FORMAT_YUV420_8_LEGACY, /** 8 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV420_8, /** 8 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV420_10, /** 10 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV420_16, /** 16 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV422_8, /** UYVY..UYVY, 8 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV422_10, /** UYVY..UYVY, 10 bits per subpixel */ + IA_CSS_STREAM_FORMAT_YUV422_16, /** UYVY..UYVY, 16 bits per subpixel */ + IA_CSS_STREAM_FORMAT_RGB_444, /** BGR..BGR, 4 bits per subpixel */ + IA_CSS_STREAM_FORMAT_RGB_555, /** BGR..BGR, 5 bits per subpixel */ + IA_CSS_STREAM_FORMAT_RGB_565, /** BGR..BGR, 5 bits B and R, 6 bits G */ + IA_CSS_STREAM_FORMAT_RGB_666, /** BGR..BGR, 6 bits per subpixel */ + IA_CSS_STREAM_FORMAT_RGB_888, /** BGR..BGR, 8 bits per subpixel */ + IA_CSS_STREAM_FORMAT_RAW_6, /** RAW data, 6 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_7, /** RAW data, 7 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_8, /** RAW data, 8 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_10, /** RAW data, 10 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_12, /** RAW data, 12 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_14, /** RAW data, 14 bits per pixel */ + IA_CSS_STREAM_FORMAT_RAW_16, /** RAW data, 16 bits per pixel, which is not specified in CSI-MIPI standard*/ - IA_CSS_STREAM_FORMAT_BINARY_8, /**< Binary byte stream, which is target at + IA_CSS_STREAM_FORMAT_BINARY_8, /** Binary byte stream, which is target at JPEG. */ - /** CSI2-MIPI specific format: Generic short packet data. It is used to + /* CSI2-MIPI specific format: Generic short packet data. It is used to * keep the timing information for the opening/closing of shutters, * triggering of flashes and etc. */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT1, /**< Generic Short Packet Code 1 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT2, /**< Generic Short Packet Code 2 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT3, /**< Generic Short Packet Code 3 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT4, /**< Generic Short Packet Code 4 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT5, /**< Generic Short Packet Code 5 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT6, /**< Generic Short Packet Code 6 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT7, /**< Generic Short Packet Code 7 */ - IA_CSS_STREAM_FORMAT_GENERIC_SHORT8, /**< Generic Short Packet Code 8 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT1, /** Generic Short Packet Code 1 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT2, /** Generic Short Packet Code 2 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT3, /** Generic Short Packet Code 3 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT4, /** Generic Short Packet Code 4 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT5, /** Generic Short Packet Code 5 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT6, /** Generic Short Packet Code 6 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT7, /** Generic Short Packet Code 7 */ + IA_CSS_STREAM_FORMAT_GENERIC_SHORT8, /** Generic Short Packet Code 8 */ - /** CSI2-MIPI specific format: YUV data. + /* CSI2-MIPI specific format: YUV data. */ - IA_CSS_STREAM_FORMAT_YUV420_8_SHIFT, /**< YUV420 8-bit (Chroma Shifted Pixel Sampling) */ - IA_CSS_STREAM_FORMAT_YUV420_10_SHIFT, /**< YUV420 8-bit (Chroma Shifted Pixel Sampling) */ + IA_CSS_STREAM_FORMAT_YUV420_8_SHIFT, /** YUV420 8-bit (Chroma Shifted Pixel Sampling) */ + IA_CSS_STREAM_FORMAT_YUV420_10_SHIFT, /** YUV420 8-bit (Chroma Shifted Pixel Sampling) */ - /** CSI2-MIPI specific format: Generic long packet data + /* CSI2-MIPI specific format: Generic long packet data */ - IA_CSS_STREAM_FORMAT_EMBEDDED, /**< Embedded 8-bit non Image Data */ + IA_CSS_STREAM_FORMAT_EMBEDDED, /** Embedded 8-bit non Image Data */ - /** CSI2-MIPI specific format: User defined byte-based data. For example, + /* CSI2-MIPI specific format: User defined byte-based data. For example, * the data transmitter (e.g. the SoC sensor) can keep the JPEG data as * the User Defined Data Type 4 and the MPEG data as the * User Defined Data Type 7. */ - IA_CSS_STREAM_FORMAT_USER_DEF1, /**< User defined 8-bit data type 1 */ - IA_CSS_STREAM_FORMAT_USER_DEF2, /**< User defined 8-bit data type 2 */ - IA_CSS_STREAM_FORMAT_USER_DEF3, /**< User defined 8-bit data type 3 */ - IA_CSS_STREAM_FORMAT_USER_DEF4, /**< User defined 8-bit data type 4 */ - IA_CSS_STREAM_FORMAT_USER_DEF5, /**< User defined 8-bit data type 5 */ - IA_CSS_STREAM_FORMAT_USER_DEF6, /**< User defined 8-bit data type 6 */ - IA_CSS_STREAM_FORMAT_USER_DEF7, /**< User defined 8-bit data type 7 */ - IA_CSS_STREAM_FORMAT_USER_DEF8, /**< User defined 8-bit data type 8 */ + IA_CSS_STREAM_FORMAT_USER_DEF1, /** User defined 8-bit data type 1 */ + IA_CSS_STREAM_FORMAT_USER_DEF2, /** User defined 8-bit data type 2 */ + IA_CSS_STREAM_FORMAT_USER_DEF3, /** User defined 8-bit data type 3 */ + IA_CSS_STREAM_FORMAT_USER_DEF4, /** User defined 8-bit data type 4 */ + IA_CSS_STREAM_FORMAT_USER_DEF5, /** User defined 8-bit data type 5 */ + IA_CSS_STREAM_FORMAT_USER_DEF6, /** User defined 8-bit data type 6 */ + IA_CSS_STREAM_FORMAT_USER_DEF7, /** User defined 8-bit data type 7 */ + IA_CSS_STREAM_FORMAT_USER_DEF8, /** User defined 8-bit data type 8 */ }; #define IA_CSS_STREAM_FORMAT_NUM IA_CSS_STREAM_FORMAT_USER_DEF8 diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h index 2c8d9de10a59..ca3203357ff5 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_stream_public.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_STREAM_PUBLIC_H #define __IA_CSS_STREAM_PUBLIC_H -/** @file +/* @file * This file contains support for configuring and controlling streams */ @@ -27,26 +27,26 @@ #include "ia_css_prbs.h" #include "ia_css_input_port.h" -/** Input modes, these enumerate all supported input modes. +/* Input modes, these enumerate all supported input modes. * Note that not all ISP modes support all input modes. */ enum ia_css_input_mode { - IA_CSS_INPUT_MODE_SENSOR, /**< data from sensor */ - IA_CSS_INPUT_MODE_FIFO, /**< data from input-fifo */ - IA_CSS_INPUT_MODE_TPG, /**< data from test-pattern generator */ - IA_CSS_INPUT_MODE_PRBS, /**< data from pseudo-random bit stream */ - IA_CSS_INPUT_MODE_MEMORY, /**< data from a frame in memory */ - IA_CSS_INPUT_MODE_BUFFERED_SENSOR /**< data is sent through mipi buffer */ + IA_CSS_INPUT_MODE_SENSOR, /** data from sensor */ + IA_CSS_INPUT_MODE_FIFO, /** data from input-fifo */ + IA_CSS_INPUT_MODE_TPG, /** data from test-pattern generator */ + IA_CSS_INPUT_MODE_PRBS, /** data from pseudo-random bit stream */ + IA_CSS_INPUT_MODE_MEMORY, /** data from a frame in memory */ + IA_CSS_INPUT_MODE_BUFFERED_SENSOR /** data is sent through mipi buffer */ }; -/** Structure of the MIPI buffer configuration +/* Structure of the MIPI buffer configuration */ struct ia_css_mipi_buffer_config { - unsigned int size_mem_words; /**< The frame size in the system memory + unsigned int size_mem_words; /** The frame size in the system memory words (32B) */ - bool contiguous; /**< Allocated memory physically + bool contiguous; /** Allocated memory physically contiguously or not. \deprecated{Will be false always.}*/ - unsigned int nof_mipi_buffers; /**< The number of MIPI buffers required for this + unsigned int nof_mipi_buffers; /** The number of MIPI buffers required for this stream */ }; @@ -57,44 +57,44 @@ enum { IA_CSS_STREAM_MAX_ISYS_STREAM_PER_CH }; -/** This is input data configuration for one MIPI data type. We can have +/* This is input data configuration for one MIPI data type. We can have * multiple of this in one virtual channel. */ struct ia_css_stream_isys_stream_config { - struct ia_css_resolution input_res; /**< Resolution of input data */ - enum ia_css_stream_format format; /**< Format of input stream. This data + struct ia_css_resolution input_res; /** Resolution of input data */ + enum ia_css_stream_format format; /** Format of input stream. This data format will be mapped to MIPI data type internally. */ - int linked_isys_stream_id; /**< default value is -1, other value means + int linked_isys_stream_id; /** default value is -1, other value means current isys_stream shares the same buffer with indicated isys_stream*/ - bool valid; /**< indicate whether other fields have valid value */ + bool valid; /** indicate whether other fields have valid value */ }; struct ia_css_stream_input_config { - struct ia_css_resolution input_res; /**< Resolution of input data */ - struct ia_css_resolution effective_res; /**< Resolution of input data. + struct ia_css_resolution input_res; /** Resolution of input data */ + struct ia_css_resolution effective_res; /** Resolution of input data. Used for CSS 2400/1 System and deprecated for other systems (replaced by input_effective_res in ia_css_pipe_config) */ - enum ia_css_stream_format format; /**< Format of input stream. This data + enum ia_css_stream_format format; /** Format of input stream. This data format will be mapped to MIPI data type internally. */ - enum ia_css_bayer_order bayer_order; /**< Bayer order for RAW streams */ + enum ia_css_bayer_order bayer_order; /** Bayer order for RAW streams */ }; -/** Input stream description. This describes how input will flow into the +/* Input stream description. This describes how input will flow into the * CSS. This is used to program the CSS hardware. */ struct ia_css_stream_config { - enum ia_css_input_mode mode; /**< Input mode */ + enum ia_css_input_mode mode; /** Input mode */ union { - struct ia_css_input_port port; /**< Port, for sensor only. */ - struct ia_css_tpg_config tpg; /**< TPG configuration */ - struct ia_css_prbs_config prbs; /**< PRBS configuration */ - } source; /**< Source of input data */ - unsigned int channel_id; /**< Channel on which input data + struct ia_css_input_port port; /** Port, for sensor only. */ + struct ia_css_tpg_config tpg; /** TPG configuration */ + struct ia_css_prbs_config prbs; /** PRBS configuration */ + } source; /** Source of input data */ + unsigned int channel_id; /** Channel on which input data will arrive. Use this field to specify virtual channel id. Valid values are: 0, 1, 2, 3 */ @@ -110,29 +110,29 @@ struct ia_css_stream_config { * and will be deprecated. In the future,all platforms will use the N*N method */ #endif - unsigned int sensor_binning_factor; /**< Binning factor used by sensor + unsigned int sensor_binning_factor; /** Binning factor used by sensor to produce image data. This is used for shading correction. */ - unsigned int pixels_per_clock; /**< Number of pixels per clock, which can be + unsigned int pixels_per_clock; /** Number of pixels per clock, which can be 1, 2 or 4. */ - bool online; /**< offline will activate RAW copy on SP, use this for + bool online; /** offline will activate RAW copy on SP, use this for continuous capture. */ /* ISYS2401 usage: ISP receives data directly from sensor, no copy. */ - unsigned init_num_cont_raw_buf; /**< initial number of raw buffers to + unsigned init_num_cont_raw_buf; /** initial number of raw buffers to allocate */ - unsigned target_num_cont_raw_buf; /**< total number of raw buffers to + unsigned target_num_cont_raw_buf; /** total number of raw buffers to allocate */ - bool pack_raw_pixels; /**< Pack pixels in the raw buffers */ - bool continuous; /**< Use SP copy feature to continuously capture frames + bool pack_raw_pixels; /** Pack pixels in the raw buffers */ + bool continuous; /** Use SP copy feature to continuously capture frames to system memory and run pipes in offline mode */ - bool disable_cont_viewfinder; /**< disable continous viewfinder for ZSL use case */ - int32_t flash_gpio_pin; /**< pin on which the flash is connected, -1 for no flash */ - int left_padding; /**< The number of input-formatter left-paddings, -1 for default from binary.*/ - struct ia_css_mipi_buffer_config mipi_buffer_config; /**< mipi buffer configuration */ - struct ia_css_metadata_config metadata_config; /**< Metadata configuration. */ - bool ia_css_enable_raw_buffer_locking; /**< Enable Raw Buffer Locking for HALv3 Support */ + bool disable_cont_viewfinder; /** disable continous viewfinder for ZSL use case */ + int32_t flash_gpio_pin; /** pin on which the flash is connected, -1 for no flash */ + int left_padding; /** The number of input-formatter left-paddings, -1 for default from binary.*/ + struct ia_css_mipi_buffer_config mipi_buffer_config; /** mipi buffer configuration */ + struct ia_css_metadata_config metadata_config; /** Metadata configuration. */ + bool ia_css_enable_raw_buffer_locking; /** Enable Raw Buffer Locking for HALv3 Support */ bool lock_all; - /**< Lock all RAW buffers (true) or lock only buffers processed by + /** Lock all RAW buffers (true) or lock only buffers processed by video or preview pipe (false). This setting needs to be enabled to allow raw buffer locking without continuous viewfinder. */ @@ -140,15 +140,15 @@ struct ia_css_stream_config { struct ia_css_stream; -/** Stream info, this struct describes properties of a stream after it has been +/* Stream info, this struct describes properties of a stream after it has been * created. */ struct ia_css_stream_info { struct ia_css_metadata_info metadata_info; - /**< Info about the metadata layout, this contains the stride. */ + /** Info about the metadata layout, this contains the stride. */ }; -/** @brief Load default stream configuration +/* @brief Load default stream configuration * @param[in,out] stream_config The stream configuration. * @return None * @@ -165,7 +165,7 @@ void ia_css_stream_config_defaults(struct ia_css_stream_config *stream_config); * create the internal structures and fill in the configuration data and pipes */ - /** @brief Creates a stream + /* @brief Creates a stream * @param[in] stream_config The stream configuration. * @param[in] num_pipes The number of pipes to incorporate in the stream. * @param[in] pipes The pipes. @@ -180,7 +180,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config, struct ia_css_pipe *pipes[], struct ia_css_stream **stream); -/** @brief Destroys a stream +/* @brief Destroys a stream * @param[in] stream The stream. * @return IA_CSS_SUCCESS or the error code. * @@ -189,7 +189,7 @@ ia_css_stream_create(const struct ia_css_stream_config *stream_config, enum ia_css_err ia_css_stream_destroy(struct ia_css_stream *stream); -/** @brief Provides information about a stream +/* @brief Provides information about a stream * @param[in] stream The stream. * @param[out] stream_info The information about the stream. * @return IA_CSS_SUCCESS or the error code. @@ -200,7 +200,7 @@ enum ia_css_err ia_css_stream_get_info(const struct ia_css_stream *stream, struct ia_css_stream_info *stream_info); -/** @brief load (rebuild) a stream that was unloaded. +/* @brief load (rebuild) a stream that was unloaded. * @param[in] stream The stream * @return IA_CSS_SUCCESS or the error code * @@ -210,7 +210,7 @@ ia_css_stream_get_info(const struct ia_css_stream *stream, enum ia_css_err ia_css_stream_load(struct ia_css_stream *stream); -/** @brief Starts the stream. +/* @brief Starts the stream. * @param[in] stream The stream. * @return IA_CSS_SUCCESS or the error code. * @@ -223,7 +223,7 @@ ia_css_stream_load(struct ia_css_stream *stream); enum ia_css_err ia_css_stream_start(struct ia_css_stream *stream); -/** @brief Stop the stream. +/* @brief Stop the stream. * @param[in] stream The stream. * @return IA_CSS_SUCCESS or the error code. * @@ -233,7 +233,7 @@ ia_css_stream_start(struct ia_css_stream *stream); enum ia_css_err ia_css_stream_stop(struct ia_css_stream *stream); -/** @brief Check if a stream has stopped +/* @brief Check if a stream has stopped * @param[in] stream The stream. * @return boolean flag * @@ -242,7 +242,7 @@ ia_css_stream_stop(struct ia_css_stream *stream); bool ia_css_stream_has_stopped(struct ia_css_stream *stream); -/** @brief destroy a stream according to the stream seed previosly saved in the seed array. +/* @brief destroy a stream according to the stream seed previosly saved in the seed array. * @param[in] stream The stream. * @return IA_CSS_SUCCESS (no other errors are generated now) * @@ -251,7 +251,7 @@ ia_css_stream_has_stopped(struct ia_css_stream *stream); enum ia_css_err ia_css_stream_unload(struct ia_css_stream *stream); -/** @brief Returns stream format +/* @brief Returns stream format * @param[in] stream The stream. * @return format of the string * @@ -260,7 +260,7 @@ ia_css_stream_unload(struct ia_css_stream *stream); enum ia_css_stream_format ia_css_stream_get_format(const struct ia_css_stream *stream); -/** @brief Check if the stream is configured for 2 pixels per clock +/* @brief Check if the stream is configured for 2 pixels per clock * @param[in] stream The stream. * @return boolean flag * @@ -270,7 +270,7 @@ ia_css_stream_get_format(const struct ia_css_stream *stream); bool ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream); -/** @brief Sets the output frame stride (at the last pipe) +/* @brief Sets the output frame stride (at the last pipe) * @param[in] stream The stream * @param[in] output_padded_width - the output buffer stride. * @return ia_css_err @@ -280,7 +280,7 @@ ia_css_stream_get_two_pixels_per_clock(const struct ia_css_stream *stream); enum ia_css_err ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int output_padded_width); -/** @brief Return max number of continuous RAW frames. +/* @brief Return max number of continuous RAW frames. * @param[in] stream The stream. * @param[out] buffer_depth The maximum number of continuous RAW frames. * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS @@ -291,7 +291,7 @@ ia_css_stream_set_output_padded_width(struct ia_css_stream *stream, unsigned int enum ia_css_err ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_depth); -/** @brief Set nr of continuous RAW frames to use. +/* @brief Set nr of continuous RAW frames to use. * * @param[in] stream The stream. * @param[in] buffer_depth Number of frames to set. @@ -302,7 +302,7 @@ ia_css_stream_get_max_buffer_depth(struct ia_css_stream *stream, int *buffer_dep enum ia_css_err ia_css_stream_set_buffer_depth(struct ia_css_stream *stream, int buffer_depth); -/** @brief Get number of continuous RAW frames to use. +/* @brief Get number of continuous RAW frames to use. * @param[in] stream The stream. * @param[out] buffer_depth The number of frames to use * @return IA_CSS_SUCCESS or IA_CSS_ERR_INVALID_ARGUMENTS @@ -315,7 +315,7 @@ ia_css_stream_get_buffer_depth(struct ia_css_stream *stream, int *buffer_depth); /* ===== CAPTURE ===== */ -/** @brief Configure the continuous capture +/* @brief Configure the continuous capture * * @param[in] stream The stream. * @param[in] num_captures The number of RAW frames to be processed to @@ -347,7 +347,7 @@ ia_css_stream_capture(struct ia_css_stream *stream, unsigned int skip, int offset); -/** @brief Specify which raw frame to tag based on exp_id found in frame info +/* @brief Specify which raw frame to tag based on exp_id found in frame info * * @param[in] stream The stream. * @param[in] exp_id The exposure id of the raw frame to tag. @@ -363,7 +363,7 @@ ia_css_stream_capture_frame(struct ia_css_stream *stream, /* ===== VIDEO ===== */ -/** @brief Send streaming data into the css input FIFO +/* @brief Send streaming data into the css input FIFO * * @param[in] stream The stream. * @param[in] data Pointer to the pixels to be send. @@ -395,7 +395,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream, unsigned int width, unsigned int height); -/** @brief Start an input frame on the CSS input FIFO. +/* @brief Start an input frame on the CSS input FIFO. * * @param[in] stream The stream. * @return None @@ -411,7 +411,7 @@ ia_css_stream_send_input_frame(const struct ia_css_stream *stream, void ia_css_stream_start_input_frame(const struct ia_css_stream *stream); -/** @brief Send a line of input data into the CSS input FIFO. +/* @brief Send a line of input data into the CSS input FIFO. * * @param[in] stream The stream. * @param[in] data Array of the first line of image data. @@ -435,7 +435,7 @@ ia_css_stream_send_input_line(const struct ia_css_stream *stream, const unsigned short *data2, unsigned int width2); -/** @brief Send a line of input embedded data into the CSS input FIFO. +/* @brief Send a line of input embedded data into the CSS input FIFO. * * @param[in] stream Pointer of the stream. * @param[in] format Format of the embedded data. @@ -457,7 +457,7 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream, const unsigned short *data, unsigned int width); -/** @brief End an input frame on the CSS input FIFO. +/* @brief End an input frame on the CSS input FIFO. * * @param[in] stream The stream. * @return None @@ -467,7 +467,7 @@ ia_css_stream_send_input_embedded_line(const struct ia_css_stream *stream, void ia_css_stream_end_input_frame(const struct ia_css_stream *stream); -/** @brief send a request flash command to SP +/* @brief send a request flash command to SP * * @param[in] stream The stream. * @return None @@ -481,7 +481,7 @@ ia_css_stream_end_input_frame(const struct ia_css_stream *stream); void ia_css_stream_request_flash(struct ia_css_stream *stream); -/** @brief Configure a stream with filter coefficients. +/* @brief Configure a stream with filter coefficients. * @deprecated {Replaced by * ia_css_pipe_set_isp_config_on_pipe()} * @@ -503,7 +503,7 @@ ia_css_stream_set_isp_config_on_pipe(struct ia_css_stream *stream, const struct ia_css_isp_config *config, struct ia_css_pipe *pipe); -/** @brief Configure a stream with filter coefficients. +/* @brief Configure a stream with filter coefficients. * @deprecated {Replaced by * ia_css_pipe_set_isp_config()} * @param[in] stream The stream. @@ -523,7 +523,7 @@ ia_css_stream_set_isp_config( struct ia_css_stream *stream, const struct ia_css_isp_config *config); -/** @brief Get selected configuration settings +/* @brief Get selected configuration settings * @param[in] stream The stream. * @param[out] config Configuration settings. * @return None @@ -532,7 +532,7 @@ void ia_css_stream_get_isp_config(const struct ia_css_stream *stream, struct ia_css_isp_config *config); -/** @brief allocate continuous raw frames for continuous capture +/* @brief allocate continuous raw frames for continuous capture * @param[in] stream The stream. * @return IA_CSS_SUCCESS or error code. * @@ -544,7 +544,7 @@ ia_css_stream_get_isp_config(const struct ia_css_stream *stream, enum ia_css_err ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream); -/** @brief allocate continuous raw frames for continuous capture +/* @brief allocate continuous raw frames for continuous capture * @param[in] stream The stream. * @return IA_CSS_SUCCESS or error code. * @@ -555,7 +555,7 @@ ia_css_alloc_continuous_frame_remain(struct ia_css_stream *stream); enum ia_css_err ia_css_update_continuous_frames(struct ia_css_stream *stream); -/** @brief ia_css_unlock_raw_frame . unlock a raw frame (HALv3 Support) +/* @brief ia_css_unlock_raw_frame . unlock a raw frame (HALv3 Support) * @param[in] stream The stream. * @param[in] exp_id exposure id that uniquely identifies the locked Raw Frame Buffer * @return ia_css_err IA_CSS_SUCCESS or error code @@ -567,7 +567,7 @@ ia_css_update_continuous_frames(struct ia_css_stream *stream); enum ia_css_err ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id); -/** @brief ia_css_en_dz_capt_pipe . Enable/Disable digital zoom for capture pipe +/* @brief ia_css_en_dz_capt_pipe . Enable/Disable digital zoom for capture pipe * @param[in] stream The stream. * @param[in] enable - true, disable - false * @return None diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h index 575bb28b4bec..b256d7c88716 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_timer.h @@ -31,47 +31,47 @@ more details. #ifndef __IA_CSS_TIMER_H #define __IA_CSS_TIMER_H -/** @file +/* @file * Timer interface definitions */ #include /* for uint32_t */ #include "ia_css_err.h" -/** @brief timer reading definition */ +/* @brief timer reading definition */ typedef uint32_t clock_value_t; -/** @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/ +/* @brief 32 bit clock tick,(timestamp based on timer-value of CSS-internal timer)*/ struct ia_css_clock_tick { - clock_value_t ticks; /**< measured time in ticks.*/ + clock_value_t ticks; /** measured time in ticks.*/ }; -/** @brief TIMER event codes */ +/* @brief TIMER event codes */ enum ia_css_tm_event { IA_CSS_TM_EVENT_AFTER_INIT, - /**< Timer Event after Initialization */ + /** Timer Event after Initialization */ IA_CSS_TM_EVENT_MAIN_END, - /**< Timer Event after end of Main */ + /** Timer Event after end of Main */ IA_CSS_TM_EVENT_THREAD_START, - /**< Timer Event after thread start */ + /** Timer Event after thread start */ IA_CSS_TM_EVENT_FRAME_PROC_START, - /**< Timer Event after Frame Process Start */ + /** Timer Event after Frame Process Start */ IA_CSS_TM_EVENT_FRAME_PROC_END - /**< Timer Event after Frame Process End */ + /** Timer Event after Frame Process End */ }; -/** @brief code measurement common struct */ +/* @brief code measurement common struct */ struct ia_css_time_meas { - clock_value_t start_timer_value; /**< measured time in ticks */ - clock_value_t end_timer_value; /**< measured time in ticks */ + clock_value_t start_timer_value; /** measured time in ticks */ + clock_value_t end_timer_value; /** measured time in ticks */ }; /**@brief SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT checks to ensure correct alignment for struct ia_css_clock_tick. */ #define SIZE_OF_IA_CSS_CLOCK_TICK_STRUCT sizeof(clock_value_t) -/** @brief checks to ensure correct alignment for ia_css_time_meas. */ +/* @brief checks to ensure correct alignment for ia_css_time_meas. */ #define SIZE_OF_IA_CSS_TIME_MEAS_STRUCT (sizeof(clock_value_t) \ + sizeof(clock_value_t)) -/** @brief API to fetch timer count directly +/* @brief API to fetch timer count directly * * @param curr_ts [out] measured count value * @return IA_CSS_SUCCESS if success diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h index 9238a3317a46..81498bd7485b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_tpg.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_TPG_H #define __IA_CSS_TPG_H -/** @file +/* @file * This file contains support for the test pattern generator (TPG) */ -/** Enumerate the TPG IDs. +/* Enumerate the TPG IDs. */ enum ia_css_tpg_id { IA_CSS_TPG_ID0, @@ -35,7 +35,7 @@ enum ia_css_tpg_id { */ #define N_CSS_TPG_IDS (IA_CSS_TPG_ID2+1) -/** Enumerate the TPG modes. +/* Enumerate the TPG modes. */ enum ia_css_tpg_mode { IA_CSS_TPG_MODE_RAMP, @@ -44,7 +44,7 @@ enum ia_css_tpg_mode { IA_CSS_TPG_MODE_MONO }; -/** @brief Configure the test pattern generator. +/* @brief Configure the test pattern generator. * * Configure the Test Pattern Generator, the way these values are used to * generate the pattern can be seen in the HRT extension for the test pattern diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h index 5fec3d5c89d8..725b90072cfe 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_types.h @@ -16,7 +16,7 @@ #ifndef _IA_CSS_TYPES_H #define _IA_CSS_TYPES_H -/** @file +/* @file * This file contains types used for the ia_css parameters. * These types are in a separate file because they are expected * to be used in software layers that do not access the CSS API @@ -58,7 +58,7 @@ #include "isp/kernels/output/output_1.0/ia_css_output_types.h" #define IA_CSS_DVS_STAT_GRID_INFO_SUPPORTED -/**< Should be removed after Driver adaptation will be done */ +/** Should be removed after Driver adaptation will be done */ #define IA_CSS_VERSION_MAJOR 2 #define IA_CSS_VERSION_MINOR 0 @@ -69,8 +69,8 @@ /* Min and max exposure IDs. These macros are here to allow * the drivers to get this information. Changing these macros * constitutes a CSS API change. */ -#define IA_CSS_ISYS_MIN_EXPOSURE_ID 1 /**< Minimum exposure ID */ -#define IA_CSS_ISYS_MAX_EXPOSURE_ID 250 /**< Maximum exposure ID */ +#define IA_CSS_ISYS_MIN_EXPOSURE_ID 1 /** Minimum exposure ID */ +#define IA_CSS_ISYS_MAX_EXPOSURE_ID 250 /** Maximum exposure ID */ /* opaque types */ struct ia_css_isp_parameters; @@ -79,72 +79,72 @@ struct ia_css_memory_offsets; struct ia_css_config_memory_offsets; struct ia_css_state_memory_offsets; -/** Virtual address within the CSS address space. */ +/* Virtual address within the CSS address space. */ typedef uint32_t ia_css_ptr; -/** Generic resolution structure. +/* Generic resolution structure. */ struct ia_css_resolution { - uint32_t width; /**< Width */ - uint32_t height; /**< Height */ + uint32_t width; /** Width */ + uint32_t height; /** Height */ }; -/** Generic coordinate structure. +/* Generic coordinate structure. */ struct ia_css_coordinate { - int32_t x; /**< Value of a coordinate on the horizontal axis */ - int32_t y; /**< Value of a coordinate on the vertical axis */ + int32_t x; /** Value of a coordinate on the horizontal axis */ + int32_t y; /** Value of a coordinate on the vertical axis */ }; -/** Vector with signed values. This is used to indicate motion for +/* Vector with signed values. This is used to indicate motion for * Digital Image Stabilization. */ struct ia_css_vector { - int32_t x; /**< horizontal motion (in pixels) */ - int32_t y; /**< vertical motion (in pixels) */ + int32_t x; /** horizontal motion (in pixels) */ + int32_t y; /** vertical motion (in pixels) */ }; /* Short hands */ #define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0 #define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0 -/** CSS data descriptor */ +/* CSS data descriptor */ struct ia_css_data { - ia_css_ptr address; /**< CSS virtual address */ - uint32_t size; /**< Disabled if 0 */ + ia_css_ptr address; /** CSS virtual address */ + uint32_t size; /** Disabled if 0 */ }; -/** Host data descriptor */ +/* Host data descriptor */ struct ia_css_host_data { - char *address; /**< Host address */ - uint32_t size; /**< Disabled if 0 */ + char *address; /** Host address */ + uint32_t size; /** Disabled if 0 */ }; -/** ISP data descriptor */ +/* ISP data descriptor */ struct ia_css_isp_data { - uint32_t address; /**< ISP address */ - uint32_t size; /**< Disabled if 0 */ + uint32_t address; /** ISP address */ + uint32_t size; /** Disabled if 0 */ }; -/** Shading Correction types. */ +/* Shading Correction types. */ enum ia_css_shading_correction_type { #ifndef ISP2401 - IA_CSS_SHADING_CORRECTION_TYPE_1 /**< Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400) */ + IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400) */ #else - IA_CSS_SHADING_CORRECTION_NONE, /**< Shading Correction is not processed in the pipe. */ - IA_CSS_SHADING_CORRECTION_TYPE_1 /**< Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */ + IA_CSS_SHADING_CORRECTION_NONE, /** Shading Correction is not processed in the pipe. */ + IA_CSS_SHADING_CORRECTION_TYPE_1 /** Shading Correction 1.0 (pipe 1.0 on ISP2300, pipe 2.2 on ISP2400/2401) */ #endif - /**< More shading correction types can be added in the future. */ + /** More shading correction types can be added in the future. */ }; -/** Shading Correction information. */ +/* Shading Correction information. */ struct ia_css_shading_info { - enum ia_css_shading_correction_type type; /**< Shading Correction type. */ + enum ia_css_shading_correction_type type; /** Shading Correction type. */ - union { /** Shading Correction information of each Shading Correction types. */ + union { /* Shading Correction information of each Shading Correction types. */ - /** Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1. + /* Shading Correction information of IA_CSS_SHADING_CORRECTION_TYPE_1. * * This structure contains the information necessary to generate * the shading table required in the isp. @@ -288,20 +288,20 @@ struct ia_css_shading_info { */ struct { #ifndef ISP2401 - uint32_t enable; /**< Shading correction enabled. + uint32_t enable; /** Shading correction enabled. 0:disabled, 1:enabled */ - uint32_t num_hor_grids; /**< Number of data points per line + uint32_t num_hor_grids; /** Number of data points per line per color on shading table. */ - uint32_t num_ver_grids; /**< Number of lines of data points + uint32_t num_ver_grids; /** Number of lines of data points per color on shading table. */ - uint32_t bqs_per_grid_cell; /**< Grid cell size + uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit. (1BQ means {Gr,R,B,Gb}(2x2 pixels).) Valid values are 8,16,32,64. */ #else - uint32_t num_hor_grids; /**< Number of data points per line per color on shading table. */ - uint32_t num_ver_grids; /**< Number of lines of data points per color on shading table. */ - uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ unit. + uint32_t num_hor_grids; /** Number of data points per line per color on shading table. */ + uint32_t num_ver_grids; /** Number of lines of data points per color on shading table. */ + uint32_t bqs_per_grid_cell; /** Grid cell size in BQ unit. NOTE: bqs = size in BQ(Bayer Quad) unit. 1BQ means {Gr,R,B,Gb} (2x2 pixels). Horizontal 1 bqs corresponds to horizontal 2 pixels. @@ -310,13 +310,13 @@ struct ia_css_shading_info { uint32_t bayer_scale_hor_ratio_in; uint32_t bayer_scale_hor_ratio_out; #ifndef ISP2401 - /**< Horizontal ratio of bayer scaling + /** Horizontal ratio of bayer scaling between input width and output width, for the scaling which should be done before shading correction. output_width = input_width * bayer_scale_hor_ratio_out / bayer_scale_hor_ratio_in */ #else - /**< Horizontal ratio of bayer scaling between input width and output width, + /** Horizontal ratio of bayer scaling between input width and output width, for the scaling which should be done before shading correction. output_width = input_width * bayer_scale_hor_ratio_out / bayer_scale_hor_ratio_in + 0.5 */ @@ -324,30 +324,30 @@ struct ia_css_shading_info { uint32_t bayer_scale_ver_ratio_in; uint32_t bayer_scale_ver_ratio_out; #ifndef ISP2401 - /**< Vertical ratio of bayer scaling + /** Vertical ratio of bayer scaling between input height and output height, for the scaling which should be done before shading correction. output_height = input_height * bayer_scale_ver_ratio_out / bayer_scale_ver_ratio_in */ uint32_t sc_bayer_origin_x_bqs_on_shading_table; - /**< X coordinate (in bqs) of bayer origin on shading table. + /** X coordinate (in bqs) of bayer origin on shading table. This indicates the left-most pixel of bayer (not include margin) inputted to the shading correction. This corresponds to the left-most pixel of bayer inputted to isp from sensor. */ uint32_t sc_bayer_origin_y_bqs_on_shading_table; - /**< Y coordinate (in bqs) of bayer origin on shading table. + /** Y coordinate (in bqs) of bayer origin on shading table. This indicates the top pixel of bayer (not include margin) inputted to the shading correction. This corresponds to the top pixel of bayer inputted to isp from sensor. */ #else - /**< Vertical ratio of bayer scaling between input height and output height, + /** Vertical ratio of bayer scaling between input height and output height, for the scaling which should be done before shading correction. output_height = input_height * bayer_scale_ver_ratio_out / bayer_scale_ver_ratio_in + 0.5 */ struct ia_css_resolution isp_input_sensor_data_res_bqs; - /**< Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling. + /** Sensor data size (in bqs) inputted to ISP. This is the size BEFORE bayer scaling. NOTE: This is NOT the size of the physical sensor size. CSS requests the driver that ISP inputs sensor data by the size of isp_input_sensor_data_res_bqs. @@ -357,22 +357,22 @@ struct ia_css_shading_info { ISP assumes the area of isp_input_sensor_data_res_bqs is centered on the physical sensor. */ struct ia_css_resolution sensor_data_res_bqs; - /**< Sensor data size (in bqs) at shading correction. + /** Sensor data size (in bqs) at shading correction. This is the size AFTER bayer scaling. */ struct ia_css_coordinate sensor_data_origin_bqs_on_sctbl; - /**< Origin of sensor data area positioned on shading table at shading correction. + /** Origin of sensor data area positioned on shading table at shading correction. The coordinate x,y should be positive values. */ #endif } type_1; - /**< More structures can be added here when more shading correction types will be added + /** More structures can be added here when more shading correction types will be added in the future. */ } info; }; #ifndef ISP2401 -/** Default Shading Correction information of Shading Correction Type 1. */ +/* Default Shading Correction information of Shading Correction Type 1. */ #define DEFAULT_SHADING_INFO_TYPE_1 \ { \ IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \ @@ -394,7 +394,7 @@ struct ia_css_shading_info { #else -/** Default Shading Correction information of Shading Correction Type 1. */ +/* Default Shading Correction information of Shading Correction Type 1. */ #define DEFAULT_SHADING_INFO_TYPE_1 \ { \ IA_CSS_SHADING_CORRECTION_TYPE_1, /* type */ \ @@ -416,27 +416,27 @@ struct ia_css_shading_info { #endif -/** Default Shading Correction information. */ +/* Default Shading Correction information. */ #define DEFAULT_SHADING_INFO DEFAULT_SHADING_INFO_TYPE_1 -/** structure that describes the 3A and DIS grids */ +/* structure that describes the 3A and DIS grids */ struct ia_css_grid_info { - /** \name ISP input size + /* \name ISP input size * that is visible for user * @{ */ uint32_t isp_in_width; uint32_t isp_in_height; - /** @}*/ + /* @}*/ - struct ia_css_3a_grid_info s3a_grid; /**< 3A grid info */ + struct ia_css_3a_grid_info s3a_grid; /** 3A grid info */ union ia_css_dvs_grid_u dvs_grid; - /**< All types of DVS statistics grid info union */ + /** All types of DVS statistics grid info union */ enum ia_css_vamem_type vamem_type; }; -/** defaults for ia_css_grid_info structs */ +/* defaults for ia_css_grid_info structs */ #define DEFAULT_GRID_INFO \ { \ 0, /* isp_in_width */ \ @@ -446,25 +446,25 @@ struct ia_css_grid_info { IA_CSS_VAMEM_TYPE_1 /* vamem_type */ \ } -/** Morphing table, used for geometric distortion and chromatic abberration +/* Morphing table, used for geometric distortion and chromatic abberration * correction (GDCAC, also called GDC). * This table describes the imperfections introduced by the lens, the * advanced ISP can correct for these imperfections using this table. */ struct ia_css_morph_table { - uint32_t enable; /**< To disable GDC, set this field to false. The + uint32_t enable; /** To disable GDC, set this field to false. The coordinates fields can be set to NULL in this case. */ - uint32_t height; /**< Table height */ - uint32_t width; /**< Table width */ + uint32_t height; /** Table height */ + uint32_t width; /** Table width */ uint16_t *coordinates_x[IA_CSS_MORPH_TABLE_NUM_PLANES]; - /**< X coordinates that describe the sensor imperfection */ + /** X coordinates that describe the sensor imperfection */ uint16_t *coordinates_y[IA_CSS_MORPH_TABLE_NUM_PLANES]; - /**< Y coordinates that describe the sensor imperfection */ + /** Y coordinates that describe the sensor imperfection */ }; struct ia_css_dvs_6axis_config { unsigned int exp_id; - /**< Exposure ID, see ia_css_event_public.h for more detail */ + /** Exposure ID, see ia_css_event_public.h for more detail */ uint32_t width_y; uint32_t height_y; uint32_t width_uv; @@ -479,16 +479,16 @@ struct ia_css_dvs_6axis_config { * This specifies the coordinates (x,y) */ struct ia_css_point { - int32_t x; /**< x coordinate */ - int32_t y; /**< y coordinate */ + int32_t x; /** x coordinate */ + int32_t y; /** y coordinate */ }; /** * This specifies the region */ struct ia_css_region { - struct ia_css_point origin; /**< Starting point coordinates for the region */ - struct ia_css_resolution resolution; /**< Region resolution */ + struct ia_css_point origin; /** Starting point coordinates for the region */ + struct ia_css_resolution resolution; /** Region resolution */ }; /** @@ -509,30 +509,30 @@ struct ia_css_region { * y + height <= effective input height */ struct ia_css_dz_config { - uint32_t dx; /**< Horizontal zoom factor */ - uint32_t dy; /**< Vertical zoom factor */ - struct ia_css_region zoom_region; /**< region for zoom */ + uint32_t dx; /** Horizontal zoom factor */ + uint32_t dy; /** Vertical zoom factor */ + struct ia_css_region zoom_region; /** region for zoom */ }; -/** The still capture mode, this can be RAW (simply copy sensor input to DDR), +/* The still capture mode, this can be RAW (simply copy sensor input to DDR), * Primary ISP, the Advanced ISP (GDC) or the low-light ISP (ANR). */ enum ia_css_capture_mode { - IA_CSS_CAPTURE_MODE_RAW, /**< no processing, copy data only */ - IA_CSS_CAPTURE_MODE_BAYER, /**< bayer processing, up to demosaic */ - IA_CSS_CAPTURE_MODE_PRIMARY, /**< primary ISP */ - IA_CSS_CAPTURE_MODE_ADVANCED, /**< advanced ISP (GDC) */ - IA_CSS_CAPTURE_MODE_LOW_LIGHT /**< low light ISP (ANR) */ + IA_CSS_CAPTURE_MODE_RAW, /** no processing, copy data only */ + IA_CSS_CAPTURE_MODE_BAYER, /** bayer processing, up to demosaic */ + IA_CSS_CAPTURE_MODE_PRIMARY, /** primary ISP */ + IA_CSS_CAPTURE_MODE_ADVANCED, /** advanced ISP (GDC) */ + IA_CSS_CAPTURE_MODE_LOW_LIGHT /** low light ISP (ANR) */ }; struct ia_css_capture_config { - enum ia_css_capture_mode mode; /**< Still capture mode */ - uint32_t enable_xnr; /**< Enable/disable XNR */ + enum ia_css_capture_mode mode; /** Still capture mode */ + uint32_t enable_xnr; /** Enable/disable XNR */ uint32_t enable_raw_output; - bool enable_capture_pp_bli; /**< Enable capture_pp_bli mode */ + bool enable_capture_pp_bli; /** Enable capture_pp_bli mode */ }; -/** default settings for ia_css_capture_config structs */ +/* default settings for ia_css_capture_config structs */ #define DEFAULT_CAPTURE_CONFIG \ { \ IA_CSS_CAPTURE_MODE_PRIMARY, /* mode (capture) */ \ @@ -542,7 +542,7 @@ struct ia_css_capture_config { } -/** ISP filter configuration. This is a collection of configurations +/* ISP filter configuration. This is a collection of configurations * for each of the ISP filters (modules). * * NOTE! The contents of all pointers is copied when get or set with the @@ -557,98 +557,98 @@ struct ia_css_capture_config { * ["ISP block", 2only] : ISP block is used only for ISP2. */ struct ia_css_isp_config { - struct ia_css_wb_config *wb_config; /**< White Balance + struct ia_css_wb_config *wb_config; /** White Balance [WB1, 1&2] */ - struct ia_css_cc_config *cc_config; /**< Color Correction + struct ia_css_cc_config *cc_config; /** Color Correction [CSC1, 1only] */ - struct ia_css_tnr_config *tnr_config; /**< Temporal Noise Reduction + struct ia_css_tnr_config *tnr_config; /** Temporal Noise Reduction [TNR1, 1&2] */ - struct ia_css_ecd_config *ecd_config; /**< Eigen Color Demosaicing + struct ia_css_ecd_config *ecd_config; /** Eigen Color Demosaicing [DE2, 2only] */ - struct ia_css_ynr_config *ynr_config; /**< Y(Luma) Noise Reduction + struct ia_css_ynr_config *ynr_config; /** Y(Luma) Noise Reduction [YNR2&YEE2, 2only] */ - struct ia_css_fc_config *fc_config; /**< Fringe Control + struct ia_css_fc_config *fc_config; /** Fringe Control [FC2, 2only] */ - struct ia_css_formats_config *formats_config; /**< Formats Control for main output + struct ia_css_formats_config *formats_config; /** Formats Control for main output [FORMATS, 1&2] */ - struct ia_css_cnr_config *cnr_config; /**< Chroma Noise Reduction + struct ia_css_cnr_config *cnr_config; /** Chroma Noise Reduction [CNR2, 2only] */ - struct ia_css_macc_config *macc_config; /**< MACC + struct ia_css_macc_config *macc_config; /** MACC [MACC2, 2only] */ - struct ia_css_ctc_config *ctc_config; /**< Chroma Tone Control + struct ia_css_ctc_config *ctc_config; /** Chroma Tone Control [CTC2, 2only] */ - struct ia_css_aa_config *aa_config; /**< YUV Anti-Aliasing + struct ia_css_aa_config *aa_config; /** YUV Anti-Aliasing [AA2, 2only] (not used currently) */ - struct ia_css_aa_config *baa_config; /**< Bayer Anti-Aliasing + struct ia_css_aa_config *baa_config; /** Bayer Anti-Aliasing [BAA2, 1&2] */ - struct ia_css_ce_config *ce_config; /**< Chroma Enhancement + struct ia_css_ce_config *ce_config; /** Chroma Enhancement [CE1, 1only] */ struct ia_css_dvs_6axis_config *dvs_6axis_config; - struct ia_css_ob_config *ob_config; /**< Objective Black + struct ia_css_ob_config *ob_config; /** Objective Black [OB1, 1&2] */ - struct ia_css_dp_config *dp_config; /**< Defect Pixel Correction + struct ia_css_dp_config *dp_config; /** Defect Pixel Correction [DPC1/DPC2, 1&2] */ - struct ia_css_nr_config *nr_config; /**< Noise Reduction + struct ia_css_nr_config *nr_config; /** Noise Reduction [BNR1&YNR1&CNR1, 1&2]*/ - struct ia_css_ee_config *ee_config; /**< Edge Enhancement + struct ia_css_ee_config *ee_config; /** Edge Enhancement [YEE1, 1&2] */ - struct ia_css_de_config *de_config; /**< Demosaic + struct ia_css_de_config *de_config; /** Demosaic [DE1, 1only] */ - struct ia_css_gc_config *gc_config; /**< Gamma Correction (for YUV) + struct ia_css_gc_config *gc_config; /** Gamma Correction (for YUV) [GC1, 1only] */ - struct ia_css_anr_config *anr_config; /**< Advanced Noise Reduction */ - struct ia_css_3a_config *s3a_config; /**< 3A Statistics config */ - struct ia_css_xnr_config *xnr_config; /**< eXtra Noise Reduction */ - struct ia_css_dz_config *dz_config; /**< Digital Zoom */ - struct ia_css_cc_config *yuv2rgb_cc_config; /**< Color Correction + struct ia_css_anr_config *anr_config; /** Advanced Noise Reduction */ + struct ia_css_3a_config *s3a_config; /** 3A Statistics config */ + struct ia_css_xnr_config *xnr_config; /** eXtra Noise Reduction */ + struct ia_css_dz_config *dz_config; /** Digital Zoom */ + struct ia_css_cc_config *yuv2rgb_cc_config; /** Color Correction [CCM2, 2only] */ - struct ia_css_cc_config *rgb2yuv_cc_config; /**< Color Correction + struct ia_css_cc_config *rgb2yuv_cc_config; /** Color Correction [CSC2, 2only] */ - struct ia_css_macc_table *macc_table; /**< MACC + struct ia_css_macc_table *macc_table; /** MACC [MACC1/MACC2, 1&2]*/ - struct ia_css_gamma_table *gamma_table; /**< Gamma Correction (for YUV) + struct ia_css_gamma_table *gamma_table; /** Gamma Correction (for YUV) [GC1, 1only] */ - struct ia_css_ctc_table *ctc_table; /**< Chroma Tone Control + struct ia_css_ctc_table *ctc_table; /** Chroma Tone Control [CTC1, 1only] */ - /** \deprecated */ - struct ia_css_xnr_table *xnr_table; /**< eXtra Noise Reduction + /* \deprecated */ + struct ia_css_xnr_table *xnr_table; /** eXtra Noise Reduction [XNR1, 1&2] */ - struct ia_css_rgb_gamma_table *r_gamma_table;/**< sRGB Gamma Correction + struct ia_css_rgb_gamma_table *r_gamma_table;/** sRGB Gamma Correction [GC2, 2only] */ - struct ia_css_rgb_gamma_table *g_gamma_table;/**< sRGB Gamma Correction + struct ia_css_rgb_gamma_table *g_gamma_table;/** sRGB Gamma Correction [GC2, 2only] */ - struct ia_css_rgb_gamma_table *b_gamma_table;/**< sRGB Gamma Correction + struct ia_css_rgb_gamma_table *b_gamma_table;/** sRGB Gamma Correction [GC2, 2only] */ - struct ia_css_vector *motion_vector; /**< For 2-axis DVS */ + struct ia_css_vector *motion_vector; /** For 2-axis DVS */ struct ia_css_shading_table *shading_table; struct ia_css_morph_table *morph_table; - struct ia_css_dvs_coefficients *dvs_coefs; /**< DVS 1.0 coefficients */ - struct ia_css_dvs2_coefficients *dvs2_coefs; /**< DVS 2.0 coefficients */ + struct ia_css_dvs_coefficients *dvs_coefs; /** DVS 1.0 coefficients */ + struct ia_css_dvs2_coefficients *dvs2_coefs; /** DVS 2.0 coefficients */ struct ia_css_capture_config *capture_config; struct ia_css_anr_thres *anr_thres; - /** @deprecated{Old shading settings, see bugzilla bz675 for details} */ + /* @deprecated{Old shading settings, see bugzilla bz675 for details} */ struct ia_css_shading_settings *shading_settings; - struct ia_css_xnr3_config *xnr3_config; /**< eXtreme Noise Reduction v3 */ - /** comment from Lasse: Be aware how this feature will affect coordinate + struct ia_css_xnr3_config *xnr3_config; /** eXtreme Noise Reduction v3 */ + /* comment from Lasse: Be aware how this feature will affect coordinate * normalization in different parts of the system. (e.g. face detection, * touch focus, 3A statistics and windows of interest, shading correction, * DVS, GDC) from IQ tool level and application level down-to ISP FW level. * the risk for regression is not in the individual blocks, but how they * integrate together. */ - struct ia_css_output_config *output_config; /**< Main Output Mirroring, flipping */ + struct ia_css_output_config *output_config; /** Main Output Mirroring, flipping */ #ifdef ISP2401 - struct ia_css_tnr3_kernel_config *tnr3_config; /**< TNR3 config */ + struct ia_css_tnr3_kernel_config *tnr3_config; /** TNR3 config */ #endif - struct ia_css_scaler_config *scaler_config; /**< Skylake: scaler config (optional) */ - struct ia_css_formats_config *formats_config_display;/**< Formats control for viewfinder/display output (optional) + struct ia_css_scaler_config *scaler_config; /** Skylake: scaler config (optional) */ + struct ia_css_formats_config *formats_config_display;/** Formats control for viewfinder/display output (optional) [OSYS, n/a] */ - struct ia_css_output_config *output_config_display; /**< Viewfinder/display output mirroring, flipping (optional) */ + struct ia_css_output_config *output_config_display; /** Viewfinder/display output mirroring, flipping (optional) */ - struct ia_css_frame *output_frame; /**< Output frame the config is to be applied to (optional) */ - uint32_t isp_config_id; /**< Unique ID to track which config was actually applied to a particular frame */ + struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */ + uint32_t isp_config_id; /** Unique ID to track which config was actually applied to a particular frame */ }; #endif /* _IA_CSS_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h index 48c59896e847..1e88901e0b82 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/ia_css_version.h @@ -15,16 +15,16 @@ #ifndef __IA_CSS_VERSION_H #define __IA_CSS_VERSION_H -/** @file +/* @file * This file contains functions to retrieve CSS-API version information */ #include -/** a common size for the version arrays */ +/* a common size for the version arrays */ #define MAX_VERSION_SIZE 500 -/** @brief Retrieves the current CSS version +/* @brief Retrieves the current CSS version * @param[out] version A pointer to a buffer where to put the generated * version string. NULL is ignored. * @param[in] max_size Size of the version buffer. If version string diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h index 834eedbbeeff..0b95bf9b9aaf 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/aa/aa_2/ia_css_aa2_types.h @@ -15,12 +15,12 @@ #ifndef __IA_CSS_AA2_TYPES_H #define __IA_CSS_AA2_TYPES_H -/** @file +/* @file * CSS-API header file for Anti-Aliasing parameters. */ -/** Anti-Aliasing configuration. +/* Anti-Aliasing configuration. * * This structure is used both for YUV AA and Bayer AA. * @@ -39,7 +39,7 @@ * ISP2: BAA2 is used. */ struct ia_css_aa_config { - uint16_t strength; /**< Strength of the filter. + uint16_t strength; /** Strength of the filter. u0.13, [0,8191], default/ineffective 0 */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h index e205574098f2..dc317a857369 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_1.0/ia_css_anr_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_ANR_TYPES_H #define __IA_CSS_ANR_TYPES_H -/** @file +/* @file * CSS-API header file for Advanced Noise Reduction kernel v1 */ @@ -23,11 +23,11 @@ #define ANR_BPP 10 #define ANR_ELEMENT_BITS ((CEIL_DIV(ANR_BPP, 8))*8) -/** Advanced Noise Reduction configuration. +/* Advanced Noise Reduction configuration. * This is also known as Low-Light. */ struct ia_css_anr_config { - int32_t threshold; /**< Threshold */ + int32_t threshold; /** Threshold */ int32_t thresholds[4*4*4]; int32_t factors[3]; }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h index 3832ada433ec..9b611315392c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr2_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_ANR2_TYPES_H #define __IA_CSS_ANR2_TYPES_H -/** @file +/* @file * CSS-API header file for Advanced Noise Reduction kernel v2 */ @@ -23,7 +23,7 @@ #define ANR_PARAM_SIZE 13 -/** Advanced Noise Reduction (ANR) thresholds */ +/* Advanced Noise Reduction (ANR) thresholds */ struct ia_css_anr_thres { int16_t data[13*64]; }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h index 4a289853367a..312141793fd2 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/anr/anr_2/ia_css_anr_param.h @@ -18,7 +18,7 @@ #include "vmem.h" #include "ia_css_anr2_types.h" -/** Advanced Noise Reduction (ANR) thresholds */ +/* Advanced Noise Reduction (ANR) thresholds */ struct ia_css_isp_anr2_params { VMEM_ARRAY(data, ANR_PARAM_SIZE*ISP_VEC_NELEMS); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h index 75ca7606b95c..a0d355454aa3 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bayer_ls/bayer_ls_1.0/ia_css_bayer_ls_param.h @@ -27,7 +27,7 @@ #define BAYER_QUAD_HEIGHT 2 #define NOF_BAYER_VECTORS 4 -/** bayer load/store */ +/* bayer load/store */ struct sh_css_isp_bayer_ls_isp_config { uint32_t base_address[NUM_BAYER_LS]; uint32_t width[NUM_BAYER_LS]; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h index 9ae27a9e0baa..ec1688e7352d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bh/bh_2/ia_css_bh_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_BH_TYPES_H #define __IA_CSS_BH_TYPES_H -/** Number of elements in the BH table. +/* Number of elements in the BH table. * Should be consistent with hmem.h */ #define IA_CSS_HMEM_BH_TABLE_SIZE ISP_HIST_DEPTH @@ -27,7 +27,7 @@ #define BH_COLOR_Y (3) #define BH_COLOR_NUM (4) -/** BH table */ +/* BH table */ struct ia_css_bh_table { uint32_t hmem[ISP_HIST_COMPONENTS][IA_CSS_HMEM_BH_UNIT_SIZE]; }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h index 219fb835cb26..87e0f19c856b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnlm/ia_css_bnlm_types.h @@ -15,13 +15,13 @@ #ifndef __IA_CSS_BNLM_TYPES_H #define __IA_CSS_BNLM_TYPES_H -/** @file +/* @file * CSS-API header file for Bayer Non-Linear Mean parameters. */ #include "type_support.h" /* int32_t */ -/** Bayer Non-Linear Mean configuration +/* Bayer Non-Linear Mean configuration * * \brief BNLM public parameters. * \details Struct with all parameters for the BNLM kernel that can be set @@ -30,16 +30,16 @@ * ISP2.6.1: BNLM is used. */ struct ia_css_bnlm_config { - bool rad_enable; /**< Enable a radial dependency in a weight calculation */ - int32_t rad_x_origin; /**< Initial x coordinate for a radius calculation */ - int32_t rad_y_origin; /**< Initial x coordinate for a radius calculation */ + bool rad_enable; /** Enable a radial dependency in a weight calculation */ + int32_t rad_x_origin; /** Initial x coordinate for a radius calculation */ + int32_t rad_y_origin; /** Initial x coordinate for a radius calculation */ /* a threshold for average of weights if this < Th, do not denoise pixel */ int32_t avg_min_th; /* minimum weight for denoising if max < th, do not denoise pixel */ int32_t max_min_th; /**@{*/ - /** Coefficient for approximation, in the form of (1 + x / N)^N, + /* Coefficient for approximation, in the form of (1 + x / N)^N, * that fits the first-order exp() to default exp_lut in BNLM sheet * */ int32_t exp_coeff_a; @@ -48,55 +48,55 @@ struct ia_css_bnlm_config { uint32_t exp_exponent; /**@}*/ - int32_t nl_th[3]; /**< Detail thresholds */ + int32_t nl_th[3]; /** Detail thresholds */ - /** Index for n-th maximum candidate weight for each detail group */ + /* Index for n-th maximum candidate weight for each detail group */ int32_t match_quality_max_idx[4]; /**@{*/ - /** A lookup table for 1/sqrt(1+mu) approximation */ + /* A lookup table for 1/sqrt(1+mu) approximation */ int32_t mu_root_lut_thr[15]; int32_t mu_root_lut_val[16]; /**@}*/ /**@{*/ - /** A lookup table for SAD normalization */ + /* A lookup table for SAD normalization */ int32_t sad_norm_lut_thr[15]; int32_t sad_norm_lut_val[16]; /**@}*/ /**@{*/ - /** A lookup table that models a weight's dependency on textures */ + /* A lookup table that models a weight's dependency on textures */ int32_t sig_detail_lut_thr[15]; int32_t sig_detail_lut_val[16]; /**@}*/ /**@{*/ - /** A lookup table that models a weight's dependency on a pixel's radial distance */ + /* A lookup table that models a weight's dependency on a pixel's radial distance */ int32_t sig_rad_lut_thr[15]; int32_t sig_rad_lut_val[16]; /**@}*/ /**@{*/ - /** A lookup table to control denoise power depending on a pixel's radial distance */ + /* A lookup table to control denoise power depending on a pixel's radial distance */ int32_t rad_pow_lut_thr[15]; int32_t rad_pow_lut_val[16]; /**@}*/ /**@{*/ - /** Non linear transfer functions to calculate the blending coefficient depending on detail group */ - /** detail group 0 */ + /* Non linear transfer functions to calculate the blending coefficient depending on detail group */ + /* detail group 0 */ /**@{*/ int32_t nl_0_lut_thr[15]; int32_t nl_0_lut_val[16]; /**@}*/ /**@{*/ - /** detail group 1 */ + /* detail group 1 */ int32_t nl_1_lut_thr[15]; int32_t nl_1_lut_val[16]; /**@}*/ /**@{*/ - /** detail group 2 */ + /* detail group 2 */ int32_t nl_2_lut_thr[15]; int32_t nl_2_lut_val[16]; /**@}*/ /**@{*/ - /** detail group 3 */ + /* detail group 3 */ int32_t nl_3_lut_thr[15]; int32_t nl_3_lut_val[16]; /**@}*/ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h index be80f705d8a1..551bd0ed3bac 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/bnr/bnr2_2/ia_css_bnr2_2_types.h @@ -15,13 +15,13 @@ #ifndef __IA_CSS_BNR2_2_TYPES_H #define __IA_CSS_BNR2_2_TYPES_H -/** @file +/* @file * CSS-API header file for Bayer Noise Reduction parameters. */ #include "type_support.h" /* int32_t */ -/** Bayer Noise Reduction 2.2 configuration +/* Bayer Noise Reduction 2.2 configuration * * \brief BNR2_2 public parameters. * \details Struct with all parameters for the BNR2.2 kernel that can be set @@ -31,41 +31,41 @@ */ struct ia_css_bnr2_2_config { /**@{*/ - /** Directional variance gain for R/G/B components in dark region */ + /* Directional variance gain for R/G/B components in dark region */ int32_t d_var_gain_r; int32_t d_var_gain_g; int32_t d_var_gain_b; /**@}*/ /**@{*/ - /** Slope of Directional variance gain between dark and bright region */ + /* Slope of Directional variance gain between dark and bright region */ int32_t d_var_gain_slope_r; int32_t d_var_gain_slope_g; int32_t d_var_gain_slope_b; /**@}*/ /**@{*/ - /** Non-Directional variance gain for R/G/B components in dark region */ + /* Non-Directional variance gain for R/G/B components in dark region */ int32_t n_var_gain_r; int32_t n_var_gain_g; int32_t n_var_gain_b; /**@}*/ /**@{*/ - /** Slope of Non-Directional variance gain between dark and bright region */ + /* Slope of Non-Directional variance gain between dark and bright region */ int32_t n_var_gain_slope_r; int32_t n_var_gain_slope_g; int32_t n_var_gain_slope_b; /**@}*/ - int32_t dir_thres; /**< Threshold for directional filtering */ - int32_t dir_thres_w; /**< Threshold width for directional filtering */ - int32_t var_offset_coef; /**< Variance offset coefficient */ - int32_t dir_gain; /**< Gain for directional coefficient */ - int32_t detail_gain; /**< Gain for low contrast texture control */ - int32_t detail_gain_divisor; /**< Gain divisor for low contrast texture control */ - int32_t detail_level_offset; /**< Bias value for low contrast texture control */ - int32_t d_var_th_min; /**< Minimum clipping value for directional variance*/ - int32_t d_var_th_max; /**< Maximum clipping value for diretional variance*/ - int32_t n_var_th_min; /**< Minimum clipping value for non-directional variance*/ - int32_t n_var_th_max; /**< Maximum clipping value for non-directional variance*/ + int32_t dir_thres; /** Threshold for directional filtering */ + int32_t dir_thres_w; /** Threshold width for directional filtering */ + int32_t var_offset_coef; /** Variance offset coefficient */ + int32_t dir_gain; /** Gain for directional coefficient */ + int32_t detail_gain; /** Gain for low contrast texture control */ + int32_t detail_gain_divisor; /** Gain divisor for low contrast texture control */ + int32_t detail_level_offset; /** Bias value for low contrast texture control */ + int32_t d_var_th_min; /** Minimum clipping value for directional variance*/ + int32_t d_var_th_max; /** Maximum clipping value for diretional variance*/ + int32_t n_var_th_min; /** Minimum clipping value for non-directional variance*/ + int32_t n_var_th_max; /** Maximum clipping value for non-directional variance*/ }; #endif /* __IA_CSS_BNR2_2_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h index 6df6c2be9a70..3ebc069d8ada 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/cnr/cnr_2/ia_css_cnr2_types.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_CNR2_TYPES_H #define __IA_CSS_CNR2_TYPES_H -/** @file +/* @file * CSS-API header file for Chroma Noise Reduction (CNR) parameters */ -/** Chroma Noise Reduction configuration. +/* Chroma Noise Reduction configuration. * * Small sensitivity of edge means strong smoothness and NR performance. * If you see blurred color on vertical edges, @@ -33,21 +33,21 @@ * ISP2: CNR2 is used for Still. */ struct ia_css_cnr_config { - uint16_t coring_u; /**< Coring level of U. + uint16_t coring_u; /** Coring level of U. u0.13, [0,8191], default/ineffective 0 */ - uint16_t coring_v; /**< Coring level of V. + uint16_t coring_v; /** Coring level of V. u0.13, [0,8191], default/ineffective 0 */ - uint16_t sense_gain_vy; /**< Sensitivity of horizontal edge of Y. + uint16_t sense_gain_vy; /** Sensitivity of horizontal edge of Y. u13.0, [0,8191], default 100, ineffective 8191 */ - uint16_t sense_gain_vu; /**< Sensitivity of horizontal edge of U. + uint16_t sense_gain_vu; /** Sensitivity of horizontal edge of U. u13.0, [0,8191], default 100, ineffective 8191 */ - uint16_t sense_gain_vv; /**< Sensitivity of horizontal edge of V. + uint16_t sense_gain_vv; /** Sensitivity of horizontal edge of V. u13.0, [0,8191], default 100, ineffective 8191 */ - uint16_t sense_gain_hy; /**< Sensitivity of vertical edge of Y. + uint16_t sense_gain_hy; /** Sensitivity of vertical edge of Y. u13.0, [0,8191], default 50, ineffective 8191 */ - uint16_t sense_gain_hu; /**< Sensitivity of vertical edge of U. + uint16_t sense_gain_hu; /** Sensitivity of vertical edge of U. u13.0, [0,8191], default 50, ineffective 8191 */ - uint16_t sense_gain_hv; /**< Sensitivity of vertical edge of V. + uint16_t sense_gain_hv; /** Sensitivity of vertical edge of V. u13.0, [0,8191], default 50, ineffective 8191 */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h index 3f11442500f0..47a38fd65950 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/conversion/conversion_1.0/ia_css_conversion_types.h @@ -23,10 +23,10 @@ * */ struct ia_css_conversion_config { - uint32_t en; /**< en parameter */ - uint32_t dummy0; /**< dummy0 dummy parameter 0 */ - uint32_t dummy1; /**< dummy1 dummy parameter 1 */ - uint32_t dummy2; /**< dummy2 dummy parameter 2 */ + uint32_t en; /** en parameter */ + uint32_t dummy0; /** dummy0 dummy parameter 0 */ + uint32_t dummy1; /** dummy1 dummy parameter 1 */ + uint32_t dummy2; /** dummy2 dummy parameter 2 */ }; #endif /* __IA_CSS_CONVERSION_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h index 8bfc8dad37a8..0f1812cdd92a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_param.h @@ -19,7 +19,7 @@ #include "dma.h" #include "sh_css_internal.h" /* sh_css_crop_pos */ -/** Crop frame */ +/* Crop frame */ struct sh_css_isp_crop_isp_config { uint32_t width_a_over_b; struct dma_port_config port_b; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h index 8091ad4d4602..b5d454225f89 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/crop/crop_1.0/ia_css_crop_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_CROP_TYPES_H #define __IA_CSS_CROP_TYPES_H -/** Crop frame +/* Crop frame * * ISP block: crop frame */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h index 54ced072467f..10404380c637 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/csc/csc_1.0/ia_css_csc_types.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_CSC_TYPES_H #define __IA_CSS_CSC_TYPES_H -/** @file +/* @file * CSS-API header file for Color Space Conversion parameters. */ -/** Color Correction configuration. +/* Color Correction configuration. * * This structure is used for 3 cases. * ("YCgCo" is the output format of Demosaic.) @@ -68,9 +68,9 @@ * 4096 -3430 -666 */ struct ia_css_cc_config { - uint32_t fraction_bits;/**< Fractional bits of matrix. + uint32_t fraction_bits;/** Fractional bits of matrix. u8.0, [0,13] */ - int32_t matrix[3 * 3]; /**< Conversion matrix. + int32_t matrix[3 * 3]; /** Conversion matrix. s[13-fraction_bits].[fraction_bits], [-8192,8191] */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h index c66e823618f6..ad7040c9d7cb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_param.h @@ -22,11 +22,11 @@ /*VMEM Luma params*/ struct ia_css_isp_ctc2_vmem_params { - /**< Gains by Y(Luma) at Y = 0.0,Y_X1, Y_X2, Y_X3, Y_X4*/ + /** Gains by Y(Luma) at Y = 0.0,Y_X1, Y_X2, Y_X3, Y_X4*/ VMEM_ARRAY(y_x, ISP_VEC_NELEMS); - /** kneepoints by Y(Luma) 0.0, y_x1, y_x2, y _x3, y_x4*/ + /* kneepoints by Y(Luma) 0.0, y_x1, y_x2, y _x3, y_x4*/ VMEM_ARRAY(y_y, ISP_VEC_NELEMS); - /** Slopes of lines interconnecting + /* Slopes of lines interconnecting * 0.0 -> y_x1 -> y_x2 -> y _x3 -> y_x4 -> 1.0*/ VMEM_ARRAY(e_y_slope, ISP_VEC_NELEMS); }; @@ -34,15 +34,15 @@ struct ia_css_isp_ctc2_vmem_params { /*DMEM Chroma params*/ struct ia_css_isp_ctc2_dmem_params { - /** Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/ + /* Gains by UV(Chroma) under kneepoints uv_x0 and uv_x1*/ int32_t uv_y0; int32_t uv_y1; - /** Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/ + /* Kneepoints by UV(Chroma)- uv_x0 and uv_x1*/ int32_t uv_x0; int32_t uv_x1; - /** Slope of line interconnecting uv_x0 -> uv_x1*/ + /* Slope of line interconnecting uv_x0 -> uv_x1*/ int32_t uv_dydx; }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h index 7b75f01e2ad2..1222cf33e851 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ctc/ctc2/ia_css_ctc2_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_CTC2_TYPES_H #define __IA_CSS_CTC2_TYPES_H -/** Chroma Tone Control configuration. +/* Chroma Tone Control configuration. * * ISP block: CTC2 (CTC by polygonal approximation) * (ISP1: CTC1 (CTC by look-up table) is used.) @@ -24,7 +24,7 @@ */ struct ia_css_ctc2_config { - /**< Gains by Y(Luma) at Y =0.0,Y_X1, Y_X2, Y_X3, Y_X4 and Y_X5 + /** Gains by Y(Luma) at Y =0.0,Y_X1, Y_X2, Y_X3, Y_X4 and Y_X5 * --default/ineffective value: 4096(0.5f) */ int32_t y_y0; @@ -33,19 +33,19 @@ struct ia_css_ctc2_config { int32_t y_y3; int32_t y_y4; int32_t y_y5; - /** 1st-4th kneepoints by Y(Luma) --default/ineffective value:n/a + /* 1st-4th kneepoints by Y(Luma) --default/ineffective value:n/a * requirement: 0.0 < y_x1 < y_x2 #include "sh_css_internal.h" -/** qplane frame +/* qplane frame * * ISP block: qplane frame */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h index 54f8c299d227..5c0b8febd79a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/raw/raw_1.0/ia_css_raw_types.h @@ -18,7 +18,7 @@ #include #include "sh_css_internal.h" -/** Raw frame +/* Raw frame * * ISP block: Raw frame */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h index 1f1b72a417d1..026443b999a6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_param.h @@ -19,7 +19,7 @@ #include "sh_css_defs.h" #include "dma.h" -/** Reference frame */ +/* Reference frame */ struct ia_css_ref_configuration { const struct ia_css_frame *ref_frames[MAX_NUM_VIDEO_DELAY_FRAMES]; uint32_t dvs_frame_delay; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h index ce0eaeeee9c6..4750fba268b9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/ref/ref_1.0/ia_css_ref_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_REF_TYPES_H #define __IA_CSS_REF_TYPES_H -/** Reference frame +/* Reference frame * * ISP block: reference frame */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h index f57ed1ec5981..8d674d2c6427 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a/s3a_1.0/ia_css_s3a_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_S3A_TYPES_H #define __IA_CSS_S3A_TYPES_H -/** @file +/* @file * CSS-API header file for 3A statistics parameters. */ @@ -25,11 +25,11 @@ #include "../../../../components/stats_3a/src/stats_3a_public.h" #endif -/** 3A configuration. This configures the 3A statistics collection +/* 3A configuration. This configures the 3A statistics collection * module. */ -/** 3A statistics grid +/* 3A statistics grid * * ISP block: S3A1 (3A Support for 3A ver.1 (Histogram is not used for AE)) * S3A2 (3A Support for 3A ver.2 (Histogram is used for AE)) @@ -39,23 +39,23 @@ struct ia_css_3a_grid_info { #if defined(SYSTEM_css_skycam_c0_system) - uint32_t ae_enable; /**< ae enabled in binary, + uint32_t ae_enable; /** ae enabled in binary, 0:disabled, 1:enabled */ - struct ae_public_config_grid_config ae_grd_info; /**< see description in ae_public.h*/ + struct ae_public_config_grid_config ae_grd_info; /** see description in ae_public.h*/ - uint32_t awb_enable; /**< awb enabled in binary, + uint32_t awb_enable; /** awb enabled in binary, 0:disabled, 1:enabled */ - struct awb_public_config_grid_config awb_grd_info; /**< see description in awb_public.h*/ + struct awb_public_config_grid_config awb_grd_info; /** see description in awb_public.h*/ - uint32_t af_enable; /**< af enabled in binary, + uint32_t af_enable; /** af enabled in binary, 0:disabled, 1:enabled */ - struct af_public_grid_config af_grd_info; /**< see description in af_public.h*/ + struct af_public_grid_config af_grd_info; /** see description in af_public.h*/ - uint32_t awb_fr_enable; /**< awb_fr enabled in binary, + uint32_t awb_fr_enable; /** awb_fr enabled in binary, 0:disabled, 1:enabled */ - struct awb_fr_public_grid_config awb_fr_grd_info;/**< see description in awb_fr_public.h*/ + struct awb_fr_public_grid_config awb_fr_grd_info;/** see description in awb_fr_public.h*/ - uint32_t elem_bit_depth; /**< TODO:Taken from BYT - need input from AIQ + uint32_t elem_bit_depth; /** TODO:Taken from BYT - need input from AIQ if needed for SKC Bit depth of element used to calculate 3A statistics. @@ -63,34 +63,34 @@ struct ia_css_3a_grid_info { bayer bit depth in DSP. */ #else - uint32_t enable; /**< 3A statistics enabled. + uint32_t enable; /** 3A statistics enabled. 0:disabled, 1:enabled */ - uint32_t use_dmem; /**< DMEM or VMEM determines layout. + uint32_t use_dmem; /** DMEM or VMEM determines layout. 0:3A statistics are stored to VMEM, 1:3A statistics are stored to DMEM */ - uint32_t has_histogram; /**< Statistics include histogram. + uint32_t has_histogram; /** Statistics include histogram. 0:no histogram, 1:has histogram */ - uint32_t width; /**< Width of 3A grid table. + uint32_t width; /** Width of 3A grid table. (= Horizontal number of grid cells in table, which cells have effective statistics.) */ - uint32_t height; /**< Height of 3A grid table. + uint32_t height; /** Height of 3A grid table. (= Vertical number of grid cells in table, which cells have effective statistics.) */ - uint32_t aligned_width; /**< Horizontal stride (for alloc). + uint32_t aligned_width; /** Horizontal stride (for alloc). (= Horizontal number of grid cells in table, which means the allocated width.) */ - uint32_t aligned_height; /**< Vertical stride (for alloc). + uint32_t aligned_height; /** Vertical stride (for alloc). (= Vertical number of grid cells in table, which means the allocated height.) */ - uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ(Bayer Quad) unit. + uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit. (1BQ means {Gr,R,B,Gb}(2x2 pixels).) Valid values are 8,16,32,64. */ - uint32_t deci_factor_log2; /**< log2 of bqs_per_grid_cell. */ - uint32_t elem_bit_depth; /**< Bit depth of element used + uint32_t deci_factor_log2; /** log2 of bqs_per_grid_cell. */ + uint32_t elem_bit_depth; /** Bit depth of element used to calculate 3A statistics. This is 13, which is the normalized bayer bit depth in DSP. */ @@ -148,7 +148,7 @@ struct ia_css_3a_grid_info { * However, that will require driver/ 3A lib modifications. */ -/** 3A configuration. This configures the 3A statistics collection +/* 3A configuration. This configures the 3A statistics collection * module. * * ae_y_*: Coefficients to calculate luminance from bayer. @@ -167,38 +167,38 @@ struct ia_css_3a_grid_info { * ISP2: S3A2 and SDVS2 are used. */ struct ia_css_3a_config { - ia_css_u0_16 ae_y_coef_r; /**< Weight of R for Y. + ia_css_u0_16 ae_y_coef_r; /** Weight of R for Y. u0.16, [0,65535], default/ineffective 25559 */ - ia_css_u0_16 ae_y_coef_g; /**< Weight of G for Y. + ia_css_u0_16 ae_y_coef_g; /** Weight of G for Y. u0.16, [0,65535], default/ineffective 32768 */ - ia_css_u0_16 ae_y_coef_b; /**< Weight of B for Y. + ia_css_u0_16 ae_y_coef_b; /** Weight of B for Y. u0.16, [0,65535], default/ineffective 7209 */ - ia_css_u0_16 awb_lg_high_raw; /**< AWB level gate high for raw. + ia_css_u0_16 awb_lg_high_raw; /** AWB level gate high for raw. u0.16, [0,65535], default 65472(=1023*64), ineffective 65535 */ - ia_css_u0_16 awb_lg_low; /**< AWB level gate low. + ia_css_u0_16 awb_lg_low; /** AWB level gate low. u0.16, [0,65535], default 64(=1*64), ineffective 0 */ - ia_css_u0_16 awb_lg_high; /**< AWB level gate high. + ia_css_u0_16 awb_lg_high; /** AWB level gate high. u0.16, [0,65535], default 65535, ineffective 65535 */ - ia_css_s0_15 af_fir1_coef[7]; /**< AF FIR coefficients of fir1. + ia_css_s0_15 af_fir1_coef[7]; /** AF FIR coefficients of fir1. s0.15, [-32768,32767], default/ineffective -6689,-12207,-32768,32767,12207,6689,0 */ - ia_css_s0_15 af_fir2_coef[7]; /**< AF FIR coefficients of fir2. + ia_css_s0_15 af_fir2_coef[7]; /** AF FIR coefficients of fir2. s0.15, [-32768,32767], default/ineffective 2053,0,-18437,32767,-18437,2053,0 */ }; -/** 3A statistics. This structure describes the data stored +/* 3A statistics. This structure describes the data stored * in each 3A grid point. * * ISP block: S3A1 (3A Support for 3A ver.1) (Histogram is not used for AE) @@ -209,43 +209,43 @@ struct ia_css_3a_config { * ISP2: S3A2 is used. */ struct ia_css_3a_output { - int32_t ae_y; /**< Sum of Y in a statistics window, for AE. + int32_t ae_y; /** Sum of Y in a statistics window, for AE. (u19.13) */ - int32_t awb_cnt; /**< Number of effective pixels + int32_t awb_cnt; /** Number of effective pixels in a statistics window. Pixels passed by the AWB level gate check are judged as "effective". (u32) */ - int32_t awb_gr; /**< Sum of Gr in a statistics window, for AWB. + int32_t awb_gr; /** Sum of Gr in a statistics window, for AWB. All Gr pixels (not only for effective pixels) are summed. (u19.13) */ - int32_t awb_r; /**< Sum of R in a statistics window, for AWB. + int32_t awb_r; /** Sum of R in a statistics window, for AWB. All R pixels (not only for effective pixels) are summed. (u19.13) */ - int32_t awb_b; /**< Sum of B in a statistics window, for AWB. + int32_t awb_b; /** Sum of B in a statistics window, for AWB. All B pixels (not only for effective pixels) are summed. (u19.13) */ - int32_t awb_gb; /**< Sum of Gb in a statistics window, for AWB. + int32_t awb_gb; /** Sum of Gb in a statistics window, for AWB. All Gb pixels (not only for effective pixels) are summed. (u19.13) */ - int32_t af_hpf1; /**< Sum of |Y| following high pass filter af_fir1 + int32_t af_hpf1; /** Sum of |Y| following high pass filter af_fir1 within a statistics window, for AF. (u19.13) */ - int32_t af_hpf2; /**< Sum of |Y| following high pass filter af_fir2 + int32_t af_hpf2; /** Sum of |Y| following high pass filter af_fir2 within a statistics window, for AF. (u19.13) */ }; -/** 3A Statistics. This structure describes the statistics that are generated +/* 3A Statistics. This structure describes the statistics that are generated * using the provided configuration (ia_css_3a_config). */ struct ia_css_3a_statistics { - struct ia_css_3a_grid_info grid; /**< grid info contains the dimensions of the 3A grid */ - struct ia_css_3a_output *data; /**< the pointer to 3a_output[grid.width * grid.height] + struct ia_css_3a_grid_info grid; /** grid info contains the dimensions of the 3A grid */ + struct ia_css_3a_output *data; /** the pointer to 3a_output[grid.width * grid.height] containing the 3A statistics */ - struct ia_css_3a_rgby_output *rgby_data;/**< the pointer to 3a_rgby_output[256] + struct ia_css_3a_rgby_output *rgby_data;/** the pointer to 3a_rgby_output[256] containing the histogram */ }; -/** Histogram (Statistics for AE). +/* Histogram (Statistics for AE). * * 4 histograms(r,g,b,y), * 256 bins for each histogram, unsigned 24bit value for each bin. @@ -256,10 +256,10 @@ struct ia_css_3a_statistics { * ISP2: HIST2 is used. */ struct ia_css_3a_rgby_output { - uint32_t r; /**< Number of R of one bin of the histogram R. (u24) */ - uint32_t g; /**< Number of G of one bin of the histogram G. (u24) */ - uint32_t b; /**< Number of B of one bin of the histogram B. (u24) */ - uint32_t y; /**< Number of Y of one bin of the histogram Y. (u24) */ + uint32_t r; /** Number of R of one bin of the histogram R. (u24) */ + uint32_t g; /** Number of G of one bin of the histogram G. (u24) */ + uint32_t b; /** Number of B of one bin of the histogram B. (u24) */ + uint32_t y; /** Number of Y of one bin of the histogram Y. (u24) */ }; #endif /* __IA_CSS_S3A_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h index 8b2b56b0310b..9aa019539f47 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/s3a_stat_ls/ia_css_s3a_stat_ls_param.h @@ -22,7 +22,7 @@ #define NUM_S3A_LS 1 -/** s3a statistics store */ +/* s3a statistics store */ #ifdef ISP2401 struct ia_css_s3a_stat_ls_configuration { uint32_t s3a_grid_size_log2; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h index 44e3c43a5d4a..b35ac3e4009b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc.host.h @@ -32,7 +32,7 @@ ia_css_sc_dump( unsigned level); #ifdef ISP2401 -/** @brief Configure the shading correction. +/* @brief Configure the shading correction. * @param[out] to Parameters used in the shading correction kernel in the isp. * @param[in] from Parameters passed from the host. * @param[in] size Size of the sh_css_isp_sc_isp_config structure. @@ -45,7 +45,7 @@ ia_css_sc_config( const struct ia_css_sc_configuration *from, unsigned size); -/** @brief Configure the shading correction. +/* @brief Configure the shading correction. * @param[in] binary The binary, which has the shading correction. * @param[in] internal_frame_origin_x_bqs_on_sctbl * X coordinate (in bqs) of the origin of the internal frame on the shading table. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h index 5a833bc48af1..30ce499ac8cf 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sc/sc_1.0/ia_css_sc_types.h @@ -15,25 +15,25 @@ #ifndef __IA_CSS_SC_TYPES_H #define __IA_CSS_SC_TYPES_H -/** @file +/* @file * CSS-API header file for Lens Shading Correction (SC) parameters. */ -/** Number of color planes in the shading table. */ +/* Number of color planes in the shading table. */ #define IA_CSS_SC_NUM_COLORS 4 -/** The 4 colors that a shading table consists of. +/* The 4 colors that a shading table consists of. * For each color we store a grid of values. */ enum ia_css_sc_color { - IA_CSS_SC_COLOR_GR, /**< Green on a green-red line */ - IA_CSS_SC_COLOR_R, /**< Red */ - IA_CSS_SC_COLOR_B, /**< Blue */ - IA_CSS_SC_COLOR_GB /**< Green on a green-blue line */ + IA_CSS_SC_COLOR_GR, /** Green on a green-red line */ + IA_CSS_SC_COLOR_R, /** Red */ + IA_CSS_SC_COLOR_B, /** Blue */ + IA_CSS_SC_COLOR_GB /** Green on a green-blue line */ }; -/** Lens Shading Correction table. +/* Lens Shading Correction table. * * This describes the color shading artefacts * introduced by lens imperfections. To correct artefacts, @@ -64,39 +64,39 @@ enum ia_css_sc_color { * ISP2: SC1 is used. */ struct ia_css_shading_table { - uint32_t enable; /**< Set to false for no shading correction. + uint32_t enable; /** Set to false for no shading correction. The data field can be NULL when enable == true */ /* ------ deprecated(bz675) : from ------ */ - uint32_t sensor_width; /**< Native sensor width in pixels. */ - uint32_t sensor_height; /**< Native sensor height in lines. + uint32_t sensor_width; /** Native sensor width in pixels. */ + uint32_t sensor_height; /** Native sensor height in lines. When shading_settings.enable_shading_table_conversion is set as 0, sensor_width and sensor_height are NOT used. These are used only in the legacy shading table conversion in the css, when shading_settings. enable_shading_table_conversion is set as 1. */ /* ------ deprecated(bz675) : to ------ */ - uint32_t width; /**< Number of data points per line per color. + uint32_t width; /** Number of data points per line per color. u8.0, [0,81] */ - uint32_t height; /**< Number of lines of data points per color. + uint32_t height; /** Number of lines of data points per color. u8.0, [0,61] */ - uint32_t fraction_bits; /**< Bits of fractional part in the data + uint32_t fraction_bits; /** Bits of fractional part in the data points. u8.0, [0,13] */ uint16_t *data[IA_CSS_SC_NUM_COLORS]; - /**< Table data, one array for each color. + /** Table data, one array for each color. Use ia_css_sc_color to index this array. u[13-fraction_bits].[fraction_bits], [0,8191] */ }; /* ------ deprecated(bz675) : from ------ */ -/** Shading Correction settings. +/* Shading Correction settings. * * NOTE: * This structure should be removed when the shading table conversion is * removed from the css. */ struct ia_css_shading_settings { - uint32_t enable_shading_table_conversion; /**< Set to 0, + uint32_t enable_shading_table_conversion; /** Set to 0, if the conversion of the shading table should be disabled in the css. (default 1) 0: The shading table is directly sent to the isp. @@ -119,14 +119,14 @@ struct ia_css_shading_settings { #ifdef ISP2401 -/** Shading Correction configuration. +/* Shading Correction configuration. * * NOTE: The shading table size is larger than or equal to the internal frame size. */ struct ia_css_sc_configuration { - uint32_t internal_frame_origin_x_bqs_on_sctbl; /**< Origin X (in bqs) of internal frame on shading table. */ - uint32_t internal_frame_origin_y_bqs_on_sctbl; /**< Origin Y (in bqs) of internal frame on shading table. */ - /**< NOTE: bqs = size in BQ(Bayer Quad) unit. + uint32_t internal_frame_origin_x_bqs_on_sctbl; /** Origin X (in bqs) of internal frame on shading table. */ + uint32_t internal_frame_origin_y_bqs_on_sctbl; /** Origin Y (in bqs) of internal frame on shading table. */ + /** NOTE: bqs = size in BQ(Bayer Quad) unit. 1BQ means {Gr,R,B,Gb}(2x2 pixels). Horizontal 1 bqs corresponds to horizontal 2 pixels. Vertical 1 bqs corresponds to vertical 2 pixels. */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h index 295dc60b778c..031983c357e4 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/common/ia_css_sdis_common_types.h @@ -15,21 +15,21 @@ #ifndef __IA_CSS_SDIS_COMMON_TYPES_H #define __IA_CSS_SDIS_COMMON_TYPES_H -/** @file +/* @file * CSS-API header file for DVS statistics parameters. */ #include -/** DVS statistics grid dimensions in number of cells. +/* DVS statistics grid dimensions in number of cells. */ struct ia_css_dvs_grid_dim { - uint32_t width; /**< Width of DVS grid table in cells */ - uint32_t height; /**< Height of DVS grid table in cells */ + uint32_t width; /** Width of DVS grid table in cells */ + uint32_t height; /** Height of DVS grid table in cells */ }; -/** DVS statistics dimensions in number of cells for +/* DVS statistics dimensions in number of cells for * grid, coeffieicient and projection. */ @@ -55,7 +55,7 @@ struct ia_css_sdis_info { 0, /* dis_deci_factor_log2 */ \ } -/** DVS statistics grid +/* DVS statistics grid * * ISP block: SDVS1 (DIS/DVS Support for DIS/DVS ver.1 (2-axes)) * SDVS2 (DVS Support for DVS ver.2 (6-axes)) @@ -63,23 +63,23 @@ struct ia_css_sdis_info { * ISP2: SDVS2 is used. */ struct ia_css_dvs_grid_res { - uint32_t width; /**< Width of DVS grid table. + uint32_t width; /** Width of DVS grid table. (= Horizontal number of grid cells in table, which cells have effective statistics.) For DVS1, this is equal to the number of vertical statistics. */ - uint32_t aligned_width; /**< Stride of each grid line. + uint32_t aligned_width; /** Stride of each grid line. (= Horizontal number of grid cells in table, which means the allocated width.) */ - uint32_t height; /**< Height of DVS grid table. + uint32_t height; /** Height of DVS grid table. (= Vertical number of grid cells in table, which cells have effective statistics.) For DVS1, This is equal to the number of horizontal statistics. */ - uint32_t aligned_height;/**< Stride of each grid column. + uint32_t aligned_height;/** Stride of each grid column. (= Vertical number of grid cells in table, which means the allocated height.) */ @@ -89,125 +89,125 @@ struct ia_css_dvs_grid_res { * However, that implies driver I/F changes */ struct ia_css_dvs_grid_info { - uint32_t enable; /**< DVS statistics enabled. + uint32_t enable; /** DVS statistics enabled. 0:disabled, 1:enabled */ - uint32_t width; /**< Width of DVS grid table. + uint32_t width; /** Width of DVS grid table. (= Horizontal number of grid cells in table, which cells have effective statistics.) For DVS1, this is equal to the number of vertical statistics. */ - uint32_t aligned_width; /**< Stride of each grid line. + uint32_t aligned_width; /** Stride of each grid line. (= Horizontal number of grid cells in table, which means the allocated width.) */ - uint32_t height; /**< Height of DVS grid table. + uint32_t height; /** Height of DVS grid table. (= Vertical number of grid cells in table, which cells have effective statistics.) For DVS1, This is equal to the number of horizontal statistics. */ - uint32_t aligned_height;/**< Stride of each grid column. + uint32_t aligned_height;/** Stride of each grid column. (= Vertical number of grid cells in table, which means the allocated height.) */ - uint32_t bqs_per_grid_cell; /**< Grid cell size in BQ(Bayer Quad) unit. + uint32_t bqs_per_grid_cell; /** Grid cell size in BQ(Bayer Quad) unit. (1BQ means {Gr,R,B,Gb}(2x2 pixels).) For DVS1, valid value is 64. For DVS2, valid value is only 64, currently. */ - uint32_t num_hor_coefs; /**< Number of horizontal coefficients. */ - uint32_t num_ver_coefs; /**< Number of vertical coefficients. */ + uint32_t num_hor_coefs; /** Number of horizontal coefficients. */ + uint32_t num_ver_coefs; /** Number of vertical coefficients. */ }; -/** Number of DVS statistics levels +/* Number of DVS statistics levels */ #define IA_CSS_DVS_STAT_NUM_OF_LEVELS 3 -/** DVS statistics generated by accelerator global configuration +/* DVS statistics generated by accelerator global configuration */ struct dvs_stat_public_dvs_global_cfg { unsigned char kappa; - /**< DVS statistics global configuration - kappa */ + /** DVS statistics global configuration - kappa */ unsigned char match_shift; - /**< DVS statistics global configuration - match_shift */ + /** DVS statistics global configuration - match_shift */ unsigned char ybin_mode; - /**< DVS statistics global configuration - y binning mode */ + /** DVS statistics global configuration - y binning mode */ }; -/** DVS statistics generated by accelerator level grid +/* DVS statistics generated by accelerator level grid * configuration */ struct dvs_stat_public_dvs_level_grid_cfg { unsigned char grid_width; - /**< DVS statistics grid width */ + /** DVS statistics grid width */ unsigned char grid_height; - /**< DVS statistics grid height */ + /** DVS statistics grid height */ unsigned char block_width; - /**< DVS statistics block width */ + /** DVS statistics block width */ unsigned char block_height; - /**< DVS statistics block height */ + /** DVS statistics block height */ }; -/** DVS statistics generated by accelerator level grid start +/* DVS statistics generated by accelerator level grid start * configuration */ struct dvs_stat_public_dvs_level_grid_start { unsigned short x_start; - /**< DVS statistics level x start */ + /** DVS statistics level x start */ unsigned short y_start; - /**< DVS statistics level y start */ + /** DVS statistics level y start */ unsigned char enable; - /**< DVS statistics level enable */ + /** DVS statistics level enable */ }; -/** DVS statistics generated by accelerator level grid end +/* DVS statistics generated by accelerator level grid end * configuration */ struct dvs_stat_public_dvs_level_grid_end { unsigned short x_end; - /**< DVS statistics level x end */ + /** DVS statistics level x end */ unsigned short y_end; - /**< DVS statistics level y end */ + /** DVS statistics level y end */ }; -/** DVS statistics generated by accelerator Feature Extraction +/* DVS statistics generated by accelerator Feature Extraction * Region Of Interest (FE-ROI) configuration */ struct dvs_stat_public_dvs_level_fe_roi_cfg { unsigned char x_start; - /**< DVS statistics fe-roi level x start */ + /** DVS statistics fe-roi level x start */ unsigned char y_start; - /**< DVS statistics fe-roi level y start */ + /** DVS statistics fe-roi level y start */ unsigned char x_end; - /**< DVS statistics fe-roi level x end */ + /** DVS statistics fe-roi level x end */ unsigned char y_end; - /**< DVS statistics fe-roi level y end */ + /** DVS statistics fe-roi level y end */ }; -/** DVS statistics generated by accelerator public configuration +/* DVS statistics generated by accelerator public configuration */ struct dvs_stat_public_dvs_grd_cfg { struct dvs_stat_public_dvs_level_grid_cfg grd_cfg; - /**< DVS statistics level grid configuration */ + /** DVS statistics level grid configuration */ struct dvs_stat_public_dvs_level_grid_start grd_start; - /**< DVS statistics level grid start configuration */ + /** DVS statistics level grid start configuration */ struct dvs_stat_public_dvs_level_grid_end grd_end; - /**< DVS statistics level grid end configuration */ + /** DVS statistics level grid end configuration */ }; -/** DVS statistics grid generated by accelerator +/* DVS statistics grid generated by accelerator */ struct ia_css_dvs_stat_grid_info { struct dvs_stat_public_dvs_global_cfg dvs_gbl_cfg; - /**< DVS statistics global configuration (kappa, match, binning) */ + /** DVS statistics global configuration (kappa, match, binning) */ struct dvs_stat_public_dvs_grd_cfg grd_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS]; - /**< DVS statistics grid configuration (blocks and grids) */ + /** DVS statistics grid configuration (blocks and grids) */ struct dvs_stat_public_dvs_level_fe_roi_cfg fe_roi_cfg[IA_CSS_DVS_STAT_NUM_OF_LEVELS]; - /**< DVS statistics FE ROI (region of interest) configuration */ + /** DVS statistics FE ROI (region of interest) configuration */ }; -/** DVS statistics generated by accelerator default grid info +/* DVS statistics generated by accelerator default grid info */ #define DEFAULT_DVS_GRID_INFO { \ { \ @@ -219,14 +219,14 @@ struct ia_css_dvs_stat_grid_info { } -/** Union that holds all types of DVS statistics grid info in +/* Union that holds all types of DVS statistics grid info in * CSS format * */ union ia_css_dvs_grid_u { struct ia_css_dvs_stat_grid_info dvs_stat_grid_info; - /**< DVS statistics produced by accelerator grid info */ + /** DVS statistics produced by accelerator grid info */ struct ia_css_dvs_grid_info dvs_grid_info; - /**< DVS (DVS1/DVS2) grid info */ + /** DVS (DVS1/DVS2) grid info */ }; #endif /* __IA_CSS_SDIS_COMMON_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h index d408b58a027d..d2ee57008fb6 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_1.0/ia_css_sdis_types.h @@ -15,38 +15,38 @@ #ifndef __IA_CSS_SDIS_TYPES_H #define __IA_CSS_SDIS_TYPES_H -/** @file +/* @file * CSS-API header file for DVS statistics parameters. */ -/** Number of DVS coefficient types */ +/* Number of DVS coefficient types */ #define IA_CSS_DVS_NUM_COEF_TYPES 6 #ifndef PIPE_GENERATION #include "isp/kernels/sdis/common/ia_css_sdis_common_types.h" #endif -/** DVS 1.0 Coefficients. +/* DVS 1.0 Coefficients. * This structure describes the coefficients that are needed for the dvs statistics. */ struct ia_css_dvs_coefficients { - struct ia_css_dvs_grid_info grid;/**< grid info contains the dimensions of the dvs grid */ - int16_t *hor_coefs; /**< the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES] + struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */ + int16_t *hor_coefs; /** the pointer to int16_t[grid.num_hor_coefs * IA_CSS_DVS_NUM_COEF_TYPES] containing the horizontal coefficients */ - int16_t *ver_coefs; /**< the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES] + int16_t *ver_coefs; /** the pointer to int16_t[grid.num_ver_coefs * IA_CSS_DVS_NUM_COEF_TYPES] containing the vertical coefficients */ }; -/** DVS 1.0 Statistics. +/* DVS 1.0 Statistics. * This structure describes the statistics that are generated using the provided coefficients. */ struct ia_css_dvs_statistics { - struct ia_css_dvs_grid_info grid;/**< grid info contains the dimensions of the dvs grid */ - int32_t *hor_proj; /**< the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES] + struct ia_css_dvs_grid_info grid;/** grid info contains the dimensions of the dvs grid */ + int32_t *hor_proj; /** the pointer to int16_t[grid.height * IA_CSS_DVS_NUM_COEF_TYPES] containing the horizontal projections */ - int32_t *ver_proj; /**< the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES] + int32_t *ver_proj; /** the pointer to int16_t[grid.width * IA_CSS_DVS_NUM_COEF_TYPES] containing the vertical projections */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h index 7db7dd10fe00..2a0bc4031746 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/sdis/sdis_2/ia_css_sdis2_types.h @@ -15,55 +15,55 @@ #ifndef __IA_CSS_SDIS2_TYPES_H #define __IA_CSS_SDIS2_TYPES_H -/** @file +/* @file * CSS-API header file for DVS statistics parameters. */ -/** Number of DVS coefficient types */ +/* Number of DVS coefficient types */ #define IA_CSS_DVS2_NUM_COEF_TYPES 4 #ifndef PIPE_GENERATION #include "isp/kernels/sdis/common/ia_css_sdis_common_types.h" #endif -/** DVS 2.0 Coefficient types. This structure contains 4 pointers to +/* DVS 2.0 Coefficient types. This structure contains 4 pointers to * arrays that contain the coeffients for each type. */ struct ia_css_dvs2_coef_types { - int16_t *odd_real; /**< real part of the odd coefficients*/ - int16_t *odd_imag; /**< imaginary part of the odd coefficients*/ - int16_t *even_real;/**< real part of the even coefficients*/ - int16_t *even_imag;/**< imaginary part of the even coefficients*/ + int16_t *odd_real; /** real part of the odd coefficients*/ + int16_t *odd_imag; /** imaginary part of the odd coefficients*/ + int16_t *even_real;/** real part of the even coefficients*/ + int16_t *even_imag;/** imaginary part of the even coefficients*/ }; -/** DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics. +/* DVS 2.0 Coefficients. This structure describes the coefficients that are needed for the dvs statistics. * e.g. hor_coefs.odd_real is the pointer to int16_t[grid.num_hor_coefs] containing the horizontal odd real * coefficients. */ struct ia_css_dvs2_coefficients { - struct ia_css_dvs_grid_info grid; /**< grid info contains the dimensions of the dvs grid */ - struct ia_css_dvs2_coef_types hor_coefs; /**< struct with pointers that contain the horizontal coefficients */ - struct ia_css_dvs2_coef_types ver_coefs; /**< struct with pointers that contain the vertical coefficients */ + struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */ + struct ia_css_dvs2_coef_types hor_coefs; /** struct with pointers that contain the horizontal coefficients */ + struct ia_css_dvs2_coef_types ver_coefs; /** struct with pointers that contain the vertical coefficients */ }; -/** DVS 2.0 Statistic types. This structure contains 4 pointers to +/* DVS 2.0 Statistic types. This structure contains 4 pointers to * arrays that contain the statistics for each type. */ struct ia_css_dvs2_stat_types { - int32_t *odd_real; /**< real part of the odd statistics*/ - int32_t *odd_imag; /**< imaginary part of the odd statistics*/ - int32_t *even_real;/**< real part of the even statistics*/ - int32_t *even_imag;/**< imaginary part of the even statistics*/ + int32_t *odd_real; /** real part of the odd statistics*/ + int32_t *odd_imag; /** imaginary part of the odd statistics*/ + int32_t *even_real;/** real part of the even statistics*/ + int32_t *even_imag;/** imaginary part of the even statistics*/ }; -/** DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients. +/* DVS 2.0 Statistics. This structure describes the statistics that are generated using the provided coefficients. * e.g. hor_prod.odd_real is the pointer to int16_t[grid.aligned_height][grid.aligned_width] containing * the horizontal odd real statistics. Valid statistics data area is int16_t[0..grid.height-1][0..grid.width-1] */ struct ia_css_dvs2_statistics { - struct ia_css_dvs_grid_info grid; /**< grid info contains the dimensions of the dvs grid */ - struct ia_css_dvs2_stat_types hor_prod; /**< struct with pointers that contain the horizontal statistics */ - struct ia_css_dvs2_stat_types ver_prod; /**< struct with pointers that contain the vertical statistics */ + struct ia_css_dvs_grid_info grid; /** grid info contains the dimensions of the dvs grid */ + struct ia_css_dvs2_stat_types hor_prod; /** struct with pointers that contain the horizontal statistics */ + struct ia_css_dvs2_stat_types ver_prod; /** struct with pointers that contain the vertical statistics */ }; #endif /* __IA_CSS_SDIS2_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h index cc47a50e5ad5..91ea8dd4651d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tdf/tdf_1.0/ia_css_tdf_types.h @@ -15,13 +15,13 @@ #ifndef __IA_CSS_TDF_TYPES_H #define __IA_CSS_TDF_TYPES_H -/** @file +/* @file * CSS-API header file for Transform Domain Filter parameters. */ #include "type_support.h" -/** Transform Domain Filter configuration +/* Transform Domain Filter configuration * * \brief TDF public parameters. * \details Struct with all parameters for the TDF kernel that can be set @@ -30,23 +30,23 @@ * ISP2.6.1: TDF is used. */ struct ia_css_tdf_config { - int32_t thres_flat_table[64]; /**< Final optimized strength table of NR for flat region. */ - int32_t thres_detail_table[64]; /**< Final optimized strength table of NR for detail region. */ - int32_t epsilon_0; /**< Coefficient to control variance for dark area (for flat region). */ - int32_t epsilon_1; /**< Coefficient to control variance for bright area (for flat region). */ - int32_t eps_scale_text; /**< Epsilon scaling coefficient for texture region. */ - int32_t eps_scale_edge; /**< Epsilon scaling coefficient for edge region. */ - int32_t sepa_flat; /**< Threshold to judge flat (edge < m_Flat_thre). */ - int32_t sepa_edge; /**< Threshold to judge edge (edge > m_Edge_thre). */ - int32_t blend_flat; /**< Blending ratio at flat region. */ - int32_t blend_text; /**< Blending ratio at texture region. */ - int32_t blend_edge; /**< Blending ratio at edge region. */ - int32_t shading_gain; /**< Gain of Shading control. */ - int32_t shading_base_gain; /**< Base Gain of Shading control. */ - int32_t local_y_gain; /**< Gain of local luminance control. */ - int32_t local_y_base_gain; /**< Base gain of local luminance control. */ - int32_t rad_x_origin; /**< Initial x coord. for radius computation. */ - int32_t rad_y_origin; /**< Initial y coord. for radius computation. */ + int32_t thres_flat_table[64]; /** Final optimized strength table of NR for flat region. */ + int32_t thres_detail_table[64]; /** Final optimized strength table of NR for detail region. */ + int32_t epsilon_0; /** Coefficient to control variance for dark area (for flat region). */ + int32_t epsilon_1; /** Coefficient to control variance for bright area (for flat region). */ + int32_t eps_scale_text; /** Epsilon scaling coefficient for texture region. */ + int32_t eps_scale_edge; /** Epsilon scaling coefficient for edge region. */ + int32_t sepa_flat; /** Threshold to judge flat (edge < m_Flat_thre). */ + int32_t sepa_edge; /** Threshold to judge edge (edge > m_Edge_thre). */ + int32_t blend_flat; /** Blending ratio at flat region. */ + int32_t blend_text; /** Blending ratio at texture region. */ + int32_t blend_edge; /** Blending ratio at edge region. */ + int32_t shading_gain; /** Gain of Shading control. */ + int32_t shading_base_gain; /** Base Gain of Shading control. */ + int32_t local_y_gain; /** Gain of local luminance control. */ + int32_t local_y_base_gain; /** Base gain of local luminance control. */ + int32_t rad_x_origin; /** Initial x coord. for radius computation. */ + int32_t rad_y_origin; /** Initial y coord. for radius computation. */ }; #endif /* __IA_CSS_TDF_TYPES_H */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h index 135563f52174..223423f8c40b 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr3/ia_css_tnr3_types.h @@ -16,7 +16,7 @@ more details. #ifndef _IA_CSS_TNR3_TYPES_H #define _IA_CSS_TNR3_TYPES_H -/** @file +/* @file * CSS-API header file for Temporal Noise Reduction v3 (TNR3) kernel */ @@ -27,7 +27,7 @@ more details. */ #define TNR3_NUM_SEGMENTS 3 -/** Temporal Noise Reduction v3 (TNR3) configuration. +/* Temporal Noise Reduction v3 (TNR3) configuration. * The parameter to this kernel is fourfold * 1. Three piecewise linear graphs (one for each plane) with three segments * each. Each line graph has Luma values on the x axis and sigma values for @@ -44,17 +44,17 @@ more details. * 4. Selection of the reference frame buffer to be used for noise reduction. */ struct ia_css_tnr3_kernel_config { - unsigned int maxfb_y; /**< Maximum Feedback Gain for Y */ - unsigned int maxfb_u; /**< Maximum Feedback Gain for U */ - unsigned int maxfb_v; /**< Maximum Feedback Gain for V */ - unsigned int round_adj_y; /**< Rounding Adjust for Y */ - unsigned int round_adj_u; /**< Rounding Adjust for U */ - unsigned int round_adj_v; /**< Rounding Adjust for V */ - unsigned int knee_y[TNR3_NUM_SEGMENTS - 1]; /**< Knee points */ - unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for Y at points Y0, Y1, Y2, Y3 */ - unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for U at points U0, U1, U2, U3 */ - unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /**< Standard deviation for V at points V0, V1, V2, V3 */ - unsigned int ref_buf_select; /**< Selection of the reference buffer */ + unsigned int maxfb_y; /** Maximum Feedback Gain for Y */ + unsigned int maxfb_u; /** Maximum Feedback Gain for U */ + unsigned int maxfb_v; /** Maximum Feedback Gain for V */ + unsigned int round_adj_y; /** Rounding Adjust for Y */ + unsigned int round_adj_u; /** Rounding Adjust for U */ + unsigned int round_adj_v; /** Rounding Adjust for V */ + unsigned int knee_y[TNR3_NUM_SEGMENTS - 1]; /** Knee points */ + unsigned int sigma_y[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for Y at points Y0, Y1, Y2, Y3 */ + unsigned int sigma_u[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for U at points U0, U1, U2, U3 */ + unsigned int sigma_v[TNR3_NUM_SEGMENTS + 1]; /** Standard deviation for V at points V0, V1, V2, V3 */ + unsigned int ref_buf_select; /** Selection of the reference buffer */ }; #endif diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h index 4fd35e6ccd70..9bbc9ab2e6c0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/tnr/tnr_1.0/ia_css_tnr_types.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_TNR_TYPES_H #define __IA_CSS_TNR_TYPES_H -/** @file +/* @file * CSS-API header file for Temporal Noise Reduction (TNR) parameters. */ -/** Temporal Noise Reduction (TNR) configuration. +/* Temporal Noise Reduction (TNR) configuration. * * When difference between current frame and previous frame is less than or * equal to threshold, TNR works and current frame is mixed @@ -36,18 +36,18 @@ struct ia_css_tnr_config { - ia_css_u0_16 gain; /**< Interpolation ratio of current frame + ia_css_u0_16 gain; /** Interpolation ratio of current frame and previous frame. gain=0.0 -> previous frame is outputted. gain=1.0 -> current frame is outputted. u0.16, [0,65535], default 32768(0.5), ineffective 65535(almost 1.0) */ - ia_css_u0_16 threshold_y; /**< Threshold to enable interpolation of Y. + ia_css_u0_16 threshold_y; /** Threshold to enable interpolation of Y. If difference between current frame and previous frame is greater than threshold_y, TNR for Y is disabled. u0.16, [0,65535], default/ineffective 0 */ - ia_css_u0_16 threshold_uv; /**< Threshold to enable interpolation of + ia_css_u0_16 threshold_uv; /** Threshold to enable interpolation of U/V. If difference between current frame and previous frame is greater than threshold_uv, diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h index df5d37c8c946..9df4e12f6c2c 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_param.h @@ -23,9 +23,9 @@ #define VFDEC_BITS_PER_PIXEL GAMMA_OUTPUT_BITS -/** Viewfinder decimation */ +/* Viewfinder decimation */ struct sh_css_isp_vf_isp_config { - uint32_t vf_downscale_bits; /**< Log VF downscale value */ + uint32_t vf_downscale_bits; /** Log VF downscale value */ uint32_t enable; struct ia_css_frame_sp_info info; struct { diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h index d8cfdfbc8c0b..e3efafa279ff 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/vf/vf_1.0/ia_css_vf_types.h @@ -15,7 +15,7 @@ #ifndef __IA_CSS_VF_TYPES_H #define __IA_CSS_VF_TYPES_H -/** Viewfinder decimation +/* Viewfinder decimation * * ISP block: vfeven_horizontal_downscale */ @@ -24,7 +24,7 @@ #include struct ia_css_vf_configuration { - uint32_t vf_downscale_bits; /**< Log VF downscale value */ + uint32_t vf_downscale_bits; /** Log VF downscale value */ const struct ia_css_frame_info *info; }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h index 6bcfa274be88..bf98734d057e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/wb/wb_1.0/ia_css_wb_types.h @@ -15,31 +15,31 @@ #ifndef __IA_CSS_WB_TYPES_H #define __IA_CSS_WB_TYPES_H -/** @file +/* @file * CSS-API header file for White Balance parameters. */ -/** White Balance configuration (Gain Adjust). +/* White Balance configuration (Gain Adjust). * * ISP block: WB1 * ISP1: WB1 is used. * ISP2: WB1 is used. */ struct ia_css_wb_config { - uint32_t integer_bits; /**< Common exponent of gains. + uint32_t integer_bits; /** Common exponent of gains. u8.0, [0,3], default 1, ineffective 1 */ - uint32_t gr; /**< Significand of Gr gain. + uint32_t gr; /** Significand of Gr gain. u[integer_bits].[16-integer_bits], [0,65535], default/ineffective 32768(u1.15, 1.0) */ - uint32_t r; /**< Significand of R gain. + uint32_t r; /** Significand of R gain. u[integer_bits].[16-integer_bits], [0,65535], default/ineffective 32768(u1.15, 1.0) */ - uint32_t b; /**< Significand of B gain. + uint32_t b; /** Significand of B gain. u[integer_bits].[16-integer_bits], [0,65535], default/ineffective 32768(u1.15, 1.0) */ - uint32_t gb; /**< Significand of Gb gain. + uint32_t gb; /** Significand of Gb gain. u[integer_bits].[16-integer_bits], [0,65535], default/ineffective 32768(u1.15, 1.0) */ }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c index 3018100f6f76..abcb531f51cc 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr.host.c @@ -21,7 +21,7 @@ #include "ia_css_xnr.host.h" const struct ia_css_xnr_config default_xnr_config = { - /** default threshold 6400 translates to 25 on ISP. */ + /* default threshold 6400 translates to 25 on ISP. */ 6400 }; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h index 806c9f8f0e2e..a5caebbe2f84 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_param.h @@ -41,7 +41,7 @@ struct sh_css_isp_xnr_vamem_params { }; struct sh_css_isp_xnr_params { - /** XNR threshold. + /* XNR threshold. * type:u0.16 but actual valid range is:[0,255] * valid range is dependent on SH_CSS_ISP_YUV_BITS (currently 8bits) * default: 25 */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h index 89e8b0f17e8c..d2b634211a3f 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h @@ -15,11 +15,11 @@ #ifndef __IA_CSS_XNR_TYPES_H #define __IA_CSS_XNR_TYPES_H -/** @file +/* @file * CSS-API header file for Extra Noise Reduction (XNR) parameters. */ -/** XNR table. +/* XNR table. * * NOTE: The driver does not need to set this table, * because the default values are set inside the css. @@ -36,23 +36,23 @@ * */ -/** Number of elements in the xnr table. */ +/* Number of elements in the xnr table. */ #define IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2 6 -/** Number of elements in the xnr table. */ +/* Number of elements in the xnr table. */ #define IA_CSS_VAMEM_1_XNR_TABLE_SIZE (1U<)parameters, etc. */ uint32_t size; /* Disabled if 0 */ @@ -77,10 +77,10 @@ struct ia_css_isp_param_isp_segments { /* Memory offsets in binary info */ struct ia_css_isp_param_memory_offsets { - uint32_t offsets[IA_CSS_NUM_PARAM_CLASSES]; /**< offset wrt hdr in bytes */ + uint32_t offsets[IA_CSS_NUM_PARAM_CLASSES]; /** offset wrt hdr in bytes */ }; -/** Offsets for ISP kernel parameters per isp memory. +/* Offsets for ISP kernel parameters per isp memory. * Only relevant for standard ISP binaries, not ACC or SP. */ union ia_css_all_memory_offsets { diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c index 832d9e16edeb..f793ce125f02 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isp_param/src/isp_param.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h index 02bf908d94e6..4cf2defe9ef0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/interface/ia_css_isys.h @@ -44,7 +44,7 @@ more details. * Virtual Input System. (Input System 2401) */ typedef input_system_cfg_t ia_css_isys_descr_t; -/** end of Virtual Input System */ +/* end of Virtual Input System */ #endif #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) @@ -112,7 +112,7 @@ unsigned int ia_css_isys_rx_translate_irq_infos(unsigned int bits); #endif /* #if !defined(USE_INPUT_SYSTEM_VERSION_2401) */ -/** @brief Translate format and compression to format type. +/* @brief Translate format and compression to format type. * * @param[in] input_format The input format. * @param[in] compression The compression scheme. @@ -195,7 +195,7 @@ extern void ia_css_isys_stream2mmio_sid_rmgr_release( stream2mmio_ID_t stream2mmio, stream2mmio_sid_ID_t *sid); -/** end of Virtual Input System */ +/* end of Virtual Input System */ #endif #endif /* __IA_CSS_ISYS_H__ */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c index d1d4f79c00f1..3b04dc51335a 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/csi_rx_rmgr.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c index faef97672eac..d8c3b75d7fac 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/ibuf_ctrl_rmgr.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* * Support for Intel Camera Imaging ISP subsystem. * Copyright (c) 2010 - 2015, Intel Corporation. * diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c index 5032627342d9..4def4a542b7d 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_dma_rmgr.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c index 239ef310bdeb..4122084fd237 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_init.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c index a93c7f44ff12..222b294c0ab0 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/isys_stream2mmio_rmgr.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c index 46a157f64343..70f6cb5e5918 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/rx.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c index 0f1e8a2f6b10..90922a7acefd 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/isys/src/virtual_isys.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. @@ -166,7 +166,7 @@ static int32_t calculate_stride( bool raw_packed, int32_t align_in_bytes); -/** end of Forwarded Declaration */ +/* end of Forwarded Declaration */ /************************************************** * @@ -292,7 +292,7 @@ ia_css_isys_error_t ia_css_isys_stream_calculate_cfg( return rc; } -/** end of Public Methods */ +/* end of Public Methods */ /************************************************** * @@ -894,5 +894,5 @@ static csi_mipi_packet_type_t get_csi_mipi_packet_type( return packet_type; } -/** end of Private Methods */ +/* end of Private Methods */ #endif diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h index 90646f5f8885..e64936e2d46e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/interface/ia_css_pipeline.h @@ -103,7 +103,7 @@ struct ia_css_pipeline_stage_desc { struct ia_css_frame *vf_frame; }; -/** @brief initialize the pipeline module +/* @brief initialize the pipeline module * * @return None * @@ -112,7 +112,7 @@ struct ia_css_pipeline_stage_desc { */ void ia_css_pipeline_init(void); -/** @brief initialize the pipeline structure with default values +/* @brief initialize the pipeline structure with default values * * @param[out] pipeline structure to be initialized with defaults * @param[in] pipe_id @@ -129,7 +129,7 @@ enum ia_css_err ia_css_pipeline_create( unsigned int pipe_num, unsigned int dvs_frame_delay); -/** @brief destroy a pipeline +/* @brief destroy a pipeline * * @param[in] pipeline * @return None @@ -138,7 +138,7 @@ enum ia_css_err ia_css_pipeline_create( void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline); -/** @brief Starts a pipeline +/* @brief Starts a pipeline * * @param[in] pipe_id * @param[in] pipeline @@ -148,7 +148,7 @@ void ia_css_pipeline_destroy(struct ia_css_pipeline *pipeline); void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id, struct ia_css_pipeline *pipeline); -/** @brief Request to stop a pipeline +/* @brief Request to stop a pipeline * * @param[in] pipeline * @return IA_CSS_SUCCESS or error code upon error. @@ -156,7 +156,7 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id, */ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline); -/** @brief Check whether pipeline has stopped +/* @brief Check whether pipeline has stopped * * @param[in] pipeline * @return true if the pipeline has stopped @@ -164,7 +164,7 @@ enum ia_css_err ia_css_pipeline_request_stop(struct ia_css_pipeline *pipeline); */ bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipe); -/** @brief clean all the stages pipeline and make it as new +/* @brief clean all the stages pipeline and make it as new * * @param[in] pipeline * @return None @@ -172,7 +172,7 @@ bool ia_css_pipeline_has_stopped(struct ia_css_pipeline *pipe); */ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline); -/** @brief Add a stage to pipeline. +/* @brief Add a stage to pipeline. * * @param pipeline Pointer to the pipeline to be added to. * @param[in] stage_desc The description of the stage @@ -188,7 +188,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage( struct ia_css_pipeline_stage_desc *stage_desc, struct ia_css_pipeline_stage **stage); -/** @brief Finalize the stages in a pipeline +/* @brief Finalize the stages in a pipeline * * @param pipeline Pointer to the pipeline to be added to. * @return None @@ -198,7 +198,7 @@ enum ia_css_err ia_css_pipeline_create_and_add_stage( void ia_css_pipeline_finalize_stages(struct ia_css_pipeline *pipeline, bool continuous); -/** @brief gets a stage from the pipeline +/* @brief gets a stage from the pipeline * * @param[in] pipeline * @return IA_CSS_SUCCESS or error code upon error. @@ -208,7 +208,7 @@ enum ia_css_err ia_css_pipeline_get_stage(struct ia_css_pipeline *pipeline, int mode, struct ia_css_pipeline_stage **stage); -/** @brief Gets a pipeline stage corresponding Firmware handle from the pipeline +/* @brief Gets a pipeline stage corresponding Firmware handle from the pipeline * * @param[in] pipeline * @param[in] fw_handle @@ -221,7 +221,7 @@ enum ia_css_err ia_css_pipeline_get_stage_from_fw(struct ia_css_pipeline *pipeli uint32_t fw_handle, struct ia_css_pipeline_stage **stage); -/** @brief Gets the Firmware handle correponding the stage num from the pipeline +/* @brief Gets the Firmware handle correponding the stage num from the pipeline * * @param[in] pipeline * @param[in] stage_num @@ -234,7 +234,7 @@ enum ia_css_err ia_css_pipeline_get_fw_from_stage(struct ia_css_pipeline *pipeli uint32_t stage_num, uint32_t *fw_handle); -/** @brief gets the output stage from the pipeline +/* @brief gets the output stage from the pipeline * * @param[in] pipeline * @return IA_CSS_SUCCESS or error code upon error. @@ -245,7 +245,7 @@ enum ia_css_err ia_css_pipeline_get_output_stage( int mode, struct ia_css_pipeline_stage **stage); -/** @brief Checks whether the pipeline uses params +/* @brief Checks whether the pipeline uses params * * @param[in] pipeline * @return true if the pipeline uses params diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c index 62d13978475d..8f93d29d1c51 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. @@ -114,7 +114,7 @@ void ia_css_pipeline_map(unsigned int pipe_num, bool map) IA_CSS_LEAVE_PRIVATE("void"); } -/** @brief destroy a pipeline +/* @brief destroy a pipeline * * @param[in] pipeline * @return None @@ -187,7 +187,7 @@ void ia_css_pipeline_start(enum ia_css_pipe_id pipe_id, "ia_css_pipeline_start() leave: return_void\n"); } -/** +/* * @brief Query the SP thread ID. * Refer to "sh_css_internal.h" for details. */ @@ -285,7 +285,7 @@ void ia_css_pipeline_clean(struct ia_css_pipeline *pipeline) IA_CSS_LEAVE_PRIVATE("void"); } -/** @brief Add a stage to pipeline. +/* @brief Add a stage to pipeline. * * @param pipeline Pointer to the pipeline to be added to. * @param[in] stage_desc The description of the stage diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h index e50a0f813753..aaf2e247cafb 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/interface/ia_css_queue.h @@ -51,7 +51,7 @@ typedef struct ia_css_queue ia_css_queue_t; /***************************************************************************** * Queue Public APIs *****************************************************************************/ -/** @brief Initialize a local queue instance. +/* @brief Initialize a local queue instance. * * @param[out] qhandle. Handle to queue instance for use with API * @param[in] desc. Descriptor with queue properties filled-in @@ -63,7 +63,7 @@ extern int ia_css_queue_local_init( ia_css_queue_t *qhandle, ia_css_queue_local_t *desc); -/** @brief Initialize a remote queue instance +/* @brief Initialize a remote queue instance * * @param[out] qhandle. Handle to queue instance for use with API * @param[in] desc. Descriptor with queue properties filled-in @@ -74,7 +74,7 @@ extern int ia_css_queue_remote_init( ia_css_queue_t *qhandle, ia_css_queue_remote_t *desc); -/** @brief Uninitialize a queue instance +/* @brief Uninitialize a queue instance * * @param[in] qhandle. Handle to queue instance * @return 0 - Successful uninit. @@ -83,7 +83,7 @@ extern int ia_css_queue_remote_init( extern int ia_css_queue_uninit( ia_css_queue_t *qhandle); -/** @brief Enqueue an item in the queue instance +/* @brief Enqueue an item in the queue instance * * @param[in] qhandle. Handle to queue instance * @param[in] item. Object to be enqueued. @@ -96,7 +96,7 @@ extern int ia_css_queue_enqueue( ia_css_queue_t *qhandle, uint32_t item); -/** @brief Dequeue an item from the queue instance +/* @brief Dequeue an item from the queue instance * * @param[in] qhandle. Handle to queue instance * @param[out] item. Object to be dequeued into this item. @@ -110,7 +110,7 @@ extern int ia_css_queue_dequeue( ia_css_queue_t *qhandle, uint32_t *item); -/** @brief Check if the queue is empty +/* @brief Check if the queue is empty * * @param[in] qhandle. Handle to queue instance * @param[in] is_empty True if empty, False if not. @@ -123,7 +123,7 @@ extern int ia_css_queue_is_empty( ia_css_queue_t *qhandle, bool *is_empty); -/** @brief Check if the queue is full +/* @brief Check if the queue is full * * @param[in] qhandle. Handle to queue instance * @param[in] is_full True if Full, False if not. @@ -136,7 +136,7 @@ extern int ia_css_queue_is_full( ia_css_queue_t *qhandle, bool *is_full); -/** @brief Get used space in the queue +/* @brief Get used space in the queue * * @param[in] qhandle. Handle to queue instance * @param[in] size Number of available elements in the queue @@ -148,7 +148,7 @@ extern int ia_css_queue_get_used_space( ia_css_queue_t *qhandle, uint32_t *size); -/** @brief Get free space in the queue +/* @brief Get free space in the queue * * @param[in] qhandle. Handle to queue instance * @param[in] size Number of free elements in the queue @@ -160,7 +160,7 @@ extern int ia_css_queue_get_free_space( ia_css_queue_t *qhandle, uint32_t *size); -/** @brief Peek at an element in the queue +/* @brief Peek at an element in the queue * * @param[in] qhandle. Handle to queue instance * @param[in] offset Offset of element to peek, @@ -175,7 +175,7 @@ extern int ia_css_queue_peek( uint32_t offset, uint32_t *element); -/** @brief Get the usable size for the queue +/* @brief Get the usable size for the queue * * @param[in] qhandle. Handle to queue instance * @param[out] size Size value to be returned here. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c index 946d4f2d2108..7bb2b494836e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/queue/src/queue_access.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c index efa9c140484f..370ff3816dbe 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr.c @@ -13,7 +13,7 @@ * more details. */ #else -/** +/* Support for Intel Camera Imaging ISP subsystem. Copyright (c) 2010 - 2015, Intel Corporation. @@ -44,7 +44,7 @@ enum ia_css_err ia_css_rmgr_init(void) return err; } -/** +/* * @brief Uninitialize resource pool (host) */ void ia_css_rmgr_uninit(void) diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c index e56006c07ee8..54239ac9d7c9 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/rmgr/src/rmgr_vbuf.c @@ -20,13 +20,13 @@ #include /* mmmgr_malloc, mhmm_free */ #include -/** +/* * @brief VBUF resource handles */ #define NUM_HANDLES 1000 struct ia_css_rmgr_vbuf_handle handle_table[NUM_HANDLES]; -/** +/* * @brief VBUF resource pool - refpool */ struct ia_css_rmgr_vbuf_pool refpool = { @@ -37,7 +37,7 @@ struct ia_css_rmgr_vbuf_pool refpool = { NULL, /* handles */ }; -/** +/* * @brief VBUF resource pool - writepool */ struct ia_css_rmgr_vbuf_pool writepool = { @@ -48,7 +48,7 @@ struct ia_css_rmgr_vbuf_pool writepool = { NULL, /* handles */ }; -/** +/* * @brief VBUF resource pool - hmmbufferpool */ struct ia_css_rmgr_vbuf_pool hmmbufferpool = { @@ -63,7 +63,7 @@ struct ia_css_rmgr_vbuf_pool *vbuf_ref = &refpool; struct ia_css_rmgr_vbuf_pool *vbuf_write = &writepool; struct ia_css_rmgr_vbuf_pool *hmm_buffer_pool = &hmmbufferpool; -/** +/* * @brief Initialize the reference count (host, vbuf) */ static void rmgr_refcount_init_vbuf(void) @@ -72,7 +72,7 @@ static void rmgr_refcount_init_vbuf(void) memset(&handle_table, 0, sizeof(handle_table)); } -/** +/* * @brief Retain the reference count for a handle (host, vbuf) * * @param handle The pointer to the handle @@ -109,7 +109,7 @@ void ia_css_rmgr_refcount_retain_vbuf(struct ia_css_rmgr_vbuf_handle **handle) (*handle)->count++; } -/** +/* * @brief Release the reference count for a handle (host, vbuf) * * @param handle The pointer to the handle @@ -131,7 +131,7 @@ void ia_css_rmgr_refcount_release_vbuf(struct ia_css_rmgr_vbuf_handle **handle) } } -/** +/* * @brief Initialize the resource pool (host, vbuf) * * @param pool The pointer to the pool @@ -163,7 +163,7 @@ enum ia_css_err ia_css_rmgr_init_vbuf(struct ia_css_rmgr_vbuf_pool *pool) return err; } -/** +/* * @brief Uninitialize the resource pool (host, vbuf) * * @param pool The pointer to the pool @@ -197,7 +197,7 @@ void ia_css_rmgr_uninit_vbuf(struct ia_css_rmgr_vbuf_pool *pool) } } -/** +/* * @brief Push a handle to the pool * * @param pool The pointer to the pool @@ -224,7 +224,7 @@ void rmgr_push_handle(struct ia_css_rmgr_vbuf_pool *pool, assert(succes); } -/** +/* * @brief Pop a handle from the pool * * @param pool The pointer to the pool @@ -254,7 +254,7 @@ void rmgr_pop_handle(struct ia_css_rmgr_vbuf_pool *pool, } } -/** +/* * @brief Acquire a handle from the pool (host, vbuf) * * @param pool The pointer to the pool @@ -302,7 +302,7 @@ void ia_css_rmgr_acq_vbuf(struct ia_css_rmgr_vbuf_pool *pool, ia_css_rmgr_refcount_retain_vbuf(handle); } -/** +/* * @brief Release a handle to the pool (host, vbuf) * * @param pool The pointer to the pool diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h index 27e9eb1e2102..bc4b1723369e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/spctrl/interface/ia_css_spctrl.h @@ -37,17 +37,17 @@ more details. typedef struct { - uint32_t ddr_data_offset; /**< posistion of data in DDR */ - uint32_t dmem_data_addr; /**< data segment address in dmem */ - uint32_t dmem_bss_addr; /**< bss segment address in dmem */ - uint32_t data_size; /**< data segment size */ - uint32_t bss_size; /**< bss segment size */ - uint32_t spctrl_config_dmem_addr; /** mode; IA_CSS_ENTER_PRIVATE("main_pipe_id=%d", main_pipe_id); - /** + /* * Check if every "ia_css_pipe" instance in this target * "ia_css_stream" instance has stopped. */ @@ -5229,7 +5229,7 @@ sh_css_pipes_have_stopped(struct ia_css_stream *stream) rval); } - /** + /* * In the CSS firmware use scenario "Continuous Preview" * as well as "Continuous Video", the "ia_css_pipe" instance * "Copy Pipe" is activated. This "Copy Pipe" is private to @@ -5474,7 +5474,7 @@ ERR: } #ifdef ISP2401 -/** +/* * @brief Check if a format is supported by the pipe. * */ @@ -8626,7 +8626,7 @@ sh_css_pipeline_add_acc_stage(struct ia_css_pipeline *pipeline, return err; } -/** +/* * @brief Tag a specific frame in continuous capture. * Refer to "sh_css_internal.h" for details. */ @@ -8666,7 +8666,7 @@ enum ia_css_err ia_css_stream_capture_frame(struct ia_css_stream *stream, return err; } -/** +/* * @brief Configure the continuous capture. * Refer to "sh_css_internal.h" for details. */ @@ -8822,7 +8822,7 @@ sh_css_init_host_sp_control_vars(void) "sh_css_init_host_sp_control_vars() leave: return_void\n"); } -/** +/* * create the internal structures and fill in the configuration data */ void ia_css_pipe_config_defaults(struct ia_css_pipe_config *pipe_config) @@ -10435,7 +10435,7 @@ ia_css_start_sp(void) return err; } -/** +/* * Time to wait SP for termincate. Only condition when this can happen * is a fatal hw failure, but we must be able to detect this and emit * a proper error trace. @@ -10713,7 +10713,7 @@ ia_css_unlock_raw_frame(struct ia_css_stream *stream, uint32_t exp_id) return ret; } -/** @brief Set the state (Enable or Disable) of the Extension stage in the +/* @brief Set the state (Enable or Disable) of the Extension stage in the * given pipe. */ enum ia_css_err @@ -10758,7 +10758,7 @@ ia_css_pipe_set_qos_ext_state(struct ia_css_pipe *pipe, uint32_t fw_handle, bool return err; } -/** @brief Get the state (Enable or Disable) of the Extension stage in the +/* @brief Get the state (Enable or Disable) of the Extension stage in the * given pipe. */ enum ia_css_err diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h index 0910021286a4..161122e1bcbc 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_internal.h @@ -188,7 +188,7 @@ enum host2sp_commands { N_host2sp_cmd }; -/** Enumeration used to indicate the events that are produced by +/* Enumeration used to indicate the events that are produced by * the SP and consumed by the Host. * * !!!IMPORTANT!!! KEEP THE FOLLOWING IN SYNC: @@ -274,10 +274,10 @@ struct sh_css_ddr_address_map_compound { }; struct ia_css_isp_parameter_set_info { - struct sh_css_ddr_address_map mem_map;/**< pointers to Parameters in ISP format IMPT: + struct sh_css_ddr_address_map mem_map;/** pointers to Parameters in ISP format IMPT: This should be first member of this struct */ - uint32_t isp_parameters_id;/**< Unique ID to track which config was actually applied to a particular frame */ - ia_css_ptr output_frame_ptr;/**< Output frame to which this config has to be applied (optional) */ + uint32_t isp_parameters_id;/** Unique ID to track which config was actually applied to a particular frame */ + ia_css_ptr output_frame_ptr;/** Output frame to which this config has to be applied (optional) */ }; /* this struct contains all arguments that can be passed to @@ -398,9 +398,9 @@ struct sh_css_sp_input_formatter_set { /* SP configuration information */ struct sh_css_sp_config { uint8_t no_isp_sync; /* Signal host immediately after start */ - uint8_t enable_raw_pool_locking; /**< Enable Raw Buffer Locking for HALv3 Support */ + uint8_t enable_raw_pool_locking; /** Enable Raw Buffer Locking for HALv3 Support */ uint8_t lock_all; - /**< If raw buffer locking is enabled, this flag indicates whether raw + /** If raw buffer locking is enabled, this flag indicates whether raw frames are locked when their EOF event is successfully sent to the host (true) or when they are passed to the preview/video pipe (false). */ @@ -458,13 +458,13 @@ struct sh_css_sp_pipeline_io { /*struct sh_css_sp_pipeline_terminal output;*/ }; -/** This struct tracks how many streams are registered per CSI port. +/* This struct tracks how many streams are registered per CSI port. * This is used to track which streams have already been configured. * Only when all streams are configured, the CSI RX is started for that port. */ struct sh_css_sp_pipeline_io_status { - uint32_t active[N_INPUT_SYSTEM_CSI_PORT]; /**< registered streams */ - uint32_t running[N_INPUT_SYSTEM_CSI_PORT]; /**< configured streams */ + uint32_t active[N_INPUT_SYSTEM_CSI_PORT]; /** registered streams */ + uint32_t running[N_INPUT_SYSTEM_CSI_PORT]; /** configured streams */ }; #endif @@ -500,7 +500,7 @@ enum sh_css_port_type { #define SH_CSS_METADATA_OFFLINE_MODE 0x04 #define SH_CSS_METADATA_WAIT_INPUT 0x08 -/** @brief Free an array of metadata buffers. +/* @brief Free an array of metadata buffers. * * @param[in] num_bufs Number of metadata buffers to be freed. * @param[in] bufs Pointer of array of metadata buffers. @@ -764,7 +764,7 @@ struct sh_css_hmm_buffer { hrt_vaddress frame_data; uint32_t flashed; uint32_t exp_id; - uint32_t isp_parameters_id; /**< Unique ID to track which config was + uint32_t isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */ #if CONFIG_ON_FRAME_ENQUEUE() struct sh_css_config_on_frame_enqueue config_on_frame_enqueue; diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h index e12789236bb9..4bcc35d219f8 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_legacy.h @@ -22,7 +22,7 @@ #include #include -/** The pipe id type, distinguishes the kind of pipes that +/* The pipe id type, distinguishes the kind of pipes that * can be run in parallel. */ enum ia_css_pipe_id { diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c index 36aaa3019a15..883474e90c81 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_mipi.c @@ -321,7 +321,7 @@ calculate_mipi_buff_size( height = stream_cfg->input_config.input_res.height; format = stream_cfg->input_config.format; pack_raw_pixels = stream_cfg->pack_raw_pixels; - /** end of NOTE */ + /* end of NOTE */ /** #ifndef ISP2401 @@ -341,7 +341,7 @@ calculate_mipi_buff_size( * in the non-continuous use scenario. */ width_padded = width + (2 * ISP_VEC_NELEMS); - /** end of NOTE */ + /* end of NOTE */ IA_CSS_ENTER("padded_width=%d, height=%d, format=%d\n", width_padded, height, format); diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h index a7ffe6d8331b..270ec2b60a3e 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.h @@ -144,8 +144,8 @@ struct ia_css_isp_parameters { struct sh_css_ddr_address_map_size pipe_ddr_ptrs_size[IA_CSS_PIPE_ID_NUM]; struct sh_css_ddr_address_map ddr_ptrs; struct sh_css_ddr_address_map_size ddr_ptrs_size; - struct ia_css_frame *output_frame; /**< Output frame the config is to be applied to (optional) */ - uint32_t isp_parameters_id; /**< Unique ID to track which config was actually applied to a particular frame */ + struct ia_css_frame *output_frame; /** Output frame the config is to be applied to (optional) */ + uint32_t isp_parameters_id; /** Unique ID to track which config was actually applied to a particular frame */ }; void diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c index e6a345979ff1..6fc00fc402b1 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_sp.c @@ -261,7 +261,7 @@ sh_css_sp_start_raw_copy(struct ia_css_frame *out_frame, assert(out_frame != NULL); { - /** + /* * Clear sh_css_sp_stage for easy debugging. * program_input_circuit must be saved as it is set outside * this function. @@ -335,7 +335,7 @@ sh_css_sp_start_isys_copy(struct ia_css_frame *out_frame, assert(out_frame != NULL); { - /** + /* * Clear sh_css_sp_stage for easy debugging. * program_input_circuit must be saved as it is set outside * this function. @@ -909,7 +909,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary, xinfo = binary->info; info = &xinfo->sp; { - /** + /* * Clear sh_css_sp_stage for easy debugging. * program_input_circuit must be saved as it is set outside * this function. @@ -980,7 +980,7 @@ sh_css_sp_init_stage(struct ia_css_binary *binary, sh_css_isp_stage.binary_name[SH_CSS_MAX_BINARY_NAME - 1] = 0; sh_css_isp_stage.mem_initializers = *isp_mem_if; - /** + /* * Even when a stage does not need uds and does not params, * ia_css_uds_sp_scale_params() seems to be called (needs * further investigation). This function can not deal with @@ -1429,7 +1429,7 @@ sh_css_init_host2sp_frame_data(void) } -/** +/* * @brief Update the offline frame information in host_sp_communication. * Refer to "sh_css_sp.h" for more details. */ @@ -1461,7 +1461,7 @@ sh_css_update_host2sp_offline_frame( } #if defined(USE_INPUT_SYSTEM_VERSION_2) || defined(USE_INPUT_SYSTEM_VERSION_2401) -/** +/* * @brief Update the mipi frame information in host_sp_communication. * Refer to "sh_css_sp.h" for more details. */ @@ -1488,7 +1488,7 @@ sh_css_update_host2sp_mipi_frame( frame ? frame->data : 0); } -/** +/* * @brief Update the mipi metadata information in host_sp_communication. * Refer to "sh_css_sp.h" for more details. */ @@ -1735,7 +1735,7 @@ ia_css_isp_has_started(void) } -/** +/* * @brief Initialize the DMA software-mask in the debug mode. * Refer to "sh_css_sp.h" for more details. */ @@ -1761,7 +1761,7 @@ sh_css_sp_init_dma_sw_reg(int dma_id) return true; } -/** +/* * @brief Set the DMA software-mask in the debug mode. * Refer to "sh_css_sp.h" for more details. */ diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h index e49e478ab354..0b8e3d872069 100644 --- a/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h +++ b/drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_struct.h @@ -61,7 +61,7 @@ struct sh_css { #endif hrt_vaddress sp_bin_addr; hrt_data page_table_base_index; - unsigned int size_mem_words; /** \deprecated{Use ia_css_mipi_buffer_config instead.}*/ + unsigned int size_mem_words; /* \deprecated{Use ia_css_mipi_buffer_config instead.}*/ enum ia_css_irq_type irq_type; unsigned int pipe_counter; -- cgit v1.2.3 From 1855e9884cb410cdc4d2b1244420d8056db1c76b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 03:46:30 -0500 Subject: media: rc: fix kernel-doc parameter names There are several parameters there that are named wrong, as reported by those warnings: drivers/media/rc/ir-sharp-decoder.c:47: warning: No description found for parameter 'ev' drivers/media/rc/ir-sharp-decoder.c:47: warning: Excess function parameter 'duration' description in 'ir_sharp_decode' drivers/media/rc/ir-sanyo-decoder.c:56: warning: No description found for parameter 'ev' drivers/media/rc/ir-sanyo-decoder.c:56: warning: Excess function parameter 'duration' description in 'ir_sanyo_decode' drivers/media/rc/ir-xmp-decoder.c:43: warning: No description found for parameter 'ev' drivers/media/rc/ir-xmp-decoder.c:43: warning: Excess function parameter 'duration' description in 'ir_xmp_decode' drivers/media/rc/ir-jvc-decoder.c:47: warning: No description found for parameter 'ev' drivers/media/rc/ir-jvc-decoder.c:47: warning: Excess function parameter 'duration' description in 'ir_jvc_decode' drivers/media/rc/ir-lirc-codec.c:34: warning: No description found for parameter 'dev' drivers/media/rc/ir-lirc-codec.c:34: warning: No description found for parameter 'ev' drivers/media/rc/ir-lirc-codec.c:34: warning: Excess function parameter 'input_dev' description in 'ir_lirc_decode' drivers/media/rc/ir-lirc-codec.c:34: warning: Excess function parameter 'duration' description in 'ir_lirc_decode' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/ir-jvc-decoder.c | 2 +- drivers/media/rc/ir-lirc-codec.c | 4 ++-- drivers/media/rc/ir-sanyo-decoder.c | 2 +- drivers/media/rc/ir-sharp-decoder.c | 2 +- drivers/media/rc/ir-xmp-decoder.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/ir-jvc-decoder.c b/drivers/media/rc/ir-jvc-decoder.c index e2bd68c42edf..22c8aee3df4f 100644 --- a/drivers/media/rc/ir-jvc-decoder.c +++ b/drivers/media/rc/ir-jvc-decoder.c @@ -39,7 +39,7 @@ enum jvc_state { /** * ir_jvc_decode() - Decode one JVC pulse or space * @dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the pulse violates the state machine */ diff --git a/drivers/media/rc/ir-lirc-codec.c b/drivers/media/rc/ir-lirc-codec.c index 8f2f37412fc5..4fd4521693d9 100644 --- a/drivers/media/rc/ir-lirc-codec.c +++ b/drivers/media/rc/ir-lirc-codec.c @@ -25,8 +25,8 @@ /** * ir_lirc_decode() - Send raw IR data to lirc_dev to be relayed to the * lircd userspace daemon for decoding. - * @input_dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @dev: the struct rc_dev descriptor of the device + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the lirc interfaces aren't wired up. */ diff --git a/drivers/media/rc/ir-sanyo-decoder.c b/drivers/media/rc/ir-sanyo-decoder.c index 758c60956850..d94e07b02f3b 100644 --- a/drivers/media/rc/ir-sanyo-decoder.c +++ b/drivers/media/rc/ir-sanyo-decoder.c @@ -48,7 +48,7 @@ enum sanyo_state { /** * ir_sanyo_decode() - Decode one SANYO pulse or space * @dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the pulse violates the state machine */ diff --git a/drivers/media/rc/ir-sharp-decoder.c b/drivers/media/rc/ir-sharp-decoder.c index 129b558acc92..7140dd6160ee 100644 --- a/drivers/media/rc/ir-sharp-decoder.c +++ b/drivers/media/rc/ir-sharp-decoder.c @@ -39,7 +39,7 @@ enum sharp_state { /** * ir_sharp_decode() - Decode one Sharp pulse or space * @dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the pulse violates the state machine */ diff --git a/drivers/media/rc/ir-xmp-decoder.c b/drivers/media/rc/ir-xmp-decoder.c index 6f464be1c8d7..712bc6d76e92 100644 --- a/drivers/media/rc/ir-xmp-decoder.c +++ b/drivers/media/rc/ir-xmp-decoder.c @@ -35,7 +35,7 @@ enum xmp_state { /** * ir_xmp_decode() - Decode one XMP pulse or space * @dev: the struct rc_dev descriptor of the device - * @duration: the struct ir_raw_event descriptor of the pulse/space + * @ev: the struct ir_raw_event descriptor of the pulse/space * * This function returns -EINVAL if the pulse violates the state machine */ -- cgit v1.2.3 From d28b2cf969b1e887450700191c22df8085574e9b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 03:56:18 -0500 Subject: media: v4l2-core: Fix kernel-doc markups There are some troubles on kernel-doc markups, as warned: drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't1' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 't2' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'pclock_delta' drivers/media/v4l2-core/v4l2-dv-timings.c:259: warning: No description found for parameter 'match_reduced_fps' drivers/media/v4l2-core/tuner-core.c:242: warning: bad line: internal parameters, like LNA mode drivers/media/v4l2-core/tuner-core.c:765: warning: No description found for parameter 'mode' drivers/media/v4l2-core/videobuf2-memops.c:127: warning: cannot understand function prototype: 'const struct vm_operations_struct vb2_common_vm_ops = ' drivers/media/v4l2-core/v4l2-mem2mem.c:190: warning: No description found for parameter 'm2m_dev' drivers/media/v4l2-core/v4l2-mem2mem.c:291: warning: No description found for parameter 'm2m_ctx' drivers/media/v4l2-core/videobuf-core.c:233: warning: No description found for parameter 'q' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/tuner-core.c | 4 +++- drivers/media/v4l2-core/v4l2-dv-timings.c | 10 +++++----- drivers/media/v4l2-core/v4l2-mem2mem.c | 2 ++ drivers/media/v4l2-core/videobuf-core.c | 2 +- drivers/media/v4l2-core/videobuf2-memops.c | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/media/v4l2-core/tuner-core.c b/drivers/media/v4l2-core/tuner-core.c index 8db45dfc271b..82852f23a3b6 100644 --- a/drivers/media/v4l2-core/tuner-core.c +++ b/drivers/media/v4l2-core/tuner-core.c @@ -239,7 +239,7 @@ static const struct analog_demod_ops tuner_analog_ops = { * @type: type of the tuner (e. g. tuner number) * @new_mode_mask: Indicates if tuner supports TV and/or Radio * @new_config: an optional parameter used by a few tuners to adjust - internal parameters, like LNA mode + * internal parameters, like LNA mode * @tuner_callback: an optional function to be called when switching * to analog mode * @@ -750,6 +750,7 @@ static int tuner_remove(struct i2c_client *client) /** * check_mode - Verify if tuner supports the requested mode * @t: a pointer to the module's internal struct_tuner + * @mode: mode of the tuner, as defined by &enum v4l2_tuner_type. * * This function checks if the tuner is capable of tuning analog TV, * digital TV or radio, depending on what the caller wants. If the @@ -757,6 +758,7 @@ static int tuner_remove(struct i2c_client *client) * returns 0. * This function is needed for boards that have a separate tuner for * radio (like devices with tea5767). + * * NOTE: mt20xx uses V4L2_TUNER_DIGITAL_TV and calls set_tv_freq to * select a TV frequency. So, t_mode = T_ANALOG_TV could actually * be used to represent a Digital TV too. diff --git a/drivers/media/v4l2-core/v4l2-dv-timings.c b/drivers/media/v4l2-core/v4l2-dv-timings.c index 5c8c49d240d1..930f9c53a64e 100644 --- a/drivers/media/v4l2-core/v4l2-dv-timings.c +++ b/drivers/media/v4l2-core/v4l2-dv-timings.c @@ -245,11 +245,11 @@ EXPORT_SYMBOL_GPL(v4l2_find_dv_timings_cea861_vic); /** * v4l2_match_dv_timings - check if two timings match - * @t1 - compare this v4l2_dv_timings struct... - * @t2 - with this struct. - * @pclock_delta - the allowed pixelclock deviation. - * @match_reduced_fps - if true, then fail if V4L2_DV_FL_REDUCED_FPS does not - * match. + * @t1: compare this v4l2_dv_timings struct... + * @t2: with this struct. + * @pclock_delta: the allowed pixelclock deviation. + * @match_reduced_fps: if true, then fail if V4L2_DV_FL_REDUCED_FPS does not + * match. * * Compare t1 with t2 with a given margin of error for the pixelclock. */ diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c index f62e68aa04c4..bc580fbe18fa 100644 --- a/drivers/media/v4l2-core/v4l2-mem2mem.c +++ b/drivers/media/v4l2-core/v4l2-mem2mem.c @@ -183,6 +183,7 @@ EXPORT_SYMBOL(v4l2_m2m_get_curr_priv); /** * v4l2_m2m_try_run() - select next job to perform and run it if possible + * @m2m_dev: per-device context * * Get next transaction (if present) from the waiting jobs list and run it. */ @@ -281,6 +282,7 @@ EXPORT_SYMBOL_GPL(v4l2_m2m_try_schedule); /** * v4l2_m2m_cancel_job() - cancel pending jobs for the context + * @m2m_ctx: m2m context with jobs to be canceled * * In case of streamoff or release called on any context, * 1] If the context is currently running, then abort job will be called diff --git a/drivers/media/v4l2-core/videobuf-core.c b/drivers/media/v4l2-core/videobuf-core.c index 1dbf6f7785bb..e87fb13b22dc 100644 --- a/drivers/media/v4l2-core/videobuf-core.c +++ b/drivers/media/v4l2-core/videobuf-core.c @@ -222,7 +222,7 @@ int videobuf_queue_is_busy(struct videobuf_queue *q) } EXPORT_SYMBOL_GPL(videobuf_queue_is_busy); -/** +/* * __videobuf_free() - free all the buffers and their control structures * * This function can only be called if streaming/reading is off, i.e. no buffers diff --git a/drivers/media/v4l2-core/videobuf2-memops.c b/drivers/media/v4l2-core/videobuf2-memops.c index 4bb8424114ce..89e51989332b 100644 --- a/drivers/media/v4l2-core/videobuf2-memops.c +++ b/drivers/media/v4l2-core/videobuf2-memops.c @@ -120,7 +120,7 @@ static void vb2_common_vm_close(struct vm_area_struct *vma) h->put(h->arg); } -/** +/* * vb2_common_vm_ops - common vm_ops used for tracking refcount of mmaped * video buffers */ -- cgit v1.2.3 From 389a455d61cbc796994332e6a87616c4d34200e2 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 04:20:45 -0500 Subject: media: davinci: fix kernel-doc warnings There are several of kernel-doc warnings: drivers/media/platform/davinci/vpif_display.c:114: warning: No description found for parameter 'sizes' drivers/media/platform/davinci/vpif_display.c:165: warning: No description found for parameter 'vq' drivers/media/platform/davinci/vpif_display.c:165: warning: Excess function parameter 'vb' description in 'vpif_start_streaming' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'chan_cfg' drivers/media/platform/davinci/vpif_display.c:780: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_display.c:813: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_capture.c:121: warning: No description found for parameter 'sizes' drivers/media/platform/davinci/vpif_capture.c:174: warning: No description found for parameter 'vq' drivers/media/platform/davinci/vpif_capture.c:174: warning: Excess function parameter 'vb' description in 'vpif_start_streaming' drivers/media/platform/davinci/vpif_capture.c:636: warning: No description found for parameter 'iface' drivers/media/platform/davinci/vpif_capture.c:647: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_capture.c:647: warning: No description found for parameter 'muxmode' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'chan_cfg' drivers/media/platform/davinci/vpif_capture.c:676: warning: No description found for parameter 'input_index' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'vpif_cfg' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'ch' drivers/media/platform/davinci/vpif_capture.c:712: warning: No description found for parameter 'index' drivers/media/platform/davinci/vpif_capture.c:798: warning: No description found for parameter 'std' drivers/media/platform/davinci/vpif_capture.c:798: warning: Excess function parameter 'std_id' description in 'vpif_g_std' drivers/media/platform/davinci/vpif_capture.c:940: warning: No description found for parameter 'fmt' drivers/media/platform/davinci/vpif_capture.c:940: warning: Excess function parameter 'index' description in 'vpif_enum_fmt_vid_cap' drivers/media/platform/davinci/vpif_capture.c:1750: warning: No description found for parameter 'dev' Fix them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpif_capture.c | 27 ++++++++++++++------------- drivers/media/platform/davinci/vpif_display.c | 16 ++++++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a89367ab1e06..fca4dc829f73 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -109,7 +109,7 @@ static int vpif_buffer_prepare(struct vb2_buffer *vb) * @vq: vb2_queue ptr * @nbuffers: ptr to number of buffers requested by application * @nplanes:: contains number of distinct video planes needed to hold a frame - * @sizes[]: contains the size (in bytes) of each plane. + * @sizes: contains the size (in bytes) of each plane. * @alloc_devs: ptr to allocation context * * This callback function is called when reqbuf() is called to adjust @@ -167,7 +167,7 @@ static void vpif_buffer_queue(struct vb2_buffer *vb) /** * vpif_start_streaming : Starts the DMA engine for streaming - * @vb: ptr to vb2_buffer + * @vq: ptr to vb2_buffer * @count: number of buffers */ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) @@ -629,7 +629,7 @@ static void vpif_calculate_offsets(struct channel_obj *ch) /** * vpif_get_default_field() - Get default field type based on interface - * @vpif_params - ptr to vpif params + * @iface: ptr to vpif interface */ static inline enum v4l2_field vpif_get_default_field( struct vpif_interface *iface) @@ -640,8 +640,8 @@ static inline enum v4l2_field vpif_get_default_field( /** * vpif_config_addr() - function to configure buffer address in vpif - * @ch - channel ptr - * @muxmode - channel mux mode + * @ch: channel ptr + * @muxmode: channel mux mode */ static void vpif_config_addr(struct channel_obj *ch, int muxmode) { @@ -661,9 +661,9 @@ static void vpif_config_addr(struct channel_obj *ch, int muxmode) /** * vpif_input_to_subdev() - Maps input to sub device - * @vpif_cfg - global config ptr - * @chan_cfg - channel config ptr - * @input_index - Given input index from application + * @vpif_cfg: global config ptr + * @chan_cfg: channel config ptr + * @input_index: Given input index from application * * lookup the sub device information for a given input index. * we report all the inputs to application. inputs table also @@ -699,9 +699,9 @@ static int vpif_input_to_subdev( /** * vpif_set_input() - Select an input - * @vpif_cfg - global config ptr - * @ch - channel - * @_index - Given input index from application + * @vpif_cfg: global config ptr + * @ch: channel + * @index: Given input index from application * * Select the given input. */ @@ -792,7 +792,7 @@ static int vpif_querystd(struct file *file, void *priv, v4l2_std_id *std_id) * vpif_g_std() - get STD handler * @file: file ptr * @priv: file handle - * @std_id: ptr to std id + * @std: ptr to std id */ static int vpif_g_std(struct file *file, void *priv, v4l2_std_id *std) { @@ -933,7 +933,7 @@ static int vpif_s_input(struct file *file, void *priv, unsigned int index) * vpif_enum_fmt_vid_cap() - ENUM_FMT handler * @file: file ptr * @priv: file handle - * @index: input index + * @fmt: ptr to V4L2 format descriptor */ static int vpif_enum_fmt_vid_cap(struct file *file, void *priv, struct v4l2_fmtdesc *fmt) @@ -1745,6 +1745,7 @@ static int vpif_remove(struct platform_device *device) #ifdef CONFIG_PM_SLEEP /** * vpif_suspend: vpif device suspend + * @dev: pointer to &struct device */ static int vpif_suspend(struct device *dev) { diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index ff2f75a328c9..7be636237acf 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c @@ -102,7 +102,7 @@ static int vpif_buffer_prepare(struct vb2_buffer *vb) * @vq: vb2_queue ptr * @nbuffers: ptr to number of buffers requested by application * @nplanes:: contains number of distinct video planes needed to hold a frame - * @sizes[]: contains the size (in bytes) of each plane. + * @sizes: contains the size (in bytes) of each plane. * @alloc_devs: ptr to allocation context * * This callback function is called when reqbuf() is called to adjust @@ -158,7 +158,7 @@ static void vpif_buffer_queue(struct vb2_buffer *vb) /** * vpif_start_streaming : Starts the DMA engine for streaming - * @vb: ptr to vb2_buffer + * @vq: ptr to vb2_buffer * @count: number of buffers */ static int vpif_start_streaming(struct vb2_queue *vq, unsigned int count) @@ -766,9 +766,9 @@ static int vpif_enum_output(struct file *file, void *fh, /** * vpif_output_to_subdev() - Maps output to sub device - * @vpif_cfg - global config ptr - * @chan_cfg - channel config ptr - * @index - Given output index from application + * @vpif_cfg: global config ptr + * @chan_cfg: channel config ptr + * @index: Given output index from application * * lookup the sub device information for a given output index. * we report all the output to application. output table also @@ -802,9 +802,9 @@ vpif_output_to_subdev(struct vpif_display_config *vpif_cfg, /** * vpif_set_output() - Select an output - * @vpif_cfg - global config ptr - * @ch - channel - * @index - Given output index from application + * @vpif_cfg: global config ptr + * @ch: channel + * @index: Given output index from application * * Select the given output. */ -- cgit v1.2.3 From 440568f8508528278efb9b944e8856484bbc7edd Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 04:22:37 -0500 Subject: media: venc: don't use kernel-doc for undescribed enums There are no descriptions for some enums, with produces lots of warnings: drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_LUMA3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_CHROMA3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_MV_INFO' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_BS_HEADER' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_PROB_BUF' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_INFO' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE2' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_RC_CODE3' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c:55: warning: Enum value 'VENC_VP8_VPU_WORK_BUF_MAX' not described in enum 'venc_vp8_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_RC_INFO' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_RC_CODE' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REC_LUMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REC_CHROMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REF_LUMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_REF_CHROMA' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MV_INFO_1' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MV_INFO_2' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_SKIP_FRAME' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:51: warning: Enum value 'VENC_H264_VPU_WORK_BUF_MAX' not described in enum 'venc_h264_vpu_work_buf' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_SPS' not described in enum 'venc_h264_bs_mode' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_PPS' not described in enum 'venc_h264_bs_mode' drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c:60: warning: Enum value 'H264_BS_MODE_FRAME' not described in enum 'venc_h264_bs_mode' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c | 4 ++-- drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c index 4eb3be37ba14..6cf31b366aad 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_h264_if.c @@ -34,7 +34,7 @@ static const char h264_filler_marker[] = {0x0, 0x0, 0x0, 0x1, 0xc}; #define H264_FILLER_MARKER_SIZE ARRAY_SIZE(h264_filler_marker) #define VENC_PIC_BITSTREAM_BYTE_CNT 0x0098 -/** +/* * enum venc_h264_vpu_work_buf - h264 encoder buffer index */ enum venc_h264_vpu_work_buf { @@ -50,7 +50,7 @@ enum venc_h264_vpu_work_buf { VENC_H264_VPU_WORK_BUF_MAX, }; -/** +/* * enum venc_h264_bs_mode - for bs_mode argument in h264_enc_vpu_encode */ enum venc_h264_bs_mode { diff --git a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c index acb639c4abd2..957420dd60de 100644 --- a/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c +++ b/drivers/media/platform/mtk-vcodec/venc/venc_vp8_if.c @@ -34,7 +34,7 @@ /* This ac_tag is vp8 frame tag. */ #define MAX_AC_TAG_SIZE 10 -/** +/* * enum venc_vp8_vpu_work_buf - vp8 encoder buffer index */ enum venc_vp8_vpu_work_buf { -- cgit v1.2.3 From 3b060ba0eb9a0d435b562a6f7b3cc2844a2df941 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 04:32:51 -0500 Subject: media: exynos4-is: fix kernel-doc warnings Fix those kernel-doc warnings: drivers/media/platform/exynos4-is/mipi-csis.c:229: warning: No description found for parameter 'clk_frequency' drivers/media/platform/exynos4-is/mipi-csis.c:229: warning: Excess struct member 'clock_frequency' description in 'csis_state' drivers/media/platform/exynos4-is/media-dev.c:69: warning: No description found for parameter 'p' drivers/media/platform/exynos4-is/media-dev.c:160: warning: No description found for parameter 'p' drivers/media/platform/exynos4-is/media-dev.c:160: warning: No description found for parameter 'on' drivers/media/platform/exynos4-is/media-dev.c:160: warning: Excess function parameter 'fimc' description in 'fimc_pipeline_s_power' drivers/media/platform/exynos4-is/media-dev.c:160: warning: Excess function parameter 'state' description in 'fimc_pipeline_s_power' drivers/media/platform/exynos4-is/media-dev.c:229: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:260: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:260: warning: Excess function parameter 'fimc' description in '__fimc_pipeline_close' drivers/media/platform/exynos4-is/media-dev.c:288: warning: No description found for parameter 'ep' drivers/media/platform/exynos4-is/media-dev.c:288: warning: Excess function parameter 'pipeline' description in '__fimc_pipeline_s_stream' drivers/media/platform/exynos4-is/media-dev.c:916: warning: No description found for parameter 'fmd' drivers/media/platform/exynos4-is/fimc-capture.c:155: warning: No description found for parameter 'ctx' drivers/media/platform/exynos4-is/fimc-capture.c:868: warning: No description found for parameter 'num_planes' drivers/media/platform/exynos4-is/fimc-capture.c:1108: warning: No description found for parameter 'fimc' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/exynos4-is/fimc-capture.c | 3 +++ drivers/media/platform/exynos4-is/media-dev.c | 11 +++++++---- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- 3 files changed, 11 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index 948fe01f6c96..ed9302caa004 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -146,6 +146,7 @@ static int fimc_stop_capture(struct fimc_dev *fimc, bool suspend) /** * fimc_capture_config_update - apply the camera interface configuration + * @ctx: FIMC capture context * * To be called from within the interrupt handler with fimc.slock * spinlock held. It updates the camera pixel crop, rotation and @@ -858,6 +859,7 @@ static int fimc_pipeline_try_format(struct fimc_ctx *ctx, * fimc_get_sensor_frame_desc - query the sensor for media bus frame parameters * @sensor: pointer to the sensor subdev * @plane_fmt: provides plane sizes corresponding to the frame layout entries + * @num_planes: number of planes * @try: true to set the frame parameters, false to query only * * This function is used by this driver only for compressed/blob data formats. @@ -1101,6 +1103,7 @@ static int fimc_cap_g_input(struct file *file, void *priv, unsigned int *i) /** * fimc_pipeline_validate - check for formats inconsistencies * between source and sink pad of each link + * @fimc: the FIMC device this context applies to * * Return 0 if all formats match or -EPIPE otherwise. */ diff --git a/drivers/media/platform/exynos4-is/media-dev.c b/drivers/media/platform/exynos4-is/media-dev.c index c15596b56dc9..0ef583cfc424 100644 --- a/drivers/media/platform/exynos4-is/media-dev.c +++ b/drivers/media/platform/exynos4-is/media-dev.c @@ -60,6 +60,7 @@ static void __setup_sensor_notification(struct fimc_md *fmd, /** * fimc_pipeline_prepare - update pipeline information with subdevice pointers + * @p: fimc pipeline * @me: media entity terminating the pipeline * * Caller holds the graph mutex. @@ -151,8 +152,8 @@ static int __subdev_set_power(struct v4l2_subdev *sd, int on) /** * fimc_pipeline_s_power - change power state of all pipeline subdevs - * @fimc: fimc device terminating the pipeline - * @state: true to power on, false to power off + * @p: fimc device terminating the pipeline + * @on: true to power on, false to power off * * Needs to be called with the graph mutex held. */ @@ -219,6 +220,7 @@ static int __fimc_pipeline_enable(struct exynos_media_pipeline *ep, /** * __fimc_pipeline_open - update the pipeline information, enable power * of all pipeline subdevs and the sensor clock + * @ep: fimc device terminating the pipeline * @me: media entity to start graph walk with * @prepare: true to walk the current pipeline and acquire all subdevs * @@ -252,7 +254,7 @@ static int __fimc_pipeline_open(struct exynos_media_pipeline *ep, /** * __fimc_pipeline_close - disable the sensor clock and pipeline power - * @fimc: fimc device terminating the pipeline + * @ep: fimc device terminating the pipeline * * Disable power of all subdevs and turn the external sensor clock off. */ @@ -281,7 +283,7 @@ static int __fimc_pipeline_close(struct exynos_media_pipeline *ep) /** * __fimc_pipeline_s_stream - call s_stream() on pipeline subdevs - * @pipeline: video pipeline structure + * @ep: video pipeline structure * @on: passed as the s_stream() callback argument */ static int __fimc_pipeline_s_stream(struct exynos_media_pipeline *ep, bool on) @@ -902,6 +904,7 @@ static int __fimc_md_create_fimc_is_links(struct fimc_md *fmd) /** * fimc_md_create_links - create default links between registered entities + * @fmd: fimc media device * * Parallel interface sensor entities are connected directly to FIMC capture * entities. The sensors using MIPI CSIS bus are connected through immutable diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index 560aadabcb11..cba46a656338 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -189,7 +189,7 @@ struct csis_drvdata { * @irq: requested s5p-mipi-csis irq number * @interrupt_mask: interrupt mask of the all used interrupts * @flags: the state variable for power and streaming control - * @clock_frequency: device bus clock frequency + * @clk_frequency: device bus clock frequency * @hs_settle: HS-RX settle time * @num_lanes: number of MIPI-CSI data lanes used * @max_num_lanes: maximum number of MIPI-CSI data lanes supported -- cgit v1.2.3 From 897aa67a47ac1379a479f42c4c84b828fe5f64a1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 04:08:14 -0500 Subject: media: m5mols: fix some kernel-doc markups Fix those warnings: drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'addr_num' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'addr_den' drivers/media/i2c/m5mols/m5mols_capture.c:42: warning: No description found for parameter 'val' drivers/media/i2c/m5mols/m5mols_capture.c:60: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_controls.c:134: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: No description found for parameter 'data' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: No description found for parameter 'length' drivers/media/i2c/m5mols/m5mols_core.c:124: warning: Excess function parameter 'size' description in 'm5mols_swap_byte' drivers/media/i2c/m5mols/m5mols_core.c:142: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:241: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:299: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:324: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:324: warning: No description found for parameter 'reg' drivers/media/i2c/m5mols/m5mols_core.c:357: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:357: warning: No description found for parameter 'mode' drivers/media/i2c/m5mols/m5mols_core.c:374: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:429: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:503: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:671: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:694: warning: No description found for parameter 'info' drivers/media/i2c/m5mols/m5mols_core.c:798: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:853: warning: No description found for parameter 'sd' drivers/media/i2c/m5mols/m5mols_core.c:853: warning: No description found for parameter 'on' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/m5mols/m5mols_capture.c | 5 +++++ drivers/media/i2c/m5mols/m5mols_controls.c | 1 + drivers/media/i2c/m5mols/m5mols_core.c | 20 ++++++++++++++++++-- 3 files changed, 24 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/i2c/m5mols/m5mols_capture.c b/drivers/media/i2c/m5mols/m5mols_capture.c index a0cd6dc32eb0..0fb457f57995 100644 --- a/drivers/media/i2c/m5mols/m5mols_capture.c +++ b/drivers/media/i2c/m5mols/m5mols_capture.c @@ -33,6 +33,10 @@ /** * m5mols_read_rational - I2C read of a rational number + * @sd: sub-device, as pointed by struct v4l2_subdev + * @addr_num: numerator register + * @addr_den: denominator register + * @val: place to store the division result * * Read numerator and denominator from registers @addr_num and @addr_den * respectively and return the division result in @val. @@ -53,6 +57,7 @@ static int m5mols_read_rational(struct v4l2_subdev *sd, u32 addr_num, /** * m5mols_capture_info - Gather captured image information + * @info: M-5MOLS driver data structure * * For now it gathers only EXIF information and file size. */ diff --git a/drivers/media/i2c/m5mols/m5mols_controls.c b/drivers/media/i2c/m5mols/m5mols_controls.c index c2218c0a9e6f..82eab7c2bc8c 100644 --- a/drivers/media/i2c/m5mols/m5mols_controls.c +++ b/drivers/media/i2c/m5mols/m5mols_controls.c @@ -126,6 +126,7 @@ static struct m5mols_scenemode m5mols_default_scenemode[] = { /** * m5mols_do_scenemode() - Change current scenemode + * @info: M-5MOLS driver data structure * @mode: Desired mode of the scenemode * * WARNING: The execution order is important. Do not change the order. diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index 463534d44756..12e79f9e32d5 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c @@ -114,7 +114,8 @@ static const struct m5mols_resolution m5mols_reg_res[] = { /** * m5mols_swap_byte - an byte array to integer conversion function - * @size: size in bytes of I2C packet defined in the M-5MOLS datasheet + * @data: byte array + * @length: size in bytes of I2C packet defined in the M-5MOLS datasheet * * Convert I2C data byte array with performing any required byte * reordering to assure proper values for each data type, regardless @@ -132,8 +133,9 @@ static u32 m5mols_swap_byte(u8 *data, u8 length) /** * m5mols_read - I2C read function - * @reg: combination of size, category and command for the I2C packet + * @sd: sub-device, as pointed by struct v4l2_subdev * @size: desired size of I2C packet + * @reg: combination of size, category and command for the I2C packet * @val: read value * * Returns 0 on success, or else negative errno. @@ -232,6 +234,7 @@ int m5mols_read_u32(struct v4l2_subdev *sd, u32 reg, u32 *val) /** * m5mols_write - I2C command write function + * @sd: sub-device, as pointed by struct v4l2_subdev * @reg: combination of size, category and command for the I2C packet * @val: value to write * @@ -284,6 +287,7 @@ int m5mols_write(struct v4l2_subdev *sd, u32 reg, u32 val) /** * m5mols_busy_wait - Busy waiting with I2C register polling + * @sd: sub-device, as pointed by struct v4l2_subdev * @reg: the I2C_REG() address of an 8-bit status register to check * @value: expected status register value * @mask: bit mask for the read status register value @@ -316,6 +320,8 @@ int m5mols_busy_wait(struct v4l2_subdev *sd, u32 reg, u32 value, u32 mask, /** * m5mols_enable_interrupt - Clear interrupt pending bits and unmask interrupts + * @sd: sub-device, as pointed by struct v4l2_subdev + * @reg: combination of size, category and command for the I2C packet * * Before writing desired interrupt value the INT_FACTOR register should * be read to clear pending interrupts. @@ -349,6 +355,8 @@ int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 irq_mask, u32 timeout) /** * m5mols_reg_mode - Write the mode and check busy status + * @sd: sub-device, as pointed by struct v4l2_subdev + * @mode: the required operation mode * * It always accompanies a little delay changing the M-5MOLS mode, so it is * needed checking current busy status to guarantee right mode. @@ -364,6 +372,7 @@ static int m5mols_reg_mode(struct v4l2_subdev *sd, u8 mode) /** * m5mols_set_mode - set the M-5MOLS controller mode + * @info: M-5MOLS driver data structure * @mode: the required operation mode * * The commands of M-5MOLS are grouped into specific modes. Each functionality @@ -421,6 +430,7 @@ int m5mols_set_mode(struct m5mols_info *info, u8 mode) /** * m5mols_get_version - retrieve full revisions information of M-5MOLS + * @sd: sub-device, as pointed by struct v4l2_subdev * * The version information includes revisions of hardware and firmware, * AutoFocus alghorithm version and the version string. @@ -489,6 +499,7 @@ static enum m5mols_restype __find_restype(u32 code) /** * __find_resolution - Lookup preset and type of M-5MOLS's resolution + * @sd: sub-device, as pointed by struct v4l2_subdev * @mf: pixel format to find/negotiate the resolution preset for * @type: M-5MOLS resolution type * @resolution: M-5MOLS resolution preset register value @@ -662,6 +673,7 @@ static const struct v4l2_subdev_pad_ops m5mols_pad_ops = { /** * m5mols_restore_controls - Apply current control values to the registers + * @info: M-5MOLS driver data structure * * m5mols_do_scenemode() handles all parameters for which there is yet no * individual control. It should be replaced at some point by setting each @@ -686,6 +698,7 @@ int m5mols_restore_controls(struct m5mols_info *info) /** * m5mols_start_monitor - Start the monitor mode + * @info: M-5MOLS driver data structure * * Before applying the controls setup the resolution and frame rate * in PARAMETER mode, and then switch over to MONITOR mode. @@ -789,6 +802,7 @@ int __attribute__ ((weak)) m5mols_update_fw(struct v4l2_subdev *sd, /** * m5mols_fw_start - M-5MOLS internal ARM controller initialization + * @sd: sub-device, as pointed by struct v4l2_subdev * * Execute the M-5MOLS internal ARM controller initialization sequence. * This function should be called after the supply voltage has been @@ -844,6 +858,8 @@ static int m5mols_auto_focus_stop(struct m5mols_info *info) /** * m5mols_s_power - Main sensor power control function + * @sd: sub-device, as pointed by struct v4l2_subdev + * @on: if true, powers on the device; powers off otherwise. * * To prevent breaking the lens when the sensor is powered off the Soft-Landing * algorithm is called where available. The Soft-Landing algorithm availability -- cgit v1.2.3 From 9ec2b40259f91627bf852f7708a90357e0db1870 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 05:54:29 -0500 Subject: media: sta2x11: document missing function parameters As warned: drivers/media/pci/sta2x11/sta2x11_vip.c:414: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:442: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:476: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:493: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:524: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:548: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'file' drivers/media/pci/sta2x11/sta2x11_vip.c:566: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:594: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:651: warning: No description found for parameter 'priv' drivers/media/pci/sta2x11/sta2x11_vip.c:717: warning: No description found for parameter 'priv' Most of the above are for the unused priv argument. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/sta2x11/sta2x11_vip.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers') diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index eb5a9eae7c8e..dd199bfc1d45 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c @@ -404,6 +404,7 @@ static const struct v4l2_file_operations vip_fops = { * vidioc_querycap - return capabilities of device * @file: descriptor of device * @cap: contains return values + * @priv: unused * * the capabilities of the device are returned * @@ -429,6 +430,7 @@ static int vidioc_querycap(struct file *file, void *priv, * vidioc_s_std - set video standard * @file: descriptor of device * @std: contains standard to be set + * @priv: unused * * the video standard is set * @@ -466,6 +468,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std) /** * vidioc_g_std - get video standard * @file: descriptor of device + * @priv: unused * @std: contains return values * * the current video standard is returned @@ -483,6 +486,7 @@ static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *std) /** * vidioc_querystd - get possible video standards * @file: descriptor of device + * @priv: unused * @std: contains return values * * all possible video standards are returned @@ -512,6 +516,7 @@ static int vidioc_enum_input(struct file *file, void *priv, /** * vidioc_s_input - set input line * @file: descriptor of device + * @priv: unused * @i: new input line number * * the current active input line is set @@ -538,6 +543,7 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) /** * vidioc_g_input - return input line * @file: descriptor of device + * @priv: unused * @i: returned input line number * * the current active input line is returned @@ -554,6 +560,8 @@ static int vidioc_g_input(struct file *file, void *priv, unsigned int *i) /** * vidioc_enum_fmt_vid_cap - return video capture format + * @file: descriptor of device + * @priv: unused * @f: returned format information * * returns name and format of video capture @@ -577,6 +585,7 @@ static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv, /** * vidioc_try_fmt_vid_cap - set video capture format * @file: descriptor of device + * @priv: unused * @f: new format * * new video format is set which includes width and @@ -639,6 +648,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, /** * vidioc_s_fmt_vid_cap - set current video format parameters * @file: descriptor of device + * @priv: unused * @f: returned format information * * set new capture format @@ -706,6 +716,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, /** * vidioc_g_fmt_vid_cap - get current video format parameters * @file: descriptor of device + * @priv: unused * @f: contains format information * * returns current video format parameters -- cgit v1.2.3 From 8fd87479251925dedd6c524bc592541fefde2332 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 06:00:09 -0500 Subject: media: pxa_camera: get rid of kernel_doc warnings Get rid of the following warnings: drivers/media/platform/pxa_camera.c:247: warning: No description found for parameter 'layout' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'buf' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'sg' drivers/media/platform/pxa_camera.c:867: warning: No description found for parameter 'sglen' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'vb' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'dma' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:867: warning: Excess function parameter 'cibr' description in 'pxa_init_dma_channel' drivers/media/platform/pxa_camera.c:1029: warning: No description found for parameter 'last_submitted' drivers/media/platform/pxa_camera.c:1029: warning: No description found for parameter 'last_issued' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/pxa_camera.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/pxa_camera.c b/drivers/media/platform/pxa_camera.c index 9d3f0cb1d95a..295f34ad1080 100644 --- a/drivers/media/platform/pxa_camera.c +++ b/drivers/media/platform/pxa_camera.c @@ -235,6 +235,7 @@ enum pxa_mbus_layout { * stored in memory in the following way: * @packing: Type of sample-packing, that has to be used * @order: Sample order when storing in memory + * @layout: Planes layout in memory * @bits_per_sample: How many bits the bridge has to sample */ struct pxa_mbus_pixelfmt { @@ -852,10 +853,10 @@ static void pxa_camera_dma_irq_v(void *data) /** * pxa_init_dma_channel - init dma descriptors * @pcdev: pxa camera device - * @vb: videobuffer2 buffer - * @dma: dma video buffer + * @buf: pxa camera buffer * @channel: dma channel (0 => 'Y', 1 => 'U', 2 => 'V') - * @cibr: camera Receive Buffer Register + * @sg: dma scatter list + * @sglen: dma scatter list length * * Prepares the pxa dma descriptors to transfer one camera channel. * @@ -1010,6 +1011,8 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev, /** * pxa_camera_check_link_miss - check missed DMA linking * @pcdev: camera device + * @last_submitted: an opaque DMA cookie for last submitted + * @last_issued: an opaque DMA cookie for last issued * * The DMA chaining is done with DMA running. This means a tiny temporal window * remains, where a buffer is queued on the chain, while the chain is already -- cgit v1.2.3 From ef69f8d2ff09518657c3ecaf2db8408c16549829 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 06:03:52 -0500 Subject: media: tw68: fix kernel-doc markups There are a few mistakes on the existing markups: drivers/media/pci/tw68/tw68-risc.c:32: warning: Cannot understand * @rp pointer to current risc program position on line 32 - I thought it was a doc line drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'pci' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'buf' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'sglist' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'top_offset' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'bottom_offset' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'bpl' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'padding' drivers/media/pci/tw68/tw68-risc.c:144: warning: No description found for parameter 'lines' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/tw68/tw68-risc.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) (limited to 'drivers') diff --git a/drivers/media/pci/tw68/tw68-risc.c b/drivers/media/pci/tw68/tw68-risc.c index 7439db212a69..82ff9c9494f3 100644 --- a/drivers/media/pci/tw68/tw68-risc.c +++ b/drivers/media/pci/tw68/tw68-risc.c @@ -29,14 +29,15 @@ #include "tw68.h" /** - * @rp pointer to current risc program position - * @sglist pointer to "scatter-gather list" of buffer pointers - * @offset offset to target memory buffer - * @sync_line 0 -> no sync, 1 -> odd sync, 2 -> even sync - * @bpl number of bytes per scan line - * @padding number of bytes of padding to add - * @lines number of lines in field - * @jump insert a jump at the start + * tw68_risc_field + * @rp: pointer to current risc program position + * @sglist: pointer to "scatter-gather list" of buffer pointers + * @offset: offset to target memory buffer + * @sync_line: 0 -> no sync, 1 -> odd sync, 2 -> even sync + * @bpl: number of bytes per scan line + * @padding: number of bytes of padding to add + * @lines: number of lines in field + * @jump: insert a jump at the start */ static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist, unsigned int offset, u32 sync_line, @@ -120,18 +121,18 @@ static __le32 *tw68_risc_field(__le32 *rp, struct scatterlist *sglist, * memory for the dma controller "program" and then fills in that * memory with the appropriate "instructions". * - * @pci_dev structure with info about the pci + * @pci: structure with info about the pci * slot which our device is in. - * @risc structure with info about the memory + * @buf: structure with info about the memory * used for our controller program. - * @sglist scatter-gather list entry - * @top_offset offset within the risc program area for the + * @sglist: scatter-gather list entry + * @top_offset: offset within the risc program area for the * first odd frame line - * @bottom_offset offset within the risc program area for the + * @bottom_offset: offset within the risc program area for the * first even frame line - * @bpl number of data bytes per scan line - * @padding number of extra bytes to add at end of line - * @lines number of scan lines + * @bpl: number of data bytes per scan line + * @padding: number of extra bytes to add at end of line + * @lines: number of scan lines */ int tw68_risc_buffer(struct pci_dev *pci, struct tw68_buf *buf, -- cgit v1.2.3 From 4521af781190848f4d7f499b9f946a8d86f6df4f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 08:19:13 -0500 Subject: media: ix2505v: get rid of /** comments As warned: drivers/media/dvb-frontends/ix2505v.c:24: warning: cannot understand function prototype: 'int ix2505v_debug; ' drivers/media/dvb-frontends/ix2505v.c:59: warning: No description found for parameter 'state' drivers/media/dvb-frontends/ix2505v.c:128: warning: No description found for parameter 'fe' None of the comments there are kernel-doc. So, remove them with: perl -pi -e 's,\/\*\*,/*,g' drivers/media/dvb-frontends/ix2505v.c Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/ix2505v.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-frontends/ix2505v.c b/drivers/media/dvb-frontends/ix2505v.c index 534b24fa2b95..965012ad5c59 100644 --- a/drivers/media/dvb-frontends/ix2505v.c +++ b/drivers/media/dvb-frontends/ix2505v.c @@ -1,4 +1,4 @@ -/** +/* * Driver for Sharp IX2505V (marked B0017) DVB-S silicon tuner * * Copyright (C) 2010 Malcolm Priestley @@ -36,7 +36,7 @@ struct ix2505v_state { u32 frequency; }; -/** +/* * Data read format of the Sharp IX2505V B0017 * * byte1: 1 | 1 | 0 | 0 | 0 | MA1 | MA0 | 1 @@ -99,7 +99,7 @@ static void ix2505v_release(struct dvb_frontend *fe) } -/** +/* * Data write format of the Sharp IX2505V B0017 * * byte1: 1 | 1 | 0 | 0 | 0 | 0(MA1)| 0(MA0)| 0 -- cgit v1.2.3 From d156f2935b6389ec3bd75c69c055c5ac84e14558 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 08:33:30 -0500 Subject: media: radio-si476x: fix kernel-doc markups get rid of the following warnings: drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'v4l2dev' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'ctrl_handler' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'debugfs' drivers/media/radio/radio-si476x.c:317: warning: No description found for parameter 'audmode' drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'kref' description in 'si476x_radio' drivers/media/radio/radio-si476x.c:317: warning: Excess struct member 'core_lock' description in 'si476x_radio' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/radio-si476x.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/media/radio/radio-si476x.c b/drivers/media/radio/radio-si476x.c index 271f725b17e8..540ac887a63c 100644 --- a/drivers/media/radio/radio-si476x.c +++ b/drivers/media/radio/radio-si476x.c @@ -158,7 +158,7 @@ enum si476x_ctrl_idx { }; static struct v4l2_ctrl_config si476x_ctrls[] = { - /** + /* * SI476X during its station seeking(or tuning) process uses several * parameters to detrmine if "the station" is valid: * @@ -197,7 +197,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = { .step = 2, }, - /** + /* * #V4L2_CID_SI476X_HARMONICS_COUNT -- number of harmonics * built-in power-line noise supression filter is to reject * during AM-mode operation. @@ -213,7 +213,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = { .step = 1, }, - /** + /* * #V4L2_CID_SI476X_DIVERSITY_MODE -- configuration which * two tuners working in diversity mode are to work in. * @@ -237,7 +237,7 @@ static struct v4l2_ctrl_config si476x_ctrls[] = { .max = ARRAY_SIZE(phase_diversity_modes) - 1, }, - /** + /* * #V4L2_CID_SI476X_INTERCHIP_LINK -- inter-chip link in * diversity mode indicator. Allows user to determine if two * chips working in diversity mode have established a link @@ -296,11 +296,15 @@ struct si476x_radio_ops { /** * struct si476x_radio - radio device * - * @core: Pointer to underlying core device + * @v4l2dev: Pointer to V4L2 device created by V4L2 subsystem * @videodev: Pointer to video device created by V4L2 subsystem + * @ctrl_handler: V4L2 controls handler + * @core: Pointer to underlying core device * @ops: Vtable of functions. See struct si476x_radio_ops for details - * @kref: Reference counter - * @core_lock: An r/w semaphore to brebvent the deletion of underlying + * @debugfs: pointer to &strucd dentry for debugfs + * @audmode: audio mode, as defined for the rxsubchans field + * at videodev2.h + * * core structure is the radio device is being used */ struct si476x_radio { -- cgit v1.2.3 From 7cd183696ec67a6741cf7db45eb0bce14da60767 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 08:41:06 -0500 Subject: media: s5k6a3: document some fields at struct s5k6a3 drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'clock' drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'clock_frequency' drivers/media/i2c/s5k6a3.c:68: warning: No description found for parameter 'power_count' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/s5k6a3.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/media/i2c/s5k6a3.c b/drivers/media/i2c/s5k6a3.c index 67dcca76f981..2e140272794b 100644 --- a/drivers/media/i2c/s5k6a3.c +++ b/drivers/media/i2c/s5k6a3.c @@ -53,6 +53,9 @@ enum { * @gpio_reset: GPIO connected to the sensor's reset pin * @lock: mutex protecting the structure's members below * @format: media bus format at the sensor's source pad + * @clock: pointer to &struct clk. + * @clock_frequency: clock frequency + * @power_count: stores state if device is powered */ struct s5k6a3 { struct device *dev; -- cgit v1.2.3 From 070250a1715cee2297de0d9e7e2cea58be999d37 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 08:44:41 -0500 Subject: media: s5k6aa: describe some function parameters as warned: drivers/media/i2c/s5k6aa.c:429: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:679: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:733: warning: No description found for parameter 's5k6aa' drivers/media/i2c/s5k6aa.c:733: warning: No description found for parameter 'preset' drivers/media/i2c/s5k6aa.c:787: warning: No description found for parameter 'sd' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/s5k6aa.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/media/i2c/s5k6aa.c b/drivers/media/i2c/s5k6aa.c index 9fd254a8e20d..13c10b5e2b45 100644 --- a/drivers/media/i2c/s5k6aa.c +++ b/drivers/media/i2c/s5k6aa.c @@ -421,6 +421,7 @@ static int s5k6aa_set_ahb_address(struct i2c_client *client) /** * s5k6aa_configure_pixel_clock - apply ISP main clock/PLL configuration + * @s5k6aa: pointer to &struct s5k6aa describing the device * * Configure the internal ISP PLL for the required output frequency. * Locking: called with s5k6aa.lock mutex held. @@ -669,6 +670,7 @@ static int s5k6aa_set_input_params(struct s5k6aa *s5k6aa) /** * s5k6aa_configure_video_bus - configure the video output interface + * @s5k6aa: pointer to &struct s5k6aa describing the device * @bus_type: video bus type: parallel or MIPI-CSI * @nlanes: number of MIPI lanes to be used (MIPI-CSI only) * @@ -724,6 +726,8 @@ static int s5k6aa_new_config_sync(struct i2c_client *client, int timeout, /** * s5k6aa_set_prev_config - write user preview register set + * @s5k6aa: pointer to &struct s5k6aa describing the device + * @preset: s5kaa preset to be applied * * Configure output resolution and color fromat, pixel clock * frequency range, device frame rate type and frame period range. @@ -777,6 +781,7 @@ static int s5k6aa_set_prev_config(struct s5k6aa *s5k6aa, /** * s5k6aa_initialize_isp - basic ISP MCU initialization + * @sd: pointer to V4L2 sub-device descriptor * * Configure AHB addresses for registers read/write; configure PLLs for * required output pixel clock. The ISP power supply needs to be already -- cgit v1.2.3 From b5a21f8a8555b03433f5b2aa65adfd996da469f5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 09:10:03 -0500 Subject: media: netup_unidvb: fix a bad kernel-doc markup There is a bad kernel-doc markup, producing the following warnings: drivers/media/pci/netup_unidvb/netup_unidvb_core.c:85: warning: bad line: Bits [0-7]: DMA packet size, 188 bytes drivers/media/pci/netup_unidvb/netup_unidvb_core.c:86: warning: bad line: Bits [16-23]: packets count in block, 128 packets drivers/media/pci/netup_unidvb/netup_unidvb_core.c:87: warning: bad line: Bits [24-31]: blocks count, 8 blocks drivers/media/pci/netup_unidvb/netup_unidvb_core.c:89: warning: bad line: For example, value of 375000000 equals to 3 sec Fix that, and use a list for the bits option, in order for it to be better format, if we add it to a driver's documentation file. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/pci/netup_unidvb/netup_unidvb_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c index 11829c0fa138..509d69e6ca4a 100644 --- a/drivers/media/pci/netup_unidvb/netup_unidvb_core.c +++ b/drivers/media/pci/netup_unidvb/netup_unidvb_core.c @@ -82,11 +82,11 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); * @start_addr_lo: DMA ring buffer start address, lower part * @start_addr_hi: DMA ring buffer start address, higher part * @size: DMA ring buffer size register - Bits [0-7]: DMA packet size, 188 bytes - Bits [16-23]: packets count in block, 128 packets - Bits [24-31]: blocks count, 8 blocks + * * Bits [0-7]: DMA packet size, 188 bytes + * * Bits [16-23]: packets count in block, 128 packets + * * Bits [24-31]: blocks count, 8 blocks * @timeout: DMA timeout in units of 8ns - For example, value of 375000000 equals to 3 sec + * For example, value of 375000000 equals to 3 sec * @curr_addr_lo: Current ring buffer head address, lower part * @curr_addr_hi: Current ring buffer head address, higher part * @stat_pkt_received: Statistic register, not tested -- cgit v1.2.3 From c5bb831854d7a710ca84cb9a120ac7b89b2f6d57 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 09:26:20 -0500 Subject: media: tvp514x: fix kernel-doc parameters There are some struct fields that aren't documented, and some consts whose comments start with /**, but they aren't kernel-doc annotations. So, fix it: drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'hdl' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'pad' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'format' drivers/media/i2c/tvp514x.c:127: warning: No description found for parameter 'int_seq' drivers/media/i2c/tvp514x.c:219: warning: cannot understand function prototype: 'const struct v4l2_fmtdesc tvp514x_fmt_list[] = ' drivers/media/i2c/tvp514x.c:235: warning: cannot understand function prototype: 'const struct tvp514x_std_info tvp514x_std_list[] = ' drivers/media/i2c/tvp514x.c:941: warning: No description found for parameter 'fmt' drivers/media/i2c/tvp514x.c:941: warning: Excess function parameter 'format' description in 'tvp514x_set_pad_format' drivers/media/i2c/tvp514x.c:1208: warning: cannot understand function prototype: 'const struct i2c_device_id tvp514x_id[] = ' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/tvp514x.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index ad2df998f9c5..d575b3e7e835 100644 --- a/drivers/media/i2c/tvp514x.c +++ b/drivers/media/i2c/tvp514x.c @@ -86,6 +86,7 @@ static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable); /** * struct tvp514x_decoder - TVP5146/47 decoder object * @sd: Subdevice Slave handle + * @hdl: embedded &struct v4l2_ctrl_handler * @tvp514x_regs: copy of hw's regs with preset values. * @pdata: Board specific * @ver: Chip version @@ -98,6 +99,9 @@ static int tvp514x_s_stream(struct v4l2_subdev *sd, int enable); * @std_list: Standards list * @input: Input routing at chip level * @output: Output routing at chip level + * @pad: subdev media pad associated with the decoder + * @format: media bus frame format + * @int_seq: driver's register init sequence */ struct tvp514x_decoder { struct v4l2_subdev sd; @@ -211,7 +215,7 @@ static struct tvp514x_reg tvp514x_reg_list_default[] = { {TOK_TERM, 0, 0}, }; -/** +/* * List of image formats supported by TVP5146/47 decoder * Currently we are using 8 bit mode only, but can be * extended to 10/20 bit mode. @@ -226,7 +230,7 @@ static const struct v4l2_fmtdesc tvp514x_fmt_list[] = { }, }; -/** +/* * Supported standards - * * Currently supports two standards only, need to add support for rest of the @@ -931,7 +935,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd, * tvp514x_set_pad_format() - V4L2 decoder interface handler for set pad format * @sd: pointer to standard V4L2 sub-device structure * @cfg: pad configuration - * @format: pointer to v4l2_subdev_format structure + * @fmt: pointer to v4l2_subdev_format structure * * Set pad format for the output pad */ @@ -1199,7 +1203,7 @@ static const struct tvp514x_reg tvp514xm_init_reg_seq[] = { {TOK_TERM, 0, 0}, }; -/** +/* * I2C Device Table - * * name - Name of the actual device/chip. -- cgit v1.2.3 From d714a755d5c48f21f1ffa32ac1fade65db93f34d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 09:36:39 -0500 Subject: media: vdec: fix some kernel-doc warnings Fix those warnings: drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c:69: warning: No description found for parameter 'reserved' drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c:175: warning: Excess struct member 'dev' description in 'vdec_vp8_inst' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c | 1 + drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c index b7731b18ecae..aa3ce41898bc 100644 --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_h264_if.c @@ -59,6 +59,7 @@ struct h264_fb { * @read_idx : read index * @write_idx : write index * @count : buffer count in list + * @reserved : for 8 bytes alignment */ struct h264_ring_fb_list { struct h264_fb fb_list[H264_MAX_FB_NUM]; diff --git a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c index b9fad6a48879..3e84a761db3a 100644 --- a/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c +++ b/drivers/media/platform/mtk-vcodec/vdec/vdec_vp8_if.c @@ -155,7 +155,6 @@ struct vdec_vp8_vpu_inst { * @reg_base : HW register base address * @frm_cnt : decode frame count * @ctx : V4L2 context - * @dev : platform device * @vpu : VPU instance for decoder * @vsi : VPU share information */ -- cgit v1.2.3 From 98156359596779d425ee14ff07ffc1735842bf9a Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 09:58:09 -0500 Subject: media: mtk-vpu: add description for wdt fields at struct mtk_vpu Fix those warnings: drivers/media/platform/mtk-vpu/mtk_vpu.c:223: warning: No description found for parameter 'wdt' drivers/media/platform/mtk-vpu/mtk_vpu.c:223: warning: No description found for parameter 'wdt_refcnt' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/mtk-vpu/mtk_vpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/platform/mtk-vpu/mtk_vpu.c b/drivers/media/platform/mtk-vpu/mtk_vpu.c index 853d598937f6..1ff6a93262b7 100644 --- a/drivers/media/platform/mtk-vpu/mtk_vpu.c +++ b/drivers/media/platform/mtk-vpu/mtk_vpu.c @@ -181,6 +181,7 @@ struct share_obj { * @extmem: VPU extended memory information * @reg: VPU TCM and configuration registers * @run: VPU initialization status + * @wdt: VPU watchdog workqueue * @ipi_desc: VPU IPI descriptor * @recv_buf: VPU DTCM share buffer for receiving. The * receive buffer is only accessed in interrupt context. @@ -194,7 +195,7 @@ struct share_obj { * suppose a client is using VPU to decode VP8. * If the other client wants to encode VP8, * it has to wait until VP8 decode completes. - * @wdt_refcnt WDT reference count to make sure the watchdog can be + * @wdt_refcnt: WDT reference count to make sure the watchdog can be * disabled if no other client is using VPU service * @ack_wq: The wait queue for each codec and mdp. When sleeping * processes wake up, they will check the condition -- cgit v1.2.3 From fa7871255fe4bb63bb8f4f96f0584f5a07e0936d Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 09:59:55 -0500 Subject: media: s3c-camif: add missing description at s3c_camif_find_format() Fix this warning: drivers/media/platform/s3c-camif/camif-core.c:112: warning: No description found for parameter 'vp' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/s3c-camif/camif-core.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index c4ab63986c8f..79bc0ef6bb41 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c @@ -103,6 +103,7 @@ static const struct camif_fmt camif_formats[] = { /** * s3c_camif_find_format() - lookup camif color format by fourcc or an index + * @vp: video path (DMA) description (codec/preview) * @pixelformat: fourcc to match, ignored if null * @index: index to the camif_formats array, ignored if negative */ -- cgit v1.2.3 From 5bef1c0bd53abb80613f901c4ac50131d035604f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:00:58 -0500 Subject: media: radio-wl1273: fix a parameter name at kernel-doc macro Solve those warnings: drivers/media/radio/radio-wl1273.c:1337: warning: No description found for parameter 'radio' drivers/media/radio/radio-wl1273.c:1337: warning: Excess function parameter 'core' description in 'wl1273_fm_set_tx_power' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/radio/radio-wl1273.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 903fcd5e99c0..3cbdc085c65d 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c @@ -1330,7 +1330,7 @@ static int wl1273_fm_vidioc_s_input(struct file *file, void *priv, /** * wl1273_fm_set_tx_power() - Set the transmission power value. - * @core: A pointer to the device struct. + * @radio: A pointer to the device struct. * @power: The new power value. */ static int wl1273_fm_set_tx_power(struct wl1273_device *radio, u16 power) -- cgit v1.2.3 From 69a52ad3196a98616c333194a2c1295a294e3b51 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:01:56 -0500 Subject: media: mt2063: fix some kernel-doc warnings Fix those warnings: drivers/media/tuners/mt2063.c:1413: warning: No description found for parameter 'f_ref' drivers/media/tuners/mt2063.c:1413: warning: Excess function parameter 'f_Ref' description in 'MT2063_fLO_FractionalTerm' drivers/media/tuners/mt2063.c:1476: warning: Excess function parameter 'f_Avoid' description in 'MT2063_CalcLO2Mult' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/tuners/mt2063.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/media/tuners/mt2063.c b/drivers/media/tuners/mt2063.c index 8b39d8dc97a0..5c87c5c6a455 100644 --- a/drivers/media/tuners/mt2063.c +++ b/drivers/media/tuners/mt2063.c @@ -1397,9 +1397,9 @@ static u32 MT2063_Round_fLO(u32 f_LO, u32 f_LO_Step, u32 f_ref) * risk of overflow. It accurately calculates * f_ref * num / denom to within 1 HZ with fixed math. * - * @num : Fractional portion of the multiplier + * @f_ref: SRO frequency. + * @num: Fractional portion of the multiplier * @denom: denominator portion of the ratio - * @f_Ref: SRO frequency. * * This calculation handles f_ref as two separate 14-bit fields. * Therefore, a maximum value of 2^28-1 may safely be used for f_ref. @@ -1464,8 +1464,6 @@ static u32 MT2063_CalcLO1Mult(u32 *Div, * @f_LO: desired LO frequency. * @f_LO_Step: Minimum step size for the LO (in Hz). * @f_Ref: SRO frequency. - * @f_Avoid: Range of PLL frequencies to avoid near - * integer multiples of f_Ref (in Hz). * * Returns: Recalculated LO frequency. */ -- cgit v1.2.3 From bd98f7a16d3a7c98157585ef406b727982db18cf Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:05:57 -0500 Subject: media: soc_camera: fix a kernel-doc markup Remove this warning: drivers/media/platform/soc_camera/soc_scale_crop.c:309: warning: Cannot understand * @icd - soc-camera device on line 309 - I thought it was a doc line Signed-off-by: Mauro Carvalho Chehab Acked-by: Guennadi Liakhovetski --- drivers/media/platform/soc_camera/soc_scale_crop.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/soc_camera/soc_scale_crop.c b/drivers/media/platform/soc_camera/soc_scale_crop.c index 0116097c0c0f..270ec613c27c 100644 --- a/drivers/media/platform/soc_camera/soc_scale_crop.c +++ b/drivers/media/platform/soc_camera/soc_scale_crop.c @@ -306,16 +306,17 @@ update_cache: } /** - * @icd - soc-camera device - * @rect - camera cropping window - * @subrect - part of rect, sent to the user - * @mf - in- / output camera output window - * @width - on input: max host input width - * on output: user width, mapped back to input - * @height - on input: max host input height - * on output: user height, mapped back to input - * @host_can_scale - host can scale this pixel format - * @shift - shift, used for scaling + * soc_camera_client_scale + * @icd: soc-camera device + * @rect: camera cropping window + * @subrect: part of rect, sent to the user + * @mf: in- / output camera output window + * @width: on input: max host input width; + * on output: user width, mapped back to input + * @height: on input: max host input height; + * on output: user height, mapped back to input + * @host_can_scale: host can scale this pixel format + * @shift: shift, used for scaling */ int soc_camera_client_scale(struct soc_camera_device *icd, struct v4l2_rect *rect, struct v4l2_rect *subrect, -- cgit v1.2.3 From 2afe216d3d88b729c40d83abce5b2d4b72d289c5 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:11:04 -0500 Subject: media: vsp1: add a missing kernel-doc parameter Fix this warning: drivers/media/platform/vsp1/vsp1_dl.c:87: warning: No description found for parameter 'has_chain' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/vsp1/vsp1_dl.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/platform/vsp1/vsp1_dl.c b/drivers/media/platform/vsp1/vsp1_dl.c index 8b5cbb6b7a70..4257451f1bd8 100644 --- a/drivers/media/platform/vsp1/vsp1_dl.c +++ b/drivers/media/platform/vsp1/vsp1_dl.c @@ -70,6 +70,7 @@ struct vsp1_dl_body { * @dma: DMA address for the header * @body0: first display list body * @fragments: list of extra display list bodies + * @has_chain: if true, indicates that there's a partition chain * @chain: entry in the display list partition chain */ struct vsp1_dl_list { -- cgit v1.2.3 From 538cf6437af951f84cc816d63aafeafc61eb40c1 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:15:53 -0500 Subject: media: rcar_jpu: fix two kernel-doc markups On kernel-doc, struct declarations should be declared as "struct foo". Fix the following warnings: drivers/media/platform/rcar_jpu.c:265: warning: cannot understand function prototype: 'struct jpu_q_data ' drivers/media/platform/rcar_jpu.c:281: warning: cannot understand function prototype: 'struct jpu_ctx ' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/rcar_jpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index 070bac36d766..f6092ae45912 100644 --- a/drivers/media/platform/rcar_jpu.c +++ b/drivers/media/platform/rcar_jpu.c @@ -257,7 +257,7 @@ struct jpu_fmt { }; /** - * jpu_q_data - parameters of one queue + * struct jpu_q_data - parameters of one queue * @fmtinfo: driver-specific format of this queue * @format: multiplanar format of this queue * @sequence: sequence number @@ -269,7 +269,7 @@ struct jpu_q_data { }; /** - * jpu_ctx - the device context data + * struct jpu_ctx - the device context data * @jpu: JPEG IP device for this context * @encoder: compression (encode) operation or decompression (decode) * @compr_quality: destination image quality in compression (encode) mode -- cgit v1.2.3 From ed050c21801566db25a907798fb4e189589ca8c8 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 10:17:33 -0500 Subject: media: lm3560: add a missing kernel-doc parameter Fix this warning: drivers/media/i2c/lm3560.c:69: warning: No description found for parameter 'dev' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/lm3560.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c index 251a2aaf98c3..b600e03aa94b 100644 --- a/drivers/media/i2c/lm3560.c +++ b/drivers/media/i2c/lm3560.c @@ -50,6 +50,7 @@ enum led_enable { /** * struct lm3560_flash * + * @dev: pointer to &struct device * @pdata: platform data * @regmap: reg. map for i2c * @lock: muxtex for serial access. -- cgit v1.2.3 From cba862dc7301d62f90393f2bbb181834a3125308 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 08:33:45 -0500 Subject: media: drivers: remove "/**" from non-kernel-doc comments Several comments are wrongly tagged as kernel-doc, causing those warnings: drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'irq' drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'data' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'solo_dev' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'ch' drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'qp' drivers/media/usb/pwc/pwc-dec23.c:652: warning: Cannot understand * on line 652 - I thought it was a doc line drivers/media/usb/dvb-usb/cinergyT2-fe.c:40: warning: No description found for parameter 'op' drivers/media/usb/dvb-usb/friio-fe.c:301: warning: Cannot understand * (reg, val) commad list to initialize this module. on line 301 - I thought it was a doc line drivers/media/rc/streamzap.c:201: warning: No description found for parameter 'urb' drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'intf' drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'id' drivers/media/rc/streamzap.c:464: warning: No description found for parameter 'interface' drivers/media/i2c/ov5647.c:432: warning: Cannot understand * @short Subdev core operations registration on line 432 - I thought it was a doc line drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'd' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'addr' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wbuf' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wlen' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rbuf' drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rlen' drivers/media/platform/vim2m.c:350: warning: No description found for parameter 'priv' drivers/media/dvb-frontends/tua6100.c:34: warning: cannot understand function prototype: 'struct tua6100_priv ' drivers/media/platform/sti/hva/hva-h264.c:140: warning: cannot understand function prototype: 'struct hva_h264_stereo_video_sei ' drivers/media/platform/sti/hva/hva-h264.c:150: warning: Cannot understand * @frame_width: width in pixels of the buffer containing the input frame on line 150 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:356: warning: Cannot understand * @ slice_size: slice size on line 356 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:369: warning: Cannot understand * @ bitstream_size: bitstream size on line 369 - I thought it was a doc line drivers/media/platform/sti/hva/hva-h264.c:395: warning: Cannot understand * @seq_info: sequence information buffer on line 395 - I thought it was a doc line drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fe' drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fw' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'n' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'd' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_i' drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_f' drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:83: warning: cannot understand function prototype: 'struct ttusb ' drivers/media/platform/sh_veu.c:277: warning: No description found for parameter 'priv' drivers/media/dvb-frontends/zl10036.c:33: warning: cannot understand function prototype: 'int zl10036_debug; ' drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'state' drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'frequency' drivers/media/platform/rcar_fdp1.c:1139: warning: No description found for parameter 'priv' drivers/media/platform/ti-vpe/vpe.c:933: warning: No description found for parameter 'priv' drivers/media/usb/gspca/ov519.c:36: warning: No description found for parameter 'fmt' drivers/media/usb/dvb-usb/dib0700_devices.c:3367: warning: No description found for parameter 'adap' Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/sp887x.c | 6 +++--- drivers/media/dvb-frontends/tua6100.c | 2 +- drivers/media/dvb-frontends/zl10036.c | 8 ++++---- drivers/media/i2c/ov5647.c | 4 ++-- drivers/media/pci/solo6x10/solo6x10-enc.c | 2 +- drivers/media/platform/rcar_fdp1.c | 2 +- drivers/media/platform/sh_veu.c | 2 +- drivers/media/platform/sti/hva/hva-h264.c | 18 +++++++++++++----- drivers/media/platform/ti-vpe/vpe.c | 2 +- drivers/media/platform/vim2m.c | 2 +- drivers/media/rc/st_rc.c | 6 +++--- drivers/media/rc/streamzap.c | 6 +++--- drivers/media/usb/dvb-usb/cinergyT2-fe.c | 2 +- drivers/media/usb/dvb-usb/dib0700_devices.c | 8 ++++---- drivers/media/usb/dvb-usb/friio-fe.c | 2 +- drivers/media/usb/dvb-usb/friio.c | 2 +- drivers/media/usb/gspca/ov519.c | 2 +- drivers/media/usb/pwc/pwc-dec23.c | 7 +++---- drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c | 6 +++--- 19 files changed, 48 insertions(+), 41 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-frontends/sp887x.c b/drivers/media/dvb-frontends/sp887x.c index 7c511c3cd4ca..d2c402b52c6e 100644 --- a/drivers/media/dvb-frontends/sp887x.c +++ b/drivers/media/dvb-frontends/sp887x.c @@ -57,7 +57,7 @@ static int sp887x_writereg (struct sp887x_state* state, u16 reg, u16 data) int ret; if ((ret = i2c_transfer(state->i2c, &msg, 1)) != 1) { - /** + /* * in case of soft reset we ignore ACK errors... */ if (!(reg == 0xf1a && data == 0x000 && @@ -130,7 +130,7 @@ static void sp887x_setup_agc (struct sp887x_state* state) #define BLOCKSIZE 30 #define FW_SIZE 0x4000 -/** +/* * load firmware and setup MPEG interface... */ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware *fw) @@ -279,7 +279,7 @@ static int configure_reg0xc05(struct dtv_frontend_properties *p, u16 *reg0xc05) return 0; } -/** +/* * estimates division of two 24bit numbers, * derived from the ves1820/stv0299 driver code */ diff --git a/drivers/media/dvb-frontends/tua6100.c b/drivers/media/dvb-frontends/tua6100.c index 18e6d4c5be21..1d41abd47f04 100644 --- a/drivers/media/dvb-frontends/tua6100.c +++ b/drivers/media/dvb-frontends/tua6100.c @@ -1,4 +1,4 @@ -/** +/* * Driver for Infineon tua6100 pll. * * (c) 2006 Andrew de Quincey diff --git a/drivers/media/dvb-frontends/zl10036.c b/drivers/media/dvb-frontends/zl10036.c index 062282739ce5..89dd65ae88ad 100644 --- a/drivers/media/dvb-frontends/zl10036.c +++ b/drivers/media/dvb-frontends/zl10036.c @@ -1,4 +1,4 @@ -/** +/* * Driver for Zarlink zl10036 DVB-S silicon tuner * * Copyright (C) 2006 Tino Reichardt @@ -157,7 +157,7 @@ static int zl10036_sleep(struct dvb_frontend *fe) return ret; } -/** +/* * register map of the ZL10036/ZL10038 * * reg[default] content @@ -219,7 +219,7 @@ static int zl10036_set_bandwidth(struct zl10036_state *state, u32 fbw) if (fbw <= 28820) { br = _BR_MAXIMUM; } else { - /** + /* * f(bw)=34,6MHz f(xtal)=10.111MHz * br = (10111/34600) * 63 * 1/K = 14; */ @@ -315,7 +315,7 @@ static int zl10036_set_params(struct dvb_frontend *fe) || (frequency > fe->ops.info.frequency_max)) return -EINVAL; - /** + /* * alpha = 1.35 for dvb-s * fBW = (alpha*symbolrate)/(2*0.8) * 1.35 / (2*0.8) = 27 / 32 diff --git a/drivers/media/i2c/ov5647.c b/drivers/media/i2c/ov5647.c index 34179d232a35..da39c49de503 100644 --- a/drivers/media/i2c/ov5647.c +++ b/drivers/media/i2c/ov5647.c @@ -428,8 +428,8 @@ static int ov5647_sensor_set_register(struct v4l2_subdev *sd, } #endif -/** - * @short Subdev core operations registration +/* + * Subdev core operations registration */ static const struct v4l2_subdev_core_ops ov5647_subdev_core_ops = { .s_power = ov5647_sensor_power, diff --git a/drivers/media/pci/solo6x10/solo6x10-enc.c b/drivers/media/pci/solo6x10/solo6x10-enc.c index d28211bb9674..58d6b5131dd0 100644 --- a/drivers/media/pci/solo6x10/solo6x10-enc.c +++ b/drivers/media/pci/solo6x10/solo6x10-enc.c @@ -175,7 +175,7 @@ out: return 0; } -/** +/* * Set channel Quality Profile (0-3). */ void solo_s_jpeg_qp(struct solo_dev *solo_dev, unsigned int ch, diff --git a/drivers/media/platform/rcar_fdp1.c b/drivers/media/platform/rcar_fdp1.c index 3245bc45f4a0..b13dec3081e5 100644 --- a/drivers/media/platform/rcar_fdp1.c +++ b/drivers/media/platform/rcar_fdp1.c @@ -1132,7 +1132,7 @@ static int fdp1_device_process(struct fdp1_ctx *ctx) * mem2mem callbacks */ -/** +/* * job_ready() - check whether an instance is ready to be scheduled to run */ static int fdp1_m2m_job_ready(void *priv) diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c index 15a562af13c7..dedc1b024f6f 100644 --- a/drivers/media/platform/sh_veu.c +++ b/drivers/media/platform/sh_veu.c @@ -267,7 +267,7 @@ static void sh_veu_process(struct sh_veu_dev *veu, sh_veu_reg_write(veu, VEU_EIER, 1); /* enable interrupt in VEU */ } -/** +/* * sh_veu_device_run() - prepares and starts the device * * This will be called by the framework when it decides to schedule a particular diff --git a/drivers/media/platform/sti/hva/hva-h264.c b/drivers/media/platform/sti/hva/hva-h264.c index a7e5eed17ada..17f1eb0ba957 100644 --- a/drivers/media/platform/sti/hva/hva-h264.c +++ b/drivers/media/platform/sti/hva/hva-h264.c @@ -134,7 +134,7 @@ enum hva_h264_sei_payload_type { SEI_FRAME_PACKING_ARRANGEMENT = 45 }; -/** +/* * stereo Video Info struct */ struct hva_h264_stereo_video_sei { @@ -146,7 +146,9 @@ struct hva_h264_stereo_video_sei { u8 right_view_self_contained_flag; }; -/** +/* + * struct hva_h264_td + * * @frame_width: width in pixels of the buffer containing the input frame * @frame_height: height in pixels of the buffer containing the input frame * @frame_num: the parameter to be written in the slice header @@ -352,7 +354,9 @@ struct hva_h264_td { u32 addr_brc_in_out_parameter; }; -/** +/* + * struct hva_h264_slice_po + * * @ slice_size: slice size * @ slice_start_time: start time * @ slice_stop_time: stop time @@ -365,7 +369,9 @@ struct hva_h264_slice_po { u32 slice_num; }; -/** +/* + * struct hva_h264_po + * * @ bitstream_size: bitstream size * @ dct_bitstream_size: dtc bitstream size * @ stuffing_bits: number of stuffing bits inserted by the encoder @@ -391,7 +397,9 @@ struct hva_h264_task { struct hva_h264_po po; }; -/** +/* + * struct hva_h264_ctx + * * @seq_info: sequence information buffer * @ref_frame: reference frame buffer * @rec_frame: reconstructed frame buffer diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 45bd10544189..e395aa85c8ad 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -926,7 +926,7 @@ static struct vpe_ctx *file2ctx(struct file *file) * mem2mem callbacks */ -/** +/* * job_ready() - check whether an instance is ready to be scheduled to run */ static int job_ready(void *priv) diff --git a/drivers/media/platform/vim2m.c b/drivers/media/platform/vim2m.c index 7bf9fa2f8534..065483e62db4 100644 --- a/drivers/media/platform/vim2m.c +++ b/drivers/media/platform/vim2m.c @@ -343,7 +343,7 @@ static void schedule_irq(struct vim2m_dev *dev, int msec_timeout) * mem2mem callbacks */ -/** +/* * job_ready() - check whether an instance is ready to be scheduled to run */ static int job_ready(void *priv) diff --git a/drivers/media/rc/st_rc.c b/drivers/media/rc/st_rc.c index a8e39c635f34..d2efd7b2c3bc 100644 --- a/drivers/media/rc/st_rc.c +++ b/drivers/media/rc/st_rc.c @@ -49,7 +49,7 @@ struct st_rc_device { #define IRB_RX_NOISE_SUPPR 0x5c /* noise suppression */ #define IRB_RX_POLARITY_INV 0x68 /* polarity inverter */ -/** +/* * IRQ set: Enable full FIFO 1 -> bit 3; * Enable overrun IRQ 1 -> bit 2; * Enable last symbol IRQ 1 -> bit 1: @@ -72,7 +72,7 @@ static void st_rc_send_lirc_timeout(struct rc_dev *rdev) ir_raw_event_store(rdev, &ev); } -/** +/* * RX graphical example to better understand the difference between ST IR block * output and standard definition used by LIRC (and most of the world!) * @@ -317,7 +317,7 @@ static int st_rc_probe(struct platform_device *pdev) device_init_wakeup(dev, true); dev_pm_set_wake_irq(dev, rc_dev->irq); - /** + /* * for LIRC_MODE_MODE2 or LIRC_MODE_PULSE or LIRC_MODE_RAW * lircd expects a long space first before a signal train to sync. */ diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index 4eebfcfc10f3..c9a70fda88a8 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c @@ -191,7 +191,7 @@ static void sz_push_half_space(struct streamzap_ir *sz, sz_push_full_space(sz, value & SZ_SPACE_MASK); } -/** +/* * streamzap_callback - usb IRQ handler callback * * This procedure is invoked on reception of data from @@ -321,7 +321,7 @@ out: return NULL; } -/** +/* * streamzap_probe * * Called by usb-core to associated with a candidate device @@ -450,7 +450,7 @@ free_sz: return retval; } -/** +/* * streamzap_disconnect * * Called by the usb core when the device is removed from the system. diff --git a/drivers/media/usb/dvb-usb/cinergyT2-fe.c b/drivers/media/usb/dvb-usb/cinergyT2-fe.c index f9772ad0a2a5..5a2f81311fb7 100644 --- a/drivers/media/usb/dvb-usb/cinergyT2-fe.c +++ b/drivers/media/usb/dvb-usb/cinergyT2-fe.c @@ -26,7 +26,7 @@ #include "cinergyT2.h" -/** +/* * convert linux-dvb frontend parameter set into TPS. * See ETSI ETS-300744, section 4.6.2, table 9 for details. * diff --git a/drivers/media/usb/dvb-usb/dib0700_devices.c b/drivers/media/usb/dvb-usb/dib0700_devices.c index 92098c1b78e5..366b05529915 100644 --- a/drivers/media/usb/dvb-usb/dib0700_devices.c +++ b/drivers/media/usb/dvb-usb/dib0700_devices.c @@ -1677,10 +1677,10 @@ static int dib8096_set_param_override(struct dvb_frontend *fe) return -EINVAL; } - /** Update PLL if needed ratio **/ + /* Update PLL if needed ratio */ state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, 0); - /** Get optimize PLL ratio to remove spurious **/ + /* Get optimize PLL ratio to remove spurious */ pll_ratio = dib8090_compute_pll_parameters(fe); if (pll_ratio == 17) timf = 21387946; @@ -1691,7 +1691,7 @@ static int dib8096_set_param_override(struct dvb_frontend *fe) else timf = 18179756; - /** Update ratio **/ + /* Update ratio */ state->dib8000_ops.update_pll(fe, &dib8090_pll_config_12mhz, fe->dtv_property_cache.bandwidth_hz / 1000, pll_ratio); state->dib8000_ops.ctrl_timf(fe, DEMOD_TIMF_SET, timf); @@ -3357,7 +3357,7 @@ static int novatd_sleep_override(struct dvb_frontend* fe) return state->sleep(fe); } -/** +/* * novatd_frontend_attach - Nova-TD specific attach * * Nova-TD has GPIO0, 1 and 2 for LEDs. So do not fiddle with them except for diff --git a/drivers/media/usb/dvb-usb/friio-fe.c b/drivers/media/usb/dvb-usb/friio-fe.c index 41261317bd5c..b6046e0e07f6 100644 --- a/drivers/media/usb/dvb-usb/friio-fe.c +++ b/drivers/media/usb/dvb-usb/friio-fe.c @@ -297,7 +297,7 @@ static int jdvbt90502_set_frontend(struct dvb_frontend *fe) } -/** +/* * (reg, val) commad list to initialize this module. * captured on a Windows box. */ diff --git a/drivers/media/usb/dvb-usb/friio.c b/drivers/media/usb/dvb-usb/friio.c index 62abe6c43a32..16875945e662 100644 --- a/drivers/media/usb/dvb-usb/friio.c +++ b/drivers/media/usb/dvb-usb/friio.c @@ -21,7 +21,7 @@ MODULE_PARM_DESC(debug, DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); -/** +/* * Indirect I2C access to the PLL via FE. * whole I2C protocol data to the PLL is sent via the FE's I2C register. * This is done by a control msg to the FE with the I2C data accompanied, and diff --git a/drivers/media/usb/gspca/ov519.c b/drivers/media/usb/gspca/ov519.c index f1537daf4e2e..1b30434b72ef 100644 --- a/drivers/media/usb/gspca/ov519.c +++ b/drivers/media/usb/gspca/ov519.c @@ -1,4 +1,4 @@ -/** +/* * OV519 driver * * Copyright (C) 2008-2011 Jean-François Moine diff --git a/drivers/media/usb/pwc/pwc-dec23.c b/drivers/media/usb/pwc/pwc-dec23.c index 3792fedff951..1283b3bd9800 100644 --- a/drivers/media/usb/pwc/pwc-dec23.c +++ b/drivers/media/usb/pwc/pwc-dec23.c @@ -649,11 +649,10 @@ static void DecompressBand23(struct pwc_dec23_private *pdec, } /** - * * Uncompress a pwc23 buffer. - * - * src: raw data - * dst: image output + * @pdev: pointer to pwc device's internal struct + * @src: raw data + * @dst: image output */ void pwc_dec23_decompress(struct pwc_device *pdev, const void *src, diff --git a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c index b842f367249f..a142b9dc0feb 100644 --- a/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c +++ b/drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c @@ -76,7 +76,7 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); #define TTUSB_REV_2_2 0x22 #define TTUSB_BUDGET_NAME "ttusb_stc_fw" -/** +/* * since we're casting (struct ttusb*) <-> (struct dvb_demux*) around * the dvb_demux field must be the first in struct!! */ @@ -713,7 +713,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len) } } - /** + /* * if length is valid and we reached the end: * goto next muxpack */ @@ -729,7 +729,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len) /* maximum bytes, until we know the length */ ttusb->muxpack_len = 2; - /** + /* * no muxpacks left? * return to search-sync state */ -- cgit v1.2.3 From b95b0c98f52883f9b907836f3421341af6f0145f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 12:39:19 -0500 Subject: media: dvb_frontends: fix kernel-doc macros Now, the Kernel checks for kernel_doc format issues. Weird enough, it didn't get any of those troubles. Shssst! Well, let's fix it, as a preventive way to avoid having hundreds of new warnings on some next Linux version. Tested by adding all files under dvb-frontends that have "/**" on them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h | 12 +- drivers/media/dvb-frontends/drx39xyj/drx_driver.h | 878 +++++++++++----------- drivers/media/dvb-frontends/drx39xyj/drxj.h | 220 +++--- drivers/media/dvb-frontends/drxk.h | 5 +- drivers/media/dvb-frontends/dvb-pll.h | 11 +- drivers/media/dvb-frontends/helene.h | 1 + drivers/media/dvb-frontends/ix2505v.h | 17 +- drivers/media/dvb-frontends/l64781.c | 2 +- drivers/media/dvb-frontends/mn88472.h | 16 +- drivers/media/dvb-frontends/rtl2832_sdr.h | 6 +- drivers/media/dvb-frontends/stb6000.h | 9 +- drivers/media/dvb-frontends/stv0299.c | 2 +- drivers/media/dvb-frontends/tda826x.h | 11 +- drivers/media/dvb-frontends/tua6100.h | 2 +- drivers/media/dvb-frontends/zd1301_demod.h | 7 +- drivers/media/dvb-frontends/zl10036.h | 16 +- 16 files changed, 607 insertions(+), 608 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h b/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h index 5b5421f70388..2b3af247a1f1 100644 --- a/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h +++ b/drivers/media/dvb-frontends/drx39xyj/bsp_i2c.h @@ -52,7 +52,7 @@ struct i2c_device_addr { }; -/** +/* * \def IS_I2C_10BIT( addr ) * \brief Determine if I2C address 'addr' is a 10 bits address or not. * \param addr The I2C address. @@ -67,7 +67,7 @@ struct i2c_device_addr { Exported FUNCTIONS ------------------------------------------------------------------------------*/ -/** +/* * \fn drxbsp_i2c_init() * \brief Initialize I2C communication module. * \return drx_status_t Return status. @@ -76,7 +76,7 @@ Exported FUNCTIONS */ drx_status_t drxbsp_i2c_init(void); -/** +/* * \fn drxbsp_i2c_term() * \brief Terminate I2C communication module. * \return drx_status_t Return status. @@ -85,7 +85,7 @@ Exported FUNCTIONS */ drx_status_t drxbsp_i2c_term(void); -/** +/* * \fn drx_status_t drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr, * u16 w_count, * u8 *wData, @@ -121,7 +121,7 @@ Exported FUNCTIONS struct i2c_device_addr *r_dev_addr, u16 r_count, u8 *r_data); -/** +/* * \fn drxbsp_i2c_error_text() * \brief Returns a human readable error. * Counter part of numerical drx_i2c_error_g. @@ -130,7 +130,7 @@ Exported FUNCTIONS */ char *drxbsp_i2c_error_text(void); -/** +/* * \var drx_i2c_error_g; * \brief I2C specific error codes, platform dependent. */ diff --git a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h index cd69e187ba7a..855685b6b386 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drx_driver.h +++ b/drivers/media/dvb-frontends/drx39xyj/drx_driver.h @@ -46,7 +46,7 @@ struct i2c_device_addr { void *user_data; /* User data pointer */ }; -/** +/* * \def IS_I2C_10BIT( addr ) * \brief Determine if I2C address 'addr' is a 10 bits address or not. * \param addr The I2C address. @@ -61,7 +61,7 @@ struct i2c_device_addr { Exported FUNCTIONS ------------------------------------------------------------------------------*/ -/** +/* * \fn drxbsp_i2c_init() * \brief Initialize I2C communication module. * \return int Return status. @@ -70,7 +70,7 @@ Exported FUNCTIONS */ int drxbsp_i2c_init(void); -/** +/* * \fn drxbsp_i2c_term() * \brief Terminate I2C communication module. * \return int Return status. @@ -79,7 +79,7 @@ int drxbsp_i2c_init(void); */ int drxbsp_i2c_term(void); -/** +/* * \fn int drxbsp_i2c_write_read( struct i2c_device_addr *w_dev_addr, * u16 w_count, * u8 * wData, @@ -115,7 +115,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr, struct i2c_device_addr *r_dev_addr, u16 r_count, u8 *r_data); -/** +/* * \fn drxbsp_i2c_error_text() * \brief Returns a human readable error. * Counter part of numerical drx_i2c_error_g. @@ -124,7 +124,7 @@ int drxbsp_i2c_write_read(struct i2c_device_addr *w_dev_addr, */ char *drxbsp_i2c_error_text(void); -/** +/* * \var drx_i2c_error_g; * \brief I2C specific error codes, platform dependent. */ @@ -241,13 +241,13 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, struct i2c_device_addr *r_dev_addr, u16 r_count, u8 *r_data); -/************** +/************* * * This section configures the DRX Data Access Protocols (DAPs). * **************/ -/** +/* * \def DRXDAP_SINGLE_MASTER * \brief Enable I2C single or I2C multimaster mode on host. * @@ -262,7 +262,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, #define DRXDAP_SINGLE_MASTER 1 #endif -/** +/* * \def DRXDAP_MAX_WCHUNKSIZE * \brief Defines maximum chunksize of an i2c write action by host. * @@ -282,7 +282,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, #define DRXDAP_MAX_WCHUNKSIZE 60 #endif -/** +/* * \def DRXDAP_MAX_RCHUNKSIZE * \brief Defines maximum chunksize of an i2c read action by host. * @@ -297,13 +297,13 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, #define DRXDAP_MAX_RCHUNKSIZE 60 #endif -/************** +/************* * * This section describes drxdriver defines. * **************/ -/** +/* * \def DRX_UNKNOWN * \brief Generic UNKNOWN value for DRX enumerated types. * @@ -313,7 +313,7 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, #define DRX_UNKNOWN (254) #endif -/** +/* * \def DRX_AUTO * \brief Generic AUTO value for DRX enumerated types. * @@ -324,104 +324,104 @@ int drxbsp_tuner_default_i2c_write_read(struct tuner_instance *tuner, #define DRX_AUTO (255) #endif -/************** +/************* * * This section describes flag definitions for the device capbilities. * **************/ -/** +/* * \brief LNA capability flag * * Device has a Low Noise Amplifier * */ #define DRX_CAPABILITY_HAS_LNA (1UL << 0) -/** +/* * \brief OOB-RX capability flag * * Device has OOB-RX * */ #define DRX_CAPABILITY_HAS_OOBRX (1UL << 1) -/** +/* * \brief ATV capability flag * * Device has ATV * */ #define DRX_CAPABILITY_HAS_ATV (1UL << 2) -/** +/* * \brief DVB-T capability flag * * Device has DVB-T * */ #define DRX_CAPABILITY_HAS_DVBT (1UL << 3) -/** +/* * \brief ITU-B capability flag * * Device has ITU-B * */ #define DRX_CAPABILITY_HAS_ITUB (1UL << 4) -/** +/* * \brief Audio capability flag * * Device has Audio * */ #define DRX_CAPABILITY_HAS_AUD (1UL << 5) -/** +/* * \brief SAW switch capability flag * * Device has SAW switch * */ #define DRX_CAPABILITY_HAS_SAWSW (1UL << 6) -/** +/* * \brief GPIO1 capability flag * * Device has GPIO1 * */ #define DRX_CAPABILITY_HAS_GPIO1 (1UL << 7) -/** +/* * \brief GPIO2 capability flag * * Device has GPIO2 * */ #define DRX_CAPABILITY_HAS_GPIO2 (1UL << 8) -/** +/* * \brief IRQN capability flag * * Device has IRQN * */ #define DRX_CAPABILITY_HAS_IRQN (1UL << 9) -/** +/* * \brief 8VSB capability flag * * Device has 8VSB * */ #define DRX_CAPABILITY_HAS_8VSB (1UL << 10) -/** +/* * \brief SMA-TX capability flag * * Device has SMATX * */ #define DRX_CAPABILITY_HAS_SMATX (1UL << 11) -/** +/* * \brief SMA-RX capability flag * * Device has SMARX * */ #define DRX_CAPABILITY_HAS_SMARX (1UL << 12) -/** +/* * \brief ITU-A/C capability flag * * Device has ITU-A/C @@ -439,7 +439,7 @@ MACROS DRX_VERSIONSTRING_HELP(PATCH) #define DRX_VERSIONSTRING_HELP(NUM) #NUM -/** +/* * \brief Macro to create byte array elements from 16 bit integers. * This macro is used to create byte arrays for block writes. * Block writes speed up I2C traffic between host and demod. @@ -449,7 +449,7 @@ MACROS #define DRX_16TO8(x) ((u8) (((u16)x) & 0xFF)), \ ((u8)((((u16)x)>>8)&0xFF)) -/** +/* * \brief Macro to convert 16 bit register value to a s32 */ #define DRX_U16TODRXFREQ(x) ((x & 0x8000) ? \ @@ -461,191 +461,191 @@ MACROS ENUM -------------------------------------------------------------------------*/ -/** +/* * \enum enum drx_standard * \brief Modulation standards. */ enum drx_standard { - DRX_STANDARD_DVBT = 0, /**< Terrestrial DVB-T. */ - DRX_STANDARD_8VSB, /**< Terrestrial 8VSB. */ - DRX_STANDARD_NTSC, /**< Terrestrial\Cable analog NTSC. */ + DRX_STANDARD_DVBT = 0, /*< Terrestrial DVB-T. */ + DRX_STANDARD_8VSB, /*< Terrestrial 8VSB. */ + DRX_STANDARD_NTSC, /*< Terrestrial\Cable analog NTSC. */ DRX_STANDARD_PAL_SECAM_BG, - /**< Terrestrial analog PAL/SECAM B/G */ + /*< Terrestrial analog PAL/SECAM B/G */ DRX_STANDARD_PAL_SECAM_DK, - /**< Terrestrial analog PAL/SECAM D/K */ + /*< Terrestrial analog PAL/SECAM D/K */ DRX_STANDARD_PAL_SECAM_I, - /**< Terrestrial analog PAL/SECAM I */ + /*< Terrestrial analog PAL/SECAM I */ DRX_STANDARD_PAL_SECAM_L, - /**< Terrestrial analog PAL/SECAM L + /*< Terrestrial analog PAL/SECAM L with negative modulation */ DRX_STANDARD_PAL_SECAM_LP, - /**< Terrestrial analog PAL/SECAM L + /*< Terrestrial analog PAL/SECAM L with positive modulation */ - DRX_STANDARD_ITU_A, /**< Cable ITU ANNEX A. */ - DRX_STANDARD_ITU_B, /**< Cable ITU ANNEX B. */ - DRX_STANDARD_ITU_C, /**< Cable ITU ANNEX C. */ - DRX_STANDARD_ITU_D, /**< Cable ITU ANNEX D. */ - DRX_STANDARD_FM, /**< Terrestrial\Cable FM radio */ - DRX_STANDARD_DTMB, /**< Terrestrial DTMB standard (China)*/ + DRX_STANDARD_ITU_A, /*< Cable ITU ANNEX A. */ + DRX_STANDARD_ITU_B, /*< Cable ITU ANNEX B. */ + DRX_STANDARD_ITU_C, /*< Cable ITU ANNEX C. */ + DRX_STANDARD_ITU_D, /*< Cable ITU ANNEX D. */ + DRX_STANDARD_FM, /*< Terrestrial\Cable FM radio */ + DRX_STANDARD_DTMB, /*< Terrestrial DTMB standard (China)*/ DRX_STANDARD_UNKNOWN = DRX_UNKNOWN, - /**< Standard unknown. */ + /*< Standard unknown. */ DRX_STANDARD_AUTO = DRX_AUTO - /**< Autodetect standard. */ + /*< Autodetect standard. */ }; -/** +/* * \enum enum drx_standard * \brief Modulation sub-standards. */ enum drx_substandard { - DRX_SUBSTANDARD_MAIN = 0, /**< Main subvariant of standard */ + DRX_SUBSTANDARD_MAIN = 0, /*< Main subvariant of standard */ DRX_SUBSTANDARD_ATV_BG_SCANDINAVIA, DRX_SUBSTANDARD_ATV_DK_POLAND, DRX_SUBSTANDARD_ATV_DK_CHINA, DRX_SUBSTANDARD_UNKNOWN = DRX_UNKNOWN, - /**< Sub-standard unknown. */ + /*< Sub-standard unknown. */ DRX_SUBSTANDARD_AUTO = DRX_AUTO - /**< Auto (default) sub-standard */ + /*< Auto (default) sub-standard */ }; -/** +/* * \enum enum drx_bandwidth * \brief Channel bandwidth or channel spacing. */ enum drx_bandwidth { - DRX_BANDWIDTH_8MHZ = 0, /**< Bandwidth 8 MHz. */ - DRX_BANDWIDTH_7MHZ, /**< Bandwidth 7 MHz. */ - DRX_BANDWIDTH_6MHZ, /**< Bandwidth 6 MHz. */ + DRX_BANDWIDTH_8MHZ = 0, /*< Bandwidth 8 MHz. */ + DRX_BANDWIDTH_7MHZ, /*< Bandwidth 7 MHz. */ + DRX_BANDWIDTH_6MHZ, /*< Bandwidth 6 MHz. */ DRX_BANDWIDTH_UNKNOWN = DRX_UNKNOWN, - /**< Bandwidth unknown. */ + /*< Bandwidth unknown. */ DRX_BANDWIDTH_AUTO = DRX_AUTO - /**< Auto Set Bandwidth */ + /*< Auto Set Bandwidth */ }; -/** +/* * \enum enum drx_mirror * \brief Indicate if channel spectrum is mirrored or not. */ enum drx_mirror { - DRX_MIRROR_NO = 0, /**< Spectrum is not mirrored. */ - DRX_MIRROR_YES, /**< Spectrum is mirrored. */ + DRX_MIRROR_NO = 0, /*< Spectrum is not mirrored. */ + DRX_MIRROR_YES, /*< Spectrum is mirrored. */ DRX_MIRROR_UNKNOWN = DRX_UNKNOWN, - /**< Unknown if spectrum is mirrored. */ + /*< Unknown if spectrum is mirrored. */ DRX_MIRROR_AUTO = DRX_AUTO - /**< Autodetect if spectrum is mirrored. */ + /*< Autodetect if spectrum is mirrored. */ }; -/** +/* * \enum enum drx_modulation * \brief Constellation type of the channel. */ enum drx_modulation { - DRX_CONSTELLATION_BPSK = 0, /**< Modulation is BPSK. */ - DRX_CONSTELLATION_QPSK, /**< Constellation is QPSK. */ - DRX_CONSTELLATION_PSK8, /**< Constellation is PSK8. */ - DRX_CONSTELLATION_QAM16, /**< Constellation is QAM16. */ - DRX_CONSTELLATION_QAM32, /**< Constellation is QAM32. */ - DRX_CONSTELLATION_QAM64, /**< Constellation is QAM64. */ - DRX_CONSTELLATION_QAM128, /**< Constellation is QAM128. */ - DRX_CONSTELLATION_QAM256, /**< Constellation is QAM256. */ - DRX_CONSTELLATION_QAM512, /**< Constellation is QAM512. */ - DRX_CONSTELLATION_QAM1024, /**< Constellation is QAM1024. */ - DRX_CONSTELLATION_QPSK_NR, /**< Constellation is QPSK_NR */ + DRX_CONSTELLATION_BPSK = 0, /*< Modulation is BPSK. */ + DRX_CONSTELLATION_QPSK, /*< Constellation is QPSK. */ + DRX_CONSTELLATION_PSK8, /*< Constellation is PSK8. */ + DRX_CONSTELLATION_QAM16, /*< Constellation is QAM16. */ + DRX_CONSTELLATION_QAM32, /*< Constellation is QAM32. */ + DRX_CONSTELLATION_QAM64, /*< Constellation is QAM64. */ + DRX_CONSTELLATION_QAM128, /*< Constellation is QAM128. */ + DRX_CONSTELLATION_QAM256, /*< Constellation is QAM256. */ + DRX_CONSTELLATION_QAM512, /*< Constellation is QAM512. */ + DRX_CONSTELLATION_QAM1024, /*< Constellation is QAM1024. */ + DRX_CONSTELLATION_QPSK_NR, /*< Constellation is QPSK_NR */ DRX_CONSTELLATION_UNKNOWN = DRX_UNKNOWN, - /**< Constellation unknown. */ + /*< Constellation unknown. */ DRX_CONSTELLATION_AUTO = DRX_AUTO - /**< Autodetect constellation. */ + /*< Autodetect constellation. */ }; -/** +/* * \enum enum drx_hierarchy * \brief Hierarchy of the channel. */ enum drx_hierarchy { - DRX_HIERARCHY_NONE = 0, /**< None hierarchical channel. */ - DRX_HIERARCHY_ALPHA1, /**< Hierarchical channel, alpha=1. */ - DRX_HIERARCHY_ALPHA2, /**< Hierarchical channel, alpha=2. */ - DRX_HIERARCHY_ALPHA4, /**< Hierarchical channel, alpha=4. */ + DRX_HIERARCHY_NONE = 0, /*< None hierarchical channel. */ + DRX_HIERARCHY_ALPHA1, /*< Hierarchical channel, alpha=1. */ + DRX_HIERARCHY_ALPHA2, /*< Hierarchical channel, alpha=2. */ + DRX_HIERARCHY_ALPHA4, /*< Hierarchical channel, alpha=4. */ DRX_HIERARCHY_UNKNOWN = DRX_UNKNOWN, - /**< Hierarchy unknown. */ + /*< Hierarchy unknown. */ DRX_HIERARCHY_AUTO = DRX_AUTO - /**< Autodetect hierarchy. */ + /*< Autodetect hierarchy. */ }; -/** +/* * \enum enum drx_priority * \brief Channel priority in case of hierarchical transmission. */ enum drx_priority { - DRX_PRIORITY_LOW = 0, /**< Low priority channel. */ - DRX_PRIORITY_HIGH, /**< High priority channel. */ + DRX_PRIORITY_LOW = 0, /*< Low priority channel. */ + DRX_PRIORITY_HIGH, /*< High priority channel. */ DRX_PRIORITY_UNKNOWN = DRX_UNKNOWN - /**< Priority unknown. */ + /*< Priority unknown. */ }; -/** +/* * \enum enum drx_coderate * \brief Channel priority in case of hierarchical transmission. */ enum drx_coderate { - DRX_CODERATE_1DIV2 = 0, /**< Code rate 1/2nd. */ - DRX_CODERATE_2DIV3, /**< Code rate 2/3nd. */ - DRX_CODERATE_3DIV4, /**< Code rate 3/4nd. */ - DRX_CODERATE_5DIV6, /**< Code rate 5/6nd. */ - DRX_CODERATE_7DIV8, /**< Code rate 7/8nd. */ + DRX_CODERATE_1DIV2 = 0, /*< Code rate 1/2nd. */ + DRX_CODERATE_2DIV3, /*< Code rate 2/3nd. */ + DRX_CODERATE_3DIV4, /*< Code rate 3/4nd. */ + DRX_CODERATE_5DIV6, /*< Code rate 5/6nd. */ + DRX_CODERATE_7DIV8, /*< Code rate 7/8nd. */ DRX_CODERATE_UNKNOWN = DRX_UNKNOWN, - /**< Code rate unknown. */ + /*< Code rate unknown. */ DRX_CODERATE_AUTO = DRX_AUTO - /**< Autodetect code rate. */ + /*< Autodetect code rate. */ }; -/** +/* * \enum enum drx_guard * \brief Guard interval of a channel. */ enum drx_guard { - DRX_GUARD_1DIV32 = 0, /**< Guard interval 1/32nd. */ - DRX_GUARD_1DIV16, /**< Guard interval 1/16th. */ - DRX_GUARD_1DIV8, /**< Guard interval 1/8th. */ - DRX_GUARD_1DIV4, /**< Guard interval 1/4th. */ + DRX_GUARD_1DIV32 = 0, /*< Guard interval 1/32nd. */ + DRX_GUARD_1DIV16, /*< Guard interval 1/16th. */ + DRX_GUARD_1DIV8, /*< Guard interval 1/8th. */ + DRX_GUARD_1DIV4, /*< Guard interval 1/4th. */ DRX_GUARD_UNKNOWN = DRX_UNKNOWN, - /**< Guard interval unknown. */ + /*< Guard interval unknown. */ DRX_GUARD_AUTO = DRX_AUTO - /**< Autodetect guard interval. */ + /*< Autodetect guard interval. */ }; -/** +/* * \enum enum drx_fft_mode * \brief FFT mode. */ enum drx_fft_mode { - DRX_FFTMODE_2K = 0, /**< 2K FFT mode. */ - DRX_FFTMODE_4K, /**< 4K FFT mode. */ - DRX_FFTMODE_8K, /**< 8K FFT mode. */ + DRX_FFTMODE_2K = 0, /*< 2K FFT mode. */ + DRX_FFTMODE_4K, /*< 4K FFT mode. */ + DRX_FFTMODE_8K, /*< 8K FFT mode. */ DRX_FFTMODE_UNKNOWN = DRX_UNKNOWN, - /**< FFT mode unknown. */ + /*< FFT mode unknown. */ DRX_FFTMODE_AUTO = DRX_AUTO - /**< Autodetect FFT mode. */ + /*< Autodetect FFT mode. */ }; -/** +/* * \enum enum drx_classification * \brief Channel classification. */ enum drx_classification { - DRX_CLASSIFICATION_GAUSS = 0, /**< Gaussion noise. */ - DRX_CLASSIFICATION_HVY_GAUSS, /**< Heavy Gaussion noise. */ - DRX_CLASSIFICATION_COCHANNEL, /**< Co-channel. */ - DRX_CLASSIFICATION_STATIC, /**< Static echo. */ - DRX_CLASSIFICATION_MOVING, /**< Moving echo. */ - DRX_CLASSIFICATION_ZERODB, /**< Zero dB echo. */ + DRX_CLASSIFICATION_GAUSS = 0, /*< Gaussion noise. */ + DRX_CLASSIFICATION_HVY_GAUSS, /*< Heavy Gaussion noise. */ + DRX_CLASSIFICATION_COCHANNEL, /*< Co-channel. */ + DRX_CLASSIFICATION_STATIC, /*< Static echo. */ + DRX_CLASSIFICATION_MOVING, /*< Moving echo. */ + DRX_CLASSIFICATION_ZERODB, /*< Zero dB echo. */ DRX_CLASSIFICATION_UNKNOWN = DRX_UNKNOWN, - /**< Unknown classification */ + /*< Unknown classification */ DRX_CLASSIFICATION_AUTO = DRX_AUTO - /**< Autodetect classification. */ + /*< Autodetect classification. */ }; -/** +/* * /enum enum drx_interleave_mode * /brief Interleave modes */ @@ -673,80 +673,80 @@ enum drx_interleave_mode { DRX_INTERLEAVEMODE_B52_M48, DRX_INTERLEAVEMODE_B52_M0, DRX_INTERLEAVEMODE_UNKNOWN = DRX_UNKNOWN, - /**< Unknown interleave mode */ + /*< Unknown interleave mode */ DRX_INTERLEAVEMODE_AUTO = DRX_AUTO - /**< Autodetect interleave mode */ + /*< Autodetect interleave mode */ }; -/** +/* * \enum enum drx_carrier_mode * \brief Channel Carrier Mode. */ enum drx_carrier_mode { - DRX_CARRIER_MULTI = 0, /**< Multi carrier mode */ - DRX_CARRIER_SINGLE, /**< Single carrier mode */ + DRX_CARRIER_MULTI = 0, /*< Multi carrier mode */ + DRX_CARRIER_SINGLE, /*< Single carrier mode */ DRX_CARRIER_UNKNOWN = DRX_UNKNOWN, - /**< Carrier mode unknown. */ - DRX_CARRIER_AUTO = DRX_AUTO /**< Autodetect carrier mode */ + /*< Carrier mode unknown. */ + DRX_CARRIER_AUTO = DRX_AUTO /*< Autodetect carrier mode */ }; -/** +/* * \enum enum drx_frame_mode * \brief Channel Frame Mode. */ enum drx_frame_mode { - DRX_FRAMEMODE_420 = 0, /**< 420 with variable PN */ - DRX_FRAMEMODE_595, /**< 595 */ - DRX_FRAMEMODE_945, /**< 945 with variable PN */ + DRX_FRAMEMODE_420 = 0, /*< 420 with variable PN */ + DRX_FRAMEMODE_595, /*< 595 */ + DRX_FRAMEMODE_945, /*< 945 with variable PN */ DRX_FRAMEMODE_420_FIXED_PN, - /**< 420 with fixed PN */ + /*< 420 with fixed PN */ DRX_FRAMEMODE_945_FIXED_PN, - /**< 945 with fixed PN */ + /*< 945 with fixed PN */ DRX_FRAMEMODE_UNKNOWN = DRX_UNKNOWN, - /**< Frame mode unknown. */ + /*< Frame mode unknown. */ DRX_FRAMEMODE_AUTO = DRX_AUTO - /**< Autodetect frame mode */ + /*< Autodetect frame mode */ }; -/** +/* * \enum enum drx_tps_frame * \brief Frame number in current super-frame. */ enum drx_tps_frame { - DRX_TPS_FRAME1 = 0, /**< TPS frame 1. */ - DRX_TPS_FRAME2, /**< TPS frame 2. */ - DRX_TPS_FRAME3, /**< TPS frame 3. */ - DRX_TPS_FRAME4, /**< TPS frame 4. */ + DRX_TPS_FRAME1 = 0, /*< TPS frame 1. */ + DRX_TPS_FRAME2, /*< TPS frame 2. */ + DRX_TPS_FRAME3, /*< TPS frame 3. */ + DRX_TPS_FRAME4, /*< TPS frame 4. */ DRX_TPS_FRAME_UNKNOWN = DRX_UNKNOWN - /**< TPS frame unknown. */ + /*< TPS frame unknown. */ }; -/** +/* * \enum enum drx_ldpc * \brief TPS LDPC . */ enum drx_ldpc { - DRX_LDPC_0_4 = 0, /**< LDPC 0.4 */ - DRX_LDPC_0_6, /**< LDPC 0.6 */ - DRX_LDPC_0_8, /**< LDPC 0.8 */ + DRX_LDPC_0_4 = 0, /*< LDPC 0.4 */ + DRX_LDPC_0_6, /*< LDPC 0.6 */ + DRX_LDPC_0_8, /*< LDPC 0.8 */ DRX_LDPC_UNKNOWN = DRX_UNKNOWN, - /**< LDPC unknown. */ - DRX_LDPC_AUTO = DRX_AUTO /**< Autodetect LDPC */ + /*< LDPC unknown. */ + DRX_LDPC_AUTO = DRX_AUTO /*< Autodetect LDPC */ }; -/** +/* * \enum enum drx_pilot_mode * \brief Pilot modes in DTMB. */ enum drx_pilot_mode { - DRX_PILOT_ON = 0, /**< Pilot On */ - DRX_PILOT_OFF, /**< Pilot Off */ + DRX_PILOT_ON = 0, /*< Pilot On */ + DRX_PILOT_OFF, /*< Pilot Off */ DRX_PILOT_UNKNOWN = DRX_UNKNOWN, - /**< Pilot unknown. */ - DRX_PILOT_AUTO = DRX_AUTO /**< Autodetect Pilot */ + /*< Pilot unknown. */ + DRX_PILOT_AUTO = DRX_AUTO /*< Autodetect Pilot */ }; -/** +/* * enum drxu_code_action - indicate if firmware has to be uploaded or verified. * @UCODE_UPLOAD: Upload the microcode image to device * @UCODE_VERIFY: Compare microcode image with code on device @@ -756,7 +756,7 @@ enum drxu_code_action { UCODE_VERIFY }; -/** +/* * \enum enum drx_lock_status * \brief Used to reflect current lock status of demodulator. * * The generic lock states have device dependent semantics. @@ -801,7 +801,7 @@ enum drx_lock_status { DRX_LOCKED }; -/** +/* * \enum enum drx_uio* \brief Used to address a User IO (UIO). */ enum drx_uio { @@ -840,7 +840,7 @@ enum drx_uio { DRX_UIO_MAX = DRX_UIO32 }; -/** +/* * \enum enum drxuio_mode * \brief Used to configure the modus oprandi of a UIO. * * DRX_UIO_MODE_FIRMWARE is an old uio mode. @@ -850,37 +850,37 @@ enum drx_uio { */ enum drxuio_mode { DRX_UIO_MODE_DISABLE = 0x01, - /**< not used, pin is configured as input */ + /*< not used, pin is configured as input */ DRX_UIO_MODE_READWRITE = 0x02, - /**< used for read/write by application */ + /*< used for read/write by application */ DRX_UIO_MODE_FIRMWARE = 0x04, - /**< controlled by firmware, function 0 */ + /*< controlled by firmware, function 0 */ DRX_UIO_MODE_FIRMWARE0 = DRX_UIO_MODE_FIRMWARE, - /**< same as above */ + /*< same as above */ DRX_UIO_MODE_FIRMWARE1 = 0x08, - /**< controlled by firmware, function 1 */ + /*< controlled by firmware, function 1 */ DRX_UIO_MODE_FIRMWARE2 = 0x10, - /**< controlled by firmware, function 2 */ + /*< controlled by firmware, function 2 */ DRX_UIO_MODE_FIRMWARE3 = 0x20, - /**< controlled by firmware, function 3 */ + /*< controlled by firmware, function 3 */ DRX_UIO_MODE_FIRMWARE4 = 0x40, - /**< controlled by firmware, function 4 */ + /*< controlled by firmware, function 4 */ DRX_UIO_MODE_FIRMWARE5 = 0x80 - /**< controlled by firmware, function 5 */ + /*< controlled by firmware, function 5 */ }; -/** +/* * \enum enum drxoob_downstream_standard * \brief Used to select OOB standard. * * Based on ANSI 55-1 and 55-2 */ enum drxoob_downstream_standard { DRX_OOB_MODE_A = 0, - /**< ANSI 55-1 */ + /*< ANSI 55-1 */ DRX_OOB_MODE_B_GRADE_A, - /**< ANSI 55-2 A */ + /*< ANSI 55-2 A */ DRX_OOB_MODE_B_GRADE_B - /**< ANSI 55-2 B */ + /*< ANSI 55-2 B */ }; /*------------------------------------------------------------------------- @@ -924,7 +924,7 @@ STRUCTS /*============================================================================*/ /*============================================================================*/ -/** +/* * struct drxu_code_info Parameters for microcode upload and verfiy. * * @mc_file: microcode file name @@ -935,7 +935,7 @@ struct drxu_code_info { char *mc_file; }; -/** +/* * \struct drx_mc_version_rec_t * \brief Microcode version record * Version numbers are stored in BCD format, as usual: @@ -963,7 +963,7 @@ struct drx_mc_version_rec { /*========================================*/ -/** +/* * \struct drx_filter_info_t * \brief Parameters for loading filter coefficients * @@ -971,18 +971,18 @@ struct drx_mc_version_rec { */ struct drx_filter_info { u8 *data_re; - /**< pointer to coefficients for RE */ + /*< pointer to coefficients for RE */ u8 *data_im; - /**< pointer to coefficients for IM */ + /*< pointer to coefficients for IM */ u16 size_re; - /**< size of coefficients for RE */ + /*< size of coefficients for RE */ u16 size_im; - /**< size of coefficients for IM */ + /*< size of coefficients for IM */ }; /*========================================*/ -/** +/* * \struct struct drx_channel * \brief The set of parameters describing a single channel. * * Used by DRX_CTRL_SET_CHANNEL and DRX_CTRL_GET_CHANNEL. @@ -991,29 +991,29 @@ struct drx_filter_info { */ struct drx_channel { s32 frequency; - /**< frequency in kHz */ + /*< frequency in kHz */ enum drx_bandwidth bandwidth; - /**< bandwidth */ - enum drx_mirror mirror; /**< mirrored or not on RF */ + /*< bandwidth */ + enum drx_mirror mirror; /*< mirrored or not on RF */ enum drx_modulation constellation; - /**< constellation */ + /*< constellation */ enum drx_hierarchy hierarchy; - /**< hierarchy */ - enum drx_priority priority; /**< priority */ - enum drx_coderate coderate; /**< coderate */ - enum drx_guard guard; /**< guard interval */ - enum drx_fft_mode fftmode; /**< fftmode */ + /*< hierarchy */ + enum drx_priority priority; /*< priority */ + enum drx_coderate coderate; /*< coderate */ + enum drx_guard guard; /*< guard interval */ + enum drx_fft_mode fftmode; /*< fftmode */ enum drx_classification classification; - /**< classification */ + /*< classification */ u32 symbolrate; - /**< symbolrate in symbols/sec */ + /*< symbolrate in symbols/sec */ enum drx_interleave_mode interleavemode; - /**< interleaveMode QAM */ - enum drx_ldpc ldpc; /**< ldpc */ - enum drx_carrier_mode carrier; /**< carrier */ + /*< interleaveMode QAM */ + enum drx_ldpc ldpc; /*< ldpc */ + enum drx_carrier_mode carrier; /*< carrier */ enum drx_frame_mode framemode; - /**< frame mode */ - enum drx_pilot_mode pilot; /**< pilot mode */ + /*< frame mode */ + enum drx_pilot_mode pilot; /*< pilot mode */ }; /*========================================*/ @@ -1027,74 +1027,74 @@ enum drx_cfg_sqi_speed { /*========================================*/ -/** +/* * \struct struct drx_complex * A complex number. * * Used by DRX_CTRL_CONSTEL. */ struct drx_complex { s16 im; - /**< Imaginary part. */ + /*< Imaginary part. */ s16 re; - /**< Real part. */ + /*< Real part. */ }; /*========================================*/ -/** +/* * \struct struct drx_frequency_plan * Array element of a frequency plan. * * Used by DRX_CTRL_SCAN_INIT. */ struct drx_frequency_plan { s32 first; - /**< First centre frequency in this band */ + /*< First centre frequency in this band */ s32 last; - /**< Last centre frequency in this band */ + /*< Last centre frequency in this band */ s32 step; - /**< Stepping frequency in this band */ + /*< Stepping frequency in this band */ enum drx_bandwidth bandwidth; - /**< Bandwidth within this frequency band */ + /*< Bandwidth within this frequency band */ u16 ch_number; - /**< First channel number in this band, or first + /*< First channel number in this band, or first index in ch_names */ char **ch_names; - /**< Optional list of channel names in this + /*< Optional list of channel names in this band */ }; /*========================================*/ -/** +/* * \struct struct drx_scan_param * Parameters for channel scan. * * Used by DRX_CTRL_SCAN_INIT. */ struct drx_scan_param { struct drx_frequency_plan *frequency_plan; - /**< Frequency plan (array)*/ - u16 frequency_plan_size; /**< Number of bands */ - u32 num_tries; /**< Max channels tried */ - s32 skip; /**< Minimum frequency step to take + /*< Frequency plan (array)*/ + u16 frequency_plan_size; /*< Number of bands */ + u32 num_tries; /*< Max channels tried */ + s32 skip; /*< Minimum frequency step to take after a channel is found */ - void *ext_params; /**< Standard specific params */ + void *ext_params; /*< Standard specific params */ }; /*========================================*/ -/** +/* * \brief Scan commands. * Used by scanning algorithms. */ enum drx_scan_command { - DRX_SCAN_COMMAND_INIT = 0,/**< Initialize scanning */ - DRX_SCAN_COMMAND_NEXT, /**< Next scan */ - DRX_SCAN_COMMAND_STOP /**< Stop scanning */ + DRX_SCAN_COMMAND_INIT = 0,/*< Initialize scanning */ + DRX_SCAN_COMMAND_NEXT, /*< Next scan */ + DRX_SCAN_COMMAND_STOP /*< Stop scanning */ }; /*========================================*/ -/** +/* * \brief Inner scan function prototype. */ typedef int(*drx_scan_func_t) (void *scan_context, @@ -1104,77 +1104,77 @@ typedef int(*drx_scan_func_t) (void *scan_context, /*========================================*/ -/** +/* * \struct struct drxtps_info * TPS information, DVB-T specific. * * Used by DRX_CTRL_TPS_INFO. */ struct drxtps_info { - enum drx_fft_mode fftmode; /**< Fft mode */ - enum drx_guard guard; /**< Guard interval */ + enum drx_fft_mode fftmode; /*< Fft mode */ + enum drx_guard guard; /*< Guard interval */ enum drx_modulation constellation; - /**< Constellation */ + /*< Constellation */ enum drx_hierarchy hierarchy; - /**< Hierarchy */ + /*< Hierarchy */ enum drx_coderate high_coderate; - /**< High code rate */ + /*< High code rate */ enum drx_coderate low_coderate; - /**< Low cod rate */ - enum drx_tps_frame frame; /**< Tps frame */ - u8 length; /**< Length */ - u16 cell_id; /**< Cell id */ + /*< Low cod rate */ + enum drx_tps_frame frame; /*< Tps frame */ + u8 length; /*< Length */ + u16 cell_id; /*< Cell id */ }; /*========================================*/ -/** +/* * \brief Power mode of device. * * Used by DRX_CTRL_SET_POWER_MODE. */ enum drx_power_mode { DRX_POWER_UP = 0, - /**< Generic , Power Up Mode */ + /*< Generic , Power Up Mode */ DRX_POWER_MODE_1, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_2, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_3, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_4, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_5, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_6, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_7, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_8, - /**< Device specific , Power Up Mode */ + /*< Device specific , Power Up Mode */ DRX_POWER_MODE_9, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_10, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_11, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_12, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_13, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_14, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_15, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_MODE_16, - /**< Device specific , Power Down Mode */ + /*< Device specific , Power Down Mode */ DRX_POWER_DOWN = 255 - /**< Generic , Power Down Mode */ + /*< Generic , Power Down Mode */ }; /*========================================*/ -/** +/* * \enum enum drx_module * \brief Software module identification. * * Used by DRX_CTRL_VERSION. @@ -1191,93 +1191,93 @@ typedef int(*drx_scan_func_t) (void *scan_context, DRX_MODULE_UNKNOWN }; -/** +/* * \enum struct drx_version * \brief Version information of one software module. * * Used by DRX_CTRL_VERSION. */ struct drx_version { enum drx_module module_type; - /**< Type identifier of the module */ + /*< Type identifier of the module */ char *module_name; - /**< Name or description of module */ - u16 v_major; /**< Major version number */ - u16 v_minor; /**< Minor version number */ - u16 v_patch; /**< Patch version number */ - char *v_string; /**< Version as text string */ + /*< Name or description of module */ + u16 v_major; /*< Major version number */ + u16 v_minor; /*< Minor version number */ + u16 v_patch; /*< Patch version number */ + char *v_string; /*< Version as text string */ }; -/** +/* * \enum struct drx_version_list * \brief List element of NULL terminated, linked list for version information. * * Used by DRX_CTRL_VERSION. */ struct drx_version_list { - struct drx_version *version;/**< Version information */ + struct drx_version *version;/*< Version information */ struct drx_version_list *next; - /**< Next list element */ + /*< Next list element */ }; /*========================================*/ -/** +/* * \brief Parameters needed to confiugure a UIO. * * Used by DRX_CTRL_UIO_CFG. */ struct drxuio_cfg { enum drx_uio uio; - /**< UIO identifier */ + /*< UIO identifier */ enum drxuio_mode mode; - /**< UIO operational mode */ + /*< UIO operational mode */ }; /*========================================*/ -/** +/* * \brief Parameters needed to read from or write to a UIO. * * Used by DRX_CTRL_UIO_READ and DRX_CTRL_UIO_WRITE. */ struct drxuio_data { enum drx_uio uio; - /**< UIO identifier */ + /*< UIO identifier */ bool value; - /**< UIO value (true=1, false=0) */ + /*< UIO value (true=1, false=0) */ }; /*========================================*/ -/** +/* * \brief Parameters needed to configure OOB. * * Used by DRX_CTRL_SET_OOB. */ struct drxoob { - s32 frequency; /**< Frequency in kHz */ + s32 frequency; /*< Frequency in kHz */ enum drxoob_downstream_standard standard; - /**< OOB standard */ - bool spectrum_inverted; /**< If true, then spectrum + /*< OOB standard */ + bool spectrum_inverted; /*< If true, then spectrum is inverted */ }; /*========================================*/ -/** +/* * \brief Metrics from OOB. * * Used by DRX_CTRL_GET_OOB. */ struct drxoob_status { - s32 frequency; /**< Frequency in Khz */ - enum drx_lock_status lock; /**< Lock status */ - u32 mer; /**< MER */ - s32 symbol_rate_offset; /**< Symbolrate offset in ppm */ + s32 frequency; /*< Frequency in Khz */ + enum drx_lock_status lock; /*< Lock status */ + u32 mer; /*< MER */ + s32 symbol_rate_offset; /*< Symbolrate offset in ppm */ }; /*========================================*/ -/** +/* * \brief Device dependent configuration data. * * Used by DRX_CTRL_SET_CFG and DRX_CTRL_GET_CFG. @@ -1285,14 +1285,14 @@ struct drx_version_list { */ struct drx_cfg { u32 cfg_type; - /**< Function identifier */ + /*< Function identifier */ void *cfg_data; - /**< Function data */ + /*< Function data */ }; /*========================================*/ -/** +/* * /struct DRXMpegStartWidth_t * MStart width [nr MCLK cycles] for serial MPEG output. */ @@ -1303,7 +1303,7 @@ struct drx_version_list { }; /* CTRL CFG MPEG output */ -/** +/* * \struct struct drx_cfg_mpeg_output * \brief Configuration parameters for MPEG output control. * * Used by DRX_CFG_MPEG_OUTPUT, in combination with DRX_CTRL_SET_CFG and @@ -1311,29 +1311,29 @@ struct drx_version_list { */ struct drx_cfg_mpeg_output { - bool enable_mpeg_output;/**< If true, enable MPEG output */ - bool insert_rs_byte; /**< If true, insert RS byte */ - bool enable_parallel; /**< If true, parallel out otherwise + bool enable_mpeg_output;/*< If true, enable MPEG output */ + bool insert_rs_byte; /*< If true, insert RS byte */ + bool enable_parallel; /*< If true, parallel out otherwise serial */ - bool invert_data; /**< If true, invert DATA signals */ - bool invert_err; /**< If true, invert ERR signal */ - bool invert_str; /**< If true, invert STR signals */ - bool invert_val; /**< If true, invert VAL signals */ - bool invert_clk; /**< If true, invert CLK signals */ - bool static_clk; /**< If true, static MPEG clockrate + bool invert_data; /*< If true, invert DATA signals */ + bool invert_err; /*< If true, invert ERR signal */ + bool invert_str; /*< If true, invert STR signals */ + bool invert_val; /*< If true, invert VAL signals */ + bool invert_clk; /*< If true, invert CLK signals */ + bool static_clk; /*< If true, static MPEG clockrate will be used, otherwise clockrate will adapt to the bitrate of the TS */ - u32 bitrate; /**< Maximum bitrate in b/s in case + u32 bitrate; /*< Maximum bitrate in b/s in case static clockrate is selected */ enum drxmpeg_str_width width_str; - /**< MPEG start width */ + /*< MPEG start width */ }; /*========================================*/ -/** +/* * \struct struct drxi2c_data * \brief Data for I2C via 2nd or 3rd or etc I2C port. * * Used by DRX_CTRL_I2C_READWRITE. @@ -1341,187 +1341,187 @@ struct drx_version_list { * */ struct drxi2c_data { - u16 port_nr; /**< I2C port number */ + u16 port_nr; /*< I2C port number */ struct i2c_device_addr *w_dev_addr; - /**< Write device address */ - u16 w_count; /**< Size of write data in bytes */ - u8 *wData; /**< Pointer to write data */ + /*< Write device address */ + u16 w_count; /*< Size of write data in bytes */ + u8 *wData; /*< Pointer to write data */ struct i2c_device_addr *r_dev_addr; - /**< Read device address */ - u16 r_count; /**< Size of data to read in bytes */ - u8 *r_data; /**< Pointer to read buffer */ + /*< Read device address */ + u16 r_count; /*< Size of data to read in bytes */ + u8 *r_data; /*< Pointer to read buffer */ }; /*========================================*/ -/** +/* * \enum enum drx_aud_standard * \brief Audio standard identifier. * * Used by DRX_CTRL_SET_AUD. */ enum drx_aud_standard { - DRX_AUD_STANDARD_BTSC, /**< set BTSC standard (USA) */ - DRX_AUD_STANDARD_A2, /**< set A2-Korea FM Stereo */ - DRX_AUD_STANDARD_EIAJ, /**< set to Japanese FM Stereo */ - DRX_AUD_STANDARD_FM_STEREO,/**< set to FM-Stereo Radio */ - DRX_AUD_STANDARD_M_MONO, /**< for 4.5 MHz mono detected */ - DRX_AUD_STANDARD_D_K_MONO, /**< for 6.5 MHz mono detected */ - DRX_AUD_STANDARD_BG_FM, /**< set BG_FM standard */ - DRX_AUD_STANDARD_D_K1, /**< set D_K1 standard */ - DRX_AUD_STANDARD_D_K2, /**< set D_K2 standard */ - DRX_AUD_STANDARD_D_K3, /**< set D_K3 standard */ + DRX_AUD_STANDARD_BTSC, /*< set BTSC standard (USA) */ + DRX_AUD_STANDARD_A2, /*< set A2-Korea FM Stereo */ + DRX_AUD_STANDARD_EIAJ, /*< set to Japanese FM Stereo */ + DRX_AUD_STANDARD_FM_STEREO,/*< set to FM-Stereo Radio */ + DRX_AUD_STANDARD_M_MONO, /*< for 4.5 MHz mono detected */ + DRX_AUD_STANDARD_D_K_MONO, /*< for 6.5 MHz mono detected */ + DRX_AUD_STANDARD_BG_FM, /*< set BG_FM standard */ + DRX_AUD_STANDARD_D_K1, /*< set D_K1 standard */ + DRX_AUD_STANDARD_D_K2, /*< set D_K2 standard */ + DRX_AUD_STANDARD_D_K3, /*< set D_K3 standard */ DRX_AUD_STANDARD_BG_NICAM_FM, - /**< set BG_NICAM_FM standard */ + /*< set BG_NICAM_FM standard */ DRX_AUD_STANDARD_L_NICAM_AM, - /**< set L_NICAM_AM standard */ + /*< set L_NICAM_AM standard */ DRX_AUD_STANDARD_I_NICAM_FM, - /**< set I_NICAM_FM standard */ + /*< set I_NICAM_FM standard */ DRX_AUD_STANDARD_D_K_NICAM_FM, - /**< set D_K_NICAM_FM standard */ - DRX_AUD_STANDARD_NOT_READY,/**< used to detect audio standard */ + /*< set D_K_NICAM_FM standard */ + DRX_AUD_STANDARD_NOT_READY,/*< used to detect audio standard */ DRX_AUD_STANDARD_AUTO = DRX_AUTO, - /**< Automatic Standard Detection */ + /*< Automatic Standard Detection */ DRX_AUD_STANDARD_UNKNOWN = DRX_UNKNOWN - /**< used as auto and for readback */ + /*< used as auto and for readback */ }; /* CTRL_AUD_GET_STATUS - struct drx_aud_status */ -/** +/* * \enum enum drx_aud_nicam_status * \brief Status of NICAM carrier. */ enum drx_aud_nicam_status { DRX_AUD_NICAM_DETECTED = 0, - /**< NICAM carrier detected */ + /*< NICAM carrier detected */ DRX_AUD_NICAM_NOT_DETECTED, - /**< NICAM carrier not detected */ - DRX_AUD_NICAM_BAD /**< NICAM carrier bad quality */ + /*< NICAM carrier not detected */ + DRX_AUD_NICAM_BAD /*< NICAM carrier bad quality */ }; -/** +/* * \struct struct drx_aud_status * \brief Audio status characteristics. */ struct drx_aud_status { - bool stereo; /**< stereo detection */ - bool carrier_a; /**< carrier A detected */ - bool carrier_b; /**< carrier B detected */ - bool sap; /**< sap / bilingual detection */ - bool rds; /**< RDS data array present */ + bool stereo; /*< stereo detection */ + bool carrier_a; /*< carrier A detected */ + bool carrier_b; /*< carrier B detected */ + bool sap; /*< sap / bilingual detection */ + bool rds; /*< RDS data array present */ enum drx_aud_nicam_status nicam_status; - /**< status of NICAM carrier */ - s8 fm_ident; /**< FM Identification value */ + /*< status of NICAM carrier */ + s8 fm_ident; /*< FM Identification value */ }; /* CTRL_AUD_READ_RDS - DRXRDSdata_t */ -/** +/* * \struct DRXRDSdata_t * \brief Raw RDS data array. */ struct drx_cfg_aud_rds { - bool valid; /**< RDS data validation */ - u16 data[18]; /**< data from one RDS data array */ + bool valid; /*< RDS data validation */ + u16 data[18]; /*< data from one RDS data array */ }; /* DRX_CFG_AUD_VOLUME - struct drx_cfg_aud_volume - set/get */ -/** +/* * \enum DRXAudAVCDecayTime_t * \brief Automatic volume control configuration. */ enum drx_aud_avc_mode { - DRX_AUD_AVC_OFF, /**< Automatic volume control off */ - DRX_AUD_AVC_DECAYTIME_8S, /**< level volume in 8 seconds */ - DRX_AUD_AVC_DECAYTIME_4S, /**< level volume in 4 seconds */ - DRX_AUD_AVC_DECAYTIME_2S, /**< level volume in 2 seconds */ - DRX_AUD_AVC_DECAYTIME_20MS/**< level volume in 20 millisec */ + DRX_AUD_AVC_OFF, /*< Automatic volume control off */ + DRX_AUD_AVC_DECAYTIME_8S, /*< level volume in 8 seconds */ + DRX_AUD_AVC_DECAYTIME_4S, /*< level volume in 4 seconds */ + DRX_AUD_AVC_DECAYTIME_2S, /*< level volume in 2 seconds */ + DRX_AUD_AVC_DECAYTIME_20MS/*< level volume in 20 millisec */ }; -/** +/* * /enum DRXAudMaxAVCGain_t * /brief Automatic volume control max gain in audio baseband. */ enum drx_aud_avc_max_gain { - DRX_AUD_AVC_MAX_GAIN_0DB, /**< maximum AVC gain 0 dB */ - DRX_AUD_AVC_MAX_GAIN_6DB, /**< maximum AVC gain 6 dB */ - DRX_AUD_AVC_MAX_GAIN_12DB /**< maximum AVC gain 12 dB */ + DRX_AUD_AVC_MAX_GAIN_0DB, /*< maximum AVC gain 0 dB */ + DRX_AUD_AVC_MAX_GAIN_6DB, /*< maximum AVC gain 6 dB */ + DRX_AUD_AVC_MAX_GAIN_12DB /*< maximum AVC gain 12 dB */ }; -/** +/* * /enum DRXAudMaxAVCAtten_t * /brief Automatic volume control max attenuation in audio baseband. */ enum drx_aud_avc_max_atten { DRX_AUD_AVC_MAX_ATTEN_12DB, - /**< maximum AVC attenuation 12 dB */ + /*< maximum AVC attenuation 12 dB */ DRX_AUD_AVC_MAX_ATTEN_18DB, - /**< maximum AVC attenuation 18 dB */ - DRX_AUD_AVC_MAX_ATTEN_24DB/**< maximum AVC attenuation 24 dB */ + /*< maximum AVC attenuation 18 dB */ + DRX_AUD_AVC_MAX_ATTEN_24DB/*< maximum AVC attenuation 24 dB */ }; -/** +/* * \struct struct drx_cfg_aud_volume * \brief Audio volume configuration. */ struct drx_cfg_aud_volume { - bool mute; /**< mute overrides volume setting */ - s16 volume; /**< volume, range -114 to 12 dB */ - enum drx_aud_avc_mode avc_mode; /**< AVC auto volume control mode */ - u16 avc_ref_level; /**< AVC reference level */ + bool mute; /*< mute overrides volume setting */ + s16 volume; /*< volume, range -114 to 12 dB */ + enum drx_aud_avc_mode avc_mode; /*< AVC auto volume control mode */ + u16 avc_ref_level; /*< AVC reference level */ enum drx_aud_avc_max_gain avc_max_gain; - /**< AVC max gain selection */ + /*< AVC max gain selection */ enum drx_aud_avc_max_atten avc_max_atten; - /**< AVC max attenuation selection */ - s16 strength_left; /**< quasi-peak, left speaker */ - s16 strength_right; /**< quasi-peak, right speaker */ + /*< AVC max attenuation selection */ + s16 strength_left; /*< quasi-peak, left speaker */ + s16 strength_right; /*< quasi-peak, right speaker */ }; /* DRX_CFG_I2S_OUTPUT - struct drx_cfg_i2s_output - set/get */ -/** +/* * \enum enum drxi2s_mode * \brief I2S output mode. */ enum drxi2s_mode { - DRX_I2S_MODE_MASTER, /**< I2S is in master mode */ - DRX_I2S_MODE_SLAVE /**< I2S is in slave mode */ + DRX_I2S_MODE_MASTER, /*< I2S is in master mode */ + DRX_I2S_MODE_SLAVE /*< I2S is in slave mode */ }; -/** +/* * \enum enum drxi2s_word_length * \brief Width of I2S data. */ enum drxi2s_word_length { - DRX_I2S_WORDLENGTH_32 = 0,/**< I2S data is 32 bit wide */ - DRX_I2S_WORDLENGTH_16 = 1 /**< I2S data is 16 bit wide */ + DRX_I2S_WORDLENGTH_32 = 0,/*< I2S data is 32 bit wide */ + DRX_I2S_WORDLENGTH_16 = 1 /*< I2S data is 16 bit wide */ }; -/** +/* * \enum enum drxi2s_format * \brief Data wordstrobe alignment for I2S. */ enum drxi2s_format { DRX_I2S_FORMAT_WS_WITH_DATA, - /**< I2S data and wordstrobe are aligned */ + /*< I2S data and wordstrobe are aligned */ DRX_I2S_FORMAT_WS_ADVANCED - /**< I2S data one cycle after wordstrobe */ + /*< I2S data one cycle after wordstrobe */ }; -/** +/* * \enum enum drxi2s_polarity * \brief Polarity of I2S data. */ enum drxi2s_polarity { - DRX_I2S_POLARITY_RIGHT,/**< wordstrobe - right high, left low */ - DRX_I2S_POLARITY_LEFT /**< wordstrobe - right low, left high */ + DRX_I2S_POLARITY_RIGHT,/*< wordstrobe - right high, left low */ + DRX_I2S_POLARITY_LEFT /*< wordstrobe - right low, left high */ }; -/** +/* * \struct struct drx_cfg_i2s_output * \brief I2S output configuration. */ struct drx_cfg_i2s_output { - bool output_enable; /**< I2S output enable */ - u32 frequency; /**< range from 8000-48000 Hz */ - enum drxi2s_mode mode; /**< I2S mode, master or slave */ + bool output_enable; /*< I2S output enable */ + u32 frequency; /*< range from 8000-48000 Hz */ + enum drxi2s_mode mode; /*< I2S mode, master or slave */ enum drxi2s_word_length word_length; - /**< I2S wordlength, 16 or 32 bits */ - enum drxi2s_polarity polarity;/**< I2S wordstrobe polarity */ - enum drxi2s_format format; /**< I2S wordstrobe delay to data */ + /*< I2S wordlength, 16 or 32 bits */ + enum drxi2s_polarity polarity;/*< I2S wordstrobe polarity */ + enum drxi2s_format format; /*< I2S wordstrobe delay to data */ }; /* ------------------------------expert interface-----------------------------*/ -/** +/* * /enum enum drx_aud_fm_deemphasis * setting for FM-Deemphasis in audio demodulator. * */ @@ -1531,7 +1531,7 @@ struct drx_version_list { DRX_AUD_FM_DEEMPH_OFF }; -/** +/* * /enum DRXAudDeviation_t * setting for deviation mode in audio demodulator. * @@ -1541,7 +1541,7 @@ struct drx_version_list { DRX_AUD_DEVIATION_HIGH }; -/** +/* * /enum enum drx_no_carrier_option * setting for carrier, mute/noise. * */ @@ -1550,7 +1550,7 @@ struct drx_version_list { DRX_NO_CARRIER_NOISE }; -/** +/* * \enum DRXAudAutoSound_t * \brief Automatic Sound */ @@ -1560,7 +1560,7 @@ struct drx_version_list { DRX_AUD_AUTO_SOUND_SELECT_ON_CHANGE_OFF }; -/** +/* * \enum DRXAudASSThres_t * \brief Automatic Sound Select Thresholds */ @@ -1570,7 +1570,7 @@ struct drx_version_list { u16 nicam; /* Nicam Threshold for ASS configuration */ }; -/** +/* * \struct struct drx_aud_carrier * \brief Carrier detection related parameters */ struct drx_aud_carrier { @@ -1580,7 +1580,7 @@ struct drx_version_list { s32 dco; /* frequency adjustment (A) */ }; -/** +/* * \struct struct drx_cfg_aud_carriers * \brief combining carrier A & B to one struct */ struct drx_cfg_aud_carriers { @@ -1588,7 +1588,7 @@ struct drx_version_list { struct drx_aud_carrier b; }; -/** +/* * /enum enum drx_aud_i2s_src * Selection of audio source */ enum drx_aud_i2s_src { @@ -1597,19 +1597,19 @@ struct drx_version_list { DRX_AUD_SRC_STEREO_OR_A, DRX_AUD_SRC_STEREO_OR_B}; -/** +/* * \enum enum drx_aud_i2s_matrix * \brief Used for selecting I2S output. */ enum drx_aud_i2s_matrix { DRX_AUD_I2S_MATRIX_A_MONO, - /**< A sound only, stereo or mono */ + /*< A sound only, stereo or mono */ DRX_AUD_I2S_MATRIX_B_MONO, - /**< B sound only, stereo or mono */ + /*< B sound only, stereo or mono */ DRX_AUD_I2S_MATRIX_STEREO, - /**< A+B sound, transparant */ - DRX_AUD_I2S_MATRIX_MONO /**< A+B mixed to mono sum, (L+R)/2 */}; + /*< A+B sound, transparant */ + DRX_AUD_I2S_MATRIX_MONO /*< A+B mixed to mono sum, (L+R)/2 */}; -/** +/* * /enum enum drx_aud_fm_matrix * setting for FM-Matrix in audio demodulator. * */ @@ -1620,7 +1620,7 @@ struct drx_version_list { DRX_AUD_FM_MATRIX_SOUND_A, DRX_AUD_FM_MATRIX_SOUND_B}; -/** +/* * \struct DRXAudMatrices_t * \brief Mixer settings */ @@ -1630,22 +1630,22 @@ struct drx_cfg_aud_mixer { enum drx_aud_fm_matrix matrix_fm; }; -/** +/* * \enum DRXI2SVidSync_t * \brief Audio/video synchronization, interacts with I2S mode. * AUTO_1 and AUTO_2 are for automatic video standard detection with preference * for NTSC or Monochrome, because the frequencies are too close (59.94 & 60 Hz) */ enum drx_cfg_aud_av_sync { - DRX_AUD_AVSYNC_OFF,/**< audio/video synchronization is off */ + DRX_AUD_AVSYNC_OFF,/*< audio/video synchronization is off */ DRX_AUD_AVSYNC_NTSC, - /**< it is an NTSC system */ + /*< it is an NTSC system */ DRX_AUD_AVSYNC_MONOCHROME, - /**< it is a MONOCHROME system */ + /*< it is a MONOCHROME system */ DRX_AUD_AVSYNC_PAL_SECAM - /**< it is a PAL/SECAM system */}; + /*< it is a PAL/SECAM system */}; -/** +/* * \struct struct drx_cfg_aud_prescale * \brief Prescalers */ struct drx_cfg_aud_prescale { @@ -1653,7 +1653,7 @@ struct drx_cfg_aud_prescale { s16 nicam_gain; }; -/** +/* * \struct struct drx_aud_beep * \brief Beep */ struct drx_aud_beep { @@ -1662,14 +1662,14 @@ struct drx_aud_beep { bool mute; }; -/** +/* * \enum enum drx_aud_btsc_detect * \brief BTSC detetcion mode */ enum drx_aud_btsc_detect { DRX_BTSC_STEREO, DRX_BTSC_MONO_AND_SAP}; -/** +/* * \struct struct drx_aud_data * \brief Audio data structure */ struct drx_aud_data { @@ -1692,7 +1692,7 @@ struct drx_aud_data { bool rds_data_present; }; -/** +/* * \enum enum drx_qam_lock_range * \brief QAM lock range mode */ enum drx_qam_lock_range { @@ -1782,7 +1782,7 @@ struct drx_aud_data { u32 wdata, /* data to write */ u32 *rdata); /* data to read */ -/** +/* * \struct struct drx_access_func * \brief Interface to an access protocol. */ struct drx_access_func { @@ -1811,85 +1811,85 @@ struct drx_reg_dump { /*============================================================================*/ /*============================================================================*/ -/** +/* * \struct struct drx_common_attr * \brief Set of common attributes, shared by all DRX devices. */ struct drx_common_attr { /* Microcode (firmware) attributes */ - char *microcode_file; /**< microcode filename */ + char *microcode_file; /*< microcode filename */ bool verify_microcode; - /**< Use microcode verify or not. */ + /*< Use microcode verify or not. */ struct drx_mc_version_rec mcversion; - /**< Version record of microcode from file */ + /*< Version record of microcode from file */ /* Clocks and tuner attributes */ s32 intermediate_freq; - /**< IF,if tuner instance not used. (kHz)*/ + /*< IF,if tuner instance not used. (kHz)*/ s32 sys_clock_freq; - /**< Systemclock frequency. (kHz) */ + /*< Systemclock frequency. (kHz) */ s32 osc_clock_freq; - /**< Oscillator clock frequency. (kHz) */ + /*< Oscillator clock frequency. (kHz) */ s16 osc_clock_deviation; - /**< Oscillator clock deviation. (ppm) */ + /*< Oscillator clock deviation. (ppm) */ bool mirror_freq_spect; - /**< Mirror IF frequency spectrum or not.*/ + /*< Mirror IF frequency spectrum or not.*/ /* Initial MPEG output attributes */ struct drx_cfg_mpeg_output mpeg_cfg; - /**< MPEG configuration */ + /*< MPEG configuration */ - bool is_opened; /**< if true instance is already opened. */ + bool is_opened; /*< if true instance is already opened. */ /* Channel scan */ struct drx_scan_param *scan_param; - /**< scan parameters */ + /*< scan parameters */ u16 scan_freq_plan_index; - /**< next index in freq plan */ + /*< next index in freq plan */ s32 scan_next_frequency; - /**< next freq to scan */ - bool scan_ready; /**< scan ready flag */ - u32 scan_max_channels;/**< number of channels in freqplan */ + /*< next freq to scan */ + bool scan_ready; /*< scan ready flag */ + u32 scan_max_channels;/*< number of channels in freqplan */ u32 scan_channels_scanned; - /**< number of channels scanned */ + /*< number of channels scanned */ /* Channel scan - inner loop: demod related */ drx_scan_func_t scan_function; - /**< function to check channel */ + /*< function to check channel */ /* Channel scan - inner loop: SYSObj related */ - void *scan_context; /**< Context Pointer of SYSObj */ + void *scan_context; /*< Context Pointer of SYSObj */ /* Channel scan - parameters for default DTV scan function in core driver */ u16 scan_demod_lock_timeout; - /**< millisecs to wait for lock */ + /*< millisecs to wait for lock */ enum drx_lock_status scan_desired_lock; - /**< lock requirement for channel found */ + /*< lock requirement for channel found */ /* scan_active can be used by SetChannel to decide how to program the tuner, fast or slow (but stable). Usually fast during scan. */ - bool scan_active; /**< true when scan routines are active */ + bool scan_active; /*< true when scan routines are active */ /* Power management */ enum drx_power_mode current_power_mode; - /**< current power management mode */ + /*< current power management mode */ /* Tuner */ - u8 tuner_port_nr; /**< nr of I2C port to wich tuner is */ + u8 tuner_port_nr; /*< nr of I2C port to wich tuner is */ s32 tuner_min_freq_rf; - /**< minimum RF input frequency, in kHz */ + /*< minimum RF input frequency, in kHz */ s32 tuner_max_freq_rf; - /**< maximum RF input frequency, in kHz */ - bool tuner_rf_agc_pol; /**< if true invert RF AGC polarity */ - bool tuner_if_agc_pol; /**< if true invert IF AGC polarity */ - bool tuner_slow_mode; /**< if true invert IF AGC polarity */ + /*< maximum RF input frequency, in kHz */ + bool tuner_rf_agc_pol; /*< if true invert RF AGC polarity */ + bool tuner_if_agc_pol; /*< if true invert IF AGC polarity */ + bool tuner_slow_mode; /*< if true invert IF AGC polarity */ struct drx_channel current_channel; - /**< current channel parameters */ + /*< current channel parameters */ enum drx_standard current_standard; - /**< current standard selection */ + /*< current standard selection */ enum drx_standard prev_standard; - /**< previous standard selection */ + /*< previous standard selection */ enum drx_standard di_cache_standard; - /**< standard in DI cache if available */ - bool use_bootloader; /**< use bootloader in open */ - u32 capabilities; /**< capabilities flags */ - u32 product_id; /**< product ID inc. metal fix number */}; + /*< standard in DI cache if available */ + bool use_bootloader; /*< use bootloader in open */ + u32 capabilities; /*< capabilities flags */ + u32 product_id; /*< product ID inc. metal fix number */}; /* * Generic functions for DRX devices. @@ -1897,16 +1897,16 @@ struct drx_reg_dump { struct drx_demod_instance; -/** +/* * \struct struct drx_demod_instance * \brief Top structure of demodulator instance. */ struct drx_demod_instance { - /**< data access protocol functions */ + /*< data access protocol functions */ struct i2c_device_addr *my_i2c_dev_addr; - /**< i2c address and device identifier */ + /*< i2c address and device identifier */ struct drx_common_attr *my_common_attr; - /**< common DRX attributes */ - void *my_ext_attr; /**< device specific attributes */ + /*< common DRX attributes */ + void *my_ext_attr; /*< device specific attributes */ /* generic demodulator data */ struct i2c_adapter *i2c; @@ -2195,7 +2195,7 @@ Conversion from enum values to human readable form. Access macros -------------------------------------------------------------------------*/ -/** +/* * \brief Create a compilable reference to the microcode attribute * \param d pointer to demod instance * @@ -2229,7 +2229,7 @@ Access macros #define DRX_ATTR_I2CDEVID(d) ((d)->my_i2c_dev_addr->i2c_dev_id) #define DRX_ISMCVERTYPE(x) ((x) == AUX_VER_RECORD) -/**************************/ +/*************************/ /* Macros with device-specific handling are converted to CFG functions */ @@ -2285,7 +2285,7 @@ Access macros #define DRX_GET_QAM_LOCKRANGE(d, x) DRX_ACCESSMACRO_GET((d), (x), \ DRX_XS_CFG_QAM_LOCKRANGE, enum drx_qam_lock_range, DRX_UNKNOWN) -/** +/* * \brief Macro to check if std is an ATV standard * \retval true std is an ATV standard * \retval false std is an ATV standard @@ -2298,7 +2298,7 @@ Access macros ((std) == DRX_STANDARD_NTSC) || \ ((std) == DRX_STANDARD_FM)) -/** +/* * \brief Macro to check if std is an QAM standard * \retval true std is an QAM standards * \retval false std is an QAM standards @@ -2308,14 +2308,14 @@ Access macros ((std) == DRX_STANDARD_ITU_C) || \ ((std) == DRX_STANDARD_ITU_D)) -/** +/* * \brief Macro to check if std is VSB standard * \retval true std is VSB standard * \retval false std is not VSB standard */ #define DRX_ISVSBSTD(std) ((std) == DRX_STANDARD_8VSB) -/** +/* * \brief Macro to check if std is DVBT standard * \retval true std is DVBT standard * \retval false std is not DVBT standard diff --git a/drivers/media/dvb-frontends/drx39xyj/drxj.h b/drivers/media/dvb-frontends/drx39xyj/drxj.h index 6c5b8f78f9f6..d3ee1c23bb2f 100644 --- a/drivers/media/dvb-frontends/drx39xyj/drxj.h +++ b/drivers/media/dvb-frontends/drx39xyj/drxj.h @@ -69,15 +69,15 @@ TYPEDEFS struct drxjscu_cmd { u16 command; - /**< Command number */ + /*< Command number */ u16 parameter_len; - /**< Data length in byte */ + /*< Data length in byte */ u16 result_len; - /**< result length in byte */ + /*< result length in byte */ u16 *parameter; - /**< General purpous param */ + /*< General purpous param */ u16 *result; - /**< General purpous param */}; + /*< General purpous param */}; /*============================================================================*/ /*============================================================================*/ @@ -130,7 +130,7 @@ TYPEDEFS DRXJ_CFG_MAX /* dummy, never to be used */}; -/** +/* * /struct enum drxj_cfg_smart_ant_io * smart antenna i/o. */ enum drxj_cfg_smart_ant_io { @@ -138,7 +138,7 @@ enum drxj_cfg_smart_ant_io { DRXJ_SMT_ANT_INPUT }; -/** +/* * /struct struct drxj_cfg_smart_ant * Set smart antenna. */ struct drxj_cfg_smart_ant { @@ -146,7 +146,7 @@ enum drxj_cfg_smart_ant_io { u16 ctrl_data; }; -/** +/* * /struct DRXJAGCSTATUS_t * AGC status information from the DRXJ-IQM-AF. */ @@ -158,7 +158,7 @@ struct drxj_agc_status { /* DRXJ_CFG_AGC_RF, DRXJ_CFG_AGC_IF */ -/** +/* * /struct enum drxj_agc_ctrl_mode * Available AGCs modes in the DRXJ. */ enum drxj_agc_ctrl_mode { @@ -166,7 +166,7 @@ struct drxj_agc_status { DRX_AGC_CTRL_USER, DRX_AGC_CTRL_OFF}; -/** +/* * /struct struct drxj_cfg_agc * Generic interface for all AGCs present on the DRXJ. */ struct drxj_cfg_agc { @@ -182,7 +182,7 @@ struct drxj_agc_status { /* DRXJ_CFG_PRE_SAW */ -/** +/* * /struct struct drxj_cfg_pre_saw * Interface to configure pre SAW sense. */ struct drxj_cfg_pre_saw { @@ -192,14 +192,14 @@ struct drxj_agc_status { /* DRXJ_CFG_AFE_GAIN */ -/** +/* * /struct struct drxj_cfg_afe_gain * Interface to configure gain of AFE (LNA + PGA). */ struct drxj_cfg_afe_gain { enum drx_standard standard; /* standard to which these settings apply */ u16 gain; /* gain in 0.1 dB steps, DRXJ range 140 .. 335 */}; -/** +/* * /struct drxjrs_errors * Available failure information in DRXJ_FEC_RS. * @@ -208,25 +208,25 @@ struct drxj_agc_status { */ struct drxjrs_errors { u16 nr_bit_errors; - /**< no of pre RS bit errors */ + /*< no of pre RS bit errors */ u16 nr_symbol_errors; - /**< no of pre RS symbol errors */ + /*< no of pre RS symbol errors */ u16 nr_packet_errors; - /**< no of pre RS packet errors */ + /*< no of pre RS packet errors */ u16 nr_failures; - /**< no of post RS failures to decode */ + /*< no of post RS failures to decode */ u16 nr_snc_par_fail_count; - /**< no of post RS bit erros */ + /*< no of post RS bit erros */ }; -/** +/* * /struct struct drxj_cfg_vsb_misc * symbol error rate */ struct drxj_cfg_vsb_misc { u32 symb_error; - /**< symbol error rate sps */}; + /*< symbol error rate sps */}; -/** +/* * /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate. * */ @@ -234,7 +234,7 @@ struct drxj_agc_status { DRXJ_MPEG_START_WIDTH_1CLKCYC, DRXJ_MPEG_START_WIDTH_8CLKCYC}; -/** +/* * /enum enum drxj_mpeg_output_clock_rate * Mpeg output clock rate. * */ @@ -247,20 +247,20 @@ struct drxj_agc_status { DRXJ_MPEGOUTPUT_CLOCK_RATE_25313K, DRXJ_MPEGOUTPUT_CLOCK_RATE_21696K}; -/** +/* * /struct DRXJCfgMisc_t * Change TEI bit of MPEG output * reverse MPEG output bit order * set MPEG output clock rate */ struct drxj_cfg_mpeg_output_misc { - bool disable_tei_handling; /**< if true pass (not change) TEI bit */ - bool bit_reverse_mpeg_outout; /**< if true, parallel: msb on MD0; serial: lsb out first */ + bool disable_tei_handling; /*< if true pass (not change) TEI bit */ + bool bit_reverse_mpeg_outout; /*< if true, parallel: msb on MD0; serial: lsb out first */ enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate; - /**< set MPEG output clock rate that overwirtes the derived one from symbol rate */ - enum drxj_mpeg_start_width mpeg_start_width; /**< set MPEG output start width */}; + /*< set MPEG output clock rate that overwirtes the derived one from symbol rate */ + enum drxj_mpeg_start_width mpeg_start_width; /*< set MPEG output start width */}; -/** +/* * /enum enum drxj_xtal_freq * Supported external crystal reference frequency. */ enum drxj_xtal_freq { @@ -269,21 +269,21 @@ struct drxj_agc_status { DRXJ_XTAL_FREQ_20P25MHZ, DRXJ_XTAL_FREQ_4MHZ}; -/** +/* * /enum enum drxj_xtal_freq * Supported external crystal reference frequency. */ enum drxji2c_speed { DRXJ_I2C_SPEED_400KBPS, DRXJ_I2C_SPEED_100KBPS}; -/** +/* * /struct struct drxj_cfg_hw_cfg * Get hw configuration, such as crystal reference frequency, I2C speed, etc... */ struct drxj_cfg_hw_cfg { enum drxj_xtal_freq xtal_freq; - /**< crystal reference frequency */ + /*< crystal reference frequency */ enum drxji2c_speed i2c_speed; - /**< 100 or 400 kbps */}; + /*< 100 or 400 kbps */}; /* * DRXJ_CFG_ATV_MISC @@ -352,7 +352,7 @@ struct drxj_cfg_oob_misc { * DRXJ_CFG_ATV_OUTPUT */ -/** +/* * /enum DRXJAttenuation_t * Attenuation setting for SIF AGC. * @@ -363,7 +363,7 @@ struct drxj_cfg_oob_misc { DRXJ_SIF_ATTENUATION_6DB, DRXJ_SIF_ATTENUATION_9DB}; -/** +/* * /struct struct drxj_cfg_atv_output * SIF attenuation setting. * */ @@ -398,7 +398,7 @@ struct drxj_cfg_atv_output { /*============================================================================*/ /*========================================*/ -/** +/* * /struct struct drxj_data * DRXJ specific attributes. * * Global data container for DRXJ specific data. @@ -406,93 +406,93 @@ struct drxj_cfg_atv_output { */ struct drxj_data { /* device capabilties (determined during drx_open()) */ - bool has_lna; /**< true if LNA (aka PGA) present */ - bool has_oob; /**< true if OOB supported */ - bool has_ntsc; /**< true if NTSC supported */ - bool has_btsc; /**< true if BTSC supported */ - bool has_smatx; /**< true if mat_tx is available */ - bool has_smarx; /**< true if mat_rx is available */ - bool has_gpio; /**< true if GPIO is available */ - bool has_irqn; /**< true if IRQN is available */ + bool has_lna; /*< true if LNA (aka PGA) present */ + bool has_oob; /*< true if OOB supported */ + bool has_ntsc; /*< true if NTSC supported */ + bool has_btsc; /*< true if BTSC supported */ + bool has_smatx; /*< true if mat_tx is available */ + bool has_smarx; /*< true if mat_rx is available */ + bool has_gpio; /*< true if GPIO is available */ + bool has_irqn; /*< true if IRQN is available */ /* A1/A2/A... */ - u8 mfx; /**< metal fix */ + u8 mfx; /*< metal fix */ /* tuner settings */ - bool mirror_freq_spect_oob;/**< tuner inversion (true = tuner mirrors the signal */ + bool mirror_freq_spect_oob;/*< tuner inversion (true = tuner mirrors the signal */ /* standard/channel settings */ - enum drx_standard standard; /**< current standard information */ + enum drx_standard standard; /*< current standard information */ enum drx_modulation constellation; - /**< current constellation */ - s32 frequency; /**< center signal frequency in KHz */ + /*< current constellation */ + s32 frequency; /*< center signal frequency in KHz */ enum drx_bandwidth curr_bandwidth; - /**< current channel bandwidth */ - enum drx_mirror mirror; /**< current channel mirror */ + /*< current channel bandwidth */ + enum drx_mirror mirror; /*< current channel mirror */ /* signal quality information */ - u32 fec_bits_desired; /**< BER accounting period */ - u16 fec_vd_plen; /**< no of trellis symbols: VD SER measurement period */ - u16 qam_vd_prescale; /**< Viterbi Measurement Prescale */ - u16 qam_vd_period; /**< Viterbi Measurement period */ - u16 fec_rs_plen; /**< defines RS BER measurement period */ - u16 fec_rs_prescale; /**< ReedSolomon Measurement Prescale */ - u16 fec_rs_period; /**< ReedSolomon Measurement period */ - bool reset_pkt_err_acc; /**< Set a flag to reset accumulated packet error */ - u16 pkt_err_acc_start; /**< Set a flag to reset accumulated packet error */ + u32 fec_bits_desired; /*< BER accounting period */ + u16 fec_vd_plen; /*< no of trellis symbols: VD SER measurement period */ + u16 qam_vd_prescale; /*< Viterbi Measurement Prescale */ + u16 qam_vd_period; /*< Viterbi Measurement period */ + u16 fec_rs_plen; /*< defines RS BER measurement period */ + u16 fec_rs_prescale; /*< ReedSolomon Measurement Prescale */ + u16 fec_rs_period; /*< ReedSolomon Measurement period */ + bool reset_pkt_err_acc; /*< Set a flag to reset accumulated packet error */ + u16 pkt_err_acc_start; /*< Set a flag to reset accumulated packet error */ /* HI configuration */ - u16 hi_cfg_timing_div; /**< HI Configure() parameter 2 */ - u16 hi_cfg_bridge_delay; /**< HI Configure() parameter 3 */ - u16 hi_cfg_wake_up_key; /**< HI Configure() parameter 4 */ - u16 hi_cfg_ctrl; /**< HI Configure() parameter 5 */ - u16 hi_cfg_transmit; /**< HI Configure() parameter 6 */ + u16 hi_cfg_timing_div; /*< HI Configure() parameter 2 */ + u16 hi_cfg_bridge_delay; /*< HI Configure() parameter 3 */ + u16 hi_cfg_wake_up_key; /*< HI Configure() parameter 4 */ + u16 hi_cfg_ctrl; /*< HI Configure() parameter 5 */ + u16 hi_cfg_transmit; /*< HI Configure() parameter 6 */ /* UIO configuration */ - enum drxuio_mode uio_sma_rx_mode;/**< current mode of SmaRx pin */ - enum drxuio_mode uio_sma_tx_mode;/**< current mode of SmaTx pin */ - enum drxuio_mode uio_gpio_mode; /**< current mode of ASEL pin */ - enum drxuio_mode uio_irqn_mode; /**< current mode of IRQN pin */ + enum drxuio_mode uio_sma_rx_mode;/*< current mode of SmaRx pin */ + enum drxuio_mode uio_sma_tx_mode;/*< current mode of SmaTx pin */ + enum drxuio_mode uio_gpio_mode; /*< current mode of ASEL pin */ + enum drxuio_mode uio_irqn_mode; /*< current mode of IRQN pin */ /* IQM fs frequecy shift and inversion */ - u32 iqm_fs_rate_ofs; /**< frequency shifter setting after setchannel */ - bool pos_image; /**< Ture: positive image */ + u32 iqm_fs_rate_ofs; /*< frequency shifter setting after setchannel */ + bool pos_image; /*< Ture: positive image */ /* IQM RC frequecy shift */ - u32 iqm_rc_rate_ofs; /**< frequency shifter setting after setchannel */ + u32 iqm_rc_rate_ofs; /*< frequency shifter setting after setchannel */ /* ATV configuration */ - u32 atv_cfg_changed_flags; /**< flag: flags cfg changes */ - s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU0__A */ - s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU1__A */ - s16 atv_top_equ2[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU2__A */ - s16 atv_top_equ3[DRXJ_COEF_IDX_MAX]; /**< shadow of ATV_TOP_EQU3__A */ - bool phase_correction_bypass;/**< flag: true=bypass */ - s16 atv_top_vid_peak; /**< shadow of ATV_TOP_VID_PEAK__A */ - u16 atv_top_noise_th; /**< shadow of ATV_TOP_NOISE_TH__A */ - bool enable_cvbs_output; /**< flag CVBS ouput enable */ - bool enable_sif_output; /**< flag SIF ouput enable */ + u32 atv_cfg_changed_flags; /*< flag: flags cfg changes */ + s16 atv_top_equ0[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU0__A */ + s16 atv_top_equ1[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU1__A */ + s16 atv_top_equ2[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU2__A */ + s16 atv_top_equ3[DRXJ_COEF_IDX_MAX]; /*< shadow of ATV_TOP_EQU3__A */ + bool phase_correction_bypass;/*< flag: true=bypass */ + s16 atv_top_vid_peak; /*< shadow of ATV_TOP_VID_PEAK__A */ + u16 atv_top_noise_th; /*< shadow of ATV_TOP_NOISE_TH__A */ + bool enable_cvbs_output; /*< flag CVBS ouput enable */ + bool enable_sif_output; /*< flag SIF ouput enable */ enum drxjsif_attenuation sif_attenuation; - /**< current SIF att setting */ + /*< current SIF att setting */ /* Agc configuration for QAM and VSB */ - struct drxj_cfg_agc qam_rf_agc_cfg; /**< qam RF AGC config */ - struct drxj_cfg_agc qam_if_agc_cfg; /**< qam IF AGC config */ - struct drxj_cfg_agc vsb_rf_agc_cfg; /**< vsb RF AGC config */ - struct drxj_cfg_agc vsb_if_agc_cfg; /**< vsb IF AGC config */ + struct drxj_cfg_agc qam_rf_agc_cfg; /*< qam RF AGC config */ + struct drxj_cfg_agc qam_if_agc_cfg; /*< qam IF AGC config */ + struct drxj_cfg_agc vsb_rf_agc_cfg; /*< vsb RF AGC config */ + struct drxj_cfg_agc vsb_if_agc_cfg; /*< vsb IF AGC config */ /* PGA gain configuration for QAM and VSB */ - u16 qam_pga_cfg; /**< qam PGA config */ - u16 vsb_pga_cfg; /**< vsb PGA config */ + u16 qam_pga_cfg; /*< qam PGA config */ + u16 vsb_pga_cfg; /*< vsb PGA config */ /* Pre SAW configuration for QAM and VSB */ struct drxj_cfg_pre_saw qam_pre_saw_cfg; - /**< qam pre SAW config */ + /*< qam pre SAW config */ struct drxj_cfg_pre_saw vsb_pre_saw_cfg; - /**< qam pre SAW config */ + /*< qam pre SAW config */ /* Version information */ - char v_text[2][12]; /**< allocated text versions */ - struct drx_version v_version[2]; /**< allocated versions structs */ + char v_text[2][12]; /*< allocated text versions */ + struct drx_version v_version[2]; /*< allocated versions structs */ struct drx_version_list v_list_elements[2]; - /**< allocated version list */ + /*< allocated version list */ /* smart antenna configuration */ bool smart_ant_inverted; @@ -502,25 +502,25 @@ struct drxj_cfg_atv_output { bool oob_power_on; /* MPEG static bitrate setting */ - u32 mpeg_ts_static_bitrate; /**< bitrate static MPEG output */ - bool disable_te_ihandling; /**< MPEG TS TEI handling */ - bool bit_reverse_mpeg_outout;/**< MPEG output bit order */ + u32 mpeg_ts_static_bitrate; /*< bitrate static MPEG output */ + bool disable_te_ihandling; /*< MPEG TS TEI handling */ + bool bit_reverse_mpeg_outout;/*< MPEG output bit order */ enum drxj_mpeg_output_clock_rate mpeg_output_clock_rate; - /**< MPEG output clock rate */ + /*< MPEG output clock rate */ enum drxj_mpeg_start_width mpeg_start_width; - /**< MPEG Start width */ + /*< MPEG Start width */ /* Pre SAW & Agc configuration for ATV */ struct drxj_cfg_pre_saw atv_pre_saw_cfg; - /**< atv pre SAW config */ - struct drxj_cfg_agc atv_rf_agc_cfg; /**< atv RF AGC config */ - struct drxj_cfg_agc atv_if_agc_cfg; /**< atv IF AGC config */ - u16 atv_pga_cfg; /**< atv pga config */ + /*< atv pre SAW config */ + struct drxj_cfg_agc atv_rf_agc_cfg; /*< atv RF AGC config */ + struct drxj_cfg_agc atv_if_agc_cfg; /*< atv IF AGC config */ + u16 atv_pga_cfg; /*< atv pga config */ u32 curr_symbol_rate; /* pin-safe mode */ - bool pdr_safe_mode; /**< PDR safe mode activated */ + bool pdr_safe_mode; /*< PDR safe mode activated */ u16 pdr_safe_restore_val_gpio; u16 pdr_safe_restore_val_v_sync; u16 pdr_safe_restore_val_sma_rx; @@ -531,12 +531,12 @@ struct drxj_cfg_atv_output { enum drxj_cfg_oob_lo_power oob_lo_pow; struct drx_aud_data aud_data; - /**< audio storage */}; + /*< audio storage */}; /*------------------------------------------------------------------------- Access MACROS -------------------------------------------------------------------------*/ -/** +/* * \brief Compilable references to attributes * \param d pointer to demod instance * @@ -554,7 +554,7 @@ Access MACROS DEFINES -------------------------------------------------------------------------*/ -/** +/* * \def DRXJ_NTSC_CARRIER_FREQ_OFFSET * \brief Offset from picture carrier to centre frequency in kHz, in RF domain * @@ -569,7 +569,7 @@ DEFINES */ #define DRXJ_NTSC_CARRIER_FREQ_OFFSET ((s32)(1750)) -/** +/* * \def DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET * \brief Offset from picture carrier to centre frequency in kHz, in RF domain * @@ -585,7 +585,7 @@ DEFINES */ #define DRXJ_PAL_SECAM_BG_CARRIER_FREQ_OFFSET ((s32)(2375)) -/** +/* * \def DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET * \brief Offset from picture carrier to centre frequency in kHz, in RF domain * @@ -601,7 +601,7 @@ DEFINES */ #define DRXJ_PAL_SECAM_DKIL_CARRIER_FREQ_OFFSET ((s32)(2775)) -/** +/* * \def DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET * \brief Offset from picture carrier to centre frequency in kHz, in RF domain * @@ -616,7 +616,7 @@ DEFINES */ #define DRXJ_PAL_SECAM_LP_CARRIER_FREQ_OFFSET ((s32)(-3255)) -/** +/* * \def DRXJ_FM_CARRIER_FREQ_OFFSET * \brief Offset from sound carrier to centre frequency in kHz, in RF domain * diff --git a/drivers/media/dvb-frontends/drxk.h b/drivers/media/dvb-frontends/drxk.h index eb9bdc9f59c4..c936142367fb 100644 --- a/drivers/media/dvb-frontends/drxk.h +++ b/drivers/media/dvb-frontends/drxk.h @@ -20,17 +20,18 @@ * @antenna_dvbt: GPIO bit for changing antenna to DVB-C. A value of 1 * means that 1=DVBC, 0 = DVBT. Zero means the opposite. * @mpeg_out_clk_strength: DRXK Mpeg output clock drive strength. + * @chunk_size: maximum size for I2C messages * @microcode_name: Name of the firmware file with the microcode * @qam_demod_parameter_count: The number of parameters used for the command * to set the demodulator parameters. All * firmwares are using the 2-parameter commmand. - * An exception is the "drxk_a3.mc" firmware, + * An exception is the ``drxk_a3.mc`` firmware, * which uses the 4-parameter command. * A value of 0 (default) or lower indicates that * the correct number of parameters will be * automatically detected. * - * On the *_gpio vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is + * On the ``*_gpio`` vars, bit 0 is UIO-1, bit 1 is UIO-2 and bit 2 is * UIO-3. */ struct drxk_config { diff --git a/drivers/media/dvb-frontends/dvb-pll.h b/drivers/media/dvb-frontends/dvb-pll.h index 6aaa9c6bff9c..01dbcc4d9550 100644 --- a/drivers/media/dvb-frontends/dvb-pll.h +++ b/drivers/media/dvb-frontends/dvb-pll.h @@ -33,11 +33,12 @@ /** * Attach a dvb-pll to the supplied frontend structure. * - * @param fe Frontend to attach to. - * @param pll_addr i2c address of the PLL (if used). - * @param i2c i2c adapter to use (set to NULL if not used). - * @param pll_desc_id dvb_pll_desc to use. - * @return Frontend pointer on success, NULL on failure + * @fe: Frontend to attach to. + * @pll_addr: i2c address of the PLL (if used). + * @i2c: i2c adapter to use (set to NULL if not used). + * @pll_desc_id: dvb_pll_desc to use. + * + * return: Frontend pointer on success, NULL on failure */ #if IS_REACHABLE(CONFIG_DVB_PLL) extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, diff --git a/drivers/media/dvb-frontends/helene.h b/drivers/media/dvb-frontends/helene.h index 333615491d9e..3f504f5d1d4f 100644 --- a/drivers/media/dvb-frontends/helene.h +++ b/drivers/media/dvb-frontends/helene.h @@ -38,6 +38,7 @@ enum helene_xtal { * @set_tuner_priv: Callback function private context * @set_tuner_callback: Callback function that notifies the parent driver * which tuner is active now + * @xtal: Cristal frequency as described by &enum helene_xtal */ struct helene_config { u8 i2c_address; diff --git a/drivers/media/dvb-frontends/ix2505v.h b/drivers/media/dvb-frontends/ix2505v.h index 0b0a431c74f6..31ca03a7b827 100644 --- a/drivers/media/dvb-frontends/ix2505v.h +++ b/drivers/media/dvb-frontends/ix2505v.h @@ -19,14 +19,6 @@ #include #include "dvb_frontend.h" -/** - * Attach a ix2505v tuner to the supplied frontend structure. - * - * @param fe Frontend to attach to. - * @param config ix2505v_config structure - * @return FE pointer on success, NULL on failure. - */ - struct ix2505v_config { u8 tuner_address; @@ -45,6 +37,15 @@ struct ix2505v_config { }; #if IS_REACHABLE(CONFIG_DVB_IX2505V) +/** + * Attach a ix2505v tuner to the supplied frontend structure. + * + * @fe: Frontend to attach to. + * @config: pointer to &struct ix2505v_config + * @i2c: pointer to &struct i2c_adapter. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *ix2505v_attach(struct dvb_frontend *fe, const struct ix2505v_config *config, struct i2c_adapter *i2c); #else diff --git a/drivers/media/dvb-frontends/l64781.c b/drivers/media/dvb-frontends/l64781.c index 68923c84679a..e5a6c1766664 100644 --- a/drivers/media/dvb-frontends/l64781.c +++ b/drivers/media/dvb-frontends/l64781.c @@ -517,7 +517,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config, state->i2c = i2c; state->first = 1; - /** + /* * the L64781 won't show up before we send the reset_and_configure() * broadcast. If nothing responds there is no L64781 on the bus... */ diff --git a/drivers/media/dvb-frontends/mn88472.h b/drivers/media/dvb-frontends/mn88472.h index 323632523876..8cd5ef61903b 100644 --- a/drivers/media/dvb-frontends/mn88472.h +++ b/drivers/media/dvb-frontends/mn88472.h @@ -19,21 +19,21 @@ #include +/* Define old names for backward compatibility */ +#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE +#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED +#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL +#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL + /** * struct mn88472_config - Platform data for the mn88472 driver * @xtal: Clock frequency. * @ts_mode: TS mode. * @ts_clock: TS clock config. * @i2c_wr_max: Max number of bytes driver writes to I2C at once. - * @get_dvb_frontend: Get DVB frontend. + * @fe: pointer to a frontend pointer + * @get_dvb_frontend: Get DVB frontend callback. */ - -/* Define old names for backward compatibility */ -#define VARIABLE_TS_CLOCK MN88472_TS_CLK_VARIABLE -#define FIXED_TS_CLOCK MN88472_TS_CLK_FIXED -#define SERIAL_TS_MODE MN88472_TS_MODE_SERIAL -#define PARALLEL_TS_MODE MN88472_TS_MODE_PARALLEL - struct mn88472_config { unsigned int xtal; diff --git a/drivers/media/dvb-frontends/rtl2832_sdr.h b/drivers/media/dvb-frontends/rtl2832_sdr.h index d8fc7e7212e3..8f88c2fb8627 100644 --- a/drivers/media/dvb-frontends/rtl2832_sdr.h +++ b/drivers/media/dvb-frontends/rtl2832_sdr.h @@ -33,15 +33,11 @@ * struct rtl2832_sdr_platform_data - Platform data for the rtl2832_sdr driver * @clk: Clock frequency (4000000, 16000000, 25000000, 28800000). * @tuner: Used tuner model. - * @i2c_client: rtl2832 demod driver I2C client. - * @bulk_read: rtl2832 driver private I/O interface. - * @bulk_write: rtl2832 driver private I/O interface. - * @update_bits: rtl2832 driver private I/O interface. + * @regmap: pointer to &struct regmap. * @dvb_frontend: rtl2832 DVB frontend. * @v4l2_subdev: Tuner v4l2 controls. * @dvb_usb_device: DVB USB interface for USB streaming. */ - struct rtl2832_sdr_platform_data { u32 clk; /* diff --git a/drivers/media/dvb-frontends/stb6000.h b/drivers/media/dvb-frontends/stb6000.h index 78e75dfc317f..3c4d51dd5415 100644 --- a/drivers/media/dvb-frontends/stb6000.h +++ b/drivers/media/dvb-frontends/stb6000.h @@ -29,10 +29,11 @@ /** * Attach a stb6000 tuner to the supplied frontend structure. * - * @param fe Frontend to attach to. - * @param addr i2c address of the tuner. - * @param i2c i2c adapter to use. - * @return FE pointer on success, NULL on failure. + * @fe: Frontend to attach to. + * @addr: i2c address of the tuner. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. */ #if IS_REACHABLE(CONFIG_DVB_STB6000) extern struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr, diff --git a/drivers/media/dvb-frontends/stv0299.c b/drivers/media/dvb-frontends/stv0299.c index b36b21a13201..b1f3d675d316 100644 --- a/drivers/media/dvb-frontends/stv0299.c +++ b/drivers/media/dvb-frontends/stv0299.c @@ -368,7 +368,7 @@ static int stv0299_set_voltage(struct dvb_frontend *fe, reg0x08 = stv0299_readreg (state, 0x08); reg0x0c = stv0299_readreg (state, 0x0c); - /** + /* * H/V switching over OP0, OP1 and OP2 are LNB power enable bits */ reg0x0c &= 0x0f; diff --git a/drivers/media/dvb-frontends/tda826x.h b/drivers/media/dvb-frontends/tda826x.h index 81abe1aebe9f..6a7bed12e741 100644 --- a/drivers/media/dvb-frontends/tda826x.h +++ b/drivers/media/dvb-frontends/tda826x.h @@ -29,11 +29,12 @@ /** * Attach a tda826x tuner to the supplied frontend structure. * - * @param fe Frontend to attach to. - * @param addr i2c address of the tuner. - * @param i2c i2c adapter to use. - * @param has_loopthrough Set to 1 if the card has a loopthrough RF connector. - * @return FE pointer on success, NULL on failure. + * @fe: Frontend to attach to. + * @addr: i2c address of the tuner. + * @i2c: i2c adapter to use. + * @has_loopthrough: Set to 1 if the card has a loopthrough RF connector. + * + * return: FE pointer on success, NULL on failure. */ #if IS_REACHABLE(CONFIG_DVB_TDA826X) extern struct dvb_frontend* tda826x_attach(struct dvb_frontend *fe, int addr, diff --git a/drivers/media/dvb-frontends/tua6100.h b/drivers/media/dvb-frontends/tua6100.h index 9f15cbdfdeca..6c098a894ea6 100644 --- a/drivers/media/dvb-frontends/tua6100.h +++ b/drivers/media/dvb-frontends/tua6100.h @@ -1,4 +1,4 @@ -/** +/* * Driver for Infineon tua6100 PLL. * * (c) 2006 Andrew de Quincey diff --git a/drivers/media/dvb-frontends/zd1301_demod.h b/drivers/media/dvb-frontends/zd1301_demod.h index ceb2e05e873c..9496f7e8b4dd 100644 --- a/drivers/media/dvb-frontends/zd1301_demod.h +++ b/drivers/media/dvb-frontends/zd1301_demod.h @@ -27,7 +27,6 @@ * @reg_read: Register read callback. * @reg_write: Register write callback. */ - struct zd1301_demod_platform_data { void *reg_priv; int (*reg_read)(void *, u16, u8 *); @@ -41,8 +40,7 @@ struct zd1301_demod_platform_data { * * Return: Pointer to DVB frontend which given platform device owns. */ - -struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *); +struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *pdev); /** * zd1301_demod_get_i2c_adapter() - Get pointer to I2C adapter @@ -50,8 +48,7 @@ struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *); * * Return: Pointer to I2C adapter which given platform device owns. */ - -struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *); +struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *pdev); #else diff --git a/drivers/media/dvb-frontends/zl10036.h b/drivers/media/dvb-frontends/zl10036.h index 88751adfecf7..ec90ca927739 100644 --- a/drivers/media/dvb-frontends/zl10036.h +++ b/drivers/media/dvb-frontends/zl10036.h @@ -20,20 +20,20 @@ #include #include "dvb_frontend.h" -/** - * Attach a zl10036 tuner to the supplied frontend structure. - * - * @param fe Frontend to attach to. - * @param config zl10036_config structure - * @return FE pointer on success, NULL on failure. - */ - struct zl10036_config { u8 tuner_address; int rf_loop_enable; }; #if IS_REACHABLE(CONFIG_DVB_ZL10036) +/** + * Attach a zl10036 tuner to the supplied frontend structure. + * + * @fe: Frontend to attach to. + * @config: zl10036_config structure. + * @i2c: pointer to struct i2c_adapter. + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *zl10036_attach(struct dvb_frontend *fe, const struct zl10036_config *config, struct i2c_adapter *i2c); #else -- cgit v1.2.3 From be9b53c83792e3898755dce90f8c632d40e7c83e Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Wed, 29 Nov 2017 14:02:22 -0500 Subject: media: dvb-frontends: complete kernel-doc markups For the dvb-frontends that are now part of the documentation, complete the kernel-doc markups, in order for them to be properly used at the driver's kAPI documentation. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb-frontends/af9013.h | 24 +++-- drivers/media/dvb-frontends/ascot2e.h | 9 ++ drivers/media/dvb-frontends/cxd2820r.h | 24 ++++- drivers/media/dvb-frontends/drxk.h | 8 ++ drivers/media/dvb-frontends/dvb-pll.h | 2 +- drivers/media/dvb-frontends/helene.h | 29 ++++-- drivers/media/dvb-frontends/horus3a.h | 9 ++ drivers/media/dvb-frontends/ix2505v.h | 17 ++-- drivers/media/dvb-frontends/m88ds3103.h | 155 ++++++++++++----------------- drivers/media/dvb-frontends/mb86a20s.h | 17 ++-- drivers/media/dvb-frontends/rtl2830.h | 1 - drivers/media/dvb-frontends/rtl2832.h | 1 - drivers/media/dvb-frontends/stb6000.h | 2 +- drivers/media/dvb-frontends/tda10071.h | 1 - drivers/media/dvb-frontends/zd1301_demod.h | 6 ++ 15 files changed, 177 insertions(+), 128 deletions(-) (limited to 'drivers') diff --git a/drivers/media/dvb-frontends/af9013.h b/drivers/media/dvb-frontends/af9013.h index 353274524f1b..a290722c04fd 100644 --- a/drivers/media/dvb-frontends/af9013.h +++ b/drivers/media/dvb-frontends/af9013.h @@ -38,6 +38,13 @@ * @api_version: Firmware API version. * @gpio: GPIOs. * @get_dvb_frontend: Get DVB frontend callback. + * + * AF9013/5 GPIOs (mostly guessed): + * * demod#1-gpio#0 - set demod#2 i2c-addr for dual devices + * * demod#1-gpio#1 - xtal setting (?) + * * demod#1-gpio#3 - tuner#1 + * * demod#2-gpio#0 - tuner#2 + * * demod#2-gpio#1 - xtal setting (?) */ struct af9013_platform_data { /* @@ -89,16 +96,15 @@ struct af9013_platform_data { #define AF9013_TS_PARALLEL AF9013_TS_MODE_PARALLEL #define AF9013_TS_SERIAL AF9013_TS_MODE_SERIAL -/* - * AF9013/5 GPIOs (mostly guessed) - * demod#1-gpio#0 - set demod#2 i2c-addr for dual devices - * demod#1-gpio#1 - xtal setting (?) - * demod#1-gpio#3 - tuner#1 - * demod#2-gpio#0 - tuner#2 - * demod#2-gpio#1 - xtal setting (?) - */ - #if IS_REACHABLE(CONFIG_DVB_AF9013) +/** + * Attach an af9013 demod + * + * @config: pointer to &struct af9013_config with demod configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *af9013_attach(const struct af9013_config *config, struct i2c_adapter *i2c); #else diff --git a/drivers/media/dvb-frontends/ascot2e.h b/drivers/media/dvb-frontends/ascot2e.h index dc61bf7d1b09..418c565baf83 100644 --- a/drivers/media/dvb-frontends/ascot2e.h +++ b/drivers/media/dvb-frontends/ascot2e.h @@ -41,6 +41,15 @@ struct ascot2e_config { }; #if IS_REACHABLE(CONFIG_DVB_ASCOT2E) +/** + * Attach an ascot2e tuner + * + * @fe: frontend to be attached + * @config: pointer to &struct ascot2e_config with tuner configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *ascot2e_attach(struct dvb_frontend *fe, const struct ascot2e_config *config, struct i2c_adapter *i2c); diff --git a/drivers/media/dvb-frontends/cxd2820r.h b/drivers/media/dvb-frontends/cxd2820r.h index f3ff8f6eb3bb..a49400c0e28e 100644 --- a/drivers/media/dvb-frontends/cxd2820r.h +++ b/drivers/media/dvb-frontends/cxd2820r.h @@ -49,7 +49,6 @@ * @gpio_chip_base: GPIO. * @get_dvb_frontend: Get DVB frontend. */ - struct cxd2820r_platform_data { u8 ts_mode; bool ts_clk_inv; @@ -62,6 +61,17 @@ struct cxd2820r_platform_data { bool attach_in_use; }; +/** + * struct cxd2820r_config - configuration for cxd2020r demod + * + * @i2c_address: Demodulator I2C address. Driver determines DVB-C slave I2C + * address automatically from master address. + * Default: none, must set. Values: 0x6c, 0x6d. + * @ts_mode: TS output mode. Default: none, must set. Values: FIXME? + * @ts_clock_inv: TS clock inverted. Default: 0. Values: 0, 1. + * @if_agc_polarity: Default: 0. Values: 0, 1 + * @spec_inv: Spectrum inversion. Default: 0. Values: 0, 1. + */ struct cxd2820r_config { /* Demodulator I2C address. * Driver determines DVB-C slave I2C address automatically from master @@ -98,6 +108,18 @@ struct cxd2820r_config { #if IS_REACHABLE(CONFIG_DVB_CXD2820R) +/** + * Attach a cxd2820r demod + * + * @config: pointer to &struct cxd2820r_config with demod configuration. + * @i2c: i2c adapter to use. + * @gpio_chip_base: if zero, disables GPIO setting. Otherwise, if + * CONFIG_GPIOLIB is set dynamically allocate + * gpio base; if is not set, use its value to + * setup the GPIO pins. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *cxd2820r_attach( const struct cxd2820r_config *config, struct i2c_adapter *i2c, diff --git a/drivers/media/dvb-frontends/drxk.h b/drivers/media/dvb-frontends/drxk.h index c936142367fb..b16fedbb53a3 100644 --- a/drivers/media/dvb-frontends/drxk.h +++ b/drivers/media/dvb-frontends/drxk.h @@ -53,6 +53,14 @@ struct drxk_config { }; #if IS_REACHABLE(CONFIG_DVB_DRXK) +/** + * Attach a drxk demod + * + * @config: pointer to &struct drxk_config with demod configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *drxk_attach(const struct drxk_config *config, struct i2c_adapter *i2c); #else diff --git a/drivers/media/dvb-frontends/dvb-pll.h b/drivers/media/dvb-frontends/dvb-pll.h index 01dbcc4d9550..212e0730f154 100644 --- a/drivers/media/dvb-frontends/dvb-pll.h +++ b/drivers/media/dvb-frontends/dvb-pll.h @@ -30,6 +30,7 @@ #define DVB_PLL_TDEE4 18 #define DVB_PLL_THOMSON_DTT7520X 19 +#if IS_REACHABLE(CONFIG_DVB_PLL) /** * Attach a dvb-pll to the supplied frontend structure. * @@ -40,7 +41,6 @@ * * return: Frontend pointer on success, NULL on failure */ -#if IS_REACHABLE(CONFIG_DVB_PLL) extern struct dvb_frontend *dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2c, diff --git a/drivers/media/dvb-frontends/helene.h b/drivers/media/dvb-frontends/helene.h index 3f504f5d1d4f..c9fc81c7e4e7 100644 --- a/drivers/media/dvb-frontends/helene.h +++ b/drivers/media/dvb-frontends/helene.h @@ -49,9 +49,31 @@ struct helene_config { }; #if IS_REACHABLE(CONFIG_DVB_HELENE) +/** + * Attach a helene tuner (terrestrial and cable standards) + * + * @fe: frontend to be attached + * @config: pointer to &struct helene_config with tuner configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *helene_attach(struct dvb_frontend *fe, const struct helene_config *config, struct i2c_adapter *i2c); + +/** + * Attach a helene tuner (satellite standards) + * + * @fe: frontend to be attached + * @config: pointer to &struct helene_config with tuner configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ +extern struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe, + const struct helene_config *config, + struct i2c_adapter *i2c); #else static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe, const struct helene_config *config, @@ -60,13 +82,6 @@ static inline struct dvb_frontend *helene_attach(struct dvb_frontend *fe, pr_warn("%s: driver disabled by Kconfig\n", __func__); return NULL; } -#endif - -#if IS_REACHABLE(CONFIG_DVB_HELENE) -extern struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe, - const struct helene_config *config, - struct i2c_adapter *i2c); -#else static inline struct dvb_frontend *helene_attach_s(struct dvb_frontend *fe, const struct helene_config *config, struct i2c_adapter *i2c) diff --git a/drivers/media/dvb-frontends/horus3a.h b/drivers/media/dvb-frontends/horus3a.h index 672a556df71a..9157fd037e2f 100644 --- a/drivers/media/dvb-frontends/horus3a.h +++ b/drivers/media/dvb-frontends/horus3a.h @@ -41,6 +41,15 @@ struct horus3a_config { }; #if IS_REACHABLE(CONFIG_DVB_HORUS3A) +/** + * Attach a horus3a tuner + * + * @fe: frontend to be attached + * @config: pointer to &struct helene_config with tuner configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *horus3a_attach(struct dvb_frontend *fe, const struct horus3a_config *config, struct i2c_adapter *i2c); diff --git a/drivers/media/dvb-frontends/ix2505v.h b/drivers/media/dvb-frontends/ix2505v.h index 31ca03a7b827..49ed93e754ed 100644 --- a/drivers/media/dvb-frontends/ix2505v.h +++ b/drivers/media/dvb-frontends/ix2505v.h @@ -19,19 +19,20 @@ #include #include "dvb_frontend.h" +/** + * struct ix2505v_config - ix2505 attachment configuration + * + * @tuner_address: tuner address + * @tuner_gain: Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB + * @tuner_chargepump: Charge pump output +/- 0=120 1=260 2=555 3=1200(default) + * @min_delay_ms: delay after tune + * @tuner_write_only: disables reads + */ struct ix2505v_config { u8 tuner_address; - - /*Baseband AMP gain control 0/1=0dB(default) 2=-2bB 3=-4dB */ u8 tuner_gain; - - /*Charge pump output +/- 0=120 1=260 2=555 3=1200(default) */ u8 tuner_chargepump; - - /* delay after tune */ int min_delay_ms; - - /* disables reads*/ u8 tuner_write_only; }; diff --git a/drivers/media/dvb-frontends/m88ds3103.h b/drivers/media/dvb-frontends/m88ds3103.h index 04b355a005fb..1a8964a2265d 100644 --- a/drivers/media/dvb-frontends/m88ds3103.h +++ b/drivers/media/dvb-frontends/m88ds3103.h @@ -24,6 +24,34 @@ * 0x68, */ +/** + * enum m88ds3103_ts_mode - TS connection mode + * @M88DS3103_TS_SERIAL: TS output pin D0, normal + * @M88DS3103_TS_SERIAL_D7: TS output pin D7 + * @M88DS3103_TS_PARALLEL: TS Parallel mode + * @M88DS3103_TS_CI: TS CI Mode + */ +enum m88ds3103_ts_mode { + M88DS3103_TS_SERIAL, + M88DS3103_TS_SERIAL_D7, + M88DS3103_TS_PARALLEL, + M88DS3103_TS_CI +}; + +/** + * enum m88ds3103_clock_out + * @M88DS3103_CLOCK_OUT_DISABLED: Clock output is disabled + * @M88DS3103_CLOCK_OUT_ENABLED: Clock output is enabled with crystal + * clock. + * @M88DS3103_CLOCK_OUT_ENABLED_DIV2: Clock output is enabled with half + * crystal clock. + */ +enum m88ds3103_clock_out { + M88DS3103_CLOCK_OUT_DISABLED, + M88DS3103_CLOCK_OUT_ENABLED, + M88DS3103_CLOCK_OUT_ENABLED_DIV2 +}; + /** * struct m88ds3103_platform_data - Platform data for the m88ds3103 driver * @clk: Clock frequency. @@ -44,24 +72,16 @@ * @get_dvb_frontend: Get DVB frontend. * @get_i2c_adapter: Get I2C adapter. */ - struct m88ds3103_platform_data { u32 clk; u16 i2c_wr_max; -#define M88DS3103_TS_SERIAL 0 /* TS output pin D0, normal */ -#define M88DS3103_TS_SERIAL_D7 1 /* TS output pin D7 */ -#define M88DS3103_TS_PARALLEL 2 /* TS Parallel mode */ -#define M88DS3103_TS_CI 3 /* TS CI Mode */ - u8 ts_mode:2; + enum m88ds3103_ts_mode ts_mode; u32 ts_clk; + enum m88ds3103_clock_out clk_out; u8 ts_clk_pol:1; u8 spec_inv:1; u8 agc; u8 agc_inv:1; -#define M88DS3103_CLOCK_OUT_DISABLED 0 -#define M88DS3103_CLOCK_OUT_ENABLED 1 -#define M88DS3103_CLOCK_OUT_ENABLED_DIV2 2 - u8 clk_out:2; u8 envelope_mode:1; u8 lnb_hv_pol:1; u8 lnb_en_pol:1; @@ -73,105 +93,60 @@ struct m88ds3103_platform_data { u8 attach_in_use:1; }; -/* - * Do not add new m88ds3103_attach() users! Use I2C bindings instead. +/** + * struct m88ds3103_config - m88ds3102 configuration + * + * @i2c_addr: I2C address. Default: none, must set. Example: 0x68, ... + * @clock: Device's clock. Default: none, must set. Example: 27000000 + * @i2c_wr_max: Max bytes I2C provider is asked to write at once. + * Default: none, must set. Example: 33, 65, ... + * @ts_mode: TS output mode, as defined by &enum m88ds3103_ts_mode. + * Default: M88DS3103_TS_SERIAL. + * @ts_clk: TS clk in KHz. Default: 0. + * @ts_clk_pol: TS clk polarity.Default: 0. + * 1-active at falling edge; 0-active at rising edge. + * @spec_inv: Spectrum inversion. Default: 0. + * @agc_inv: AGC polarity. Default: 0. + * @clock_out: Clock output, as defined by &enum m88ds3103_clock_out. + * Default: M88DS3103_CLOCK_OUT_DISABLED. + * @envelope_mode: DiSEqC envelope mode. Default: 0. + * @agc: AGC configuration. Default: none, must set. + * @lnb_hv_pol: LNB H/V pin polarity. Default: 0. Values: + * 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18; + * 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13. + * @lnb_en_pol: LNB enable pin polarity. Default: 0. Values: + * 1: pin high to enable, pin low to disable; + * 0: pin high to disable, pin low to enable. */ struct m88ds3103_config { - /* - * I2C address - * Default: none, must set - * 0x68, ... - */ u8 i2c_addr; - - /* - * clock - * Default: none, must set - * 27000000 - */ u32 clock; - - /* - * max bytes I2C provider is asked to write at once - * Default: none, must set - * 33, 65, ... - */ u16 i2c_wr_max; - - /* - * TS output mode - * Default: M88DS3103_TS_SERIAL - */ -#define M88DS3103_TS_SERIAL 0 /* TS output pin D0, normal */ -#define M88DS3103_TS_SERIAL_D7 1 /* TS output pin D7 */ -#define M88DS3103_TS_PARALLEL 2 /* TS Parallel mode */ -#define M88DS3103_TS_CI 3 /* TS CI Mode */ u8 ts_mode; - - /* - * TS clk in KHz - * Default: 0. - */ u32 ts_clk; - - /* - * TS clk polarity. - * Default: 0. 1-active at falling edge; 0-active at rising edge. - */ u8 ts_clk_pol:1; - - /* - * spectrum inversion - * Default: 0 - */ u8 spec_inv:1; - - /* - * AGC polarity - * Default: 0 - */ u8 agc_inv:1; - - /* - * clock output - * Default: M88DS3103_CLOCK_OUT_DISABLED - */ -#define M88DS3103_CLOCK_OUT_DISABLED 0 -#define M88DS3103_CLOCK_OUT_ENABLED 1 -#define M88DS3103_CLOCK_OUT_ENABLED_DIV2 2 u8 clock_out; - - /* - * DiSEqC envelope mode - * Default: 0 - */ u8 envelope_mode:1; - - /* - * AGC configuration - * Default: none, must set - */ u8 agc; - - /* - * LNB H/V pin polarity - * Default: 0. - * 1: pin high set to VOLTAGE_13, pin low to set VOLTAGE_18. - * 0: pin high set to VOLTAGE_18, pin low to set VOLTAGE_13. - */ u8 lnb_hv_pol:1; - - /* - * LNB enable pin polarity - * Default: 0. - * 1: pin high to enable, pin low to disable. - * 0: pin high to disable, pin low to enable. - */ u8 lnb_en_pol:1; }; #if defined(CONFIG_DVB_M88DS3103) || \ (defined(CONFIG_DVB_M88DS3103_MODULE) && defined(MODULE)) +/** + * Attach a m88ds3103 demod + * + * @config: pointer to &struct m88ds3103_config with demod configuration. + * @i2c: i2c adapter to use. + * @tuner_i2c: on success, returns the I2C adapter associated with + * m88ds3103 tuner. + * + * return: FE pointer on success, NULL on failure. + * Note: Do not add new m88ds3103_attach() users! Use I2C bindings instead. + */ extern struct dvb_frontend *m88ds3103_attach( const struct m88ds3103_config *config, struct i2c_adapter *i2c, diff --git a/drivers/media/dvb-frontends/mb86a20s.h b/drivers/media/dvb-frontends/mb86a20s.h index dfb02db2126c..05c9725d1c5f 100644 --- a/drivers/media/dvb-frontends/mb86a20s.h +++ b/drivers/media/dvb-frontends/mb86a20s.h @@ -26,7 +26,6 @@ * @demod_address: the demodulator's i2c address * @is_serial: if true, TS is serial. Otherwise, TS is parallel */ - struct mb86a20s_config { u32 fclk; u8 demod_address; @@ -34,9 +33,17 @@ struct mb86a20s_config { }; #if IS_REACHABLE(CONFIG_DVB_MB86A20S) +/** + * Attach a mb86a20s demod + * + * @config: pointer to &struct mb86a20s_config with demod configuration. + * @i2c: i2c adapter to use. + * + * return: FE pointer on success, NULL on failure. + */ extern struct dvb_frontend *mb86a20s_attach(const struct mb86a20s_config *config, struct i2c_adapter *i2c); -extern struct i2c_adapter *mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *); + #else static inline struct dvb_frontend *mb86a20s_attach( const struct mb86a20s_config *config, struct i2c_adapter *i2c) @@ -44,12 +51,6 @@ static inline struct dvb_frontend *mb86a20s_attach( printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); return NULL; } -static inline struct i2c_adapter * - mb86a20s_get_tuner_i2c_adapter(struct dvb_frontend *fe) -{ - printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); - return NULL; -} #endif #endif /* MB86A20S */ diff --git a/drivers/media/dvb-frontends/rtl2830.h b/drivers/media/dvb-frontends/rtl2830.h index 0cde151e6608..458ac94e8a8b 100644 --- a/drivers/media/dvb-frontends/rtl2830.h +++ b/drivers/media/dvb-frontends/rtl2830.h @@ -32,7 +32,6 @@ * @pid_filter: Set PID to PID filter. * @pid_filter_ctrl: Control PID filter. */ - struct rtl2830_platform_data { u32 clk; bool spec_inv; diff --git a/drivers/media/dvb-frontends/rtl2832.h b/drivers/media/dvb-frontends/rtl2832.h index 03c0de039fa9..6a124ff71c2b 100644 --- a/drivers/media/dvb-frontends/rtl2832.h +++ b/drivers/media/dvb-frontends/rtl2832.h @@ -35,7 +35,6 @@ * @pid_filter: Set PID to PID filter. * @pid_filter_ctrl: Control PID filter. */ - struct rtl2832_platform_data { u32 clk; /* diff --git a/drivers/media/dvb-frontends/stb6000.h b/drivers/media/dvb-frontends/stb6000.h index 3c4d51dd5415..e94a3d5facf6 100644 --- a/drivers/media/dvb-frontends/stb6000.h +++ b/drivers/media/dvb-frontends/stb6000.h @@ -26,6 +26,7 @@ #include #include "dvb_frontend.h" +#if IS_REACHABLE(CONFIG_DVB_STB6000) /** * Attach a stb6000 tuner to the supplied frontend structure. * @@ -35,7 +36,6 @@ * * return: FE pointer on success, NULL on failure. */ -#if IS_REACHABLE(CONFIG_DVB_STB6000) extern struct dvb_frontend *stb6000_attach(struct dvb_frontend *fe, int addr, struct i2c_adapter *i2c); #else diff --git a/drivers/media/dvb-frontends/tda10071.h b/drivers/media/dvb-frontends/tda10071.h index 8f184026ee11..da1a87bc1603 100644 --- a/drivers/media/dvb-frontends/tda10071.h +++ b/drivers/media/dvb-frontends/tda10071.h @@ -38,7 +38,6 @@ * @tuner_i2c_addr: CX24118A tuner I2C address (0x14, 0x54, ...). * @get_dvb_frontend: Get DVB frontend. */ - struct tda10071_platform_data { u32 clk; u16 i2c_wr_max; diff --git a/drivers/media/dvb-frontends/zd1301_demod.h b/drivers/media/dvb-frontends/zd1301_demod.h index 9496f7e8b4dd..6cd8f6f9c415 100644 --- a/drivers/media/dvb-frontends/zd1301_demod.h +++ b/drivers/media/dvb-frontends/zd1301_demod.h @@ -52,6 +52,12 @@ struct i2c_adapter *zd1301_demod_get_i2c_adapter(struct platform_device *pdev); #else +/** + * zd1301_demod_get_dvb_frontend() - Attach a zd1301 frontend + * @dev: Pointer to platform device + * + * Return: Pointer to %struct dvb_frontend or NULL if attach fails. + */ static inline struct dvb_frontend *zd1301_demod_get_dvb_frontend(struct platform_device *dev) { printk(KERN_WARNING "%s: driver disabled by Kconfig\n", __func__); -- cgit v1.2.3 From 6d33377f2abbf9f0e561b116dd468d1c3ff36a6a Mon Sep 17 00:00:00 2001 From: Laurent Caumont Date: Sat, 11 Nov 2017 12:44:46 -0500 Subject: media: dvb: i2c transfers over usb cannot be done from stack Cc: stable@vger.kernel.org Signed-off-by: Laurent Caumont Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- drivers/media/usb/dvb-usb/dibusb-common.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/usb/dvb-usb/dibusb-common.c b/drivers/media/usb/dvb-usb/dibusb-common.c index 8207e6900656..bcacb0f22028 100644 --- a/drivers/media/usb/dvb-usb/dibusb-common.c +++ b/drivers/media/usb/dvb-usb/dibusb-common.c @@ -223,8 +223,20 @@ EXPORT_SYMBOL(dibusb_i2c_algo); int dibusb_read_eeprom_byte(struct dvb_usb_device *d, u8 offs, u8 *val) { - u8 wbuf[1] = { offs }; - return dibusb_i2c_msg(d, 0x50, wbuf, 1, val, 1); + u8 *buf; + int rc; + + buf = kmalloc(2, GFP_KERNEL); + if (!buf) + return -ENOMEM; + + buf[0] = offs; + + rc = dibusb_i2c_msg(d, 0x50, &buf[0], 1, &buf[1], 1); + *val = buf[1]; + kfree(buf); + + return rc; } EXPORT_SYMBOL(dibusb_read_eeprom_byte); -- cgit v1.2.3 From 67f0f15ad5c47490e19f2526f8f9cea97c5ce1a6 Mon Sep 17 00:00:00 2001 From: Sean Young Date: Sun, 19 Nov 2017 16:57:27 -0500 Subject: media: rc: partial revert of "media: rc: per-protocol repeat period" Since commit d57ea877af38 ("media: rc: per-protocol repeat period"), most IR protocols have a lower keyup timeout. This causes problems on the ite-cir, which has default IR timeout of 200ms. Since the IR decoders read the trailing space, with a IR timeout of 200ms, the last keydown will have at least a delay of 200ms. This is more than the protocol timeout of e.g. rc-6 (which is 164ms). As a result the last IR will be interpreted as a new keydown event, and we get two keypresses. Revert the protocol timeout to 250ms, except for cec which needs a timeout of 550ms. Fixes: d57ea877af38 ("media: rc: per-protocol repeat period") Cc: # 4.14 Reported-by: Matthias Reichl Signed-off-by: Sean Young Tested-by: Matthias Reichl Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/rc-main.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'drivers') diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index c4b0217bd169..c144b77eac98 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -39,41 +39,41 @@ static const struct { [RC_PROTO_UNKNOWN] = { .name = "unknown", .repeat_period = 250 }, [RC_PROTO_OTHER] = { .name = "other", .repeat_period = 250 }, [RC_PROTO_RC5] = { .name = "rc-5", - .scancode_bits = 0x1f7f, .repeat_period = 164 }, + .scancode_bits = 0x1f7f, .repeat_period = 250 }, [RC_PROTO_RC5X_20] = { .name = "rc-5x-20", - .scancode_bits = 0x1f7f3f, .repeat_period = 164 }, + .scancode_bits = 0x1f7f3f, .repeat_period = 250 }, [RC_PROTO_RC5_SZ] = { .name = "rc-5-sz", - .scancode_bits = 0x2fff, .repeat_period = 164 }, + .scancode_bits = 0x2fff, .repeat_period = 250 }, [RC_PROTO_JVC] = { .name = "jvc", .scancode_bits = 0xffff, .repeat_period = 250 }, [RC_PROTO_SONY12] = { .name = "sony-12", - .scancode_bits = 0x1f007f, .repeat_period = 100 }, + .scancode_bits = 0x1f007f, .repeat_period = 250 }, [RC_PROTO_SONY15] = { .name = "sony-15", - .scancode_bits = 0xff007f, .repeat_period = 100 }, + .scancode_bits = 0xff007f, .repeat_period = 250 }, [RC_PROTO_SONY20] = { .name = "sony-20", - .scancode_bits = 0x1fff7f, .repeat_period = 100 }, + .scancode_bits = 0x1fff7f, .repeat_period = 250 }, [RC_PROTO_NEC] = { .name = "nec", - .scancode_bits = 0xffff, .repeat_period = 160 }, + .scancode_bits = 0xffff, .repeat_period = 250 }, [RC_PROTO_NECX] = { .name = "nec-x", - .scancode_bits = 0xffffff, .repeat_period = 160 }, + .scancode_bits = 0xffffff, .repeat_period = 250 }, [RC_PROTO_NEC32] = { .name = "nec-32", - .scancode_bits = 0xffffffff, .repeat_period = 160 }, + .scancode_bits = 0xffffffff, .repeat_period = 250 }, [RC_PROTO_SANYO] = { .name = "sanyo", .scancode_bits = 0x1fffff, .repeat_period = 250 }, [RC_PROTO_MCIR2_KBD] = { .name = "mcir2-kbd", - .scancode_bits = 0xffff, .repeat_period = 150 }, + .scancode_bits = 0xffff, .repeat_period = 250 }, [RC_PROTO_MCIR2_MSE] = { .name = "mcir2-mse", - .scancode_bits = 0x1fffff, .repeat_period = 150 }, + .scancode_bits = 0x1fffff, .repeat_period = 250 }, [RC_PROTO_RC6_0] = { .name = "rc-6-0", - .scancode_bits = 0xffff, .repeat_period = 164 }, + .scancode_bits = 0xffff, .repeat_period = 250 }, [RC_PROTO_RC6_6A_20] = { .name = "rc-6-6a-20", - .scancode_bits = 0xfffff, .repeat_period = 164 }, + .scancode_bits = 0xfffff, .repeat_period = 250 }, [RC_PROTO_RC6_6A_24] = { .name = "rc-6-6a-24", - .scancode_bits = 0xffffff, .repeat_period = 164 }, + .scancode_bits = 0xffffff, .repeat_period = 250 }, [RC_PROTO_RC6_6A_32] = { .name = "rc-6-6a-32", - .scancode_bits = 0xffffffff, .repeat_period = 164 }, + .scancode_bits = 0xffffffff, .repeat_period = 250 }, [RC_PROTO_RC6_MCE] = { .name = "rc-6-mce", - .scancode_bits = 0xffff7fff, .repeat_period = 164 }, + .scancode_bits = 0xffff7fff, .repeat_period = 250 }, [RC_PROTO_SHARP] = { .name = "sharp", .scancode_bits = 0x1fff, .repeat_period = 250 }, [RC_PROTO_XMP] = { .name = "xmp", .repeat_period = 250 }, -- cgit v1.2.3 From fce8ba670b7418319da14a6fc6668db1f1a96267 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Sun, 5 Nov 2017 17:51:00 -0500 Subject: media: ov13858: Select V4L2_FWNODE The ov13858 driver depends on the V4L2 fwnode, thus add that to Kconfig. Fixes: 5fcf092e0c9f ("[media] ov13858: add support for OV13858 sensor") Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/i2c/Kconfig b/drivers/media/i2c/Kconfig index 3c6d6428f525..cb5d7ff82915 100644 --- a/drivers/media/i2c/Kconfig +++ b/drivers/media/i2c/Kconfig @@ -676,6 +676,7 @@ config VIDEO_OV13858 tristate "OmniVision OV13858 sensor support" depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API depends on MEDIA_CAMERA_SUPPORT + select V4L2_FWNODE ---help--- This is a Video4Linux2 sensor-level driver for the OmniVision OV13858 camera. -- cgit v1.2.3 From 2aa4d4985fc526ce076bef68b3efe6013c20b975 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 13 Nov 2017 08:56:45 -0500 Subject: media: et8ek8: select V4L2_FWNODE v4l2_async_register_subdev_sensor_common() is only provided when CONFIG_V4L2_FWNODE is enabled, otherwise we get a link failure: drivers/media/i2c/et8ek8/et8ek8_driver.o: In function `et8ek8_probe': et8ek8_driver.c:(.text+0x884): undefined reference to `v4l2_async_register_subdev_sensor_common' This adds a Kconfig 'select' statement like all the other users of this interface have. Fixes: d8932f38c10f ("media: et8ek8: Add support for flash and lens devices") Signed-off-by: Arnd Bergmann Reviewed-by: Sebastian Reichel Acked-by: Pavel Machek Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/i2c/et8ek8/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/media/i2c/et8ek8/Kconfig b/drivers/media/i2c/et8ek8/Kconfig index 14399365ad7f..9fe409e95666 100644 --- a/drivers/media/i2c/et8ek8/Kconfig +++ b/drivers/media/i2c/et8ek8/Kconfig @@ -1,6 +1,7 @@ config VIDEO_ET8EK8 tristate "ET8EK8 camera sensor support" depends on I2C && VIDEO_V4L2 && VIDEO_V4L2_SUBDEV_API + select V4L2_FWNODE ---help--- This is a driver for the Toshiba ET8EK8 5 MP camera sensor. It is used for example in Nokia N900 (RX-51). -- cgit v1.2.3 From 3bf393860f6efc41ce268f5c21a457df1e8e6e00 Mon Sep 17 00:00:00 2001 From: Tomasz Figa Date: Wed, 15 Nov 2017 06:55:22 -0500 Subject: media: v4l2-fwnode: Check subdev count after checking port Current implementation of __v4l2_async_notifier_parse_fwnode_endpoints() checks first whether subdev_count >= subdev_max and only then whether the port being parsed matches the given port index. This triggers an error in otherwise valid cases of skipping ports that do not match. Fix this by moving the check below the port index check. Fixes: 9ca465312132 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device") Signed-off-by: Tomasz Figa Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-fwnode.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/media/v4l2-core/v4l2-fwnode.c b/drivers/media/v4l2-core/v4l2-fwnode.c index 681b192420d9..fb72c7ac04d4 100644 --- a/drivers/media/v4l2-core/v4l2-fwnode.c +++ b/drivers/media/v4l2-core/v4l2-fwnode.c @@ -458,11 +458,6 @@ static int __v4l2_async_notifier_parse_fwnode_endpoints( if (!is_available) continue; - if (WARN_ON(notifier->num_subdevs >= notifier->max_subdevs)) { - ret = -EINVAL; - break; - } - if (has_port) { struct fwnode_endpoint ep; @@ -474,6 +469,11 @@ static int __v4l2_async_notifier_parse_fwnode_endpoints( continue; } + if (WARN_ON(notifier->num_subdevs >= notifier->max_subdevs)) { + ret = -EINVAL; + break; + } + ret = v4l2_async_notifier_fwnode_parse_endpoint( dev, notifier, fwnode, asd_struct_size, parse_endpoint); if (ret < 0) -- cgit v1.2.3 From 487cc857851f6ca7850636bd111e7a4bfadab4da Mon Sep 17 00:00:00 2001 From: Niklas Söderlund Date: Wed, 15 Nov 2017 10:43:58 -0500 Subject: media: v4l: async: use the v4l2_dev from the root notifier when matching sub-devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When matching and registering a sub-device from a sub-notifier use the v4l2_device from the root parent notifier. Using the v4l2_dev stored in the sub-notifier itself is incorrect as it might not be set. This can be demonstrated by unbinding and rebinding the adv748x driver and observing that it fails to probe due to the check !v4l2_dev in v4l2_device_register_subdev(). # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/unbind # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/bind adv748x 4-0070: chip found @ 0xe0 revision 2143 adv748x 4-0070: Failed to probe TXA adv748x: probe of 4-0070 failed with error -22 Looking at the commit which adds sub-notifiers to V4L2 it looks like this is the intended behavior of the original commit. With this fix the adv748x can be re-bound and still function properly. Fixes: 2cab00bb076b9f0e ("media: v4l: async: Allow binding notifiers to sub-devices") Signed-off-by: Niklas Söderlund Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-async.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/media/v4l2-core/v4l2-async.c b/drivers/media/v4l2-core/v4l2-async.c index a7c3464976f2..e5acfab470a5 100644 --- a/drivers/media/v4l2-core/v4l2-async.c +++ b/drivers/media/v4l2-core/v4l2-async.c @@ -558,8 +558,7 @@ int v4l2_async_register_subdev(struct v4l2_subdev *sd) if (!asd) continue; - ret = v4l2_async_match_notify(notifier, notifier->v4l2_dev, sd, - asd); + ret = v4l2_async_match_notify(notifier, v4l2_dev, sd, asd); if (ret) goto err_unbind; -- cgit v1.2.3 From 781b045baefdabf7e0bc9f33672ca830d3db9f27 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Wed, 1 Nov 2017 05:40:58 -0400 Subject: media: imx274: Fix error handling, add MAINTAINERS entry Add the missing MAINTAINERS entry for imx274, fix error handling in driver probe and unregister the correct control handler in driver remove. Signed-off-by: Sakari Ailus Signed-off-by: Mauro Carvalho Chehab --- MAINTAINERS | 8 ++++++++ drivers/media/i2c/imx274.c | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/MAINTAINERS b/MAINTAINERS index aa71ab52fd76..7a52a66aa991 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12630,6 +12630,14 @@ S: Maintained F: drivers/ssb/ F: include/linux/ssb/ +SONY IMX274 SENSOR DRIVER +M: Leon Luo +L: linux-media@vger.kernel.org +T: git git://linuxtv.org/media_tree.git +S: Maintained +F: drivers/media/i2c/imx274.c +F: Documentation/devicetree/bindings/media/i2c/imx274.txt + SONY MEMORYSTICK CARD SUPPORT M: Alex Dubov W: http://tifmxx.berlios.de/ diff --git a/drivers/media/i2c/imx274.c b/drivers/media/i2c/imx274.c index 800b9bf9cdd3..2f71af2f90bf 100644 --- a/drivers/media/i2c/imx274.c +++ b/drivers/media/i2c/imx274.c @@ -1770,8 +1770,7 @@ static int imx274_probe(struct i2c_client *client, return 0; err_ctrls: - v4l2_async_unregister_subdev(sd); - v4l2_ctrl_handler_free(sd->ctrl_handler); + v4l2_ctrl_handler_free(&imx274->ctrls.handler); err_me: media_entity_cleanup(&sd->entity); err_regmap: @@ -1788,7 +1787,7 @@ static int imx274_remove(struct i2c_client *client) imx274_write_table(imx274, mode_table[IMX274_MODE_STOP_STREAM]); v4l2_async_unregister_subdev(sd); - v4l2_ctrl_handler_free(sd->ctrl_handler); + v4l2_ctrl_handler_free(&imx274->ctrls.handler); media_entity_cleanup(&sd->entity); mutex_destroy(&imx274->lock); return 0; -- cgit v1.2.3 From a158531f3c92467df0e93e000d58185acae78a6e Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 21 Nov 2017 15:18:10 +0100 Subject: gpio: 74x164: Fix crash during .remove() Commit 7ebc194d0fd4bb0f ("gpio: 74x164: Introduce 'enable-gpios' property") added a new member gpiod_oe to the end of the struct gen_74x164_chip, after the zero-length buffer array. However, this buffer is a flexible array, allocated together with the structure during .probe(). As the buffer is no longer the last member, writing to it corrupts the newly added member after it. During device removal, the corrupted member will be used as a pointer, leading to a crash. This went unnoticed, as the flexible array was declared as "buffer[0]" instead of "buffer[]", and thus did not trigger a "flexible array member not at end of struct" error from gcc. Move the gpiod_oe field up to fix this, and drop the zero from the array size to prevent future similar bugs. Fixes: 7ebc194d0fd4bb0f ("gpio: 74x164: Introduce 'enable-gpios' property") Signed-off-by: Geert Uytterhoeven Reviewed-by: Fabio Estevam Signed-off-by: Linus Walleij --- drivers/gpio/gpio-74x164.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpio/gpio-74x164.c b/drivers/gpio/gpio-74x164.c index 6b535ec858cc..15a1f4b348c4 100644 --- a/drivers/gpio/gpio-74x164.c +++ b/drivers/gpio/gpio-74x164.c @@ -23,6 +23,7 @@ struct gen_74x164_chip { struct gpio_chip gpio_chip; struct mutex lock; + struct gpio_desc *gpiod_oe; u32 registers; /* * Since the registers are chained, every byte sent will make @@ -31,8 +32,7 @@ struct gen_74x164_chip { * register at the end of the transfer. So, to have a logical * numbering, store the bytes in reverse order. */ - u8 buffer[0]; - struct gpio_desc *gpiod_oe; + u8 buffer[]; }; static int __gen_74x164_write_config(struct gen_74x164_chip *chip) -- cgit v1.2.3 From 793b9184047f3d7fe4fe234a46951dabfc3cfeeb Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 22 Nov 2017 21:04:14 +0100 Subject: pinctrl: gemini: Fix usage of 3512 groups The pin config lookup function was still hardcoding the 3516 pin set, which is obviously wrong. Use the pointer in the state container. Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-gemini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/pinctrl/pinctrl-gemini.c b/drivers/pinctrl/pinctrl-gemini.c index e9b83e291edf..c11b8f14d841 100644 --- a/drivers/pinctrl/pinctrl-gemini.c +++ b/drivers/pinctrl/pinctrl-gemini.c @@ -2322,7 +2322,7 @@ static const struct gemini_pin_conf *gemini_get_pin_conf(struct gemini_pmx *pmx, int i; for (i = 0; i < pmx->nconfs; i++) { - retconf = &gemini_confs_3516[i]; + retconf = &pmx->confs[i]; if (retconf->pin == pin) return retconf; } -- cgit v1.2.3 From 7f8e2a85c1b0bd440ffe87be82c79fdc319e8291 Mon Sep 17 00:00:00 2001 From: Keerthy Date: Fri, 10 Nov 2017 16:43:17 +0530 Subject: gpio: davinci: Assign first bank regs for unbanked case As per the re-design assign the first bank regs for unbanked irq case. This was missed out in the original patch. Signed-off-by: Keerthy Fixes: b5cf3fd827d2e1 ("gpio: davinci: Redesign driver to accommodate ngpios in one gpio chip") Signed-off-by: Linus Walleij --- drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index f75d8443ecaf..e4b3d7db68c9 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -383,7 +383,7 @@ static int gpio_irq_type_unbanked(struct irq_data *data, unsigned trigger) u32 mask; d = (struct davinci_gpio_controller *)irq_data_get_irq_handler_data(data); - g = (struct davinci_gpio_regs __iomem *)d->regs; + g = (struct davinci_gpio_regs __iomem *)d->regs[0]; mask = __gpio_mask(data->irq - d->base_irq); if (trigger & ~(IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING)) -- cgit v1.2.3 From 6ad4cc8d1ac483e0fd33f605fb2788b0ecf51ed4 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sat, 25 Nov 2017 12:19:48 +0000 Subject: pinctrl: sunxi: Fix A80 interrupt pin bank On the A80 the pins on port B can trigger interrupts, and those are assigned to the second interrupt bank. Having two pins assigned to the same interrupt bank/pin combination does not look healthy (instead more like a copy&paste bug from pins PA14-PA16), so fix the interrupt bank for pins PB14-PB16, which is actually 1. I don't have any A80 board, so could not test this. Fixes: d5e9fb31baa2 ("pinctrl: sunxi: Add A80 pinctrl muxing options") Signed-off-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij --- drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c index 472ef0d91b99..5553c0eb0f41 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun9i-a80.c @@ -145,19 +145,19 @@ static const struct sunxi_desc_pin sun9i_a80_pins[] = { SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x3, "mcsi"), /* MCLK */ - SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 14)), /* PB_EINT14 */ + SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 14)), /* PB_EINT14 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 15), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x3, "mcsi"), /* SCK */ SUNXI_FUNCTION(0x4, "i2c4"), /* SCK */ - SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 15)), /* PB_EINT15 */ + SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 15)), /* PB_EINT15 */ SUNXI_PIN(SUNXI_PINCTRL_PIN(B, 16), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x3, "mcsi"), /* SDA */ SUNXI_FUNCTION(0x4, "i2c4"), /* SDA */ - SUNXI_FUNCTION_IRQ_BANK(0x6, 0, 16)), /* PB_EINT16 */ + SUNXI_FUNCTION_IRQ_BANK(0x6, 1, 16)), /* PB_EINT16 */ /* Hole */ SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 0), -- cgit v1.2.3 From 7c5c2c2d18d778e51fd8b899965097168306031c Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sat, 25 Nov 2017 12:12:30 +0000 Subject: pinctrl: sunxi: Fix A64 UART mux value To use pin PF4 as the RX signal of UART0, we have to write 0b011 into the respective pin controller register. Fix the wrong value we had in our table so far. Fixes: 96851d391d02 ("drivers: pinctrl: add driver for Allwinner A64 SoC") Signed-off-by: Andre Przywara Acked-by: Chen-Yu Tsai Signed-off-by: Linus Walleij --- drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c index 4f2a726bbaeb..f5f77432ce6f 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-a64.c @@ -428,7 +428,7 @@ static const struct sunxi_desc_pin a64_pins[] = { SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), SUNXI_FUNCTION(0x2, "mmc0"), /* D3 */ - SUNXI_FUNCTION(0x4, "uart0")), /* RX */ + SUNXI_FUNCTION(0x3, "uart0")), /* RX */ SUNXI_PIN(SUNXI_PINCTRL_PIN(F, 5), SUNXI_FUNCTION(0x0, "gpio_in"), SUNXI_FUNCTION(0x1, "gpio_out"), -- cgit v1.2.3 From 07c43a382d7de3db01cc28bf2e17ed151cde2046 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Sat, 25 Nov 2017 12:02:00 +0000 Subject: pinctrl: sunxi: Disable strict mode for H5 driver All of the H5 boards in the kernel reference the MMC0 CD pin twice in their DT, so strict mode will make the MMC driver fail to load. To keep existing DTs working, disable strict mode in the H5 driver. Signed-off-by: Andre Przywara Reported-by: Chris Obbard Acked-by: Maxime Ripard Signed-off-by: Linus Walleij --- drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c index 97b48336f84a..a78d7b922ef4 100644 --- a/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c +++ b/drivers/pinctrl/sunxi/pinctrl-sun50i-h5.c @@ -535,14 +535,16 @@ static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_data_broken = { .pins = sun50i_h5_pins, .npins = ARRAY_SIZE(sun50i_h5_pins), .irq_banks = 2, - .irq_read_needs_mux = true + .irq_read_needs_mux = true, + .disable_strict_mode = true, }; static const struct sunxi_pinctrl_desc sun50i_h5_pinctrl_data = { .pins = sun50i_h5_pins, .npins = ARRAY_SIZE(sun50i_h5_pins), .irq_banks = 3, - .irq_read_needs_mux = true + .irq_read_needs_mux = true, + .disable_strict_mode = true, }; static int sun50i_h5_pinctrl_probe(struct platform_device *pdev) -- cgit v1.2.3 From 770b2edece42fa55bbe7d4cbe53347a07b8968d4 Mon Sep 17 00:00:00 2001 From: Yuyang Du Date: Thu, 30 Nov 2017 10:22:40 +0800 Subject: usbip: Fix USB device hang due to wrong enabling of scatter-gather The previous USB3 SuperSpeed enabling patches mistakenly enabled URB scatter-gather chaining, which is actually not supported by the VHCI HCD. This patch fixes that. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=197867 Fixes: 03cd00d538a6feb ("usbip: vhci-hcd: Set the vhci structure up to work") Reported-by: Juan Zea Signed-off-by: Yuyang Du Cc: stable Acked-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- drivers/usb/usbip/vhci_hcd.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/usb/usbip/vhci_hcd.c b/drivers/usb/usbip/vhci_hcd.c index 713e94170963..6b3278c4b72a 100644 --- a/drivers/usb/usbip/vhci_hcd.c +++ b/drivers/usb/usbip/vhci_hcd.c @@ -1098,7 +1098,6 @@ static int hcd_name_to_id(const char *name) static int vhci_setup(struct usb_hcd *hcd) { struct vhci *vhci = *((void **)dev_get_platdata(hcd->self.controller)); - hcd->self.sg_tablesize = ~0; if (usb_hcd_is_primary_hcd(hcd)) { vhci->vhci_hcd_hs = hcd_to_vhci_hcd(hcd); vhci->vhci_hcd_hs->vhci = vhci; -- cgit v1.2.3 From 8935780b9f7bbad0f2eb5dd43f61ba7b509a1575 Mon Sep 17 00:00:00 2001 From: Dennis Dalessandro Date: Tue, 14 Nov 2017 04:34:23 -0800 Subject: IB/hfi1: Initialize bth1 in 16B rc ack builder It is possible the bth1 variable could be used uninitialized so going ahead and giving it a default value. Otherwise we leak stack memory to the network. Fixes: 5b6cabb0db77 ("IB/hfi1: Add 16B RC/UC support") Reviewed-by: Don Hiatt Signed-off-by: Dennis Dalessandro Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/hfi1/rc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/hfi1/rc.c b/drivers/infiniband/hw/hfi1/rc.c index fd01a760259f..af5f7936f7e5 100644 --- a/drivers/infiniband/hw/hfi1/rc.c +++ b/drivers/infiniband/hw/hfi1/rc.c @@ -814,7 +814,7 @@ static inline void hfi1_make_rc_ack_16B(struct rvt_qp *qp, struct hfi1_pportdata *ppd = ppd_from_ibp(ibp); struct hfi1_16b_header *hdr = &opa_hdr->opah; struct ib_other_headers *ohdr; - u32 bth0, bth1; + u32 bth0, bth1 = 0; u16 len, pkey; u8 becn = !!is_fecn; u8 l4 = OPA_16B_L4_IB_LOCAL; -- cgit v1.2.3 From db0acbc475f06c775682ba969ab338e1efa2ae96 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 19 Nov 2017 19:58:30 +0100 Subject: IB: INFINIBAND should depend on HAS_DMA If NO_DMA=y: ERROR: "bad_dma_ops" [net/sunrpc/xprtrdma/rpcrdma.ko] undefined! ERROR: "bad_dma_ops" [net/smc/smc.ko] undefined! ERROR: "bad_dma_ops" [net/rds/rds_rdma.ko] undefined! ERROR: "bad_dma_ops" [net/9p/9pnet_rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/nvme/target/nvmet-rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/nvme/host/nvme-rdma.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/srpt/ib_srpt.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/srp/ib_srp.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/isert/ib_isert.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/iser/ib_iser.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/ulp/ipoib/ib_ipoib.ko] undefined! ERROR: "bad_dma_ops" [drivers/infiniband/core/ib_core.ko] undefined! Before, this was handled implicitly by the dependency on PCI. Add an explicit dependency on HAS_DMA to fix this. Fixes: 931bc0d91639f8fb ("IB: Move PCI dependency from root KConfig to HW's KConfigs") Signed-off-by: Geert Uytterhoeven Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/infiniband/Kconfig b/drivers/infiniband/Kconfig index 98ac46ed7214..cbf186522016 100644 --- a/drivers/infiniband/Kconfig +++ b/drivers/infiniband/Kconfig @@ -1,6 +1,6 @@ menuconfig INFINIBAND tristate "InfiniBand support" - depends on HAS_IOMEM + depends on HAS_IOMEM && HAS_DMA depends on NET depends on INET depends on m || IPV6 != m -- cgit v1.2.3 From e4ec40ec4b260efcca15089de4285a0a3411259b Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Fri, 1 Dec 2017 13:41:19 +0200 Subject: xhci: Don't show incorrect WARN message about events for empty rings xHC can generate two events for a short transfer if the short TRB and last TRB in the TD are not the same TRB. The driver will handle the TD after the first short event, and remove it from its internal list. Driver then incorrectly prints a warning for the second event: "WARN Event TRB for slot x ep y with no TDs queued" Fix this by not printing a warning if we get a event on a empty list if the previous event was a short event. Cc: Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-ring.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index c239c688076c..6eb87c6e4d24 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2477,12 +2477,16 @@ static int handle_tx_event(struct xhci_hcd *xhci, */ if (list_empty(&ep_ring->td_list)) { /* - * A stopped endpoint may generate an extra completion - * event if the device was suspended. Don't print - * warnings. + * Don't print wanings if it's due to a stopped endpoint + * generating an extra completion event if the device + * was suspended. Or, a event for the last TRB of a + * short TD we already got a short event for. + * The short TD is already removed from the TD list. */ + if (!(trb_comp_code == COMP_STOPPED || - trb_comp_code == COMP_STOPPED_LENGTH_INVALID)) { + trb_comp_code == COMP_STOPPED_LENGTH_INVALID || + ep_ring->last_td_was_short)) { xhci_warn(xhci, "WARN Event TRB for slot %d ep %d with no TDs queued?\n", TRB_TO_SLOT_ID(le32_to_cpu(event->flags)), ep_index); -- cgit v1.2.3 From 80e457699a8dbdd70f2d26911e46f538645c55fc Mon Sep 17 00:00:00 2001 From: Yu Chen Date: Fri, 1 Dec 2017 13:41:20 +0200 Subject: usb: xhci: fix panic in xhci_free_virt_devices_depth_first Check vdev->real_port 0 to avoid panic [ 9.261347] [] xhci_free_virt_devices_depth_first+0x58/0x108 [ 9.261352] [] xhci_mem_cleanup+0x1bc/0x570 [ 9.261355] [] xhci_stop+0x140/0x1c8 [ 9.261365] [] usb_remove_hcd+0xfc/0x1d0 [ 9.261369] [] xhci_plat_remove+0x6c/0xa8 [ 9.261377] [] platform_drv_remove+0x2c/0x70 [ 9.261384] [] __device_release_driver+0x80/0x108 [ 9.261387] [] device_release_driver+0x2c/0x40 [ 9.261392] [] bus_remove_device+0xe0/0x120 [ 9.261396] [] device_del+0x114/0x210 [ 9.261399] [] platform_device_del+0x30/0xa0 [ 9.261403] [] dwc3_otg_work+0x204/0x488 [ 9.261407] [] event_work+0x304/0x5b8 [ 9.261414] [] process_one_work+0x148/0x490 [ 9.261417] [] worker_thread+0x50/0x4a0 [ 9.261421] [] kthread+0xe8/0x100 [ 9.261427] [] ret_from_fork+0x10/0x50 The problem can occur if xhci_plat_remove() is called shortly after xhci_plat_probe(). While xhci_free_virt_devices_depth_first been called before the device has been setup and get real_port initialized. The problem occurred on Hikey960 and was reproduced by Guenter Roeck on Kevin with chromeos-4.4. Fixes: ee8665e28e8d ("xhci: free xhci virtual devices with leaf nodes first") Cc: Guenter Roeck Cc: # v4.10+ Reviewed-by: Guenter Roeck Tested-by: Guenter Roeck Signed-off-by: Fan Ning Signed-off-by: Li Rui Signed-off-by: yangdi Signed-off-by: Yu Chen Signed-off-by: Mathias Nyman Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/xhci-mem.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers') diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index e1fba4688509..15f7d422885f 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -934,6 +934,12 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) if (!vdev) return; + if (vdev->real_port == 0 || + vdev->real_port > HCS_MAX_PORTS(xhci->hcs_params1)) { + xhci_dbg(xhci, "Bad vdev->real_port.\n"); + goto out; + } + tt_list_head = &(xhci->rh_bw[vdev->real_port - 1].tts); list_for_each_entry_safe(tt_info, next, tt_list_head, tt_list) { /* is this a hub device that added a tt_info to the tts list */ @@ -947,6 +953,7 @@ void xhci_free_virt_devices_depth_first(struct xhci_hcd *xhci, int slot_id) } } } +out: /* we are now at a leaf device */ xhci_debugfs_remove_slot(xhci, slot_id); xhci_free_virt_device(xhci, slot_id); -- cgit v1.2.3 From 100d6de2ced538c539d923dc14a1b5cbae234503 Mon Sep 17 00:00:00 2001 From: Chien Tin Tung Date: Tue, 21 Nov 2017 16:18:30 -0600 Subject: i40iw: Allocate a sdbuf per CQP WQE Currently there is only one sdbuf per Control QP (CQP) for programming Segment Descriptor (SD). If multiple SD work requests are posted simultaneously, the sdbuf is reused by all WQEs and new WQEs can corrupt previous WQEs sdbuf leading to incorrect SD programming. Fix this by allocating one sdbuf per CQP SQ WQE. When an SD command is posted, it will use the corresponding sdbuf for the WQE. Fixes: 86dbcd0f12e9 ("i40iw: add file to handle cqp calls") Signed-off-by: Chien Tin Tung Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/i40iw/i40iw_ctrl.c | 43 ++++++++++++++++++++++---------- drivers/infiniband/hw/i40iw/i40iw_d.h | 4 ++- 2 files changed, 33 insertions(+), 14 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c index d88c6cf47cf2..da9821a10e0d 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_ctrl.c +++ b/drivers/infiniband/hw/i40iw/i40iw_ctrl.c @@ -513,7 +513,7 @@ static enum i40iw_status_code i40iw_sc_cqp_create(struct i40iw_sc_cqp *cqp, ret_code = i40iw_allocate_dma_mem(cqp->dev->hw, &cqp->sdbuf, - 128, + I40IW_UPDATE_SD_BUF_SIZE * cqp->sq_size, I40IW_SD_BUF_ALIGNMENT); if (ret_code) @@ -596,14 +596,15 @@ void i40iw_sc_cqp_post_sq(struct i40iw_sc_cqp *cqp) } /** - * i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq - * @cqp: struct for cqp hw - * @wqe_idx: we index of cqp ring + * i40iw_sc_cqp_get_next_send_wqe_idx - get next WQE on CQP SQ and pass back the index + * @cqp: pointer to CQP structure + * @scratch: private data for CQP WQE + * @wqe_idx: WQE index for next WQE on CQP SQ */ -u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch) +static u64 *i40iw_sc_cqp_get_next_send_wqe_idx(struct i40iw_sc_cqp *cqp, + u64 scratch, u32 *wqe_idx) { u64 *wqe = NULL; - u32 wqe_idx; enum i40iw_status_code ret_code; if (I40IW_RING_FULL_ERR(cqp->sq_ring)) { @@ -616,20 +617,32 @@ u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch) cqp->sq_ring.size); return NULL; } - I40IW_ATOMIC_RING_MOVE_HEAD(cqp->sq_ring, wqe_idx, ret_code); + I40IW_ATOMIC_RING_MOVE_HEAD(cqp->sq_ring, *wqe_idx, ret_code); cqp->dev->cqp_cmd_stats[OP_REQUESTED_COMMANDS]++; if (ret_code) return NULL; - if (!wqe_idx) + if (!*wqe_idx) cqp->polarity = !cqp->polarity; - wqe = cqp->sq_base[wqe_idx].elem; - cqp->scratch_array[wqe_idx] = scratch; + wqe = cqp->sq_base[*wqe_idx].elem; + cqp->scratch_array[*wqe_idx] = scratch; I40IW_CQP_INIT_WQE(wqe); return wqe; } +/** + * i40iw_sc_cqp_get_next_send_wqe - get next wqe on cqp sq + * @cqp: struct for cqp hw + * @scratch: private data for CQP WQE + */ +u64 *i40iw_sc_cqp_get_next_send_wqe(struct i40iw_sc_cqp *cqp, u64 scratch) +{ + u32 wqe_idx; + + return i40iw_sc_cqp_get_next_send_wqe_idx(cqp, scratch, &wqe_idx); +} + /** * i40iw_sc_cqp_destroy - destroy cqp during close * @cqp: struct for cqp hw @@ -3587,8 +3600,10 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp, u64 *wqe; int mem_entries, wqe_entries; struct i40iw_dma_mem *sdbuf = &cqp->sdbuf; + u64 offset; + u32 wqe_idx; - wqe = i40iw_sc_cqp_get_next_send_wqe(cqp, scratch); + wqe = i40iw_sc_cqp_get_next_send_wqe_idx(cqp, scratch, &wqe_idx); if (!wqe) return I40IW_ERR_RING_FULL; @@ -3601,8 +3616,10 @@ static enum i40iw_status_code cqp_sds_wqe_fill(struct i40iw_sc_cqp *cqp, LS_64(mem_entries, I40IW_CQPSQ_UPESD_ENTRY_COUNT); if (mem_entries) { - memcpy(sdbuf->va, &info->entry[3], (mem_entries << 4)); - data = sdbuf->pa; + offset = wqe_idx * I40IW_UPDATE_SD_BUF_SIZE; + memcpy((char *)sdbuf->va + offset, &info->entry[3], + mem_entries << 4); + data = (u64)sdbuf->pa + offset; } else { data = 0; } diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h index 65ec39e3746b..1077b78f7754 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_d.h +++ b/drivers/infiniband/hw/i40iw/i40iw_d.h @@ -1526,7 +1526,7 @@ enum i40iw_alignment { I40IW_AEQ_ALIGNMENT = 0x100, I40IW_CEQ_ALIGNMENT = 0x100, I40IW_CQ0_ALIGNMENT = 0x100, - I40IW_SD_BUF_ALIGNMENT = 0x100 + I40IW_SD_BUF_ALIGNMENT = 0x80 }; #define I40IW_WQE_SIZE_64 64 @@ -1534,6 +1534,8 @@ enum i40iw_alignment { #define I40IW_QP_WQE_MIN_SIZE 32 #define I40IW_QP_WQE_MAX_SIZE 128 +#define I40IW_UPDATE_SD_BUF_SIZE 128 + #define I40IW_CQE_QTYPE_RQ 0 #define I40IW_CQE_QTYPE_SQ 1 -- cgit v1.2.3 From 10499986dbd8778e1acf9f9d2e166800dfee44b4 Mon Sep 17 00:00:00 2001 From: Mustafa Ismail Date: Tue, 21 Nov 2017 16:18:31 -0600 Subject: i40iw: Do not free sqbuf when event is I40IW_TIMER_TYPE_CLOSE When the event type is I40IW_TIMER_TYPE_CLOSE, there is no sqbuf and it should not be freed as one in i40iw_schedule_cm_timer(). Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index 493d6ef3d2d5..e1454174e3d9 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c @@ -1043,7 +1043,7 @@ negotiate_done: * i40iw_schedule_cm_timer * @@cm_node: connection's node * @sqbuf: buffer to send - * @type: if it es send ot close + * @type: if it is send or close * @send_retrans: if rexmits to be done * @close_when_complete: is cm_node to be removed * @@ -1067,7 +1067,8 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, new_send = kzalloc(sizeof(*new_send), GFP_ATOMIC); if (!new_send) { - i40iw_free_sqbuf(vsi, (void *)sqbuf); + if (type != I40IW_TIMER_TYPE_CLOSE) + i40iw_free_sqbuf(vsi, (void *)sqbuf); return -ENOMEM; } new_send->retrycount = I40IW_DEFAULT_RETRYS; @@ -1082,7 +1083,6 @@ int i40iw_schedule_cm_timer(struct i40iw_cm_node *cm_node, new_send->timetosend += (HZ / 10); if (cm_node->close_entry) { kfree(new_send); - i40iw_free_sqbuf(vsi, (void *)sqbuf); i40iw_pr_err("already close entry\n"); return -EINVAL; } -- cgit v1.2.3 From a283cdc4d3670700182c820b59078387f9a01a30 Mon Sep 17 00:00:00 2001 From: Mustafa Ismail Date: Tue, 21 Nov 2017 16:18:32 -0600 Subject: i40iw: Correct ARP index mask The ARP table entry indexes are aliased to 12bits instead of the intended 16bits when uploaded to the QP Context. This will present an issue when the number of connections exceeds 4096 as ARP entries are reused. Fix this by adjusting the mask to account for the full 16bits. Fixes: 4e9042e647ff ("i40iw: add hw and utils files") Signed-off-by: Mustafa Ismail Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/i40iw/i40iw_d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/i40iw/i40iw_d.h b/drivers/infiniband/hw/i40iw/i40iw_d.h index 1077b78f7754..029083cb81d5 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_d.h +++ b/drivers/infiniband/hw/i40iw/i40iw_d.h @@ -1114,7 +1114,7 @@ #define I40IWQPC_VLANTAG_MASK (0xffffULL << I40IWQPC_VLANTAG_SHIFT) #define I40IWQPC_ARPIDX_SHIFT 48 -#define I40IWQPC_ARPIDX_MASK (0xfffULL << I40IWQPC_ARPIDX_SHIFT) +#define I40IWQPC_ARPIDX_MASK (0xffffULL << I40IWQPC_ARPIDX_SHIFT) #define I40IWQPC_FLOWLABEL_SHIFT 0 #define I40IWQPC_FLOWLABEL_MASK (0xfffffUL << I40IWQPC_FLOWLABEL_SHIFT) -- cgit v1.2.3 From 8bb45252bb5108485f590a08291d1f4641abc77e Mon Sep 17 00:00:00 2001 From: Tatyana Nikolova Date: Tue, 21 Nov 2017 16:18:33 -0600 Subject: i40iw: Move MPA request event for loopback after connect For loopback, a MPA request event is generated when cm_node is initialized, which allows applications to act on the connect request before i40iw_connect() has completed. In some cases, the reject flow executes in parallel with the connect flow and doesn't delete an APBVT entry, because the apbvt_set variable is still not set by the connect flow. Move the MPA request event to the end of i40iw_connect() to notify application for a connect request, after connect has completed. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Tatyana Nikolova Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index e1454174e3d9..57cf40733800 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c @@ -2947,8 +2947,6 @@ static struct i40iw_cm_node *i40iw_create_cm_node( loopback_remotenode->tcp_cntxt.snd_wnd = cm_node->tcp_cntxt.rcv_wnd; cm_node->tcp_cntxt.snd_wscale = loopback_remotenode->tcp_cntxt.rcv_wscale; loopback_remotenode->tcp_cntxt.snd_wscale = cm_node->tcp_cntxt.rcv_wscale; - loopback_remotenode->state = I40IW_CM_STATE_MPAREQ_RCVD; - i40iw_create_event(loopback_remotenode, I40IW_CM_EVENT_MPA_REQ); } return cm_node; } @@ -3864,6 +3862,12 @@ int i40iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) goto err; } + if (cm_node->loopbackpartner) { + cm_node->loopbackpartner->state = I40IW_CM_STATE_MPAREQ_RCVD; + i40iw_create_event(cm_node->loopbackpartner, + I40IW_CM_EVENT_MPA_REQ); + } + i40iw_debug(cm_node->dev, I40IW_DEBUG_CM, "Api - connect(): port=0x%04x, cm_node=%p, cm_id = %p.\n", -- cgit v1.2.3 From a7c6dfe215a7f85c6195f09c1b9474a2ba7fea9c Mon Sep 17 00:00:00 2001 From: Henry Orosco Date: Tue, 21 Nov 2017 16:18:34 -0600 Subject: i40iw: Notify user of established connection after QP in RTS Established CM event is sent prior to modifying QP to RTS state. This can result in application closing the connection before the QP is actually in RTS state. Move sending of established CM event to after modify QP to RTS. Fixes: f27b4746f378 ("i40iw: add connection management code") Signed-off-by: Henry Orosco Signed-off-by: Shiraz Saleem Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/i40iw/i40iw_cm.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/i40iw/i40iw_cm.c b/drivers/infiniband/hw/i40iw/i40iw_cm.c index 57cf40733800..77870f9e1736 100644 --- a/drivers/infiniband/hw/i40iw/i40iw_cm.c +++ b/drivers/infiniband/hw/i40iw/i40iw_cm.c @@ -3687,11 +3687,16 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) cm_id->add_ref(cm_id); i40iw_add_ref(&iwqp->ibqp); - i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_ESTABLISHED, 0); - attr.qp_state = IB_QPS_RTS; cm_node->qhash_set = false; i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL); + + cm_node->accelerated = 1; + status = + i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_ESTABLISHED, 0); + if (status) + i40iw_debug(dev, I40IW_DEBUG_CM, "error sending cm event - ESTABLISHED\n"); + if (cm_node->loopbackpartner) { cm_node->loopbackpartner->pdata.size = conn_param->private_data_len; @@ -3702,7 +3707,6 @@ int i40iw_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param) i40iw_create_event(cm_node->loopbackpartner, I40IW_CM_EVENT_CONNECTED); } - cm_node->accelerated = 1; if (cm_node->accept_pend) { atomic_dec(&cm_node->listener->pend_accepts_cnt); cm_node->accept_pend = 0; @@ -4048,9 +4052,6 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event) dev->iw_priv_qp_ops->qp_send_rtt(&iwqp->sc_qp, read0); if (iwqp->page) kunmap(iwqp->page); - status = i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_CONNECT_REPLY, 0); - if (status) - i40iw_pr_err("send cm event\n"); memset(&attr, 0, sizeof(attr)); attr.qp_state = IB_QPS_RTS; @@ -4058,6 +4059,10 @@ static void i40iw_cm_event_connected(struct i40iw_cm_event *event) i40iw_modify_qp(&iwqp->ibqp, &attr, IB_QP_STATE, NULL); cm_node->accelerated = 1; + status = i40iw_send_cm_event(cm_node, cm_id, IW_CM_EVENT_CONNECT_REPLY, + 0); + if (status) + i40iw_debug(dev, I40IW_DEBUG_CM, "error sending cm event - CONNECT_REPLY\n"); return; -- cgit v1.2.3 From 23a9cd2ad90543e9da3786878d2b2729c095439d Mon Sep 17 00:00:00 2001 From: Moni Shoua Date: Sun, 26 Nov 2017 20:23:54 +0200 Subject: RDMA/cma: Make sure that PSN is not over max allowed This patch limits the initial value for PSN to 24 bits as spec requires. Signed-off-by: Moni Shoua Signed-off-by: Mukesh Kacker Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/cma.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 1fdb473b5df7..f6983357145d 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c @@ -801,6 +801,7 @@ struct rdma_cm_id *rdma_create_id(struct net *net, INIT_LIST_HEAD(&id_priv->mc_list); get_random_bytes(&id_priv->seq_num, sizeof id_priv->seq_num); id_priv->id.route.addr.dev_addr.net = get_net(net); + id_priv->seq_num &= 0x00ffffff; return &id_priv->id; } -- cgit v1.2.3 From a9cd1a673737dd81332fce1145801bfacfb90d90 Mon Sep 17 00:00:00 2001 From: Dmitry Monakhov Date: Mon, 27 Nov 2017 13:39:05 +0000 Subject: IB/core: Init subsys if compiled to vmlinuz-core Once infiniband is compiled as a core component its subsystem must be enabled before device initialization. Otherwise there is a NULL pointer dereference during mlx4_core init, calltrace: ->device_add if (dev->class) { deref dev->class->p =>NULLPTR #Config CONFIG_NET_DEVLINK=y CONFIG_MAY_USE_DEVLINK=y CONFIG_MLX4_EN=y Signed-off-by: Dmitry Monakhov Reviewed-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c index 84fc32a2c8b3..5e1be4949d5f 100644 --- a/drivers/infiniband/core/device.c +++ b/drivers/infiniband/core/device.c @@ -1253,5 +1253,5 @@ static void __exit ib_core_cleanup(void) MODULE_ALIAS_RDMA_NETLINK(RDMA_NL_LS, 4); -module_init(ib_core_init); +subsys_initcall(ib_core_init); module_exit(ib_core_cleanup); -- cgit v1.2.3 From db270c41900d39a388990701da3ee2971094ebaa Mon Sep 17 00:00:00 2001 From: "Wei Hu\\(Xavier\\)" Date: Tue, 28 Nov 2017 15:10:26 +0800 Subject: RDMA/hns: Fix the issue of IOVA not page continuous in hip08 If the smmu is enabled, the length of sg obtained from __iommu_map_sg_attrs is not 4kB. When the IOVA is set with the sg dma address, the IOVA will not be page continuous. so, the current code has MTPT configuration error that probably cause dma operation failure. In order to fix this issue, the IOVA should be calculated based on the sg length. Fixes: 3958cc5("RDMA/hns: Configure the MTPT in hip08") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 8f719c00467b..8e18445714a9 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -1126,9 +1126,11 @@ static int hns_roce_v2_write_mtpt(void *mb_buf, struct hns_roce_mr *mr, { struct hns_roce_v2_mpt_entry *mpt_entry; struct scatterlist *sg; + u64 page_addr; u64 *pages; + int i, j; + int len; int entry; - int i; mpt_entry = mb_buf; memset(mpt_entry, 0, sizeof(*mpt_entry)); @@ -1186,14 +1188,20 @@ static int hns_roce_v2_write_mtpt(void *mb_buf, struct hns_roce_mr *mr, i = 0; for_each_sg(mr->umem->sg_head.sgl, sg, mr->umem->nmap, entry) { - pages[i] = ((u64)sg_dma_address(sg)) >> 6; - - /* Record the first 2 entry directly to MTPT table */ - if (i >= HNS_ROCE_V2_MAX_INNER_MTPT_NUM - 1) - break; - i++; + len = sg_dma_len(sg) >> PAGE_SHIFT; + for (j = 0; j < len; ++j) { + page_addr = sg_dma_address(sg) + + (j << mr->umem->page_shift); + pages[i] = page_addr >> 6; + + /* Record the first 2 entry directly to MTPT table */ + if (i >= HNS_ROCE_V2_MAX_INNER_MTPT_NUM - 1) + goto found; + i++; + } } +found: mpt_entry->pa0_l = cpu_to_le32(lower_32_bits(pages[0])); roce_set_field(mpt_entry->byte_56_pa0_h, V2_MPT_BYTE_56_PA0_H_M, V2_MPT_BYTE_56_PA0_H_S, -- cgit v1.2.3 From b1c158350968d6717ec1889f07ea3a89432e8574 Mon Sep 17 00:00:00 2001 From: "Wei Hu\\(Xavier\\)" Date: Tue, 28 Nov 2017 15:10:27 +0800 Subject: RDMA/hns: Get rid of virt_to_page and vmap calls after dma_alloc_coherent In general dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the virtual address is either in the linear map or vmalloc. It could be in some other special place. We have no guarantee that the underlying memory even has an associated struct page at all. In current code, there are incorrect usage as below: dma_alloc_coherent + virt_to_page + vmap. There will probably introduce coherency problem. This patch fixes it to get rid of virt_to_page and vmap calls at Leon's suggestion. The related link: https://lkml.org/lkml/2017/11/7/34 Fixes: 9a44353("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/hns/hns_roce_alloc.c | 23 ----------------------- drivers/infiniband/hw/hns/hns_roce_device.h | 4 +--- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c index 3e4c5253ab5c..a40ec939ece5 100644 --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c @@ -162,14 +162,10 @@ void hns_roce_buf_free(struct hns_roce_dev *hr_dev, u32 size, { int i; struct device *dev = hr_dev->dev; - u32 bits_per_long = BITS_PER_LONG; if (buf->nbufs == 1) { dma_free_coherent(dev, size, buf->direct.buf, buf->direct.map); } else { - if (bits_per_long == 64 && buf->page_shift == PAGE_SHIFT) - vunmap(buf->direct.buf); - for (i = 0; i < buf->nbufs; ++i) if (buf->page_list[i].buf) dma_free_coherent(dev, 1 << buf->page_shift, @@ -185,9 +181,7 @@ int hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, u32 max_direct, { int i = 0; dma_addr_t t; - struct page **pages; struct device *dev = hr_dev->dev; - u32 bits_per_long = BITS_PER_LONG; u32 page_size = 1 << page_shift; u32 order; @@ -236,23 +230,6 @@ int hns_roce_buf_alloc(struct hns_roce_dev *hr_dev, u32 size, u32 max_direct, buf->page_list[i].map = t; memset(buf->page_list[i].buf, 0, page_size); } - if (bits_per_long == 64 && page_shift == PAGE_SHIFT) { - pages = kmalloc_array(buf->nbufs, sizeof(*pages), - GFP_KERNEL); - if (!pages) - goto err_free; - - for (i = 0; i < buf->nbufs; ++i) - pages[i] = virt_to_page(buf->page_list[i].buf); - - buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP, - PAGE_KERNEL); - kfree(pages); - if (!buf->direct.buf) - goto err_free; - } else { - buf->direct.buf = NULL; - } } return 0; diff --git a/drivers/infiniband/hw/hns/hns_roce_device.h b/drivers/infiniband/hw/hns/hns_roce_device.h index 01d3d695cbba..b154ce40cded 100644 --- a/drivers/infiniband/hw/hns/hns_roce_device.h +++ b/drivers/infiniband/hw/hns/hns_roce_device.h @@ -726,11 +726,9 @@ static inline struct hns_roce_qp static inline void *hns_roce_buf_offset(struct hns_roce_buf *buf, int offset) { - u32 bits_per_long_val = BITS_PER_LONG; u32 page_size = 1 << buf->page_shift; - if ((bits_per_long_val == 64 && buf->page_shift == PAGE_SHIFT) || - buf->nbufs == 1) + if (buf->nbufs == 1) return (char *)(buf->direct.buf) + offset; else return (char *)(buf->page_list[offset >> buf->page_shift].buf) + -- cgit v1.2.3 From 378efe798ecf0e7d9730a595ef3419b046e34fb4 Mon Sep 17 00:00:00 2001 From: "Wei Hu\\(Xavier\\)" Date: Tue, 28 Nov 2017 15:10:28 +0800 Subject: RDMA/hns: Get rid of page operation after dma_alloc_coherent In general, dma_alloc_coherent() returns a CPU virtual address and a DMA address, and we have no guarantee that the underlying memory even has an associated struct page at all. This patch gets rid of the page operation after dma_alloc_coherent, and records the VA returned form dma_alloc_coherent in the struct of hem in hns RoCE driver. Fixes: 9a44353("IB/hns: Add driver files for hns RoCE driver") Signed-off-by: Wei Hu (Xavier) Signed-off-by: Shaobo Xu Signed-off-by: Lijun Ou Signed-off-by: Yixian Liu Signed-off-by: Xiping Zhang (Francis) Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/hns/hns_roce_hem.c | 25 +++++++++++++------------ drivers/infiniband/hw/hns/hns_roce_hem.h | 1 + 2 files changed, 14 insertions(+), 12 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.c b/drivers/infiniband/hw/hns/hns_roce_hem.c index 8b733a66fae5..0eeabfbee192 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.c +++ b/drivers/infiniband/hw/hns/hns_roce_hem.c @@ -224,6 +224,7 @@ static struct hns_roce_hem *hns_roce_alloc_hem(struct hns_roce_dev *hr_dev, sg_init_table(chunk->mem, HNS_ROCE_HEM_CHUNK_LEN); chunk->npages = 0; chunk->nsg = 0; + memset(chunk->buf, 0, sizeof(chunk->buf)); list_add_tail(&chunk->list, &hem->chunk_list); } @@ -240,8 +241,7 @@ static struct hns_roce_hem *hns_roce_alloc_hem(struct hns_roce_dev *hr_dev, if (!buf) goto fail; - sg_set_buf(mem, buf, PAGE_SIZE << order); - WARN_ON(mem->offset); + chunk->buf[chunk->npages] = buf; sg_dma_len(mem) = PAGE_SIZE << order; ++chunk->npages; @@ -267,8 +267,8 @@ void hns_roce_free_hem(struct hns_roce_dev *hr_dev, struct hns_roce_hem *hem) list_for_each_entry_safe(chunk, tmp, &hem->chunk_list, list) { for (i = 0; i < chunk->npages; ++i) dma_free_coherent(hr_dev->dev, - chunk->mem[i].length, - lowmem_page_address(sg_page(&chunk->mem[i])), + sg_dma_len(&chunk->mem[i]), + chunk->buf[i], sg_dma_address(&chunk->mem[i])); kfree(chunk); } @@ -722,11 +722,12 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev, struct hns_roce_hem_chunk *chunk; struct hns_roce_hem_mhop mhop; struct hns_roce_hem *hem; - struct page *page = NULL; + void *addr = NULL; unsigned long mhop_obj = obj; unsigned long obj_per_chunk; unsigned long idx_offset; int offset, dma_offset; + int length; int i, j; u32 hem_idx = 0; @@ -763,25 +764,25 @@ void *hns_roce_table_find(struct hns_roce_dev *hr_dev, list_for_each_entry(chunk, &hem->chunk_list, list) { for (i = 0; i < chunk->npages; ++i) { + length = sg_dma_len(&chunk->mem[i]); if (dma_handle && dma_offset >= 0) { - if (sg_dma_len(&chunk->mem[i]) > - (u32)dma_offset) + if (length > (u32)dma_offset) *dma_handle = sg_dma_address( &chunk->mem[i]) + dma_offset; - dma_offset -= sg_dma_len(&chunk->mem[i]); + dma_offset -= length; } - if (chunk->mem[i].length > (u32)offset) { - page = sg_page(&chunk->mem[i]); + if (length > (u32)offset) { + addr = chunk->buf[i] + offset; goto out; } - offset -= chunk->mem[i].length; + offset -= length; } } out: mutex_unlock(&table->mutex); - return page ? lowmem_page_address(page) + offset : NULL; + return addr; } EXPORT_SYMBOL_GPL(hns_roce_table_find); diff --git a/drivers/infiniband/hw/hns/hns_roce_hem.h b/drivers/infiniband/hw/hns/hns_roce_hem.h index db66db12075e..e8850d59e780 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hem.h +++ b/drivers/infiniband/hw/hns/hns_roce_hem.h @@ -78,6 +78,7 @@ struct hns_roce_hem_chunk { int npages; int nsg; struct scatterlist mem[HNS_ROCE_HEM_CHUNK_LEN]; + void *buf[HNS_ROCE_HEM_CHUNK_LEN]; }; struct hns_roce_hem { -- cgit v1.2.3 From 315d160c5a4e034a576a13aa21e7235d5c9ec609 Mon Sep 17 00:00:00 2001 From: Daniel Jurgens Date: Wed, 29 Nov 2017 20:10:39 +0200 Subject: IB/core: Only enforce security for InfiniBand For now the only LSM security enforcement mechanism available is specific to InfiniBand. Bypass enforcement for non-IB link types. This fixes a regression where modify_qp fails for iWARP because querying the PKEY returns -EINVAL. Cc: Paul Moore Cc: Don Dutile Cc: stable@vger.kernel.org Reported-by: Potnuri Bharat Teja Fixes: d291f1a65232("IB/core: Enforce PKey security on QPs") Fixes: 47a2b338fe63("IB/core: Enforce security on management datagrams") Signed-off-by: Daniel Jurgens Reviewed-by: Parav Pandit Tested-by: Potnuri Bharat Teja Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/core/security.c | 50 +++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/infiniband/core/security.c b/drivers/infiniband/core/security.c index 23278ed5be45..a337386652b0 100644 --- a/drivers/infiniband/core/security.c +++ b/drivers/infiniband/core/security.c @@ -417,8 +417,17 @@ void ib_close_shared_qp_security(struct ib_qp_security *sec) int ib_create_qp_security(struct ib_qp *qp, struct ib_device *dev) { + u8 i = rdma_start_port(dev); + bool is_ib = false; int ret; + while (i <= rdma_end_port(dev) && !is_ib) + is_ib = rdma_protocol_ib(dev, i++); + + /* If this isn't an IB device don't create the security context */ + if (!is_ib) + return 0; + qp->qp_sec = kzalloc(sizeof(*qp->qp_sec), GFP_KERNEL); if (!qp->qp_sec) return -ENOMEM; @@ -441,6 +450,10 @@ EXPORT_SYMBOL(ib_create_qp_security); void ib_destroy_qp_security_begin(struct ib_qp_security *sec) { + /* Return if not IB */ + if (!sec) + return; + mutex_lock(&sec->mutex); /* Remove the QP from the lists so it won't get added to @@ -470,6 +483,10 @@ void ib_destroy_qp_security_abort(struct ib_qp_security *sec) int ret; int i; + /* Return if not IB */ + if (!sec) + return; + /* If a concurrent cache update is in progress this * QP security could be marked for an error state * transition. Wait for this to complete. @@ -505,6 +522,10 @@ void ib_destroy_qp_security_end(struct ib_qp_security *sec) { int i; + /* Return if not IB */ + if (!sec) + return; + /* If a concurrent cache update is occurring we must * wait until this QP security structure is processed * in the QP to error flow before destroying it because @@ -557,7 +578,7 @@ int ib_security_modify_qp(struct ib_qp *qp, { int ret = 0; struct ib_ports_pkeys *tmp_pps; - struct ib_ports_pkeys *new_pps; + struct ib_ports_pkeys *new_pps = NULL; struct ib_qp *real_qp = qp->real_qp; bool special_qp = (real_qp->qp_type == IB_QPT_SMI || real_qp->qp_type == IB_QPT_GSI || @@ -565,18 +586,27 @@ int ib_security_modify_qp(struct ib_qp *qp, bool pps_change = ((qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) || (qp_attr_mask & IB_QP_ALT_PATH)); + WARN_ONCE((qp_attr_mask & IB_QP_PORT && + rdma_protocol_ib(real_qp->device, qp_attr->port_num) && + !real_qp->qp_sec), + "%s: QP security is not initialized for IB QP: %d\n", + __func__, real_qp->qp_num); + /* The port/pkey settings are maintained only for the real QP. Open * handles on the real QP will be in the shared_qp_list. When * enforcing security on the real QP all the shared QPs will be * checked as well. */ - if (pps_change && !special_qp) { + if (pps_change && !special_qp && real_qp->qp_sec) { mutex_lock(&real_qp->qp_sec->mutex); new_pps = get_new_pps(real_qp, qp_attr, qp_attr_mask); - + if (!new_pps) { + mutex_unlock(&real_qp->qp_sec->mutex); + return -ENOMEM; + } /* Add this QP to the lists for the new port * and pkey settings before checking for permission * in case there is a concurrent cache update @@ -600,7 +630,7 @@ int ib_security_modify_qp(struct ib_qp *qp, qp_attr_mask, udata); - if (pps_change && !special_qp) { + if (new_pps) { /* Clean up the lists and free the appropriate * ports_pkeys structure. */ @@ -631,6 +661,9 @@ int ib_security_pkey_access(struct ib_device *dev, u16 pkey; int ret; + if (!rdma_protocol_ib(dev, port_num)) + return 0; + ret = ib_get_cached_pkey(dev, port_num, pkey_index, &pkey); if (ret) return ret; @@ -665,6 +698,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent, { int ret; + if (!rdma_protocol_ib(agent->device, agent->port_num)) + return 0; + ret = security_ib_alloc_security(&agent->security); if (ret) return ret; @@ -690,6 +726,9 @@ int ib_mad_agent_security_setup(struct ib_mad_agent *agent, void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent) { + if (!rdma_protocol_ib(agent->device, agent->port_num)) + return; + security_ib_free_security(agent->security); if (agent->lsm_nb_reg) unregister_lsm_notifier(&agent->lsm_nb); @@ -697,6 +736,9 @@ void ib_mad_agent_security_cleanup(struct ib_mad_agent *agent) int ib_mad_enforce_security(struct ib_mad_agent_private *map, u16 pkey_index) { + if (!rdma_protocol_ib(map->agent.device, map->agent.port_num)) + return 0; + if (map->agent.qp->qp_type == IB_QPT_SMI && !map->agent.smp_allowed) return -EACCES; -- cgit v1.2.3 From aff69d89bdebc39235cddb4445371eb979b49685 Mon Sep 17 00:00:00 2001 From: bingjingc Date: Fri, 17 Nov 2017 10:57:44 +0800 Subject: md/raid5: correct degraded calculation in raid5_error When disk failure occurs on new disks for reshape, mddev->degraded is not calculated correctly. Faulty bit of the failure device is not set before raid5_calc_degraded(conf). mdadm --create /dev/md0 --level=5 --raid-devices=3 /dev/loop[012] mdadm /dev/md0 -a /dev/loop3 mdadm /dev/md0 --grow -n4 mdadm /dev/md0 -f /dev/loop3 # simulating disk failure cat /sys/block/md0/md/degraded # it outputs 0, but it should be 1. However, mdadm -D /dev/md0 will show that it is degraded. It's a bug. It can be fixed by moving the resources raid5_calc_degraded() depends on before it. Reported-by: Roy Chung Reviewed-by: Alex Wu Signed-off-by: BingJing Chang Signed-off-by: Shaohua Li --- drivers/md/raid5.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 31dc25e2871a..98ce4272ace9 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2677,13 +2677,13 @@ static void raid5_error(struct mddev *mddev, struct md_rdev *rdev) pr_debug("raid456: error called\n"); spin_lock_irqsave(&conf->device_lock, flags); + set_bit(Faulty, &rdev->flags); clear_bit(In_sync, &rdev->flags); mddev->degraded = raid5_calc_degraded(conf); spin_unlock_irqrestore(&conf->device_lock, flags); set_bit(MD_RECOVERY_INTR, &mddev->recovery); set_bit(Blocked, &rdev->flags); - set_bit(Faulty, &rdev->flags); set_mask_bits(&mddev->sb_flags, 0, BIT(MD_SB_CHANGE_DEVS) | BIT(MD_SB_CHANGE_PENDING)); pr_crit("md/raid:%s: Disk failure on %s, disabling device.\n" -- cgit v1.2.3 From ff35f58e8f8eb520367879a0ccc6f2ec4b62b17b Mon Sep 17 00:00:00 2001 From: Song Liu Date: Sun, 19 Nov 2017 22:17:00 -0800 Subject: md/r5cache: move mddev_lock() out of r5c_journal_mode_set() r5c_journal_mode_set() is called by r5c_journal_mode_store() and raid_ctr() in dm-raid. We don't need mddev_lock() when calling from raid_ctr(). This patch fixes this by moves the mddev_lock() to r5c_journal_mode_store(). Cc: stable@vger.kernel.org (v4.13+) Signed-off-by: Song Liu Signed-off-by: Shaohua Li --- drivers/md/raid5-cache.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'drivers') diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index f1c86d938502..39f31f07ffe9 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -2577,31 +2577,22 @@ static ssize_t r5c_journal_mode_show(struct mddev *mddev, char *page) int r5c_journal_mode_set(struct mddev *mddev, int mode) { struct r5conf *conf; - int err; if (mode < R5C_JOURNAL_MODE_WRITE_THROUGH || mode > R5C_JOURNAL_MODE_WRITE_BACK) return -EINVAL; - err = mddev_lock(mddev); - if (err) - return err; conf = mddev->private; - if (!conf || !conf->log) { - mddev_unlock(mddev); + if (!conf || !conf->log) return -ENODEV; - } if (raid5_calc_degraded(conf) > 0 && - mode == R5C_JOURNAL_MODE_WRITE_BACK) { - mddev_unlock(mddev); + mode == R5C_JOURNAL_MODE_WRITE_BACK) return -EINVAL; - } mddev_suspend(mddev); conf->log->r5c_journal_mode = mode; mddev_resume(mddev); - mddev_unlock(mddev); pr_debug("md/raid:%s: setting r5c cache mode to %d: %s\n", mdname(mddev), mode, r5c_journal_mode_str[mode]); @@ -2614,6 +2605,7 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev, { int mode = ARRAY_SIZE(r5c_journal_mode_str); size_t len = length; + int ret; if (len < 2) return -EINVAL; @@ -2625,8 +2617,12 @@ static ssize_t r5c_journal_mode_store(struct mddev *mddev, if (strlen(r5c_journal_mode_str[mode]) == len && !strncmp(page, r5c_journal_mode_str[mode], len)) break; - - return r5c_journal_mode_set(mddev, mode) ?: length; + ret = mddev_lock(mddev); + if (ret) + return ret; + ret = r5c_journal_mode_set(mddev, mode); + mddev_unlock(mddev); + return ret ?: length; } struct md_sysfs_entry -- cgit v1.2.3 From d2e2ec8222b4cb49c59f6dc6f5c4fe6fb4c80de9 Mon Sep 17 00:00:00 2001 From: Nate Dailey Date: Thu, 30 Nov 2017 11:33:30 -0500 Subject: md: limit mdstat resync progress to max_sectors There is a small window near the end of md_do_sync where mddev->curr_resync can be equal to MaxSector. If status_resync is called during this window, the resulting /proc/mdstat output contains a HUGE number of = signs due to the very large curr_resync: Personalities : [raid1] md123 : active raid1 sdd3[2] sdb3[0] 204736 blocks super 1.0 [2/1] [U_] [===================================================================== ... (82 MB more) ... ================>] recovery =429496729.3% (9223372036854775807/204736) finish=0.2min speed=12796K/sec bitmap: 0/1 pages [0KB], 65536KB chunk Modify status_resync to ensure the resync variable doesn't exceed the array's max_sectors. Signed-off-by: Nate Dailey Acked-by: Guoqing Jiang Signed-off-by: Shaohua Li --- drivers/md/md.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/md/md.c b/drivers/md/md.c index 41c050b59ec4..4e4dee0ec2de 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7605,7 +7605,9 @@ static int status_resync(struct seq_file *seq, struct mddev *mddev) if (test_bit(MD_RECOVERY_DONE, &mddev->recovery)) /* Still cleaning up */ resync = max_sectors; - } else + } else if (resync > max_sectors) + resync = max_sectors; + else resync -= atomic_read(&mddev->recovery_active); if (resync == 0) { -- cgit v1.2.3 From 18022a1bd3709b74ca31ef0b28fccd52bcd6c504 Mon Sep 17 00:00:00 2001 From: Shaohua Li Date: Fri, 1 Dec 2017 12:12:34 -0800 Subject: md/raid1/10: add missed blk plug flush_pending_writes isn't always called with block plug, so add it, and plug works in nested way. Signed-off-by: Shaohua Li --- drivers/md/raid1.c | 4 ++++ drivers/md/raid10.c | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'drivers') diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index cc9d337a1ed3..6df398e3a008 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -809,11 +809,15 @@ static void flush_pending_writes(struct r1conf *conf) spin_lock_irq(&conf->device_lock); if (conf->pending_bio_list.head) { + struct blk_plug plug; struct bio *bio; + bio = bio_list_get(&conf->pending_bio_list); conf->pending_count = 0; spin_unlock_irq(&conf->device_lock); + blk_start_plug(&plug); flush_bio_list(conf, bio); + blk_finish_plug(&plug); } else spin_unlock_irq(&conf->device_lock); } diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index b9edbc747a95..c131835cf008 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -894,10 +894,13 @@ static void flush_pending_writes(struct r10conf *conf) spin_lock_irq(&conf->device_lock); if (conf->pending_bio_list.head) { + struct blk_plug plug; struct bio *bio; + bio = bio_list_get(&conf->pending_bio_list); conf->pending_count = 0; spin_unlock_irq(&conf->device_lock); + blk_start_plug(&plug); /* flush any pending bitmap writes to disk * before proceeding w/ I/O */ bitmap_unplug(conf->mddev->bitmap); @@ -918,6 +921,7 @@ static void flush_pending_writes(struct r10conf *conf) generic_make_request(bio); bio = next; } + blk_finish_plug(&plug); } else spin_unlock_irq(&conf->device_lock); } -- cgit v1.2.3 From 81b039ec36a41a5451e1e36f05bb055eceab1dc8 Mon Sep 17 00:00:00 2001 From: Pan Bian Date: Mon, 13 Nov 2017 00:01:20 +0800 Subject: iio: adc: cpcap: fix incorrect validation Function platform_get_irq_byname() returns a negative error code on failure, and a zero or positive number on success. However, in function cpcap_adc_probe(), positive IRQ numbers are also taken as error cases. Use "if (ddata->irq < 0)" instead of "if (!ddata->irq)" to validate the return value of platform_get_irq_byname(). Signed-off-by: Pan Bian Fixes: 25ec249632d50 ("iio: adc: cpcap: Add minimal support for CPCAP PMIC ADC") Reviewed-by: Sebastian Reichel Acked-by: Tony Lindgren Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/cpcap-adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c index 3576ec73ec23..9ad60421d360 100644 --- a/drivers/iio/adc/cpcap-adc.c +++ b/drivers/iio/adc/cpcap-adc.c @@ -1011,7 +1011,7 @@ static int cpcap_adc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, indio_dev); ddata->irq = platform_get_irq_byname(pdev, "adcdone"); - if (!ddata->irq) + if (ddata->irq < 0) return -ENODEV; error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL, -- cgit v1.2.3 From e53111ad5deaef98d8c18a9933ef1f5624c5979d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Fri, 3 Nov 2017 15:03:36 +0200 Subject: iio: proximity: sx9500: Assign interrupt from GpioIo() The commit 0f0796509c07 ("iio: remove gpio interrupt probing from drivers that use a single interrupt") removed custom IRQ assignment for the drivers which are enumerated via ACPI or OF. Unfortunately, some ACPI tables have IRQ line defined as GpioIo() resource and thus automatic IRQ allocation will fail. Partially revert the commit 0f0796509c07 to restore original behaviour. Signed-off-by: Andy Shevchenko Acked-by: Mika Westerberg Signed-off-by: Jonathan Cameron --- drivers/iio/proximity/sx9500.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 53c5d653e780..df23dbcc030a 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -869,6 +869,7 @@ static int sx9500_init_device(struct iio_dev *indio_dev) static void sx9500_gpio_probe(struct i2c_client *client, struct sx9500_data *data) { + struct gpio_desc *gpiod_int; struct device *dev; if (!client) @@ -876,6 +877,14 @@ static void sx9500_gpio_probe(struct i2c_client *client, dev = &client->dev; + if (client->irq <= 0) { + gpiod_int = devm_gpiod_get(dev, SX9500_GPIO_INT, GPIOD_IN); + if (IS_ERR(gpiod_int)) + dev_err(dev, "gpio get irq failed\n"); + else + client->irq = gpiod_to_irq(gpiod_int); + } + data->gpiod_rst = devm_gpiod_get(dev, SX9500_GPIO_RESET, GPIOD_OUT_HIGH); if (IS_ERR(data->gpiod_rst)) { dev_warn(dev, "gpio get reset pin failed\n"); -- cgit v1.2.3 From 7a6b0420d2fe4ce59437bd318826fe468f0d71ae Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Tue, 31 Oct 2017 21:01:43 +0100 Subject: iio: adc: meson-saradc: fix the bit_idx of the adc_en clock Meson8 and Meson8b SoCs use the the SAR ADC gate clock provided by the MESON_SAR_ADC_REG3 register within the SAR ADC register area. According to the datasheet (and the existing MESON_SAR_ADC_REG3_CLK_EN definition) the gate is on bit 30. The fls() function returns the last set bit, which is "bit index + 1" (fls(MESON_SAR_ADC_REG3_CLK_EN) returns 31). Fix this by switching to __ffs() which returns the first set bit, which is bit 30 in our case. This off by one error results in the ADC not being usable on devices where the bootloader did not enable the clock. Fixes: 3adbf3427330 ("iio: adc: add a driver for the SAR ADC found in Amlogic Meson SoCs") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/meson_saradc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 9c6932ffc0af..1d25c78b74d2 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -600,7 +600,7 @@ static int meson_sar_adc_clk_init(struct iio_dev *indio_dev, init.num_parents = 1; priv->clk_gate.reg = base + MESON_SAR_ADC_REG3; - priv->clk_gate.bit_idx = fls(MESON_SAR_ADC_REG3_CLK_EN); + priv->clk_gate.bit_idx = __ffs(MESON_SAR_ADC_REG3_CLK_EN); priv->clk_gate.hw.init = &init; priv->adc_clk = devm_clk_register(&indio_dev->dev, &priv->clk_gate.hw); -- cgit v1.2.3 From d85eed9f576369bc90322659de96b7dbea1f9a57 Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Tue, 31 Oct 2017 21:01:44 +0100 Subject: iio: adc: meson-saradc: initialize the bandgap correctly on older SoCs Meson8 and Meson8b do not have the MESON_SAR_ADC_REG11 register. The bandgap setting for these SoCs is configured in the MESON_SAR_ADC_DELTA_10 register instead. Make the driver aware of this difference and use the correct bandgap register depending on the SoC. This has worked fine on Meson8 and Meson8b because the bootloader is already initializing the bandgap setting. Fixes: 6c76ed31cd05 ("iio: adc: meson-saradc: add Meson8b SoC compatibility") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/meson_saradc.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) (limited to 'drivers') diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 1d25c78b74d2..a220d07d890f 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -221,6 +221,7 @@ enum meson_sar_adc_chan7_mux_sel { struct meson_sar_adc_data { bool has_bl30_integration; + u32 bandgap_reg; unsigned int resolution; const char *name; }; @@ -685,6 +686,20 @@ static int meson_sar_adc_init(struct iio_dev *indio_dev) return 0; } +static void meson_sar_adc_set_bandgap(struct iio_dev *indio_dev, bool on_off) +{ + struct meson_sar_adc_priv *priv = iio_priv(indio_dev); + u32 enable_mask; + + if (priv->data->bandgap_reg == MESON_SAR_ADC_REG11) + enable_mask = MESON_SAR_ADC_REG11_BANDGAP_EN; + else + enable_mask = MESON_SAR_ADC_DELTA_10_TS_VBG_EN; + + regmap_update_bits(priv->regmap, priv->data->bandgap_reg, enable_mask, + on_off ? enable_mask : 0); +} + static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev) { struct meson_sar_adc_priv *priv = iio_priv(indio_dev); @@ -717,9 +732,9 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev) regval = FIELD_PREP(MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, 1); regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG0, MESON_SAR_ADC_REG0_FIFO_CNT_IRQ_MASK, regval); - regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, - MESON_SAR_ADC_REG11_BANDGAP_EN, - MESON_SAR_ADC_REG11_BANDGAP_EN); + + meson_sar_adc_set_bandgap(indio_dev, true); + regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, MESON_SAR_ADC_REG3_ADC_EN, MESON_SAR_ADC_REG3_ADC_EN); @@ -739,8 +754,7 @@ static int meson_sar_adc_hw_enable(struct iio_dev *indio_dev) err_adc_clk: regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, MESON_SAR_ADC_REG3_ADC_EN, 0); - regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, - MESON_SAR_ADC_REG11_BANDGAP_EN, 0); + meson_sar_adc_set_bandgap(indio_dev, false); clk_disable_unprepare(priv->sana_clk); err_sana_clk: clk_disable_unprepare(priv->core_clk); @@ -765,8 +779,8 @@ static int meson_sar_adc_hw_disable(struct iio_dev *indio_dev) regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG3, MESON_SAR_ADC_REG3_ADC_EN, 0); - regmap_update_bits(priv->regmap, MESON_SAR_ADC_REG11, - MESON_SAR_ADC_REG11_BANDGAP_EN, 0); + + meson_sar_adc_set_bandgap(indio_dev, false); clk_disable_unprepare(priv->sana_clk); clk_disable_unprepare(priv->core_clk); @@ -844,30 +858,35 @@ static const struct iio_info meson_sar_adc_iio_info = { static const struct meson_sar_adc_data meson_sar_adc_meson8_data = { .has_bl30_integration = false, + .bandgap_reg = MESON_SAR_ADC_DELTA_10, .resolution = 10, .name = "meson-meson8-saradc", }; static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { .has_bl30_integration = false, + .bandgap_reg = MESON_SAR_ADC_DELTA_10, .resolution = 10, .name = "meson-meson8b-saradc", }; static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { .has_bl30_integration = true, + .bandgap_reg = MESON_SAR_ADC_REG11, .resolution = 10, .name = "meson-gxbb-saradc", }; static const struct meson_sar_adc_data meson_sar_adc_gxl_data = { .has_bl30_integration = true, + .bandgap_reg = MESON_SAR_ADC_REG11, .resolution = 12, .name = "meson-gxl-saradc", }; static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { .has_bl30_integration = true, + .bandgap_reg = MESON_SAR_ADC_REG11, .resolution = 12, .name = "meson-gxm-saradc", }; -- cgit v1.2.3 From 96748823c483c6eed8321f78bd128dd33f09c55c Mon Sep 17 00:00:00 2001 From: Martin Blumenstingl Date: Tue, 31 Oct 2017 21:01:45 +0100 Subject: iio: adc: meson-saradc: Meson8 and Meson8b do not have REG11 and REG13 The Meson GXBB and newer SoCs have a few more registers than the older Meson8 and Meson8b SoCs. Use a separate regmap config to limit the older SoCs to the DELTA_10 register. Fixes: 6c76ed31cd05 ("iio: adc: meson-saradc: add Meson8b SoC compatibility") Signed-off-by: Martin Blumenstingl Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/adc/meson_saradc.c | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index a220d07d890f..36047147ce7c 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -224,6 +224,7 @@ struct meson_sar_adc_data { u32 bandgap_reg; unsigned int resolution; const char *name; + const struct regmap_config *regmap_config; }; struct meson_sar_adc_priv { @@ -243,13 +244,20 @@ struct meson_sar_adc_priv { int calibscale; }; -static const struct regmap_config meson_sar_adc_regmap_config = { +static const struct regmap_config meson_sar_adc_regmap_config_gxbb = { .reg_bits = 8, .val_bits = 32, .reg_stride = 4, .max_register = MESON_SAR_ADC_REG13, }; +static const struct regmap_config meson_sar_adc_regmap_config_meson8 = { + .reg_bits = 8, + .val_bits = 32, + .reg_stride = 4, + .max_register = MESON_SAR_ADC_DELTA_10, +}; + static unsigned int meson_sar_adc_get_fifo_count(struct iio_dev *indio_dev) { struct meson_sar_adc_priv *priv = iio_priv(indio_dev); @@ -859,6 +867,7 @@ static const struct iio_info meson_sar_adc_iio_info = { static const struct meson_sar_adc_data meson_sar_adc_meson8_data = { .has_bl30_integration = false, .bandgap_reg = MESON_SAR_ADC_DELTA_10, + .regmap_config = &meson_sar_adc_regmap_config_meson8, .resolution = 10, .name = "meson-meson8-saradc", }; @@ -866,6 +875,7 @@ static const struct meson_sar_adc_data meson_sar_adc_meson8_data = { static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { .has_bl30_integration = false, .bandgap_reg = MESON_SAR_ADC_DELTA_10, + .regmap_config = &meson_sar_adc_regmap_config_meson8, .resolution = 10, .name = "meson-meson8b-saradc", }; @@ -873,6 +883,7 @@ static const struct meson_sar_adc_data meson_sar_adc_meson8b_data = { static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { .has_bl30_integration = true, .bandgap_reg = MESON_SAR_ADC_REG11, + .regmap_config = &meson_sar_adc_regmap_config_gxbb, .resolution = 10, .name = "meson-gxbb-saradc", }; @@ -880,6 +891,7 @@ static const struct meson_sar_adc_data meson_sar_adc_gxbb_data = { static const struct meson_sar_adc_data meson_sar_adc_gxl_data = { .has_bl30_integration = true, .bandgap_reg = MESON_SAR_ADC_REG11, + .regmap_config = &meson_sar_adc_regmap_config_gxbb, .resolution = 12, .name = "meson-gxl-saradc", }; @@ -887,6 +899,7 @@ static const struct meson_sar_adc_data meson_sar_adc_gxl_data = { static const struct meson_sar_adc_data meson_sar_adc_gxm_data = { .has_bl30_integration = true, .bandgap_reg = MESON_SAR_ADC_REG11, + .regmap_config = &meson_sar_adc_regmap_config_gxbb, .resolution = 12, .name = "meson-gxm-saradc", }; @@ -964,7 +977,7 @@ static int meson_sar_adc_probe(struct platform_device *pdev) return ret; priv->regmap = devm_regmap_init_mmio(&pdev->dev, base, - &meson_sar_adc_regmap_config); + priv->data->regmap_config); if (IS_ERR(priv->regmap)) return PTR_ERR(priv->regmap); -- cgit v1.2.3 From c175cb7cd953782bbf4e8bdf088ad61440d6dde5 Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Sun, 29 Oct 2017 17:06:01 -0700 Subject: iio: fix kernel-doc build errors Fix build errors in kernel-doc notation. Symbols that end in '_' have a special meaning, but adding a '*' makes them OK. ../drivers/iio/industrialio-core.c:635: ERROR: Unknown target name: "iio_val". ../drivers/iio/industrialio-core.c:642: ERROR: Unknown target name: "iio_val". Signed-off-by: Randy Dunlap Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/industrialio-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 9c4cfd19b739..2f0998ebeed2 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -631,7 +631,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type, * iio_format_value() - Formats a IIO value into its string representation * @buf: The buffer to which the formatted value gets written * which is assumed to be big enough (i.e. PAGE_SIZE). - * @type: One of the IIO_VAL_... constants. This decides how the val + * @type: One of the IIO_VAL_* constants. This decides how the val * and val2 parameters are formatted. * @size: Number of IIO value entries contained in vals * @vals: Pointer to the values, exact meaning depends on the @@ -639,7 +639,7 @@ static ssize_t __iio_format_value(char *buf, size_t len, unsigned int type, * * Return: 0 by default, a negative number on failure or the * total number of characters written for a type that belongs - * to the IIO_VAL_... constant. + * to the IIO_VAL_* constant. */ ssize_t iio_format_value(char *buf, unsigned int type, int size, int *vals) { -- cgit v1.2.3 From ad44a9f804c1591ba2a2ec0ac8d916a515d2790c Mon Sep 17 00:00:00 2001 From: Peter Meerwald-Stadler Date: Fri, 27 Oct 2017 21:45:31 +0200 Subject: iio: health: max30102: Temperature should be in milli Celsius As per ABI temperature should be in milli Celsius after scaling, not Celsius Note on stable cc. This driver is breaking the standard IIO ABI. (JC) Signed-off-by: Peter Meerwald-Stadler Acked-by: Matt Ranostay Cc: Signed-off-by: Jonathan Cameron --- drivers/iio/health/max30102.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/iio/health/max30102.c b/drivers/iio/health/max30102.c index 203ffb9cad6a..147a8c14235f 100644 --- a/drivers/iio/health/max30102.c +++ b/drivers/iio/health/max30102.c @@ -371,7 +371,7 @@ static int max30102_read_raw(struct iio_dev *indio_dev, mutex_unlock(&indio_dev->mlock); break; case IIO_CHAN_INFO_SCALE: - *val = 1; /* 0.0625 */ + *val = 1000; /* 62.5 */ *val2 = 16; ret = IIO_VAL_FRACTIONAL; break; -- cgit v1.2.3 From 5c3de777bdaf48bd0cfb43097c0d0fb85056cab7 Mon Sep 17 00:00:00 2001 From: Arend Van Spriel Date: Sat, 25 Nov 2017 21:39:25 +0100 Subject: brcmfmac: change driver unbind order of the sdio function devices In the function brcmf_sdio_firmware_callback() the driver is unbound from the sdio function devices in the error path. However, the order in which it is done resulted in a use-after-free issue (see brcmf_ops_sdio_remove() in bcmsdh.c). Hence change the order and first unbind sdio function #2 device and then unbind sdio function #1 device. Cc: stable@vger.kernel.org # v4.12.x Fixes: 7a51461fc2da ("brcmfmac: unbind all devices upon failure in firmware callback") Reported-by: Stefan Wahren Reviewed-by: Hante Meuleman Reviewed-by: Pieter-Paul Giesberts Reviewed-by: Franky Lin Signed-off-by: Arend van Spriel Signed-off-by: Kalle Valo --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index 310c4e2746aa..adf180f338ca 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -4121,8 +4121,8 @@ release: sdio_release_host(sdiodev->func[1]); fail: brcmf_dbg(TRACE, "failed: dev=%s, err=%d\n", dev_name(dev), err); - device_release_driver(dev); device_release_driver(&sdiodev->func[2]->dev); + device_release_driver(dev); } struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev) -- cgit v1.2.3 From 8a64e557f399090f5d1917b2f32a065da2b12be1 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Thu, 16 Nov 2017 23:18:32 +0300 Subject: gpio: pca953x: fix vendor prefix for PCA9654 Despite commit 55020c8056a8 ("of: Add vendor prefix for ON Semiconductor Corp.") was made long ago, the latter commit 9f49f6dd0473 ("gpio: pca953x: add onsemi,pca9654 id") made use of another, undocumented vendor prefix. Since such prefix doesn't seem to be used in any device trees, I think we can just fix the "compatible" string in the driver and the bindings and be done with that... Fixes: 9f49f6dd0473 ("gpio: pca953x: add onsemi,pca9654 id") Signed-off-by: Sergei Shtylyov Acked-by: Rob Herring Signed-off-by: Linus Walleij --- Documentation/devicetree/bindings/gpio/gpio-pca953x.txt | 2 +- drivers/gpio/gpio-pca953x.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt index 7f57271df2bc..0d0158728f89 100644 --- a/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt +++ b/Documentation/devicetree/bindings/gpio/gpio-pca953x.txt @@ -27,7 +27,7 @@ Required properties: ti,tca6424 ti,tca9539 ti,tca9554 - onsemi,pca9654 + onnn,pca9654 exar,xra1202 Optional properties: diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index babb7bd2ba59..a0a5f9730aa7 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -947,7 +947,7 @@ static const struct of_device_id pca953x_dt_ids[] = { { .compatible = "ti,tca6416", .data = OF_953X(16, PCA_INT), }, { .compatible = "ti,tca6424", .data = OF_953X(24, PCA_INT), }, - { .compatible = "onsemi,pca9654", .data = OF_953X( 8, PCA_INT), }, + { .compatible = "onnn,pca9654", .data = OF_953X( 8, PCA_INT), }, { .compatible = "exar,xra1202", .data = OF_953X( 8, 0), }, { } -- cgit v1.2.3 From 31eb7431805493e10f4731f366cf4d4e3e952035 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Fri, 1 Dec 2017 14:58:34 +0100 Subject: PM / runtime: Fix handling of suppliers with disabled runtime PM Prevent rpm_get_suppliers() from returning an error code if runtime PM is disabled for one or more of the supplier devices it wants to runtime-resume, so as to make runtime PM work for devices with links to suppliers that don't use runtime PM (such links may be created during device enumeration even before it is known whether or not runtime PM will be enabled for the devices in question, for example). Fixes: 21d5c57b3726 (PM / runtime: Use device links) Reported-by: Adrian Hunter Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukas Wunner Tested-by: Adrian Hunter --- drivers/base/power/runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index 027d159ac381..6e89b51ea3d9 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -276,7 +276,8 @@ static int rpm_get_suppliers(struct device *dev) continue; retval = pm_runtime_get_sync(link->supplier); - if (retval < 0) { + /* Ignore suppliers with disabled runtime PM. */ + if (retval < 0 && retval != -EACCES) { pm_runtime_put_noidle(link->supplier); return retval; } -- cgit v1.2.3 From e2874a3c8c0c3b251d288a6149a80b9fd1c2f019 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 30 Nov 2017 21:15:50 -0500 Subject: drm/amdgpu: add license to Makefiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Was missing license text. Acked-by: Harry Wentland Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/acp/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/amdgpu/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/amdkfd/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/display/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/amdgpu_dm/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/basics/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/bios/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/calcs/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce100/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce110/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce112/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dce120/Makefile | 23 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/dce80/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dcn10/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/dml/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/gpio/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/i2caux/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/irq/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/virtual/Makefile | 21 ++++++++++++++++++++ .../gpu/drm/amd/display/modules/freesync/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/lib/Makefile | 21 ++++++++++++++++++++ drivers/gpu/drm/amd/powerplay/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/hwmgr/Makefile | 22 ++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/smumgr/Makefile | 22 ++++++++++++++++++++- 26 files changed, 547 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/amd/acp/Makefile b/drivers/gpu/drm/amd/acp/Makefile index 8a08e81ee90d..d4176a3fb706 100644 --- a/drivers/gpu/drm/amd/acp/Makefile +++ b/drivers/gpu/drm/amd/acp/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the ACP, which is a sub-component # of AMDSOC/AMDGPU drm driver. # It provides the HW control for ACP related functionalities. diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile b/drivers/gpu/drm/amd/amdgpu/Makefile index 78d609123420..90202cf4cd1e 100644 --- a/drivers/gpu/drm/amd/amdgpu/Makefile +++ b/drivers/gpu/drm/amd/amdgpu/Makefile @@ -1,4 +1,24 @@ -# SPDX-License-Identifier: GPL-2.0 +# +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# # # Makefile for the drm device driver. This driver provides support for the # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. diff --git a/drivers/gpu/drm/amd/amdkfd/Makefile b/drivers/gpu/drm/amd/amdkfd/Makefile index 7bb0bc0ca3d6..342c2d937b17 100644 --- a/drivers/gpu/drm/amd/amdkfd/Makefile +++ b/drivers/gpu/drm/amd/amdkfd/Makefile @@ -1,4 +1,24 @@ -# SPDX-License-Identifier: GPL-2.0 +# +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# # # Makefile for Heterogenous System Architecture support for AMD GPU devices # diff --git a/drivers/gpu/drm/amd/display/Makefile b/drivers/gpu/drm/amd/display/Makefile index 8ba37dd9cf7f..c27c81cdeed3 100644 --- a/drivers/gpu/drm/amd/display/Makefile +++ b/drivers/gpu/drm/amd/display/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the DAL (Display Abstract Layer), which is a sub-component # of the AMDGPU drm driver. # It provides the HW control for display related functionalities. diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile b/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile index 4699e47aa76b..2b72009844f8 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'dm' sub-component of DAL. # It provides the control and status of dm blocks. diff --git a/drivers/gpu/drm/amd/display/dc/Makefile b/drivers/gpu/drm/amd/display/dc/Makefile index 4f83e3011743..aed538a4d1ba 100644 --- a/drivers/gpu/drm/amd/display/dc/Makefile +++ b/drivers/gpu/drm/amd/display/dc/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for Display Core (dc) component. # diff --git a/drivers/gpu/drm/amd/display/dc/basics/Makefile b/drivers/gpu/drm/amd/display/dc/basics/Makefile index 43c5ccdeeb72..6af8c8a9ad80 100644 --- a/drivers/gpu/drm/amd/display/dc/basics/Makefile +++ b/drivers/gpu/drm/amd/display/dc/basics/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'utils' sub-component of DAL. # It provides the general basic services required by other DAL # subcomponents. diff --git a/drivers/gpu/drm/amd/display/dc/bios/Makefile b/drivers/gpu/drm/amd/display/dc/bios/Makefile index 6ec815dce9cc..239e86bbec5a 100644 --- a/drivers/gpu/drm/amd/display/dc/bios/Makefile +++ b/drivers/gpu/drm/amd/display/dc/bios/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'bios' sub-component of DAL. # It provides the parsing and executing controls for atom bios image. diff --git a/drivers/gpu/drm/amd/display/dc/calcs/Makefile b/drivers/gpu/drm/amd/display/dc/calcs/Makefile index 41ef35995b02..7959e382ed28 100644 --- a/drivers/gpu/drm/amd/display/dc/calcs/Makefile +++ b/drivers/gpu/drm/amd/display/dc/calcs/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'calcs' sub-component of DAL. # It calculates Bandwidth and Watermarks values for HW programming # diff --git a/drivers/gpu/drm/amd/display/dc/dce/Makefile b/drivers/gpu/drm/amd/display/dc/dce/Makefile index 8abec0bed379..11401fd8e535 100644 --- a/drivers/gpu/drm/amd/display/dc/dce/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for common 'dce' logic # HW object file under this folder follow similar pattern for HW programming # - register offset and/or shift + mask stored in the dec_hw struct diff --git a/drivers/gpu/drm/amd/display/dc/dce100/Makefile b/drivers/gpu/drm/amd/display/dc/dce100/Makefile index ea40870624b3..a822d4e2a169 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce100/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'controller' sub-component of DAL. # It provides the control and status of HW CRTC block. diff --git a/drivers/gpu/drm/amd/display/dc/dce110/Makefile b/drivers/gpu/drm/amd/display/dc/dce110/Makefile index 98d956e2f218..d564c0eb8b04 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce110/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'controller' sub-component of DAL. # It provides the control and status of HW CRTC block. diff --git a/drivers/gpu/drm/amd/display/dc/dce112/Makefile b/drivers/gpu/drm/amd/display/dc/dce112/Makefile index 265ac4310d85..8e090446d511 100644 --- a/drivers/gpu/drm/amd/display/dc/dce112/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce112/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'controller' sub-component of DAL. # It provides the control and status of HW CRTC block. diff --git a/drivers/gpu/drm/amd/display/dc/dce120/Makefile b/drivers/gpu/drm/amd/display/dc/dce120/Makefile index 1779b963525c..37db1f8d45ea 100644 --- a/drivers/gpu/drm/amd/display/dc/dce120/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce120/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'controller' sub-component of DAL. # It provides the control and status of HW CRTC block. @@ -8,4 +29,4 @@ dce120_hw_sequencer.o AMD_DAL_DCE120 = $(addprefix $(AMDDALPATH)/dc/dce120/,$(DCE120)) -AMD_DISPLAY_FILES += $(AMD_DAL_DCE120) \ No newline at end of file +AMD_DISPLAY_FILES += $(AMD_DAL_DCE120) diff --git a/drivers/gpu/drm/amd/display/dc/dce80/Makefile b/drivers/gpu/drm/amd/display/dc/dce80/Makefile index c1105895e5fa..bc388aa4b2f5 100644 --- a/drivers/gpu/drm/amd/display/dc/dce80/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dce80/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'controller' sub-component of DAL. # It provides the control and status of HW CRTC block. diff --git a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile index ebeb88283a14..f565a6042970 100644 --- a/drivers/gpu/drm/amd/display/dc/dcn10/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dcn10/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for DCN. DCN10 = dcn10_resource.o dcn10_ipp.o dcn10_hw_sequencer.o \ diff --git a/drivers/gpu/drm/amd/display/dc/dml/Makefile b/drivers/gpu/drm/amd/display/dc/dml/Makefile index 87bab8e8139f..3488af2b5786 100644 --- a/drivers/gpu/drm/amd/display/dc/dml/Makefile +++ b/drivers/gpu/drm/amd/display/dc/dml/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'utils' sub-component of DAL. # It provides the general basic services required by other DAL # subcomponents. diff --git a/drivers/gpu/drm/amd/display/dc/gpio/Makefile b/drivers/gpu/drm/amd/display/dc/gpio/Makefile index 70d01a9e9676..562ee189d780 100644 --- a/drivers/gpu/drm/amd/display/dc/gpio/Makefile +++ b/drivers/gpu/drm/amd/display/dc/gpio/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'gpio' sub-component of DAL. # It provides the control and status of HW GPIO pins. diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/Makefile b/drivers/gpu/drm/amd/display/dc/i2caux/Makefile index 55603400acd9..352885cb4d07 100644 --- a/drivers/gpu/drm/amd/display/dc/i2caux/Makefile +++ b/drivers/gpu/drm/amd/display/dc/i2caux/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'i2c' sub-component of DAL. # It provides the control and status of HW i2c engine of the adapter. diff --git a/drivers/gpu/drm/amd/display/dc/irq/Makefile b/drivers/gpu/drm/amd/display/dc/irq/Makefile index c7e93f7223bd..498515aad4a5 100644 --- a/drivers/gpu/drm/amd/display/dc/irq/Makefile +++ b/drivers/gpu/drm/amd/display/dc/irq/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'audio' sub-component of DAL. # It provides the control and status of HW adapter resources, # that are global for the ASIC and sharable between pipes. diff --git a/drivers/gpu/drm/amd/display/dc/virtual/Makefile b/drivers/gpu/drm/amd/display/dc/virtual/Makefile index fc0b7318d9cc..07326d244d50 100644 --- a/drivers/gpu/drm/amd/display/dc/virtual/Makefile +++ b/drivers/gpu/drm/amd/display/dc/virtual/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the virtual sub-component of DAL. # It provides the control and status of HW CRTC block. diff --git a/drivers/gpu/drm/amd/display/modules/freesync/Makefile b/drivers/gpu/drm/amd/display/modules/freesync/Makefile index db8e0ff6d7a9..fb9a499780e8 100644 --- a/drivers/gpu/drm/amd/display/modules/freesync/Makefile +++ b/drivers/gpu/drm/amd/display/modules/freesync/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for the 'freesync' sub-module of DAL. # diff --git a/drivers/gpu/drm/amd/lib/Makefile b/drivers/gpu/drm/amd/lib/Makefile index 87cd7009e80f..690243001e1a 100644 --- a/drivers/gpu/drm/amd/lib/Makefile +++ b/drivers/gpu/drm/amd/lib/Makefile @@ -1,4 +1,25 @@ # +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# +# # Makefile for AMD library routines, which are used by AMD driver # components. # diff --git a/drivers/gpu/drm/amd/powerplay/Makefile b/drivers/gpu/drm/amd/powerplay/Makefile index 8c55c6e254d9..231785a9e24c 100644 --- a/drivers/gpu/drm/amd/powerplay/Makefile +++ b/drivers/gpu/drm/amd/powerplay/Makefile @@ -1,4 +1,24 @@ -# SPDX-License-Identifier: GPL-2.0 +# +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# subdir-ccflags-y += \ -I$(FULL_AMD_PATH)/powerplay/inc/ \ diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile index 824fb6fe54ae..a212c27f2e17 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/Makefile @@ -1,4 +1,24 @@ -# SPDX-License-Identifier: GPL-2.0 +# +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# # # Makefile for the 'hw manager' sub-component of powerplay. # It provides the hardware management services for the driver. diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/Makefile b/drivers/gpu/drm/amd/powerplay/smumgr/Makefile index 30d3089d7dba..98e701e4f553 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/Makefile +++ b/drivers/gpu/drm/amd/powerplay/smumgr/Makefile @@ -1,4 +1,24 @@ -# SPDX-License-Identifier: GPL-2.0 +# +# Copyright 2017 Advanced Micro Devices, Inc. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +# OTHER DEALINGS IN THE SOFTWARE. +# # # Makefile for the 'smu manager' sub-component of powerplay. # It provides the smu management services for the driver. -- cgit v1.2.3 From bf93b448b80bf71c2003659b06487879153b8b9b Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 30 Nov 2017 21:29:47 -0500 Subject: drm/amdgpu: add license to files where it was missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These files were missing it before. Acked-by: Harry Wentland Acked-by: Felix Kuehling Acked-by: Christian König Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/display/dc/core/dc_debug.c | 22 ++++++++++++++++++++ drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dc_helper.c | 22 ++++++++++++++++++++ .../drm/amd/display/dc/dce100/dce100_resource.c | 2 +- .../drm/amd/display/dc/dce100/dce100_resource.h | 23 +++++++++++++++++++++ .../drm/amd/display/dc/dce110/dce110_resource.c | 2 +- .../display/dc/dce110/dce110_timing_generator_v.c | 23 +++++++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/link_encoder.h | 22 ++++++++++++++++++++ .../gpu/drm/amd/display/dc/inc/hw/stream_encoder.h | 22 ++++++++++++++++++++ .../gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/smu72.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h | 24 +++++++++++++++++++++- drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h | 24 +++++++++++++++++++++- 15 files changed, 254 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 6c570d4e4516..f8edf5483f11 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c @@ -1,4 +1,6 @@ /* + * Copyright 2017 Advanced Micro Devices, Inc. + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h index f337c316ec2c..06525f2c36c3 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_trace.h @@ -1,4 +1,26 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #if !defined(_AMDGPU_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) #define _AMDGPU_TRACE_H_ diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c index 6acee5426e4b..43c7a7fddb83 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_debug.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_debug.c @@ -1,3 +1,25 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ /* * dc_debug.c * diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c index b7422d3b71ef..928895809867 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c @@ -1,5 +1,5 @@ /* -* Copyright 2012-15 Advanced Micro Devices, Inc. + * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/drivers/gpu/drm/amd/display/dc/dc_helper.c b/drivers/gpu/drm/amd/display/dc/dc_helper.c index 0d84b2a1ccfd..90e81f7ba919 100644 --- a/drivers/gpu/drm/amd/display/dc/dc_helper.c +++ b/drivers/gpu/drm/amd/display/dc/dc_helper.c @@ -1,3 +1,25 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ /* * dc_helper.c * diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c index 90911258bdb3..3ea43e2a9450 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c @@ -1,5 +1,5 @@ /* -* Copyright 2012-15 Advanced Micro Devices, Inc. + * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h index de8fdf438f9b..2f366d66635d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.h @@ -1,3 +1,26 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * + */ /* * dce100_resource.h * diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c index 61adb8174ce0..42df17f9aa8d 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_resource.c @@ -1,5 +1,5 @@ /* -* Copyright 2012-15 Advanced Micro Devices, Inc. + * Copyright 2012-15 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c index 07d9303d5477..59b4cd329715 100644 --- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c +++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_timing_generator_v.c @@ -1,3 +1,26 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #include "dm_services.h" /* include DCE11 register header files */ diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h index 3d33bcda7059..498b7f05c5ca 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/link_encoder.h @@ -1,3 +1,25 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ /* * link_encoder.h * diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h index 3050afe8e8a9..b5db1692393c 100644 --- a/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h +++ b/drivers/gpu/drm/amd/display/dc/inc/hw/stream_encoder.h @@ -1,3 +1,25 @@ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ /* * stream_encoder.h * diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c index 67fae834bc67..8de384bf9a8f 100644 --- a/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/pp_overdriver.c @@ -1,4 +1,26 @@ -// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #include "pp_overdriver.h" #include diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu72.h b/drivers/gpu/drm/amd/powerplay/inc/smu72.h index 08cd70c75d8b..9ad1cefff79f 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smu72.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smu72.h @@ -1,4 +1,26 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #ifndef SMU72_H #define SMU72_H diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h b/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h index b2edbc0c3c4d..2aefbb85f620 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smu72_discrete.h @@ -1,4 +1,26 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #ifndef SMU72_DISCRETE_H #define SMU72_DISCRETE_H diff --git a/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h b/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h index 283a0dc25e84..07129e6c31a9 100644 --- a/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h +++ b/drivers/gpu/drm/amd/scheduler/gpu_sched_trace.h @@ -1,4 +1,26 @@ -/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright 2017 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + */ + #if !defined(_GPU_SCHED_TRACE_H) || defined(TRACE_HEADER_MULTI_READ) #define _GPU_SCHED_TRACE_H_ -- cgit v1.2.3 From 0b926ac304a9b315f0ce8ce2ae5373b5a0478b68 Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Mon, 23 Oct 2017 09:40:16 +0200 Subject: s390/qdio: consider ERROR buffers for inbound-full condition In the unlikely case that an ERROR buffer (presented by the HW) consumed the last available slot on the input queue, increment the corresponding statistics counter. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/qdio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 59b4a3370cd5..d681e6b56add 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -536,7 +536,8 @@ static int get_inbound_buffer_frontier(struct qdio_q *q) case SLSB_P_INPUT_ERROR: process_buffer_error(q, count); q->first_to_check = add_buf(q->first_to_check, count); - atomic_sub(count, &q->nr_buf_used); + if (atomic_sub_return(count, &q->nr_buf_used) == 0) + qperf_inc(q, inbound_queue_full); if (q->irq_ptr->perf_stat_enabled) account_sbals_error(q, count); break; -- cgit v1.2.3 From b23481fbfc567fea256a69b307ced283c56aba99 Mon Sep 17 00:00:00 2001 From: Julian Wiedmann Date: Mon, 23 Oct 2017 09:38:18 +0200 Subject: s390/qdio: restrict target-full handling to IQDIO The 'no target buffer empty' error code only applies to HiperSockets. If this code is reported on a different queue type, be sure to make the same amount of noise as for any other error code. Signed-off-by: Julian Wiedmann Reviewed-by: Benjamin Block Signed-off-by: Martin Schwidefsky --- drivers/s390/cio/qdio_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index d681e6b56add..95b0efe28afb 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -431,8 +431,8 @@ static void process_buffer_error(struct qdio_q *q, int count) q->qdio_error = QDIO_ERROR_SLSB_STATE; /* special handling for no target buffer empty */ - if ((!q->is_input_q && - (q->sbal[q->first_to_check]->element[15].sflags) == 0x10)) { + if (queue_type(q) == QDIO_IQDIO_QFMT && !q->is_input_q && + q->sbal[q->first_to_check]->element[15].sflags == 0x10) { qperf_inc(q, target_full); DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "OUTFULL FTC:%02x", q->first_to_check); -- cgit v1.2.3 From bd7a9b3757895c3a2fd64b3f12e438d9190c83d9 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Mon, 27 Nov 2017 12:46:57 +0100 Subject: s390/dasd: remove 'struct timespec' usage getnstimeofday() and timespec are deprecated since they can overflow on 32-bit architectures. This simply changes to the explicitly typed timespec64 version that doesn't have that problem. It would be nice to also convert to monotonic timestamps and call ktime_get_ts64() rather than ktime_get_real_ts64(), but that would be a user-visible change. Signed-off-by: Arnd Bergmann Signed-off-by: Stefan Haberland Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd.c | 10 +++++----- drivers/s390/block/dasd_int.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 66e008f7adb6..d4e8dff673cc 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c @@ -759,7 +759,7 @@ static void dasd_profile_end_add_data(struct dasd_profile_info *data, /* in case of an overflow, reset the whole profile */ if (data->dasd_io_reqs == UINT_MAX) { memset(data, 0, sizeof(*data)); - getnstimeofday(&data->starttod); + ktime_get_real_ts64(&data->starttod); } data->dasd_io_reqs++; data->dasd_io_sects += sectors; @@ -894,7 +894,7 @@ void dasd_profile_reset(struct dasd_profile *profile) return; } memset(data, 0, sizeof(*data)); - getnstimeofday(&data->starttod); + ktime_get_real_ts64(&data->starttod); spin_unlock_bh(&profile->lock); } @@ -911,7 +911,7 @@ int dasd_profile_on(struct dasd_profile *profile) kfree(data); return 0; } - getnstimeofday(&data->starttod); + ktime_get_real_ts64(&data->starttod); profile->data = data; spin_unlock_bh(&profile->lock); return 0; @@ -995,8 +995,8 @@ static void dasd_stats_array(struct seq_file *m, unsigned int *array) static void dasd_stats_seq_print(struct seq_file *m, struct dasd_profile_info *data) { - seq_printf(m, "start_time %ld.%09ld\n", - data->starttod.tv_sec, data->starttod.tv_nsec); + seq_printf(m, "start_time %lld.%09ld\n", + (s64)data->starttod.tv_sec, data->starttod.tv_nsec); seq_printf(m, "total_requests %u\n", data->dasd_io_reqs); seq_printf(m, "total_sectors %u\n", data->dasd_io_sects); seq_printf(m, "total_pav %u\n", data->dasd_io_alias); diff --git a/drivers/s390/block/dasd_int.h b/drivers/s390/block/dasd_int.h index b095a23bcc0c..96709b1a7bf8 100644 --- a/drivers/s390/block/dasd_int.h +++ b/drivers/s390/block/dasd_int.h @@ -441,7 +441,7 @@ struct dasd_profile_info { unsigned int dasd_io_nr_req[32]; /* hist. of # of requests in chanq */ /* new data */ - struct timespec starttod; /* time of start or last reset */ + struct timespec64 starttod; /* time of start or last reset */ unsigned int dasd_io_alias; /* requests using an alias */ unsigned int dasd_io_tpm; /* requests using transport mode */ unsigned int dasd_read_reqs; /* total number of read requests */ -- cgit v1.2.3 From da340f921d3454f1521671c7a5a43ad3331fbe50 Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Thu, 26 Oct 2017 14:37:35 +0200 Subject: s390/dasd: prevent prefix I/O error Prevent that a prefix flag is set based on invalid configuration data. The validity.verify_base flag should only be set for alias devices. Usually the unit address type is either one of base, PAV alias or HyperPAV alias. But in cases where the unit address type is not set or any other value the validity.verify_base flag might be set as well. This would lead to follow on errors. Explicitly check for alias devices and set the validity flag only for them. Signed-off-by: Stefan Haberland Reviewed-by: Jan Hoeppner Signed-off-by: Martin Schwidefsky --- drivers/s390/block/dasd_eckd.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c index 1a41ef496338..a2edf2a7ace9 100644 --- a/drivers/s390/block/dasd_eckd.c +++ b/drivers/s390/block/dasd_eckd.c @@ -531,10 +531,12 @@ static int prefix_LRE(struct ccw1 *ccw, struct PFX_eckd_data *pfxdata, pfxdata->validity.define_extent = 1; /* private uid is kept up to date, conf_data may be outdated */ - if (startpriv->uid.type != UA_BASE_DEVICE) { + if (startpriv->uid.type == UA_BASE_PAV_ALIAS) pfxdata->validity.verify_base = 1; - if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) - pfxdata->validity.hyper_pav = 1; + + if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) { + pfxdata->validity.verify_base = 1; + pfxdata->validity.hyper_pav = 1; } rc = define_extent(NULL, dedata, trk, totrk, cmd, basedev, blksize); @@ -3415,10 +3417,12 @@ static int prepare_itcw(struct itcw *itcw, pfxdata.validity.define_extent = 1; /* private uid is kept up to date, conf_data may be outdated */ - if (startpriv->uid.type != UA_BASE_DEVICE) { + if (startpriv->uid.type == UA_BASE_PAV_ALIAS) + pfxdata.validity.verify_base = 1; + + if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) { pfxdata.validity.verify_base = 1; - if (startpriv->uid.type == UA_HYPER_PAV_ALIAS) - pfxdata.validity.hyper_pav = 1; + pfxdata.validity.hyper_pav = 1; } switch (cmd) { -- cgit v1.2.3 From 9fa1db4c7511543c951128758f358cd7aad99628 Mon Sep 17 00:00:00 2001 From: Martin Schwidefsky Date: Mon, 4 Dec 2017 10:39:38 +0100 Subject: s390: add a few more SPDX identifiers Add the correct SPDX license to a few more files under arch/s390 and drivers/s390 which have been missed to far. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. Signed-off-by: Martin Schwidefsky --- arch/s390/Kbuild | 1 + arch/s390/appldata/Makefile | 1 + arch/s390/boot/compressed/vmlinux.scr | 1 + arch/s390/crypto/sha1_s390.c | 1 + arch/s390/hypfs/Makefile | 1 + arch/s390/include/asm/Kbuild | 1 + arch/s390/include/asm/alternative.h | 1 + arch/s390/include/asm/ap.h | 1 + arch/s390/include/asm/bugs.h | 1 + arch/s390/include/asm/segment.h | 1 + arch/s390/include/asm/vga.h | 1 + arch/s390/include/uapi/asm/Kbuild | 1 + arch/s390/include/uapi/asm/perf_regs.h | 1 + arch/s390/include/uapi/asm/sthyi.h | 1 + arch/s390/include/uapi/asm/vmcp.h | 1 + arch/s390/kernel/alternative.c | 1 + arch/s390/kernel/perf_regs.c | 1 + arch/s390/kernel/vdso64/note.S | 1 + arch/s390/net/Makefile | 1 + arch/s390/numa/Makefile | 1 + arch/s390/pci/Makefile | 1 + arch/s390/tools/gen_opcode_table.c | 1 + drivers/s390/Makefile | 1 + drivers/s390/block/Kconfig | 1 + drivers/s390/char/Kconfig | 1 + drivers/s390/char/defkeymap.map | 1 + drivers/s390/cio/blacklist.h | 1 + drivers/s390/net/Kconfig | 1 + drivers/s390/scsi/Makefile | 1 + 29 files changed, 29 insertions(+) (limited to 'drivers') diff --git a/arch/s390/Kbuild b/arch/s390/Kbuild index eae2c64cf69d..9fdff3fe1a42 100644 --- a/arch/s390/Kbuild +++ b/arch/s390/Kbuild @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-y += kernel/ obj-y += mm/ obj-$(CONFIG_KVM) += kvm/ diff --git a/arch/s390/appldata/Makefile b/arch/s390/appldata/Makefile index 99f1cf071304..b06def4a4f2f 100644 --- a/arch/s390/appldata/Makefile +++ b/arch/s390/appldata/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the Linux - z/VM Monitor Stream. # diff --git a/arch/s390/boot/compressed/vmlinux.scr b/arch/s390/boot/compressed/vmlinux.scr index f02382ae5c48..42a242597f34 100644 --- a/arch/s390/boot/compressed/vmlinux.scr +++ b/arch/s390/boot/compressed/vmlinux.scr @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ SECTIONS { .rodata.compressed : { diff --git a/arch/s390/crypto/sha1_s390.c b/arch/s390/crypto/sha1_s390.c index c7de53d8da75..71048bd4d64c 100644 --- a/arch/s390/crypto/sha1_s390.c +++ b/arch/s390/crypto/sha1_s390.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Cryptographic API. * diff --git a/arch/s390/hypfs/Makefile b/arch/s390/hypfs/Makefile index 2ee25ba252d6..06f601509ce9 100644 --- a/arch/s390/hypfs/Makefile +++ b/arch/s390/hypfs/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the linux hypfs filesystem routines. # diff --git a/arch/s390/include/asm/Kbuild b/arch/s390/include/asm/Kbuild index 41c211a4d8b1..048450869328 100644 --- a/arch/s390/include/asm/Kbuild +++ b/arch/s390/include/asm/Kbuild @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 generic-y += asm-offsets.h generic-y += cacheflush.h generic-y += clkdev.h diff --git a/arch/s390/include/asm/alternative.h b/arch/s390/include/asm/alternative.h index a72002056b54..c2cf7bcdef9b 100644 --- a/arch/s390/include/asm/alternative.h +++ b/arch/s390/include/asm/alternative.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_S390_ALTERNATIVE_H #define _ASM_S390_ALTERNATIVE_H diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h index c02f4aba88a6..9ff489598d5d 100644 --- a/arch/s390/include/asm/ap.h +++ b/arch/s390/include/asm/ap.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Adjunct processor (AP) interfaces * diff --git a/arch/s390/include/asm/bugs.h b/arch/s390/include/asm/bugs.h index 0f5bd894f4dc..aa42a179be33 100644 --- a/arch/s390/include/asm/bugs.h +++ b/arch/s390/include/asm/bugs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * S390 version * Copyright IBM Corp. 1999 diff --git a/arch/s390/include/asm/segment.h b/arch/s390/include/asm/segment.h index 8bfce3475b1c..97a0582b8d0f 100644 --- a/arch/s390/include/asm/segment.h +++ b/arch/s390/include/asm/segment.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_SEGMENT_H #define _ASM_SEGMENT_H diff --git a/arch/s390/include/asm/vga.h b/arch/s390/include/asm/vga.h index d375526c261f..605dc46bac5e 100644 --- a/arch/s390/include/asm/vga.h +++ b/arch/s390/include/asm/vga.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef _ASM_S390_VGA_H #define _ASM_S390_VGA_H diff --git a/arch/s390/include/uapi/asm/Kbuild b/arch/s390/include/uapi/asm/Kbuild index 098f28778a13..92b7c9b3e641 100644 --- a/arch/s390/include/uapi/asm/Kbuild +++ b/arch/s390/include/uapi/asm/Kbuild @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # UAPI Header export list include include/uapi/asm-generic/Kbuild.asm diff --git a/arch/s390/include/uapi/asm/perf_regs.h b/arch/s390/include/uapi/asm/perf_regs.h index 7c8564f98205..d17dd9e5d516 100644 --- a/arch/s390/include/uapi/asm/perf_regs.h +++ b/arch/s390/include/uapi/asm/perf_regs.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _ASM_S390_PERF_REGS_H #define _ASM_S390_PERF_REGS_H diff --git a/arch/s390/include/uapi/asm/sthyi.h b/arch/s390/include/uapi/asm/sthyi.h index ec113db4eb7e..b1b022316983 100644 --- a/arch/s390/include/uapi/asm/sthyi.h +++ b/arch/s390/include/uapi/asm/sthyi.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ #ifndef _UAPI_ASM_STHYI_H #define _UAPI_ASM_STHYI_H diff --git a/arch/s390/include/uapi/asm/vmcp.h b/arch/s390/include/uapi/asm/vmcp.h index 4caf71714a55..aeaaa030030e 100644 --- a/arch/s390/include/uapi/asm/vmcp.h +++ b/arch/s390/include/uapi/asm/vmcp.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* * Copyright IBM Corp. 2004, 2005 * Interface implementation for communication with the z/VM control program diff --git a/arch/s390/kernel/alternative.c b/arch/s390/kernel/alternative.c index 315986a06cf5..574e77622c04 100644 --- a/arch/s390/kernel/alternative.c +++ b/arch/s390/kernel/alternative.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include #include #include diff --git a/arch/s390/kernel/perf_regs.c b/arch/s390/kernel/perf_regs.c index f8603ebed669..54e2d634b849 100644 --- a/arch/s390/kernel/perf_regs.c +++ b/arch/s390/kernel/perf_regs.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include #include #include diff --git a/arch/s390/kernel/vdso64/note.S b/arch/s390/kernel/vdso64/note.S index 79a071e4357e..db19d0680a0a 100644 --- a/arch/s390/kernel/vdso64/note.S +++ b/arch/s390/kernel/vdso64/note.S @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * This supplies .note.* sections to go into the PT_NOTE inside the vDSO text. * Here we can supply some information useful to userland. diff --git a/arch/s390/net/Makefile b/arch/s390/net/Makefile index 90568c33ddb0..e0d5f245e42b 100644 --- a/arch/s390/net/Makefile +++ b/arch/s390/net/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Arch-specific network modules # diff --git a/arch/s390/numa/Makefile b/arch/s390/numa/Makefile index f94ecaffa71b..66c2dff74895 100644 --- a/arch/s390/numa/Makefile +++ b/arch/s390/numa/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 obj-y += numa.o obj-y += toptree.o obj-$(CONFIG_NUMA_EMU) += mode_emu.o diff --git a/arch/s390/pci/Makefile b/arch/s390/pci/Makefile index 805d8b29193a..22d0871291ee 100644 --- a/arch/s390/pci/Makefile +++ b/arch/s390/pci/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the s390 PCI subsystem. # diff --git a/arch/s390/tools/gen_opcode_table.c b/arch/s390/tools/gen_opcode_table.c index 01d4c5a4bfe9..357d42681cef 100644 --- a/arch/s390/tools/gen_opcode_table.c +++ b/arch/s390/tools/gen_opcode_table.c @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Generate opcode table initializers for the in-kernel disassembler. * diff --git a/drivers/s390/Makefile b/drivers/s390/Makefile index e5225ad9c5b1..2fdab400c1fe 100644 --- a/drivers/s390/Makefile +++ b/drivers/s390/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the S/390 specific device drivers # diff --git a/drivers/s390/block/Kconfig b/drivers/s390/block/Kconfig index 31f014b57bfc..bc27d716aa6b 100644 --- a/drivers/s390/block/Kconfig +++ b/drivers/s390/block/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 comment "S/390 block device drivers" depends on S390 && BLOCK diff --git a/drivers/s390/char/Kconfig b/drivers/s390/char/Kconfig index 97c4c9fdd53d..ab0b243a947d 100644 --- a/drivers/s390/char/Kconfig +++ b/drivers/s390/char/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 comment "S/390 character device drivers" depends on S390 diff --git a/drivers/s390/char/defkeymap.map b/drivers/s390/char/defkeymap.map index 353b3f268824..f4c095612a02 100644 --- a/drivers/s390/char/defkeymap.map +++ b/drivers/s390/char/defkeymap.map @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # Default keymap for 3270 (ebcdic codepage 037). keymaps 0-1,4-5 diff --git a/drivers/s390/cio/blacklist.h b/drivers/s390/cio/blacklist.h index 95e25c1df922..140e3e4ee2fd 100644 --- a/drivers/s390/cio/blacklist.h +++ b/drivers/s390/cio/blacklist.h @@ -1,3 +1,4 @@ +/* SPDX-License-Identifier: GPL-2.0 */ #ifndef S390_BLACKLIST_H #define S390_BLACKLIST_H diff --git a/drivers/s390/net/Kconfig b/drivers/s390/net/Kconfig index b2837b1c70b7..a782a207ad31 100644 --- a/drivers/s390/net/Kconfig +++ b/drivers/s390/net/Kconfig @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 menu "S/390 network device drivers" depends on NETDEVICES && S390 diff --git a/drivers/s390/scsi/Makefile b/drivers/s390/scsi/Makefile index 9259039e886d..9dda431ec8f3 100644 --- a/drivers/s390/scsi/Makefile +++ b/drivers/s390/scsi/Makefile @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: GPL-2.0 # # Makefile for the S/390 specific device drivers # -- cgit v1.2.3 From 567deca8e72df3ceb6c07c63f8541a4928f64d3b Mon Sep 17 00:00:00 2001 From: Ihab Zhaika Date: Thu, 16 Nov 2017 09:29:19 +0200 Subject: iwlwifi: add new cards for 9260 and 22000 series add 1 PCI ID for 9260 series and 1 for 22000 series. Cc: stable@vger.kernel.org Signed-off-by: Ihab Zhaika Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c index f21fe59faccf..ccd7c33c4c28 100644 --- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c @@ -553,6 +553,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x271B, 0x0014, iwl9160_2ac_cfg)}, {IWL_PCI_DEVICE(0x271B, 0x0210, iwl9160_2ac_cfg)}, {IWL_PCI_DEVICE(0x271B, 0x0214, iwl9260_2ac_cfg)}, + {IWL_PCI_DEVICE(0x271C, 0x0214, iwl9260_2ac_cfg)}, {IWL_PCI_DEVICE(0x2720, 0x0034, iwl9560_2ac_cfg)}, {IWL_PCI_DEVICE(0x2720, 0x0038, iwl9560_2ac_cfg)}, {IWL_PCI_DEVICE(0x2720, 0x003C, iwl9560_2ac_cfg)}, @@ -664,6 +665,7 @@ static const struct pci_device_id iwl_hw_card_ids[] = { {IWL_PCI_DEVICE(0x2720, 0x0310, iwla000_2ac_cfg_hr_cdb)}, {IWL_PCI_DEVICE(0x40C0, 0x0000, iwla000_2ax_cfg_hr)}, {IWL_PCI_DEVICE(0x40C0, 0x0A10, iwla000_2ax_cfg_hr)}, + {IWL_PCI_DEVICE(0xA0F0, 0x0000, iwla000_2ax_cfg_hr)}, #endif /* CONFIG_IWLMVM */ -- cgit v1.2.3 From 6c2d49fdc5d947c5fe89935bd52e69f10000f4cb Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 13 Nov 2017 17:26:09 +0100 Subject: iwlwifi: mvm: flush queue before deleting ROC Before deleting a time event (remain-on-channel instance), flush the queue so that frames cannot get stuck on it. We already flush the AUX STA queues, but a separate station is used for the P2P Device queue. Cc: stable@vger.kernel.org Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ .../net/wireless/intel/iwlwifi/mvm/time-event.c | 24 ++++++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 6a9a25beab3f..55ab5349dd40 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1061,6 +1061,7 @@ struct iwl_mvm { * @IWL_MVM_STATUS_ROC_AUX_RUNNING: AUX remain-on-channel is running * @IWL_MVM_STATUS_D3_RECONFIG: D3 reconfiguration is being done * @IWL_MVM_STATUS_FIRMWARE_RUNNING: firmware is running + * @IWL_MVM_STATUS_NEED_FLUSH_P2P: need to flush P2P bcast STA */ enum iwl_mvm_status { IWL_MVM_STATUS_HW_RFKILL, @@ -1072,6 +1073,7 @@ enum iwl_mvm_status { IWL_MVM_STATUS_ROC_AUX_RUNNING, IWL_MVM_STATUS_D3_RECONFIG, IWL_MVM_STATUS_FIRMWARE_RUNNING, + IWL_MVM_STATUS_NEED_FLUSH_P2P, }; /* Keep track of completed init configuration */ diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c index 4d0314912e94..e25cda9fbf6c 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/time-event.c @@ -132,6 +132,24 @@ void iwl_mvm_roc_done_wk(struct work_struct *wk) * executed, and a new time event means a new command. */ iwl_mvm_flush_sta(mvm, &mvm->aux_sta, true, CMD_ASYNC); + + /* Do the same for the P2P device queue (STA) */ + if (test_and_clear_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status)) { + struct iwl_mvm_vif *mvmvif; + + /* + * NB: access to this pointer would be racy, but the flush bit + * can only be set when we had a P2P-Device VIF, and we have a + * flush of this work in iwl_mvm_prepare_mac_removal() so it's + * not really racy. + */ + + if (!WARN_ON(!mvm->p2p_device_vif)) { + mvmvif = iwl_mvm_vif_from_mac80211(mvm->p2p_device_vif); + iwl_mvm_flush_sta(mvm, &mvmvif->bcast_sta, true, + CMD_ASYNC); + } + } } static void iwl_mvm_roc_finished(struct iwl_mvm *mvm) @@ -855,10 +873,12 @@ void iwl_mvm_stop_roc(struct iwl_mvm *mvm) mvmvif = iwl_mvm_vif_from_mac80211(te_data->vif); - if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) + if (te_data->vif->type == NL80211_IFTYPE_P2P_DEVICE) { iwl_mvm_remove_time_event(mvm, mvmvif, te_data); - else + set_bit(IWL_MVM_STATUS_NEED_FLUSH_P2P, &mvm->status); + } else { iwl_mvm_remove_aux_roc_te(mvm, mvmvif, te_data); + } iwl_mvm_roc_finished(mvm); } -- cgit v1.2.3 From 9d0fc5a50a0548f8e5d61243e5e5f26d5c405aef Mon Sep 17 00:00:00 2001 From: David Spinadel Date: Mon, 21 Nov 2016 17:01:25 +0200 Subject: iwlwifi: mvm: enable RX offloading with TKIP and WEP Set the flag that indicates that ICV was stripped on if this option was enabled in the HW. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: David Spinadel Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 4 +++- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index ca0b5536a8a6..921cab9e2d73 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -117,6 +117,7 @@ #define FH_RSCSR_FRAME_INVALID 0x55550000 #define FH_RSCSR_FRAME_ALIGN 0x40 #define FH_RSCSR_RPA_EN BIT(25) +#define FH_RSCSR_RADA_EN BIT(26) #define FH_RSCSR_RXQ_POS 16 #define FH_RSCSR_RXQ_MASK 0x3F0000 @@ -128,7 +129,8 @@ struct iwl_rx_packet { * 31: flag flush RB request * 30: flag ignore TC (terminal counter) request * 29: flag fast IRQ request - * 28-26: Reserved + * 28-27: Reserved + * 26: RADA enabled * 25: Offload enabled * 24: RPF enabled * 23: RSS enabled diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index 20fe23fbf040..bf8409d8a132 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -234,8 +234,8 @@ static void iwl_mvm_get_signal_strength(struct iwl_mvm *mvm, static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, struct ieee80211_rx_status *stats, - struct iwl_rx_mpdu_desc *desc, int queue, - u8 *crypt_len) + struct iwl_rx_mpdu_desc *desc, u32 pkt_flags, + int queue, u8 *crypt_len) { u16 status = le16_to_cpu(desc->status); @@ -272,6 +272,10 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, if ((status & IWL_RX_MPDU_STATUS_SEC_MASK) == IWL_RX_MPDU_STATUS_SEC_WEP) *crypt_len = IEEE80211_WEP_IV_LEN; + + if (pkt_flags & FH_RSCSR_RADA_EN) + stats->flag |= RX_FLAG_ICV_STRIPPED; + return 0; case IWL_RX_MPDU_STATUS_SEC_EXT_ENC: if (!(status & IWL_RX_MPDU_STATUS_MIC_OK)) @@ -850,7 +854,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status = IEEE80211_SKB_RXCB(skb); - if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, queue, &crypt_len)) { + if (iwl_mvm_rx_crypto(mvm, hdr, rx_status, desc, + le32_to_cpu(pkt->len_n_flags), queue, + &crypt_len)) { kfree_skb(skb); return; } -- cgit v1.2.3 From bf19037074e770aad74b3b90f37b8b98db3f3748 Mon Sep 17 00:00:00 2001 From: Sara Sharon Date: Mon, 8 Feb 2016 23:30:47 +0200 Subject: iwlwifi: mvm: mark MIC stripped MPDUs When RADA is active, the hardware decrypts the packets and strips off the MIC as it is useless after decryption. Indicate that to mac80211. Cc: stable@vger.kernel.org # 4.13+ [this is needed for the 9000-series HW to work properly] Signed-off-by: Sara Sharon Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c index bf8409d8a132..3b8d44361380 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c @@ -255,6 +255,8 @@ static int iwl_mvm_rx_crypto(struct iwl_mvm *mvm, struct ieee80211_hdr *hdr, return -1; stats->flag |= RX_FLAG_DECRYPTED; + if (pkt_flags & FH_RSCSR_RADA_EN) + stats->flag |= RX_FLAG_MIC_STRIPPED; *crypt_len = IEEE80211_CCMP_HDR_LEN; return 0; case IWL_RX_MPDU_STATUS_SEC_TKIP: -- cgit v1.2.3 From dda4b8f73231e70df32f3a218b7ceb6704ec860c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Thu, 30 Nov 2017 10:29:51 +0000 Subject: drm/i915: Skip switch-to-kernel-context on suspend when wedged If the HW is already wedged, attempting to submit a request will generate an -EIO. If we tried this during suspend, we would abort whereas all we want to do is to go sleep and throw away the corrupt state. Fixes: 5ab57c702069 ("drm/i915: Flush logical context image out to memory upon suspend") Testcase: igt/gem_eio/suspend Signed-off-by: Chris Wilson Cc: Mika Kuoppala Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen Link: https://patchwork.freedesktop.org/patch/msgid/20171130102951.14965-1-chris@chris-wilson.co.uk (cherry picked from commit ecf73eb2d27d43b2153bb80671768a06d35521f1) Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 3a140eedfc83..46bdea2de268 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4712,17 +4712,19 @@ int i915_gem_suspend(struct drm_i915_private *dev_priv) * state. Fortunately, the kernel_context is disposable and we do * not rely on its state. */ - ret = i915_gem_switch_to_kernel_context(dev_priv); - if (ret) - goto err_unlock; + if (!i915_terminally_wedged(&dev_priv->gpu_error)) { + ret = i915_gem_switch_to_kernel_context(dev_priv); + if (ret) + goto err_unlock; - ret = i915_gem_wait_for_idle(dev_priv, - I915_WAIT_INTERRUPTIBLE | - I915_WAIT_LOCKED); - if (ret && ret != -EIO) - goto err_unlock; + ret = i915_gem_wait_for_idle(dev_priv, + I915_WAIT_INTERRUPTIBLE | + I915_WAIT_LOCKED); + if (ret && ret != -EIO) + goto err_unlock; - assert_kernel_context_is_current(dev_priv); + assert_kernel_context_is_current(dev_priv); + } i915_gem_contexts_lost(dev_priv); mutex_unlock(&dev->struct_mutex); -- cgit v1.2.3 From a87e55f89f0b0dc541d89248a8445635936a3858 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Wed, 29 Nov 2017 17:37:30 +0200 Subject: drm/i915: Fix vblank timestamp/frame counter jumps on gen2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously I was under the impression that the scanline counter reads 0 when the pipe is off. Turns out that's not correct, and instead the scanline counter simply stops when the pipe stops, and it retains it's last value until the pipe starts up again, at which point the scanline counter jumps to vblank start. These jumps can cause the timestamp to jump backwards by one frame. Since we use the timestamps to guesstimage also the frame counter value on gen2, that would cause the frame counter to also jump backwards, which leads to a massice difference from the previous value. The end result is that flips/vblank events don't appear to complete as they're stuck waiting for the frame counter to catch up to that massive difference. Fix the problem properly by actually making sure the scanline counter has started to move before we assume that it's safe to enable vblank processing. v2: Less pointless duplication in the code (Chris) Cc: stable@vger.kernel.org Cc: Daniel Vetter Cc: Chris Wilson Reviewed-by: Chris Wilson Fixes: b7792d8b54cc ("drm/i915: Wait for pipe to start before sampling vblank timestamps on gen2") Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20171129153732.3612-1-ville.syrjala@linux.intel.com (cherry picked from commit 8fedd64dabc86d0f31a0d1e152be3aa23c323553) Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_display.c | 51 +++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 16 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 878acc432a4b..e8ccf89cb17b 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -1000,7 +1000,8 @@ enum transcoder intel_pipe_to_cpu_transcoder(struct drm_i915_private *dev_priv, return crtc->config->cpu_transcoder; } -static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe) +static bool pipe_scanline_is_moving(struct drm_i915_private *dev_priv, + enum pipe pipe) { i915_reg_t reg = PIPEDSL(pipe); u32 line1, line2; @@ -1015,7 +1016,28 @@ static bool pipe_dsl_stopped(struct drm_i915_private *dev_priv, enum pipe pipe) msleep(5); line2 = I915_READ(reg) & line_mask; - return line1 == line2; + return line1 != line2; +} + +static void wait_for_pipe_scanline_moving(struct intel_crtc *crtc, bool state) +{ + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); + enum pipe pipe = crtc->pipe; + + /* Wait for the display line to settle/start moving */ + if (wait_for(pipe_scanline_is_moving(dev_priv, pipe) == state, 100)) + DRM_ERROR("pipe %c scanline %s wait timed out\n", + pipe_name(pipe), onoff(state)); +} + +static void intel_wait_for_pipe_scanline_stopped(struct intel_crtc *crtc) +{ + wait_for_pipe_scanline_moving(crtc, false); +} + +static void intel_wait_for_pipe_scanline_moving(struct intel_crtc *crtc) +{ + wait_for_pipe_scanline_moving(crtc, true); } /* @@ -1038,7 +1060,6 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc) { struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); enum transcoder cpu_transcoder = crtc->config->cpu_transcoder; - enum pipe pipe = crtc->pipe; if (INTEL_GEN(dev_priv) >= 4) { i915_reg_t reg = PIPECONF(cpu_transcoder); @@ -1049,9 +1070,7 @@ static void intel_wait_for_pipe_off(struct intel_crtc *crtc) 100)) WARN(1, "pipe_off wait timed out\n"); } else { - /* Wait for the display line to settle */ - if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100)) - WARN(1, "pipe_off wait timed out\n"); + intel_wait_for_pipe_scanline_stopped(crtc); } } @@ -1936,15 +1955,14 @@ static void intel_enable_pipe(struct intel_crtc *crtc) POSTING_READ(reg); /* - * Until the pipe starts DSL will read as 0, which would cause - * an apparent vblank timestamp jump, which messes up also the - * frame count when it's derived from the timestamps. So let's - * wait for the pipe to start properly before we call - * drm_crtc_vblank_on() + * Until the pipe starts PIPEDSL reads will return a stale value, + * which causes an apparent vblank timestamp jump when PIPEDSL + * resets to its proper value. That also messes up the frame count + * when it's derived from the timestamps. So let's wait for the + * pipe to start properly before we call drm_crtc_vblank_on() */ - if (dev->max_vblank_count == 0 && - wait_for(intel_get_crtc_scanline(crtc) != crtc->scanline_offset, 50)) - DRM_ERROR("pipe %c didn't start\n", pipe_name(pipe)); + if (dev->max_vblank_count == 0) + intel_wait_for_pipe_scanline_moving(crtc); } /** @@ -14643,6 +14661,8 @@ void i830_enable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe) void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe) { + struct intel_crtc *crtc = intel_get_crtc_for_pipe(dev_priv, pipe); + DRM_DEBUG_KMS("disabling pipe %c due to force quirk\n", pipe_name(pipe)); @@ -14652,8 +14672,7 @@ void i830_disable_pipe(struct drm_i915_private *dev_priv, enum pipe pipe) I915_WRITE(PIPECONF(pipe), 0); POSTING_READ(PIPECONF(pipe)); - if (wait_for(pipe_dsl_stopped(dev_priv, pipe), 100)) - DRM_ERROR("pipe %c off wait timed out\n", pipe_name(pipe)); + intel_wait_for_pipe_scanline_stopped(crtc); I915_WRITE(DPLL(pipe), DPLL_VGA_MODE_DIS); POSTING_READ(DPLL(pipe)); -- cgit v1.2.3 From 46442beed972d439210580739bc006713375c5b4 Mon Sep 17 00:00:00 2001 From: James Ausmus Date: Thu, 30 Nov 2017 18:17:00 -0800 Subject: drm/i915/cnl: Mask previous DDI - PLL mapping Without masking out the old value, we can end up pointing the DDI to a disabled PLL, which makes the system fall over. Mask out the previous value before setting the PLL to DDI mapping. This can be observed by running igt/testdisplay with both an eDP and HDMI/DP output active. v2: Add the Bugzilla link Fixes: 555e38d273172 ("drm/i915/cnl: DDI - PLL mapping") Testcase: igt/testdisplay Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103997 Cc: Rodrigo Vivi Cc: Matt Atwood Signed-off-by: James Ausmus Reviewed-by: Rodrigo Vivi Tested-by: Rodrigo Vivi Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171201021700.13504-1-james.ausmus@intel.com (cherry picked from commit 23a7068ec581fcc6fb61039448632d25987b1fae) Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/intel_ddi.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 933c18fd4258..e0843bb99169 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -2131,6 +2131,7 @@ static void intel_ddi_clk_select(struct intel_encoder *encoder, if (IS_CANNONLAKE(dev_priv)) { /* Configure DPCLKA_CFGCR0 to map the DPLL to the DDI. */ val = I915_READ(DPCLKA_CFGCR0); + val &= ~DPCLKA_CFGCR0_DDI_CLK_SEL_MASK(port); val |= DPCLKA_CFGCR0_DDI_CLK_SEL(pll->id, port); I915_WRITE(DPCLKA_CFGCR0, val); -- cgit v1.2.3 From 42d779ffc186f6dd26271fc60a7417cb51aca93e Mon Sep 17 00:00:00 2001 From: Pieter Jansen van Vuuren Date: Fri, 1 Dec 2017 21:37:23 -0800 Subject: nfp: fix port stats for mac representors Previously we swapped the tx_packets, tx_bytes and tx_dropped counters with rx_packets, rx_bytes and rx_dropped counters, respectively. This behaviour is correct and expected for VF representors but it should not be swapped for physical port mac representors. Fixes: eadfa4c3be99 ("nfp: add stats and xmit helpers for representors") Signed-off-by: Pieter Jansen van Vuuren Reviewed-by: Simon Horman Reviewed-by: Jakub Kicinski Signed-off-by: David S. Miller --- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c index 924a05e05da0..78b36c67c232 100644 --- a/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +++ b/drivers/net/ethernet/netronome/nfp/nfp_net_repr.c @@ -84,16 +84,13 @@ nfp_repr_phy_port_get_stats64(struct nfp_port *port, { u8 __iomem *mem = port->eth_stats; - /* TX and RX stats are flipped as we are returning the stats as seen - * at the switch port corresponding to the phys port. - */ - stats->tx_packets = readq(mem + NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK); - stats->tx_bytes = readq(mem + NFP_MAC_STATS_RX_IN_OCTETS); - stats->tx_dropped = readq(mem + NFP_MAC_STATS_RX_IN_ERRORS); + stats->tx_packets = readq(mem + NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK); + stats->tx_bytes = readq(mem + NFP_MAC_STATS_TX_OUT_OCTETS); + stats->tx_dropped = readq(mem + NFP_MAC_STATS_TX_OUT_ERRORS); - stats->rx_packets = readq(mem + NFP_MAC_STATS_TX_FRAMES_TRANSMITTED_OK); - stats->rx_bytes = readq(mem + NFP_MAC_STATS_TX_OUT_OCTETS); - stats->rx_dropped = readq(mem + NFP_MAC_STATS_TX_OUT_ERRORS); + stats->rx_packets = readq(mem + NFP_MAC_STATS_RX_FRAMES_RECEIVED_OK); + stats->rx_bytes = readq(mem + NFP_MAC_STATS_RX_IN_OCTETS); + stats->rx_dropped = readq(mem + NFP_MAC_STATS_RX_IN_ERRORS); } static void -- cgit v1.2.3 From 58117672943734715bbe7565ac9f062effa524f0 Mon Sep 17 00:00:00 2001 From: Zumeng Chen Date: Mon, 4 Dec 2017 11:22:02 +0800 Subject: gianfar: fix a flooded alignment reports because of padding issue. According to LS1021A RM, the value of PAL can be set so that the start of the IP header in the receive data buffer is aligned to a 32-bit boundary. Normally, setting PAL = 2 provides minimal padding to ensure such alignment of the IP header. However every incoming packet's 8-byte time stamp will be inserted into the packet data buffer as padding alignment bytes when hardware time stamping is enabled. So we set the padding 8+2 here to avoid the flooded alignment faults: root@128:~# cat /proc/cpu/alignment User: 0 System: 17539 (inet_gro_receive+0x114/0x2c0) Skipped: 0 Half: 0 Word: 0 DWord: 0 Multi: 17539 User faults: 2 (fixup) Also shown when exception report enablement CPU: 0 PID: 161 Comm: irq/66-eth1_g0_ Not tainted 4.1.21-rt13-WR8.0.0.0_preempt-rt #16 Hardware name: Freescale LS1021A [<8001b420>] (unwind_backtrace) from [<8001476c>] (show_stack+0x20/0x24) [<8001476c>] (show_stack) from [<807cfb48>] (dump_stack+0x94/0xac) [<807cfb48>] (dump_stack) from [<80025d70>] (do_alignment+0x720/0x958) [<80025d70>] (do_alignment) from [<80009224>] (do_DataAbort+0x40/0xbc) [<80009224>] (do_DataAbort) from [<80015398>] (__dabt_svc+0x38/0x60) Exception stack(0x86ad1cc0 to 0x86ad1d08) 1cc0: f9b3e080 86b3d072 2d78d287 00000000 866816c0 86b3d05e 86e785d0 00000000 1ce0: 00000011 0000000e 80840ab0 86ad1d3c 86ad1d08 86ad1d08 806d7fc0 806d806c 1d00: 40070013 ffffffff [<80015398>] (__dabt_svc) from [<806d806c>] (inet_gro_receive+0x114/0x2c0) [<806d806c>] (inet_gro_receive) from [<80660eec>] (dev_gro_receive+0x21c/0x3c0) [<80660eec>] (dev_gro_receive) from [<8066133c>] (napi_gro_receive+0x44/0x17c) [<8066133c>] (napi_gro_receive) from [<804f0538>] (gfar_clean_rx_ring+0x39c/0x7d4) [<804f0538>] (gfar_clean_rx_ring) from [<804f0bf4>] (gfar_poll_rx_sq+0x58/0xe0) [<804f0bf4>] (gfar_poll_rx_sq) from [<80660b10>] (net_rx_action+0x27c/0x43c) [<80660b10>] (net_rx_action) from [<80033638>] (do_current_softirqs+0x1e0/0x3dc) [<80033638>] (do_current_softirqs) from [<800338c4>] (__local_bh_enable+0x90/0xa8) [<800338c4>] (__local_bh_enable) from [<8008025c>] (irq_forced_thread_fn+0x70/0x84) [<8008025c>] (irq_forced_thread_fn) from [<800805e8>] (irq_thread+0x16c/0x244) [<800805e8>] (irq_thread) from [<8004e490>] (kthread+0xe8/0x104) [<8004e490>] (kthread) from [<8000fda8>] (ret_from_fork+0x14/0x2c) Signed-off-by: Zumeng Chen Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/gianfar.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 5be52d89b182..81a73af0df31 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1378,9 +1378,11 @@ static int gfar_probe(struct platform_device *ofdev) gfar_init_addr_hash_table(priv); - /* Insert receive time stamps into padding alignment bytes */ + /* Insert receive time stamps into padding alignment bytes, and + * plus 2 bytes padding to ensure the cpu alignment. + */ if (priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) - priv->padding = 8; + priv->padding = 8 + DEFAULT_PADDING; if (dev->features & NETIF_F_IP_CSUM || priv->device_flags & FSL_GIANFAR_DEV_HAS_TIMER) -- cgit v1.2.3 From 1ee0d3d778f146b982b100ae7add0c4da9626e9a Mon Sep 17 00:00:00 2001 From: Roger He Date: Tue, 21 Nov 2017 09:58:26 +0800 Subject: drm/ttm: use NUM_PAGES_TO_ALLOC always MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 8d7172e8381d..dca4d8322437 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -510,8 +510,7 @@ static int ttm_alloc_new_pages(struct list_head *pages, gfp_t gfp_flags, int r = 0; unsigned i, j, cpages; unsigned npages = 1 << order; - unsigned max_cpages = min(count, - (unsigned)(PAGE_SIZE/sizeof(struct page *))); + unsigned max_cpages = min(count, (unsigned)NUM_PAGES_TO_ALLOC); /* allocate array for page caching change */ caching_array = kmalloc(max_cpages*sizeof(struct page *), GFP_KERNEL); -- cgit v1.2.3 From 6d5e4e3213f4700338627f1f2fba6d3552b1158a Mon Sep 17 00:00:00 2001 From: Roger He Date: Tue, 21 Nov 2017 09:37:52 +0800 Subject: drm/ttm: add page order in page pool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit to indicate page order for each element in the pool Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 38 +++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index dca4d8322437..bf25ba25bfc6 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -81,6 +81,7 @@ struct ttm_page_pool { char *name; unsigned long nfrees; unsigned long nrefills; + unsigned int order; }; /** @@ -412,6 +413,7 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) struct ttm_page_pool *pool; int shrink_pages = sc->nr_to_scan; unsigned long freed = 0; + unsigned int nr_free_pool; if (!mutex_trylock(&lock)) return SHRINK_STOP; @@ -421,10 +423,15 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) unsigned nr_free = shrink_pages; if (shrink_pages == 0) break; + pool = &_manager->pools[(i + pool_offset)%NUM_POOLS]; /* OK to use static buffer since global mutex is held. */ - shrink_pages = ttm_page_pool_free(pool, nr_free, true); - freed += nr_free - shrink_pages; + nr_free_pool = (nr_free >> pool->order); + if (nr_free_pool == 0) + continue; + + shrink_pages = ttm_page_pool_free(pool, nr_free_pool, true); + freed += ((nr_free_pool - shrink_pages) << pool->order); } mutex_unlock(&lock); return freed; @@ -436,9 +443,12 @@ ttm_pool_shrink_count(struct shrinker *shrink, struct shrink_control *sc) { unsigned i; unsigned long count = 0; + struct ttm_page_pool *pool; - for (i = 0; i < NUM_POOLS; ++i) - count += _manager->pools[i].npages; + for (i = 0; i < NUM_POOLS; ++i) { + pool = &_manager->pools[i]; + count += (pool->npages << pool->order); + } return count; } @@ -936,7 +946,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, } static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, gfp_t flags, - char *name) + char *name, unsigned int order) { spin_lock_init(&pool->lock); pool->fill_lock = false; @@ -944,11 +954,17 @@ static void ttm_page_pool_init_locked(struct ttm_page_pool *pool, gfp_t flags, pool->npages = pool->nfrees = 0; pool->gfp_flags = flags; pool->name = name; + pool->order = order; } int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages) { int ret; +#ifdef CONFIG_TRANSPARENT_HUGEPAGE + unsigned order = HPAGE_PMD_ORDER; +#else + unsigned order = 0; +#endif WARN_ON(_manager); @@ -956,23 +972,23 @@ int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages) _manager = kzalloc(sizeof(*_manager), GFP_KERNEL); - ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc"); + ttm_page_pool_init_locked(&_manager->wc_pool, GFP_HIGHUSER, "wc", 0); - ttm_page_pool_init_locked(&_manager->uc_pool, GFP_HIGHUSER, "uc"); + ttm_page_pool_init_locked(&_manager->uc_pool, GFP_HIGHUSER, "uc", 0); ttm_page_pool_init_locked(&_manager->wc_pool_dma32, - GFP_USER | GFP_DMA32, "wc dma"); + GFP_USER | GFP_DMA32, "wc dma", 0); ttm_page_pool_init_locked(&_manager->uc_pool_dma32, - GFP_USER | GFP_DMA32, "uc dma"); + GFP_USER | GFP_DMA32, "uc dma", 0); ttm_page_pool_init_locked(&_manager->wc_pool_huge, GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP), - "wc huge"); + "wc huge", order); ttm_page_pool_init_locked(&_manager->uc_pool_huge, GFP_TRANSHUGE & ~(__GFP_MOVABLE | __GFP_COMP) - , "uc huge"); + , "uc huge", order); _manager->options.max_size = max_pages; _manager->options.small = SMALL_ALLOCATION; -- cgit v1.2.3 From 54ddc5f2d709e9eae5c55a665b37fe2581681c90 Mon Sep 17 00:00:00 2001 From: Roger He Date: Wed, 22 Nov 2017 15:09:33 +0800 Subject: drm/ttm: add set_pages_wb for handling page order more than zero MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index bf25ba25bfc6..359a641d3211 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -223,6 +223,17 @@ static struct kobj_type ttm_pool_kobj_type = { static struct ttm_pool_manager *_manager; #ifndef CONFIG_X86 +static int set_pages_wb(struct page *page, int numpages) +{ +#if IS_ENABLED(CONFIG_AGP) + int i; + + for (i = 0; i < numpages; i++) + unmap_page_from_agp(page++); +#endif + return 0; +} + static int set_pages_array_wb(struct page **pages, int addrinarray) { #if IS_ENABLED(CONFIG_AGP) -- cgit v1.2.3 From bae5c5b50b20b522002d6f9f6e9dbe1ae95152aa Mon Sep 17 00:00:00 2001 From: Roger He Date: Tue, 21 Nov 2017 14:24:48 +0800 Subject: drm/ttm: add page order support in ttm_pages_put MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 359a641d3211..337c228b44ad 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -296,13 +296,23 @@ static struct ttm_page_pool *ttm_get_pool(int flags, bool huge, } /* set memory back to wb and free the pages. */ -static void ttm_pages_put(struct page *pages[], unsigned npages) +static void ttm_pages_put(struct page *pages[], unsigned npages, + unsigned int order) { - unsigned i; - if (set_pages_array_wb(pages, npages)) - pr_err("Failed to set %d pages to wb!\n", npages); - for (i = 0; i < npages; ++i) - __free_page(pages[i]); + unsigned int i, pages_nr = (1 << order); + + if (order == 0) { + if (set_pages_array_wb(pages, npages)) + pr_err("Failed to set %d pages to wb!\n", npages); + } + + for (i = 0; i < npages; ++i) { + if (order > 0) { + if (set_pages_wb(pages[i], pages_nr)) + pr_err("Failed to set %d pages to wb!\n", pages_nr); + } + __free_pages(pages[i], order); + } } static void ttm_pool_update_free_locked(struct ttm_page_pool *pool, @@ -365,7 +375,7 @@ restart: */ spin_unlock_irqrestore(&pool->lock, irq_flags); - ttm_pages_put(pages_to_free, freed_pages); + ttm_pages_put(pages_to_free, freed_pages, pool->order); if (likely(nr_free != FREE_ALL_PAGES)) nr_free -= freed_pages; @@ -400,7 +410,7 @@ restart: spin_unlock_irqrestore(&pool->lock, irq_flags); if (freed_pages) - ttm_pages_put(pages_to_free, freed_pages); + ttm_pages_put(pages_to_free, freed_pages, pool->order); out: if (pages_to_free != static_buf) kfree(pages_to_free); -- cgit v1.2.3 From 2bf257d662509553ae226239e7dc1c3d00636ca6 Mon Sep 17 00:00:00 2001 From: Roger He Date: Tue, 21 Nov 2017 16:47:16 +0800 Subject: drm/ttm: roundup the shrink request to prevent skip huge pool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e.g. shrink reqeust is less than 512, the logic will skip huge pool Reviewed-by: Chunming Zhou Reviewed-by: Christian König Signed-off-by: Roger He Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 337c228b44ad..116897a20514 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -442,17 +442,19 @@ ttm_pool_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) /* select start pool in round robin fashion */ for (i = 0; i < NUM_POOLS; ++i) { unsigned nr_free = shrink_pages; + unsigned page_nr; + if (shrink_pages == 0) break; pool = &_manager->pools[(i + pool_offset)%NUM_POOLS]; + page_nr = (1 << pool->order); /* OK to use static buffer since global mutex is held. */ - nr_free_pool = (nr_free >> pool->order); - if (nr_free_pool == 0) - continue; - + nr_free_pool = roundup(nr_free, page_nr) >> pool->order; shrink_pages = ttm_page_pool_free(pool, nr_free_pool, true); - freed += ((nr_free_pool - shrink_pages) << pool->order); + freed += (nr_free_pool - shrink_pages) << pool->order; + if (freed >= sc->nr_to_scan) + break; } mutex_unlock(&lock); return freed; -- cgit v1.2.3 From 5ff7ec02f2f306d619c661ff8fd5392d3653d407 Mon Sep 17 00:00:00 2001 From: Christian König Date: Mon, 4 Dec 2017 11:17:54 +0100 Subject: drm/ttm: swap consecutive allocated cached pages v3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we detect consecutive allocation of pages swap them to avoid accidentally freeing them as huge page. v2: use swap v3: check if it's really the first allocated page Signed-off-by: Christian König Reviewed-by: Roger He Reviewed-by: Michel Dänzer Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 116897a20514..b6f7ce286fb1 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -877,7 +877,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, #endif struct list_head plist; struct page *p = NULL; - unsigned count; + unsigned count, first; int r; /* No pool for cached pages */ @@ -918,6 +918,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, } #endif + first = i; while (npages) { p = alloc_page(gfp_flags); if (!p) { @@ -925,6 +926,10 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, return -ENOMEM; } + /* Swap the pages if we detect consecutive order */ + if (i > first && pages[i - 1] == p - 1) + swap(p, pages[i - 1]); + pages[i++] = p; --npages; } -- cgit v1.2.3 From 22c1aed4093a605b120d6e566620364843a318ed Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 4 Dec 2017 14:33:26 +0100 Subject: net: sh_eth: use correct "struct device" when calling DMA mapping functions There are two types of "struct device": the one representing the physical device on its physical bus (platform, SPI, PCI, etc.), and the one representing the logical device in its device class (net, etc.). The DMA mapping API expects to receive as argument a "struct device" representing the physical device, as the "struct device" contains information about the bus that the DMA API needs. However, the sh_eth driver mistakenly uses the "struct device" representing the logical device (embedded in "struct net_device") rather than the "struct device" representing the physical device on its bus. This commit fixes that by adjusting all calls to the DMA mapping API. Signed-off-by: Thomas Petazzoni Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller --- drivers/net/ethernet/renesas/sh_eth.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 7e060aa9fbed..91e918e654fe 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -1149,7 +1149,8 @@ static int sh_eth_tx_free(struct net_device *ndev, bool sent_only) entry, le32_to_cpu(txdesc->status)); /* Free the original skb. */ if (mdp->tx_skbuff[entry]) { - dma_unmap_single(&ndev->dev, le32_to_cpu(txdesc->addr), + dma_unmap_single(&mdp->pdev->dev, + le32_to_cpu(txdesc->addr), le32_to_cpu(txdesc->len) >> 16, DMA_TO_DEVICE); dev_kfree_skb_irq(mdp->tx_skbuff[entry]); @@ -1179,7 +1180,7 @@ static void sh_eth_ring_free(struct net_device *ndev) if (mdp->rx_skbuff[i]) { struct sh_eth_rxdesc *rxdesc = &mdp->rx_ring[i]; - dma_unmap_single(&ndev->dev, + dma_unmap_single(&mdp->pdev->dev, le32_to_cpu(rxdesc->addr), ALIGN(mdp->rx_buf_sz, 32), DMA_FROM_DEVICE); @@ -1245,9 +1246,9 @@ static void sh_eth_ring_format(struct net_device *ndev) /* The size of the buffer is a multiple of 32 bytes. */ buf_len = ALIGN(mdp->rx_buf_sz, 32); - dma_addr = dma_map_single(&ndev->dev, skb->data, buf_len, + dma_addr = dma_map_single(&mdp->pdev->dev, skb->data, buf_len, DMA_FROM_DEVICE); - if (dma_mapping_error(&ndev->dev, dma_addr)) { + if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) { kfree_skb(skb); break; } @@ -1527,7 +1528,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota) mdp->rx_skbuff[entry] = NULL; if (mdp->cd->rpadir) skb_reserve(skb, NET_IP_ALIGN); - dma_unmap_single(&ndev->dev, dma_addr, + dma_unmap_single(&mdp->pdev->dev, dma_addr, ALIGN(mdp->rx_buf_sz, 32), DMA_FROM_DEVICE); skb_put(skb, pkt_len); @@ -1555,9 +1556,9 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota) if (skb == NULL) break; /* Better luck next round. */ sh_eth_set_receive_align(skb); - dma_addr = dma_map_single(&ndev->dev, skb->data, + dma_addr = dma_map_single(&mdp->pdev->dev, skb->data, buf_len, DMA_FROM_DEVICE); - if (dma_mapping_error(&ndev->dev, dma_addr)) { + if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) { kfree_skb(skb); break; } @@ -2441,9 +2442,9 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) /* soft swap. */ if (!mdp->cd->hw_swap) sh_eth_soft_swap(PTR_ALIGN(skb->data, 4), skb->len + 2); - dma_addr = dma_map_single(&ndev->dev, skb->data, skb->len, + dma_addr = dma_map_single(&mdp->pdev->dev, skb->data, skb->len, DMA_TO_DEVICE); - if (dma_mapping_error(&ndev->dev, dma_addr)) { + if (dma_mapping_error(&mdp->pdev->dev, dma_addr)) { kfree_skb(skb); return NETDEV_TX_OK; } -- cgit v1.2.3 From 573500dbf0f2756947517c1d4f942767dbf16dcc Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Mon, 4 Dec 2017 14:33:27 +0100 Subject: net: sh_eth: don't use NULL as "struct device" for the DMA mapping API Using NULL as argument for the DMA mapping API is bogus, as the DMA mapping API may use information from the "struct device" to perform the DMA mapping operation. Therefore, pass the appropriate "struct device". Signed-off-by: Thomas Petazzoni Acked-by: Sergei Shtylyov Reviewed-by: Geert Uytterhoeven Signed-off-by: David S. Miller --- drivers/net/ethernet/renesas/sh_eth.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c index 91e918e654fe..db72d13cebb9 100644 --- a/drivers/net/ethernet/renesas/sh_eth.c +++ b/drivers/net/ethernet/renesas/sh_eth.c @@ -1187,7 +1187,7 @@ static void sh_eth_ring_free(struct net_device *ndev) } } ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring; - dma_free_coherent(NULL, ringsize, mdp->rx_ring, + dma_free_coherent(&mdp->pdev->dev, ringsize, mdp->rx_ring, mdp->rx_desc_dma); mdp->rx_ring = NULL; } @@ -1204,7 +1204,7 @@ static void sh_eth_ring_free(struct net_device *ndev) sh_eth_tx_free(ndev, false); ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring; - dma_free_coherent(NULL, ringsize, mdp->tx_ring, + dma_free_coherent(&mdp->pdev->dev, ringsize, mdp->tx_ring, mdp->tx_desc_dma); mdp->tx_ring = NULL; } @@ -1324,8 +1324,8 @@ static int sh_eth_ring_init(struct net_device *ndev) /* Allocate all Rx descriptors. */ rx_ringsize = sizeof(struct sh_eth_rxdesc) * mdp->num_rx_ring; - mdp->rx_ring = dma_alloc_coherent(NULL, rx_ringsize, &mdp->rx_desc_dma, - GFP_KERNEL); + mdp->rx_ring = dma_alloc_coherent(&mdp->pdev->dev, rx_ringsize, + &mdp->rx_desc_dma, GFP_KERNEL); if (!mdp->rx_ring) goto ring_free; @@ -1333,8 +1333,8 @@ static int sh_eth_ring_init(struct net_device *ndev) /* Allocate all Tx descriptors. */ tx_ringsize = sizeof(struct sh_eth_txdesc) * mdp->num_tx_ring; - mdp->tx_ring = dma_alloc_coherent(NULL, tx_ringsize, &mdp->tx_desc_dma, - GFP_KERNEL); + mdp->tx_ring = dma_alloc_coherent(&mdp->pdev->dev, tx_ringsize, + &mdp->tx_desc_dma, GFP_KERNEL); if (!mdp->tx_ring) goto ring_free; return 0; -- cgit v1.2.3 From 1ecbd7170d6579a1ee389a37bf1f0437ea01a388 Mon Sep 17 00:00:00 2001 From: George Cherian Date: Mon, 4 Dec 2017 14:06:54 +0000 Subject: ACPI / CPPC: Fix KASAN global out of bounds warning Default value of pcc_subspace_idx is -1. Make sure to check pcc_subspace_idx before using the same as array index. This will avoid following KASAN warnings too. [ 15.113449] ================================================================== [ 15.116983] BUG: KASAN: global-out-of-bounds in cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] Read of size 8 at addr ffffffffb9a5c0d8 by task swapper/0/1 [ 15.116983] CPU: 3 PID: 1 Comm: swapper/0 Not tainted 4.15.0-rc2+ #2 [ 15.116983] Hardware name: Dell Inc. OptiPlex 7040/0Y7WYT, BIOS 1.2.8 01/26/2016 [ 15.116983] Call Trace: [ 15.116983] dump_stack+0x7c/0xbb [ 15.116983] print_address_description+0x1df/0x290 [ 15.116983] kasan_report+0x28a/0x370 [ 15.116983] ? cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] cppc_get_perf_caps+0xf3/0x3b0 [ 15.116983] ? cpc_read+0x210/0x210 [ 15.116983] ? __rdmsr_on_cpu+0x90/0x90 [ 15.116983] ? rdmsrl_on_cpu+0xa9/0xe0 [ 15.116983] ? rdmsr_on_cpu+0x100/0x100 [ 15.116983] ? wrmsrl_on_cpu+0x9c/0xd0 [ 15.116983] ? wrmsrl_on_cpu+0x9c/0xd0 [ 15.116983] ? wrmsr_on_cpu+0xe0/0xe0 [ 15.116983] __intel_pstate_cpu_init.part.16+0x3a2/0x530 [ 15.116983] ? intel_pstate_init_cpu+0x197/0x390 [ 15.116983] ? show_no_turbo+0xe0/0xe0 [ 15.116983] ? __lockdep_init_map+0xa0/0x290 [ 15.116983] intel_pstate_cpu_init+0x30/0x60 [ 15.116983] cpufreq_online+0x155/0xac0 [ 15.116983] cpufreq_add_dev+0x9b/0xb0 [ 15.116983] subsys_interface_register+0x1ae/0x290 [ 15.116983] ? bus_unregister_notifier+0x40/0x40 [ 15.116983] ? mark_held_locks+0x83/0xb0 [ 15.116983] ? _raw_write_unlock_irqrestore+0x32/0x60 [ 15.116983] ? intel_pstate_setup+0xc/0x104 [ 15.116983] ? intel_pstate_setup+0xc/0x104 [ 15.116983] ? cpufreq_register_driver+0x1ce/0x2b0 [ 15.116983] cpufreq_register_driver+0x1ce/0x2b0 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] intel_pstate_register_driver+0x3a/0xa0 [ 15.116983] intel_pstate_init+0x3c4/0x434 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] ? intel_pstate_setup+0x104/0x104 [ 15.116983] do_one_initcall+0x9c/0x206 [ 15.116983] ? parameq+0xa0/0xa0 [ 15.116983] ? initcall_blacklisted+0x150/0x150 [ 15.116983] ? lock_downgrade+0x2c0/0x2c0 [ 15.116983] kernel_init_freeable+0x327/0x3f0 [ 15.116983] ? start_kernel+0x612/0x612 [ 15.116983] ? _raw_spin_unlock_irq+0x29/0x40 [ 15.116983] ? finish_task_switch+0xdd/0x320 [ 15.116983] ? finish_task_switch+0x8e/0x320 [ 15.116983] ? rest_init+0xd0/0xd0 [ 15.116983] kernel_init+0xf/0x11a [ 15.116983] ? rest_init+0xd0/0xd0 [ 15.116983] ret_from_fork+0x24/0x30 [ 15.116983] The buggy address belongs to the variable: [ 15.116983] __key.36299+0x38/0x40 [ 15.116983] Memory state around the buggy address: [ 15.116983] ffffffffb9a5bf80: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa [ 15.116983] ffffffffb9a5c000: fa fa fa fa 00 fa fa fa fa fa fa fa 00 fa fa fa [ 15.116983] >ffffffffb9a5c080: fa fa fa fa 00 fa fa fa fa fa fa fa 00 00 00 00 [ 15.116983] ^ [ 15.116983] ffffffffb9a5c100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 15.116983] ffffffffb9a5c180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 [ 15.116983] ================================================================== Fixes: 85b1407bf6d2 (ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs) Reported-by: Changbin Du Signed-off-by: George Cherian Signed-off-by: Rafael J. Wysocki --- drivers/acpi/cppc_acpi.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/acpi/cppc_acpi.c b/drivers/acpi/cppc_acpi.c index 21c28433c590..30e84cc600ae 100644 --- a/drivers/acpi/cppc_acpi.c +++ b/drivers/acpi/cppc_acpi.c @@ -949,7 +949,7 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val) } *val = 0; - if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) + if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) vaddr = reg_res->sys_mem_vaddr; @@ -988,7 +988,7 @@ static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val) int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu); struct cpc_reg *reg = ®_res->cpc_entry.reg; - if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM) + if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0) vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id); else if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY) vaddr = reg_res->sys_mem_vaddr; @@ -1035,14 +1035,15 @@ int cppc_get_perf_caps(int cpunum, struct cppc_perf_caps *perf_caps) *lowest_non_linear_reg, *nominal_reg; u64 high, low, nom, min_nonlinear; int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); - struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; + struct cppc_pcc_data *pcc_ss_data; int ret = 0, regs_in_pcc = 0; - if (!cpc_desc) { + if (!cpc_desc || pcc_ss_id < 0) { pr_debug("No CPC descriptor for CPU:%d\n", cpunum); return -ENODEV; } + pcc_ss_data = pcc_data[pcc_ss_id]; highest_reg = &cpc_desc->cpc_regs[HIGHEST_PERF]; lowest_reg = &cpc_desc->cpc_regs[LOWEST_PERF]; lowest_non_linear_reg = &cpc_desc->cpc_regs[LOW_NON_LINEAR_PERF]; @@ -1095,15 +1096,16 @@ int cppc_get_perf_ctrs(int cpunum, struct cppc_perf_fb_ctrs *perf_fb_ctrs) struct cpc_register_resource *delivered_reg, *reference_reg, *ref_perf_reg, *ctr_wrap_reg; int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpunum); - struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; + struct cppc_pcc_data *pcc_ss_data; u64 delivered, reference, ref_perf, ctr_wrap_time; int ret = 0, regs_in_pcc = 0; - if (!cpc_desc) { + if (!cpc_desc || pcc_ss_id < 0) { pr_debug("No CPC descriptor for CPU:%d\n", cpunum); return -ENODEV; } + pcc_ss_data = pcc_data[pcc_ss_id]; delivered_reg = &cpc_desc->cpc_regs[DELIVERED_CTR]; reference_reg = &cpc_desc->cpc_regs[REFERENCE_CTR]; ref_perf_reg = &cpc_desc->cpc_regs[REFERENCE_PERF]; @@ -1172,11 +1174,12 @@ int cppc_set_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls) struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; int ret = 0; - if (!cpc_desc) { + if (!cpc_desc || pcc_ss_id < 0) { pr_debug("No CPC descriptor for CPU:%d\n", cpu); return -ENODEV; } + pcc_ss_data = pcc_data[pcc_ss_id]; desired_reg = &cpc_desc->cpc_regs[DESIRED_PERF]; /* @@ -1301,7 +1304,7 @@ unsigned int cppc_get_transition_latency(int cpu_num) struct cpc_desc *cpc_desc; struct cpc_register_resource *desired_reg; int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu_num); - struct cppc_pcc_data *pcc_ss_data = pcc_data[pcc_ss_id]; + struct cppc_pcc_data *pcc_ss_data; cpc_desc = per_cpu(cpc_desc_ptr, cpu_num); if (!cpc_desc) @@ -1311,6 +1314,10 @@ unsigned int cppc_get_transition_latency(int cpu_num) if (!CPC_IN_PCC(desired_reg)) return CPUFREQ_ETERNAL; + if (pcc_ss_id < 0) + return CPUFREQ_ETERNAL; + + pcc_ss_data = pcc_data[pcc_ss_id]; if (pcc_ss_data->pcc_mpar) latency_ns = 60 * (1000 * 1000 * 1000 / pcc_ss_data->pcc_mpar); -- cgit v1.2.3 From c20a548792f15f8d8e38cd74356301c6db0d241f Mon Sep 17 00:00:00 2001 From: Subash Abhinov Kasiviswanathan Date: Tue, 5 Dec 2017 13:41:17 -0700 Subject: net: qualcomm: rmnet: Fix leak on transmit failure If a skb in transmit path does not have sufficient headroom to add the map header, the skb is not sent out and is never freed. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller --- drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c index 29842ccc91a9..08e4afc0ab39 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c @@ -126,12 +126,12 @@ static int rmnet_map_egress_handler(struct sk_buff *skb, if (skb_headroom(skb) < required_headroom) { if (pskb_expand_head(skb, required_headroom, 0, GFP_KERNEL)) - return RMNET_MAP_CONSUMED; + goto fail; } map_header = rmnet_map_add_map_header(skb, additional_header_len, 0); if (!map_header) - return RMNET_MAP_CONSUMED; + goto fail; if (port->egress_data_format & RMNET_EGRESS_FORMAT_MUXING) { if (mux_id == 0xff) @@ -143,6 +143,10 @@ static int rmnet_map_egress_handler(struct sk_buff *skb, skb->protocol = htons(ETH_P_MAP); return RMNET_MAP_SUCCESS; + +fail: + kfree_skb(skb); + return RMNET_MAP_CONSUMED; } static void -- cgit v1.2.3 From 6296928fa3b9f656d7760fbf346c0cf834788a78 Mon Sep 17 00:00:00 2001 From: Subash Abhinov Kasiviswanathan Date: Tue, 5 Dec 2017 13:41:18 -0700 Subject: net: qualcomm: rmnet: Fix leak in device creation failure If the rmnet device creation fails in the newlink either while registering with the physical device or after subsequent operations, the rmnet endpoint information is never freed. Fixes: ceed73a2cf4a ("drivers: net: ethernet: qualcomm: rmnet: Initial implementation") Signed-off-by: Subash Abhinov Kasiviswanathan Signed-off-by: David S. Miller --- drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c index 71bee1af71ef..df21e900f874 100644 --- a/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c +++ b/drivers/net/ethernet/qualcomm/rmnet/rmnet_config.c @@ -195,6 +195,7 @@ err2: err1: rmnet_unregister_real_device(real_dev, port); err0: + kfree(ep); return err; } -- cgit v1.2.3 From 8e1611e2357927b22892ecc062d65c99d0d89066 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 5 Dec 2017 23:29:09 +0000 Subject: make sock_alloc_file() do sock_release() on failures This changes calling conventions (and simplifies the hell out the callers). New rules: once struct socket had been passed to sock_alloc_file(), it's been consumed either by struct file or by sock_release() done by sock_alloc_file(). Either way the caller should not do sock_release() after that point. Reviewed-by: Eric Dumazet Signed-off-by: Al Viro Signed-off-by: David S. Miller --- drivers/staging/lustre/lnet/lnet/lib-socket.c | 8 ++------ net/9p/trans_fd.c | 1 - net/kcm/kcmsock.c | 7 +------ net/sctp/socket.c | 1 - net/socket.c | 25 ++++++++----------------- 5 files changed, 11 insertions(+), 31 deletions(-) (limited to 'drivers') diff --git a/drivers/staging/lustre/lnet/lnet/lib-socket.c b/drivers/staging/lustre/lnet/lnet/lib-socket.c index 539a26444f31..7d49d4865298 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-socket.c +++ b/drivers/staging/lustre/lnet/lnet/lib-socket.c @@ -71,16 +71,12 @@ lnet_sock_ioctl(int cmd, unsigned long arg) } sock_filp = sock_alloc_file(sock, 0, NULL); - if (IS_ERR(sock_filp)) { - sock_release(sock); - rc = PTR_ERR(sock_filp); - goto out; - } + if (IS_ERR(sock_filp)) + return PTR_ERR(sock_filp); rc = kernel_sock_unlocked_ioctl(sock_filp, cmd, arg); fput(sock_filp); -out: return rc; } diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c index 985046ae4231..80f5c79053a4 100644 --- a/net/9p/trans_fd.c +++ b/net/9p/trans_fd.c @@ -839,7 +839,6 @@ static int p9_socket_open(struct p9_client *client, struct socket *csocket) if (IS_ERR(file)) { pr_err("%s (%d): failed to map fd\n", __func__, task_pid_nr(current)); - sock_release(csocket); kfree(p); return PTR_ERR(file); } diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c index c5fa634e63ca..d4e98f20fc2a 100644 --- a/net/kcm/kcmsock.c +++ b/net/kcm/kcmsock.c @@ -1629,7 +1629,6 @@ static struct file *kcm_clone(struct socket *osock) { struct socket *newsock; struct sock *newsk; - struct file *file; newsock = sock_alloc(); if (!newsock) @@ -1649,11 +1648,7 @@ static struct file *kcm_clone(struct socket *osock) sock_init_data(newsock, newsk); init_kcm_sock(kcm_sk(newsk), kcm_sk(osock->sk)->mux); - file = sock_alloc_file(newsock, 0, osock->sk->sk_prot_creator->name); - if (IS_ERR(file)) - sock_release(newsock); - - return file; + return sock_alloc_file(newsock, 0, osock->sk->sk_prot_creator->name); } static int kcm_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg) diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 014847e25648..eb17a911aa29 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c @@ -5080,7 +5080,6 @@ static int sctp_getsockopt_peeloff_common(struct sock *sk, sctp_peeloff_arg_t *p *newfile = sock_alloc_file(newsock, 0, NULL); if (IS_ERR(*newfile)) { put_unused_fd(retval); - sock_release(newsock); retval = PTR_ERR(*newfile); *newfile = NULL; return retval; diff --git a/net/socket.c b/net/socket.c index 2df83c0bfde9..05f361faec45 100644 --- a/net/socket.c +++ b/net/socket.c @@ -406,8 +406,10 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) name.len = strlen(name.name); } path.dentry = d_alloc_pseudo(sock_mnt->mnt_sb, &name); - if (unlikely(!path.dentry)) + if (unlikely(!path.dentry)) { + sock_release(sock); return ERR_PTR(-ENOMEM); + } path.mnt = mntget(sock_mnt); d_instantiate(path.dentry, SOCK_INODE(sock)); @@ -415,9 +417,11 @@ struct file *sock_alloc_file(struct socket *sock, int flags, const char *dname) file = alloc_file(&path, FMODE_READ | FMODE_WRITE, &socket_file_ops); if (IS_ERR(file)) { - /* drop dentry, keep inode */ + /* drop dentry, keep inode for a bit */ ihold(d_inode(path.dentry)); path_put(&path); + /* ... and now kill it properly */ + sock_release(sock); return file; } @@ -1330,19 +1334,9 @@ SYSCALL_DEFINE3(socket, int, family, int, type, int, protocol) retval = sock_create(family, type, protocol, &sock); if (retval < 0) - goto out; - - retval = sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK)); - if (retval < 0) - goto out_release; - -out: - /* It may be already another descriptor 8) Not kernel problem. */ - return retval; + return retval; -out_release: - sock_release(sock); - return retval; + return sock_map_fd(sock, flags & (O_CLOEXEC | O_NONBLOCK)); } /* @@ -1412,7 +1406,6 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol, newfile1 = sock_alloc_file(sock1, flags, NULL); if (IS_ERR(newfile1)) { err = PTR_ERR(newfile1); - sock_release(sock1); sock_release(sock2); goto out; } @@ -1420,7 +1413,6 @@ SYSCALL_DEFINE4(socketpair, int, family, int, type, int, protocol, newfile2 = sock_alloc_file(sock2, flags, NULL); if (IS_ERR(newfile2)) { err = PTR_ERR(newfile2); - sock_release(sock2); fput(newfile1); goto out; } @@ -1549,7 +1541,6 @@ SYSCALL_DEFINE4(accept4, int, fd, struct sockaddr __user *, upeer_sockaddr, if (IS_ERR(newfile)) { err = PTR_ERR(newfile); put_unused_fd(newfd); - sock_release(newsock); goto out_put; } -- cgit v1.2.3 From add7e4fc2420e35f200e4aa13764708e62690e2e Mon Sep 17 00:00:00 2001 From: Changbin Du Date: Thu, 2 Nov 2017 13:33:42 +0800 Subject: drm/i915/gvt: Emulate PCI expansion ROM base address register Our vGPU doesn't have a device ROM, we need follow the PCI spec to report this info to drivers. Otherwise, we would see below errors. Inspecting possible rom at 0xfe049000 (vd=8086:1912 bdf=00:10.0) qemu-system-x86_64: vfio-pci: Cannot read device rom at 00000000-0000-0000-0000-000000000001 Device option ROM contents are probably invalid (check dmesg). Skip option ROM probe with rombar=0, or load from file with romfile=No option rom signature (got 4860) I will also send a improvement patch to PCI subsystem related to PCI ROM. But no idea to omit below error, since no pattern to detect vbios shadow without touch its content. 0000:00:10.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000 Signed-off-by: Changbin Du Signed-off-by: Zhenyu Wang (cherry picked from commit c4270d122ccff963a021d1beb893d6192336af96) --- drivers/gpu/drm/i915/gvt/cfg_space.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/gvt/cfg_space.c b/drivers/gpu/drm/i915/gvt/cfg_space.c index ab19545d59a1..4ce2e6bd0680 100644 --- a/drivers/gpu/drm/i915/gvt/cfg_space.c +++ b/drivers/gpu/drm/i915/gvt/cfg_space.c @@ -208,6 +208,20 @@ static int emulate_pci_command_write(struct intel_vgpu *vgpu, return 0; } +static int emulate_pci_rom_bar_write(struct intel_vgpu *vgpu, + unsigned int offset, void *p_data, unsigned int bytes) +{ + u32 *pval = (u32 *)(vgpu_cfg_space(vgpu) + offset); + u32 new = *(u32 *)(p_data); + + if ((new & PCI_ROM_ADDRESS_MASK) == PCI_ROM_ADDRESS_MASK) + /* We don't have rom, return size of 0. */ + *pval = 0; + else + vgpu_pci_cfg_mem_write(vgpu, offset, p_data, bytes); + return 0; +} + static int emulate_pci_bar_write(struct intel_vgpu *vgpu, unsigned int offset, void *p_data, unsigned int bytes) { @@ -300,6 +314,11 @@ int intel_vgpu_emulate_cfg_write(struct intel_vgpu *vgpu, unsigned int offset, } switch (rounddown(offset, 4)) { + case PCI_ROM_ADDRESS: + if (WARN_ON(!IS_ALIGNED(offset, 4))) + return -EINVAL; + return emulate_pci_rom_bar_write(vgpu, offset, p_data, bytes); + case PCI_BASE_ADDRESS_0 ... PCI_BASE_ADDRESS_5: if (WARN_ON(!IS_ALIGNED(offset, 4))) return -EINVAL; @@ -375,6 +394,8 @@ void intel_vgpu_init_cfg_space(struct intel_vgpu *vgpu, pci_resource_len(gvt->dev_priv->drm.pdev, 0); vgpu->cfg_space.bar[INTEL_GVT_PCI_BAR_APERTURE].size = pci_resource_len(gvt->dev_priv->drm.pdev, 2); + + memset(vgpu_cfg_space(vgpu) + PCI_ROM_ADDRESS, 0, 4); } /** -- cgit v1.2.3 From 365ad5df9caa1a7ebc73b8d70ab94bbf6a74268a Mon Sep 17 00:00:00 2001 From: Zhi Wang Date: Sat, 30 Sep 2017 17:42:20 +0800 Subject: drm/i915/gvt: Export intel_gvt_render_mmio_to_ring_id() Since many emulation logic needs to convert the offset of ring registers into ring id, we export it for other caller which might need it. Signed-off-by: Zhi Wang (cherry picked from commit 62a6a53786fc4b4e7543cc63b704dbb3f7df4c0f) --- drivers/gpu/drm/i915/gvt/handlers.c | 21 +++++++++++++++------ drivers/gpu/drm/i915/gvt/mmio.h | 2 ++ 2 files changed, 17 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index 44cd5ff5e97d..55cbdb022924 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -137,17 +137,26 @@ static int new_mmio_info(struct intel_gvt *gvt, return 0; } -static int render_mmio_to_ring_id(struct intel_gvt *gvt, unsigned int reg) +/** + * intel_gvt_render_mmio_to_ring_id - convert a mmio offset into ring id + * @gvt: a GVT device + * @offset: register offset + * + * Returns: + * Ring ID on success, negative error code if failed. + */ +int intel_gvt_render_mmio_to_ring_id(struct intel_gvt *gvt, + unsigned int offset) { enum intel_engine_id id; struct intel_engine_cs *engine; - reg &= ~GENMASK(11, 0); + offset &= ~GENMASK(11, 0); for_each_engine(engine, gvt->dev_priv, id) { - if (engine->mmio_base == reg) + if (engine->mmio_base == offset) return id; } - return -1; + return -ENODEV; } #define offset_to_fence_num(offset) \ @@ -1409,7 +1418,7 @@ static int mmio_read_from_hw(struct intel_vgpu *vgpu, static int elsp_mmio_write(struct intel_vgpu *vgpu, unsigned int offset, void *p_data, unsigned int bytes) { - int ring_id = render_mmio_to_ring_id(vgpu->gvt, offset); + int ring_id = intel_gvt_render_mmio_to_ring_id(vgpu->gvt, offset); struct intel_vgpu_execlist *execlist; u32 data = *(u32 *)p_data; int ret = 0; @@ -1436,7 +1445,7 @@ static int ring_mode_mmio_write(struct intel_vgpu *vgpu, unsigned int offset, void *p_data, unsigned int bytes) { u32 data = *(u32 *)p_data; - int ring_id = render_mmio_to_ring_id(vgpu->gvt, offset); + int ring_id = intel_gvt_render_mmio_to_ring_id(vgpu->gvt, offset); bool enable_execlist; write_vreg(vgpu, offset, p_data, bytes); diff --git a/drivers/gpu/drm/i915/gvt/mmio.h b/drivers/gpu/drm/i915/gvt/mmio.h index 32cd64ddad26..dbc04ad2c7a1 100644 --- a/drivers/gpu/drm/i915/gvt/mmio.h +++ b/drivers/gpu/drm/i915/gvt/mmio.h @@ -65,6 +65,8 @@ struct intel_gvt_mmio_info { struct hlist_node node; }; +int intel_gvt_render_mmio_to_ring_id(struct intel_gvt *gvt, + unsigned int reg); unsigned long intel_gvt_get_device_type(struct intel_gvt *gvt); bool intel_gvt_match_device(struct intel_gvt *gvt, unsigned long device); -- cgit v1.2.3 From 29f9e425973d3c7cdfc32725a4d7c4c2f537d5a9 Mon Sep 17 00:00:00 2001 From: Xiong Zhang Date: Tue, 7 Nov 2017 05:23:02 +0800 Subject: drm/i915/gvt: Limit read hw reg to active vgpu mmio_read_from_hw() let vgpu could read hw reg, if vgpu's workload is running on hw, things is good. Otherwise vgpu will get other vgpu's reg val, it is unsafe. This patch limit such hw access to active vgpu. If vgpu isn't running on hw, the reg read of this vgpu will get the last active val which saved at schedule_out. v2: ring timestamp is walking continuously even if the ring is idle. so read hw directly. (Zhenyu) Signed-off-by: Xiong Zhang Signed-off-by: Zhenyu Wang (cherry picked from commit 295764cd2ff41e2c1bc8af4050de77cec5e7a1c0) --- drivers/gpu/drm/i915/gvt/handlers.c | 26 ++++++++++++++++++++++---- drivers/gpu/drm/i915/gvt/scheduler.c | 15 +++++++++++++++ 2 files changed, 37 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/gvt/handlers.c b/drivers/gpu/drm/i915/gvt/handlers.c index 55cbdb022924..1f840f6b81bb 100644 --- a/drivers/gpu/drm/i915/gvt/handlers.c +++ b/drivers/gpu/drm/i915/gvt/handlers.c @@ -1407,11 +1407,29 @@ static int skl_lcpll_write(struct intel_vgpu *vgpu, unsigned int offset, static int mmio_read_from_hw(struct intel_vgpu *vgpu, unsigned int offset, void *p_data, unsigned int bytes) { - struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv; + struct intel_gvt *gvt = vgpu->gvt; + struct drm_i915_private *dev_priv = gvt->dev_priv; + int ring_id; + u32 ring_base; + + ring_id = intel_gvt_render_mmio_to_ring_id(gvt, offset); + /** + * Read HW reg in following case + * a. the offset isn't a ring mmio + * b. the offset's ring is running on hw. + * c. the offset is ring time stamp mmio + */ + if (ring_id >= 0) + ring_base = dev_priv->engine[ring_id]->mmio_base; + + if (ring_id < 0 || vgpu == gvt->scheduler.engine_owner[ring_id] || + offset == i915_mmio_reg_offset(RING_TIMESTAMP(ring_base)) || + offset == i915_mmio_reg_offset(RING_TIMESTAMP_UDW(ring_base))) { + mmio_hw_access_pre(dev_priv); + vgpu_vreg(vgpu, offset) = I915_READ(_MMIO(offset)); + mmio_hw_access_post(dev_priv); + } - mmio_hw_access_pre(dev_priv); - vgpu_vreg(vgpu, offset) = I915_READ(_MMIO(offset)); - mmio_hw_access_post(dev_priv); return intel_vgpu_default_mmio_read(vgpu, offset, p_data, bytes); } diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index 3ac1dc97a7a0..a63787be1e6b 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -131,6 +131,20 @@ static inline bool is_gvt_request(struct drm_i915_gem_request *req) return i915_gem_context_force_single_submission(req->ctx); } +static void save_ring_hw_state(struct intel_vgpu *vgpu, int ring_id) +{ + struct drm_i915_private *dev_priv = vgpu->gvt->dev_priv; + u32 ring_base = dev_priv->engine[ring_id]->mmio_base; + i915_reg_t reg; + + reg = RING_INSTDONE(ring_base); + vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg); + reg = RING_ACTHD(ring_base); + vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg); + reg = RING_ACTHD_UDW(ring_base); + vgpu_vreg(vgpu, i915_mmio_reg_offset(reg)) = I915_READ_FW(reg); +} + static int shadow_context_status_change(struct notifier_block *nb, unsigned long action, void *data) { @@ -176,6 +190,7 @@ static int shadow_context_status_change(struct notifier_block *nb, break; case INTEL_CONTEXT_SCHEDULE_OUT: case INTEL_CONTEXT_SCHEDULE_PREEMPTED: + save_ring_hw_state(workload->vgpu, ring_id); atomic_set(&workload->shadow_ctx_active, 0); break; default: -- cgit v1.2.3 From ac7688c0397442f1c9eef7069737089660322497 Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Fri, 1 Dec 2017 14:59:53 +0800 Subject: drm/i915/gvt: Don't mark vgpu context as inactive when preempted We shouldn't mark inactive for vGPU context if preempted, which would still be re-scheduled later. So keep active state. Fixes: d6c0511300dc ("drm/i915/execlists: Distinguish the incomplete context notifies") Signed-off-by: Zhenyu Wang (cherry picked from commit da5f99eaccc10e30bf82eb02b1be74703b878720) --- drivers/gpu/drm/i915/gvt/scheduler.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index a63787be1e6b..ab3d041ee5f9 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -189,10 +189,12 @@ static int shadow_context_status_change(struct notifier_block *nb, atomic_set(&workload->shadow_ctx_active, 1); break; case INTEL_CONTEXT_SCHEDULE_OUT: - case INTEL_CONTEXT_SCHEDULE_PREEMPTED: save_ring_hw_state(workload->vgpu, ring_id); atomic_set(&workload->shadow_ctx_active, 0); break; + case INTEL_CONTEXT_SCHEDULE_PREEMPTED: + save_ring_hw_state(workload->vgpu, ring_id); + break; default: WARN_ON(1); return NOTIFY_OK; -- cgit v1.2.3 From 11474e9091cf2002e948647fd9f63a7f027e488a Mon Sep 17 00:00:00 2001 From: Zhenyu Wang Date: Mon, 4 Dec 2017 10:42:58 +0800 Subject: drm/i915/gvt: set max priority for gvt context This is to workaround guest driver hang regression after preemption enable that gvt hasn't enabled handling of that for guest workload. So in effect this disables preemption for gvt context now. Signed-off-by: Zhenyu Wang (cherry picked from commit 1603660b3342269c95fcafee1945790342a8c28e) --- drivers/gpu/drm/i915/gvt/scheduler.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/gvt/scheduler.c b/drivers/gpu/drm/i915/gvt/scheduler.c index ab3d041ee5f9..69f8f0d155b9 100644 --- a/drivers/gpu/drm/i915/gvt/scheduler.c +++ b/drivers/gpu/drm/i915/gvt/scheduler.c @@ -757,6 +757,9 @@ int intel_vgpu_init_gvt_context(struct intel_vgpu *vgpu) if (IS_ERR(vgpu->shadow_ctx)) return PTR_ERR(vgpu->shadow_ctx); + if (INTEL_INFO(vgpu->gvt->dev_priv)->has_logical_ring_preemption) + vgpu->shadow_ctx->priority = INT_MAX; + vgpu->shadow_ctx->engine[RCS].initialised = true; bitmap_zero(vgpu->shadow_ctx_desc_updated, I915_NUM_ENGINES); -- cgit v1.2.3 From a703c55004e1c5076d57e43771b3e11117796ea0 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Mon, 4 Dec 2017 21:48:18 +0100 Subject: drm: safely free connectors from connector_iter In commit 613051dac40da1751ab269572766d3348d45a197 Author: Daniel Vetter Date: Wed Dec 14 00:08:06 2016 +0100 drm: locking&new iterators for connector_list we've went to extreme lengths to make sure connector iterations works in any context, without introducing any additional locking context. This worked, except for a small fumble in the implementation: When we actually race with a concurrent connector unplug event, and our temporary connector reference turns out to be the final one, then everything breaks: We call the connector release function from whatever context we happen to be in, which can be an irq/atomic context. And connector freeing grabs all kinds of locks and stuff. Fix this by creating a specially safe put function for connetor_iter, which (in this rare case) punts the cleanup to a worker. Reported-by: Ben Widawsky Cc: Ben Widawsky Fixes: 613051dac40d ("drm: locking&new iterators for connector_list") Cc: Dave Airlie Cc: Chris Wilson Cc: Sean Paul Cc: # v4.11+ Reviewed-by: Dave Airlie Signed-off-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20171204204818.24745-1-daniel.vetter@ffwll.ch --- drivers/gpu/drm/drm_connector.c | 28 ++++++++++++++++++++++++++-- drivers/gpu/drm/drm_mode_config.c | 2 ++ include/drm/drm_connector.h | 8 ++++++++ 3 files changed, 36 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 25f4b2e9a44f..482014137953 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -152,6 +152,16 @@ static void drm_connector_free(struct kref *kref) connector->funcs->destroy(connector); } +static void drm_connector_free_work_fn(struct work_struct *work) +{ + struct drm_connector *connector = + container_of(work, struct drm_connector, free_work); + struct drm_device *dev = connector->dev; + + drm_mode_object_unregister(dev, &connector->base); + connector->funcs->destroy(connector); +} + /** * drm_connector_init - Init a preallocated connector * @dev: DRM device @@ -181,6 +191,8 @@ int drm_connector_init(struct drm_device *dev, if (ret) return ret; + INIT_WORK(&connector->free_work, drm_connector_free_work_fn); + connector->base.properties = &connector->properties; connector->dev = dev; connector->funcs = funcs; @@ -529,6 +541,18 @@ void drm_connector_list_iter_begin(struct drm_device *dev, } EXPORT_SYMBOL(drm_connector_list_iter_begin); +/* + * Extra-safe connector put function that works in any context. Should only be + * used from the connector_iter functions, where we never really expect to + * actually release the connector when dropping our final reference. + */ +static void +drm_connector_put_safe(struct drm_connector *conn) +{ + if (refcount_dec_and_test(&conn->base.refcount.refcount)) + schedule_work(&conn->free_work); +} + /** * drm_connector_list_iter_next - return next connector * @iter: connectr_list iterator @@ -561,7 +585,7 @@ drm_connector_list_iter_next(struct drm_connector_list_iter *iter) spin_unlock_irqrestore(&config->connector_list_lock, flags); if (old_conn) - drm_connector_put(old_conn); + drm_connector_put_safe(old_conn); return iter->conn; } @@ -580,7 +604,7 @@ void drm_connector_list_iter_end(struct drm_connector_list_iter *iter) { iter->dev = NULL; if (iter->conn) - drm_connector_put(iter->conn); + drm_connector_put_safe(iter->conn); lock_release(&connector_list_iter_dep_map, 0, _RET_IP_); } EXPORT_SYMBOL(drm_connector_list_iter_end); diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index cda8bfab6d3b..cc78b3d9e5e4 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -431,6 +431,8 @@ void drm_mode_config_cleanup(struct drm_device *dev) drm_connector_put(connector); } drm_connector_list_iter_end(&conn_iter); + /* connector_iter drops references in a work item. */ + flush_scheduled_work(); if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) { drm_connector_list_iter_begin(dev, &conn_iter); drm_for_each_connector_iter(connector, &conn_iter) diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h index df9807a3caae..a4649c56ca2f 100644 --- a/include/drm/drm_connector.h +++ b/include/drm/drm_connector.h @@ -916,6 +916,14 @@ struct drm_connector { uint8_t num_h_tile, num_v_tile; uint8_t tile_h_loc, tile_v_loc; uint16_t tile_h_size, tile_v_size; + + /** + * @free_work: + * + * Work used only by &drm_connector_iter to be able to clean up a + * connector from any context. + */ + struct work_struct free_work; }; #define obj_to_connector(x) container_of(x, struct drm_connector, base) -- cgit v1.2.3 From e60bb46b5754727c7643cc5bb7b005c49f869930 Mon Sep 17 00:00:00 2001 From: Christian König Date: Mon, 4 Dec 2017 11:26:14 +0100 Subject: drm/ttm: swap consecutive allocated pooled pages v4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we detect consecutive allocation of pages swap them to avoid accidentally freeing them as huge page. v2: use swap v3: check if it's really the first allocated page v4: don't touch the loop variable Signed-off-by: Christian König Reviewed-by: Roger He Reviewed-by: Michel Dänzer Tested-by: Dieter Nützel Signed-off-by: Alex Deucher --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index b6f7ce286fb1..44343a2bf55c 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -958,8 +958,15 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, r = ttm_page_pool_get_pages(pool, &plist, flags, cstate, npages - count, 0); - list_for_each_entry(p, &plist, lru) - pages[count++] = p; + first = count; + list_for_each_entry(p, &plist, lru) { + struct page *tmp = p; + + /* Swap the pages if we detect consecutive order */ + if (count > first && pages[count - 1] == tmp - 1) + swap(tmp, pages[count - 1]); + pages[count++] = tmp; + } if (r) { /* If there is any pages in the list put them back to -- cgit v1.2.3 From 8c71fa88f7778eb093ee22cba13a3813a82113ad Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 5 Dec 2017 17:38:43 +0300 Subject: xen/pvcalls: check for xenbus_read() errors Smatch complains that "len" is uninitialized if xenbus_read() fails so let's add some error handling. Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky --- drivers/xen/pvcalls-front.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index 40caa92bff33..afa3f1b5d807 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -1128,6 +1128,8 @@ static int pvcalls_front_probe(struct xenbus_device *dev, } versions = xenbus_read(XBT_NIL, dev->otherend, "versions", &len); + if (IS_ERR(versions)) + return PTR_ERR(versions); if (!len) return -EINVAL; if (strcmp(versions, "1")) { -- cgit v1.2.3 From 1ab134ca3151c55b6fc606857e71d9adb4c355d1 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 5 Dec 2017 17:38:54 +0300 Subject: xen/pvcalls: Fix a check in pvcalls_front_remove() bedata->ref can't be less than zero because it's unsigned. This affects certain error paths in probe. We first set ->ref = -1 and then we set it to a valid value later. Fixes: 219681909913 ("xen/pvcalls: connect to the backend") Signed-off-by: Dan Carpenter Reviewed-by: Juergen Gross Reviewed-by: Stefano Stabellini Signed-off-by: Boris Ostrovsky --- drivers/xen/pvcalls-front.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/xen/pvcalls-front.c b/drivers/xen/pvcalls-front.c index afa3f1b5d807..d1e1d8d2b9d5 100644 --- a/drivers/xen/pvcalls-front.c +++ b/drivers/xen/pvcalls-front.c @@ -1103,7 +1103,7 @@ static int pvcalls_front_remove(struct xenbus_device *dev) kfree(map); } } - if (bedata->ref >= 0) + if (bedata->ref != -1) gnttab_end_foreign_access(bedata->ref, 0, 0); kfree(bedata->ring.sring); kfree(bedata); -- cgit v1.2.3 From af97a77bc01ce49a466f9d4c0125479e2e2230b6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 6 Dec 2017 09:50:08 +0000 Subject: efi: Move some sysfs files to be read-only by root Thanks to the scripts/leaking_addresses.pl script, it was found that some EFI values should not be readable by non-root users. So make them root-only, and to do that, add a __ATTR_RO_MODE() macro to make this easier, and use it in other places at the same time. Reported-by: Linus Torvalds Tested-by: Dave Young Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ard Biesheuvel Cc: H. Peter Anvin Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Cc: stable Link: http://lkml.kernel.org/r/20171206095010.24170-2-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- drivers/firmware/efi/efi.c | 3 +-- drivers/firmware/efi/esrt.c | 15 ++++++--------- drivers/firmware/efi/runtime-map.c | 10 +++++----- include/linux/sysfs.h | 6 ++++++ 4 files changed, 18 insertions(+), 16 deletions(-) (limited to 'drivers') diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index f70febf680c3..c3eefa126e3b 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -143,8 +143,7 @@ static ssize_t systab_show(struct kobject *kobj, return str - buf; } -static struct kobj_attribute efi_attr_systab = - __ATTR(systab, 0400, systab_show, NULL); +static struct kobj_attribute efi_attr_systab = __ATTR_RO_MODE(systab, 0400); #define EFI_FIELD(var) efi.var diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c index bd7ed3c1148a..7aae2483fcb9 100644 --- a/drivers/firmware/efi/esrt.c +++ b/drivers/firmware/efi/esrt.c @@ -106,7 +106,7 @@ static const struct sysfs_ops esre_attr_ops = { }; /* Generic ESRT Entry ("ESRE") support. */ -static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf) +static ssize_t fw_class_show(struct esre_entry *entry, char *buf) { char *str = buf; @@ -117,18 +117,16 @@ static ssize_t esre_fw_class_show(struct esre_entry *entry, char *buf) return str - buf; } -static struct esre_attribute esre_fw_class = __ATTR(fw_class, 0400, - esre_fw_class_show, NULL); +static struct esre_attribute esre_fw_class = __ATTR_RO_MODE(fw_class, 0400); #define esre_attr_decl(name, size, fmt) \ -static ssize_t esre_##name##_show(struct esre_entry *entry, char *buf) \ +static ssize_t name##_show(struct esre_entry *entry, char *buf) \ { \ return sprintf(buf, fmt "\n", \ le##size##_to_cpu(entry->esre.esre1->name)); \ } \ \ -static struct esre_attribute esre_##name = __ATTR(name, 0400, \ - esre_##name##_show, NULL) +static struct esre_attribute esre_##name = __ATTR_RO_MODE(name, 0400) esre_attr_decl(fw_type, 32, "%u"); esre_attr_decl(fw_version, 32, "%u"); @@ -193,14 +191,13 @@ static int esre_create_sysfs_entry(void *esre, int entry_num) /* support for displaying ESRT fields at the top level */ #define esrt_attr_decl(name, size, fmt) \ -static ssize_t esrt_##name##_show(struct kobject *kobj, \ +static ssize_t name##_show(struct kobject *kobj, \ struct kobj_attribute *attr, char *buf)\ { \ return sprintf(buf, fmt "\n", le##size##_to_cpu(esrt->name)); \ } \ \ -static struct kobj_attribute esrt_##name = __ATTR(name, 0400, \ - esrt_##name##_show, NULL) +static struct kobj_attribute esrt_##name = __ATTR_RO_MODE(name, 0400) esrt_attr_decl(fw_resource_count, 32, "%u"); esrt_attr_decl(fw_resource_count_max, 32, "%u"); diff --git a/drivers/firmware/efi/runtime-map.c b/drivers/firmware/efi/runtime-map.c index 8e64b77aeac9..f377609ff141 100644 --- a/drivers/firmware/efi/runtime-map.c +++ b/drivers/firmware/efi/runtime-map.c @@ -63,11 +63,11 @@ static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr, return map_attr->show(entry, buf); } -static struct map_attribute map_type_attr = __ATTR_RO(type); -static struct map_attribute map_phys_addr_attr = __ATTR_RO(phys_addr); -static struct map_attribute map_virt_addr_attr = __ATTR_RO(virt_addr); -static struct map_attribute map_num_pages_attr = __ATTR_RO(num_pages); -static struct map_attribute map_attribute_attr = __ATTR_RO(attribute); +static struct map_attribute map_type_attr = __ATTR_RO_MODE(type, 0400); +static struct map_attribute map_phys_addr_attr = __ATTR_RO_MODE(phys_addr, 0400); +static struct map_attribute map_virt_addr_attr = __ATTR_RO_MODE(virt_addr, 0400); +static struct map_attribute map_num_pages_attr = __ATTR_RO_MODE(num_pages, 0400); +static struct map_attribute map_attribute_attr = __ATTR_RO_MODE(attribute, 0400); /* * These are default attributes that are added for every memmap entry. diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h index e32dfe098e82..40839c02d28c 100644 --- a/include/linux/sysfs.h +++ b/include/linux/sysfs.h @@ -117,6 +117,12 @@ struct attribute_group { .show = _name##_show, \ } +#define __ATTR_RO_MODE(_name, _mode) { \ + .attr = { .name = __stringify(_name), \ + .mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \ + .show = _name##_show, \ +} + #define __ATTR_WO(_name) { \ .attr = { .name = __stringify(_name), .mode = S_IWUSR }, \ .store = _name##_store, \ -- cgit v1.2.3 From 89c5a2d34bda58319e3075e8e7dd727ea25a435c Mon Sep 17 00:00:00 2001 From: Pan Bian Date: Wed, 6 Dec 2017 09:50:09 +0000 Subject: efi/esrt: Use memunmap() instead of kfree() to free the remapping The remapping result of memremap() should be freed with memunmap(), not kfree(). Signed-off-by: Pan Bian Signed-off-by: Ard Biesheuvel Cc: Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20171206095010.24170-3-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- drivers/firmware/efi/esrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/firmware/efi/esrt.c b/drivers/firmware/efi/esrt.c index 7aae2483fcb9..c47e0c6ec00f 100644 --- a/drivers/firmware/efi/esrt.c +++ b/drivers/firmware/efi/esrt.c @@ -428,7 +428,7 @@ err_remove_group: err_remove_esrt: kobject_put(esrt_kobj); err: - kfree(esrt); + memunmap(esrt); esrt = NULL; return error; } -- cgit v1.2.3 From 0b02e448a2ebb46eb9be4f1bdfc87112bd420cbf Mon Sep 17 00:00:00 2001 From: Dave Young Date: Wed, 6 Dec 2017 09:50:10 +0000 Subject: efi: Add comment to avoid future expanding of sysfs systab /sys/firmware/efi/systab shows several different values, it breaks sysfs one file one value design. But since there are already userspace tools depend on it eg. kexec-tools so add code comment to alert future expanding of this file. Signed-off-by: Dave Young Signed-off-by: Ard Biesheuvel Reviewed-by: Greg Kroah-Hartman Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Matt Fleming Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: linux-efi@vger.kernel.org Link: http://lkml.kernel.org/r/20171206095010.24170-4-ard.biesheuvel@linaro.org Signed-off-by: Ingo Molnar --- drivers/firmware/efi/efi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index c3eefa126e3b..557a47829d03 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -109,6 +109,8 @@ struct kobject *efi_kobj; /* * Let's not leave out systab information that snuck into * the efivars driver + * Note, do not add more fields in systab sysfs file as it breaks sysfs + * one value per file rule! */ static ssize_t systab_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) -- cgit v1.2.3 From 134059fd2775be79e26c2dff87d25cc2f6ea5626 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Wed, 6 Dec 2017 01:04:50 +0100 Subject: net: thunderx: Fix TCP/UDP checksum offload for IPv4 pkts Offload IP header checksum to NIC. This fixes a previous patch which disabled checksum offloading for both IPv4 and IPv6 packets. So L3 checksum offload was getting disabled for IPv4 pkts. And HW is dropping these pkts for some reason. Without this patch, IPv4 TSO appears to be broken: WIthout this patch I get ~16kbyte/s, with patch close to 2mbyte/s when copying files via scp from test box to my home workstation. Looking at tcpdump on sender it looks like hardware drops IPv4 TSO skbs. This patch restores performance for me, ipv6 looks good too. Fixes: fa6d7cb5d76c ("net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts") Cc: Sunil Goutham Cc: Aleksey Makarov Cc: Eric Dumazet Signed-off-by: Florian Westphal Signed-off-by: David S. Miller --- drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c index 8b2c31e2a2b0..a3d12dbde95b 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c @@ -1355,6 +1355,8 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, struct snd_queue *sq, int qentry, /* Offload checksum calculation to HW */ if (skb->ip_summed == CHECKSUM_PARTIAL) { + if (ip.v4->version == 4) + hdr->csum_l3 = 1; /* Enable IP csum calculation */ hdr->l3_offset = skb_network_offset(skb); hdr->l4_offset = skb_transport_offset(skb); -- cgit v1.2.3 From cc10f8712bd688543602f3f3d052b13be4095695 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Tue, 5 Dec 2017 22:40:25 -0800 Subject: xen-netback: Fix logging message with spurious period after newline Using a period after a newline causes bad output. Signed-off-by: Joe Perches Reviewed-by: Paul Durrant Signed-off-by: David S. Miller --- drivers/net/xen-netback/interface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/xen-netback/interface.c b/drivers/net/xen-netback/interface.c index d6dff347f896..78ebe494fef0 100644 --- a/drivers/net/xen-netback/interface.c +++ b/drivers/net/xen-netback/interface.c @@ -186,7 +186,7 @@ static int xenvif_start_xmit(struct sk_buff *skb, struct net_device *dev) /* Obtain the queue to be used to transmit this packet */ index = skb_get_queue_mapping(skb); if (index >= num_queues) { - pr_warn_ratelimited("Invalid queue %hu for packet on interface %s\n.", + pr_warn_ratelimited("Invalid queue %hu for packet on interface %s\n", index, vif->dev->name); index %= num_queues; } -- cgit v1.2.3 From 30f1e59550363f6be28213393407ef225150e7fe Mon Sep 17 00:00:00 2001 From: Pravin Shedge Date: Wed, 6 Dec 2017 22:28:40 +0530 Subject: drivers: net: dsa: remove duplicate includes These duplicate includes have been found with scripts/checkincludes.pl but they have been removed manually to avoid removing false positives. Signed-off-by: Pravin Shedge Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/dsa/bcm_sf2.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index ea01f24f15e7..b62d47210db8 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include -- cgit v1.2.3 From 33acc40d00bc66f2d6e84441b6c46e03bd8acfa9 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 27 Nov 2017 15:46:27 +0100 Subject: of: unittest: Remove bogus overlay mutex release from overlay_data_add() overlay_data_add() never takes the special overlay mutex, so it must not be released in the error patch. Presumably the call to of_overlay_mutex_unlock() is a relic from v1 of the patch. Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/unittest.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers') diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index e568b1e82501..0f8052f1355c 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -2165,7 +2165,6 @@ static int __init overlay_data_add(int onum) ret = of_overlay_apply(info->np_overlay, &info->overlay_id); if (ret < 0) { pr_err("of_overlay_apply() (ret=%d), %d\n", ret, onum); - of_overlay_mutex_unlock(); goto out_free_np_overlay; } -- cgit v1.2.3 From e9d92e40ac9dea5a9a185fc11227f492f0b74fc7 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 28 Nov 2017 09:25:23 +0100 Subject: of: Spelling s/changset/changeset/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring --- drivers/of/dynamic.c | 4 ++-- drivers/of/overlay.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c index c454941b34ec..ab988d88704d 100644 --- a/drivers/of/dynamic.c +++ b/drivers/of/dynamic.c @@ -695,7 +695,7 @@ int __of_changeset_apply_entries(struct of_changeset *ocs, int *ret_revert) /* * Returns 0 on success, a negative error value in case of an error. * - * If multiple changset entry notification errors occur then only the + * If multiple changeset entry notification errors occur then only the * final notification error is reported. */ int __of_changeset_apply_notify(struct of_changeset *ocs) @@ -795,7 +795,7 @@ int __of_changeset_revert_entries(struct of_changeset *ocs, int *ret_apply) } /* - * If multiple changset entry notification errors occur then only the + * If multiple changeset entry notification errors occur then only the * final notification error is reported. */ int __of_changeset_revert_notify(struct of_changeset *ocs) diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index c150abb9049d..3036f1776efc 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -660,14 +660,14 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs) * A non-zero return value will not have created the changeset if error is from: * - parameter checks * - building the changeset - * - overlay changset pre-apply notifier + * - overlay changeset pre-apply notifier * * If an error is returned by an overlay changeset pre-apply notifier * then no further overlay changeset pre-apply notifier will be called. * * A non-zero return value will have created the changeset if error is from: * - overlay changeset entry notifier - * - overlay changset post-apply notifier + * - overlay changeset post-apply notifier * * If an error is returned by an overlay changeset post-apply notifier * then no further overlay changeset post-apply notifier will be called. @@ -871,7 +871,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs) * * A non-zero return value will not revert the changeset if error is from: * - parameter checks - * - overlay changset pre-remove notifier + * - overlay changeset pre-remove notifier * - overlay changeset entry revert * * If an error is returned by an overlay changeset pre-remove notifier @@ -882,7 +882,7 @@ static int overlay_removal_is_ok(struct overlay_changeset *remove_ovcs) * * A non-zero return value will revert the changeset if error is from: * - overlay changeset entry notifier - * - overlay changset post-remove notifier + * - overlay changeset post-remove notifier * * If an error is returned by an overlay changeset post-remove notifier * then no further overlay changeset post-remove notifier will be called. -- cgit v1.2.3 From 6de67de326041c3a450a117b2733cbedd3aab097 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 28 Nov 2017 09:26:33 +0100 Subject: of: overlay: Remove else after goto If an "if" branch is terminated by a "goto", there's no need to have an "else" statement and an indented block of code. Remove the "else" statement to simplify the code flow for the casual reviewer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring --- drivers/of/overlay.c | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) (limited to 'drivers') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 3036f1776efc..2b852a39581e 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -580,9 +580,9 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, of_node_put(fragment->overlay); ret = -EINVAL; goto err_free_fragments; - } else { - cnt++; } + + cnt++; } } @@ -736,14 +736,13 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id) devicetree_state_flags |= DTSF_APPLY_FAIL; } goto err_free_overlay_changeset; - } else { - ret = __of_changeset_apply_notify(&ovcs->cset); - if (ret) - pr_err("overlay changeset entry notify error %d\n", - ret); - /* fall through */ } + ret = __of_changeset_apply_notify(&ovcs->cset); + if (ret) + pr_err("overlay changeset entry notify error %d\n", ret); + /* notify failure is not fatal, continue */ + list_add_tail(&ovcs->ovcs_list, &ovcs_list); *ovcs_id = ovcs->id; @@ -931,15 +930,13 @@ int of_overlay_remove(int *ovcs_id) if (ret_apply) devicetree_state_flags |= DTSF_REVERT_FAIL; goto out_unlock; - } else { - ret = __of_changeset_revert_notify(&ovcs->cset); - if (ret) { - pr_err("overlay changeset entry notify error %d\n", - ret); - /* fall through - changeset was reverted */ - } } + ret = __of_changeset_revert_notify(&ovcs->cset); + if (ret) + pr_err("overlay changeset entry notify error %d\n", ret); + /* notify failure is not fatal, continue */ + *ovcs_id = 0; ret_tmp = overlay_notify(ovcs, OF_OVERLAY_POST_REMOVE); -- cgit v1.2.3 From 1352f09b4cc4f9dce386620b118401738bbf0d5f Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 5 Dec 2017 16:27:02 +0100 Subject: of: overlay: Fix memory leak in of_overlay_apply() error path If of_resolve_phandles() fails, free_overlay_changeset() is called in the error path. However, that function returns early if the list hasn't been initialized yet, before freeing the object. Explicitly calling kfree() instead would solve that issue. However, that complicates matter, by having to consider which of two different methods to use to dispose of the same object. Hence make free_overlay_changeset() consider initialization state of the different parts of the object, making it always safe to call (once!) to dispose of a (partially) initialized overlay_changeset: - Only destroy the changeset if the list was initialized, - Make init_overlay_changeset() store the ID in ovcs->id on success, to avoid calling idr_remove() with an error value or an already released ID. Reported-by: Colin King Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/overlay.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'drivers') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 2b852a39581e..bb3f123ed259 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -522,7 +522,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, struct device_node *node, *overlay_node; struct fragment *fragment; struct fragment *fragments; - int cnt, ret; + int cnt, id, ret; /* * Warn for some issues. Can not return -EINVAL for these until @@ -543,9 +543,9 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, of_changeset_init(&ovcs->cset); - ovcs->id = idr_alloc(&ovcs_idr, ovcs, 1, 0, GFP_KERNEL); - if (ovcs->id <= 0) - return ovcs->id; + id = idr_alloc(&ovcs_idr, ovcs, 1, 0, GFP_KERNEL); + if (id <= 0) + return id; cnt = 0; @@ -611,6 +611,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, goto err_free_fragments; } + ovcs->id = id; ovcs->count = cnt; ovcs->fragments = fragments; @@ -619,7 +620,7 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, err_free_fragments: kfree(fragments); err_free_idr: - idr_remove(&ovcs_idr, ovcs->id); + idr_remove(&ovcs_idr, id); pr_err("%s() failed, ret = %d\n", __func__, ret); @@ -630,9 +631,8 @@ static void free_overlay_changeset(struct overlay_changeset *ovcs) { int i; - if (!ovcs->cset.entries.next) - return; - of_changeset_destroy(&ovcs->cset); + if (ovcs->cset.entries.next) + of_changeset_destroy(&ovcs->cset); if (ovcs->id) idr_remove(&ovcs_idr, ovcs->id); -- cgit v1.2.3 From 5e4748175fe942c86cbab840e2fa41a92b4d6cf6 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Tue, 5 Dec 2017 16:27:03 +0100 Subject: of: overlay: Fix (un)locking in of_overlay_apply() The special overlay mutex is taken first, hence it should be released last in the error path. of_resolve_phandles() must be called with of_mutex held. Without it, a node and new phandle could be added via of_attach_node(), making the max phandle wrong. free_overlay_changeset() must be called with of_mutex held, if any non-trivial cleanup is to be done. Hence move "mutex_lock(&of_mutex)" up, as suggested by Frank, and merge the two tail statements of the success and error paths, now they became identical. Note that while the two mutexes are adjacent, we still need both: __of_changeset_apply_notify(), which is called by __of_changeset_apply() unlocks of_mutex, then does notifications then locks of_mutex. So the mutex get released in the middle of of_overlay_apply() Fixes: f948d6d8b792bb90 ("of: overlay: avoid race condition between applying multiple overlays") Signed-off-by: Geert Uytterhoeven Reviewed-by: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/overlay.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index bb3f123ed259..fcce5cdbe229 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -706,12 +706,11 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id) } of_overlay_mutex_lock(); + mutex_lock(&of_mutex); ret = of_resolve_phandles(tree); if (ret) - goto err_overlay_unlock; - - mutex_lock(&of_mutex); + goto err_free_overlay_changeset; ret = init_overlay_changeset(ovcs, tree); if (ret) @@ -754,18 +753,14 @@ int of_overlay_apply(struct device_node *tree, int *ovcs_id) ret = ret_tmp; } - mutex_unlock(&of_mutex); - of_overlay_mutex_unlock(); - - goto out; - -err_overlay_unlock: - of_overlay_mutex_unlock(); + goto out_unlock; err_free_overlay_changeset: free_overlay_changeset(ovcs); +out_unlock: mutex_unlock(&of_mutex); + of_overlay_mutex_unlock(); out: pr_debug("%s() err=%d\n", __func__, ret); -- cgit v1.2.3 From 89452d4ab20745002e50ecf90979708f1ce1d077 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Mon, 30 Oct 2017 08:28:09 +0100 Subject: drm/exynos: Fix dma-buf import When IOMMU support was enabled, dma-buf import in Exynos DRM was broken since commit f43c35966a5a ("drm/exynos: use real device for DMA-mapping operations") due to using wrong struct device in drm_gem_prime_import() function. This patch fixes following kernel BUG caused by incorrect buffer mapping to DMA address space: exynos-sysmmu 14650000.sysmmu: 14450000.mixer: PAGE FAULT occurred at 0xb2e00000 ------------[ cut here ]------------ kernel BUG at drivers/iommu/exynos-iommu.c:449! Internal error: Oops - BUG: 0 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.14.0-rc4-next-20171016-00033-g990d723669fd #3165 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) task: c0e0b7c0 task.stack: c0e00000 PC is at exynos_sysmmu_irq+0x1d0/0x24c LR is at exynos_sysmmu_irq+0x154/0x24c ------------[ cut here ]------------ Reported-by: Marian Mihailescu Fixes: f43c35966a5a ("drm/exynos: use real device for DMA-mapping operations") Signed-off-by: Marek Szyprowski Reviewed-by: Tobias Jakobi Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 +- drivers/gpu/drm/exynos/exynos_drm_gem.c | 6 ++++++ drivers/gpu/drm/exynos/exynos_drm_gem.h | 2 ++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index 82b72425a42f..a6ff3a538c8a 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -148,7 +148,7 @@ static struct drm_driver exynos_drm_driver = { .prime_handle_to_fd = drm_gem_prime_handle_to_fd, .prime_fd_to_handle = drm_gem_prime_fd_to_handle, .gem_prime_export = drm_gem_prime_export, - .gem_prime_import = drm_gem_prime_import, + .gem_prime_import = exynos_drm_gem_prime_import, .gem_prime_get_sg_table = exynos_drm_gem_prime_get_sg_table, .gem_prime_import_sg_table = exynos_drm_gem_prime_import_sg_table, .gem_prime_vmap = exynos_drm_gem_prime_vmap, diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index 077de014d610..ef35bc23bb36 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -506,6 +506,12 @@ int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma) } /* low-level interface prime helpers */ +struct drm_gem_object *exynos_drm_gem_prime_import(struct drm_device *dev, + struct dma_buf *dma_buf) +{ + return drm_gem_prime_import_dev(dev, dma_buf, to_dma_dev(dev)); +} + struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj) { struct exynos_drm_gem *exynos_gem = to_exynos_gem(obj); diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.h b/drivers/gpu/drm/exynos/exynos_drm_gem.h index e86d1a9518c3..5a4c7de80f65 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.h +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.h @@ -117,6 +117,8 @@ int exynos_drm_gem_fault(struct vm_fault *vmf); int exynos_drm_gem_mmap(struct file *filp, struct vm_area_struct *vma); /* low-level interface prime helpers */ +struct drm_gem_object *exynos_drm_gem_prime_import(struct drm_device *dev, + struct dma_buf *dma_buf); struct sg_table *exynos_drm_gem_prime_get_sg_table(struct drm_gem_object *obj); struct drm_gem_object * exynos_drm_gem_prime_import_sg_table(struct drm_device *dev, -- cgit v1.2.3 From 120a264f9c2782682027d931d83dcbd22e01da80 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Wed, 22 Nov 2017 14:14:47 +0100 Subject: drm/exynos: gem: Drop NONCONTIG flag for buffers allocated without IOMMU When no IOMMU is available, all GEM buffers allocated by Exynos DRM driver are contiguous, because of the underlying dma_alloc_attrs() function provides only such buffers. In such case it makes no sense to keep BO_NONCONTIG flag for the allocated GEM buffers. This allows to avoid failures for buffer contiguity checks in the subsequent operations on GEM objects. Signed-off-by: Marek Szyprowski Signed-off-by: Inki Dae CC: stable@vger.kernel.org # v4.4+ --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/drm/exynos/exynos_drm_gem.c index ef35bc23bb36..11cc01b47bc0 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_gem.c +++ b/drivers/gpu/drm/exynos/exynos_drm_gem.c @@ -247,6 +247,15 @@ struct exynos_drm_gem *exynos_drm_gem_create(struct drm_device *dev, if (IS_ERR(exynos_gem)) return exynos_gem; + if (!is_drm_iommu_supported(dev) && (flags & EXYNOS_BO_NONCONTIG)) { + /* + * when no IOMMU is available, all allocated buffers are + * contiguous anyway, so drop EXYNOS_BO_NONCONTIG flag + */ + flags &= ~EXYNOS_BO_NONCONTIG; + DRM_WARN("Non-contiguous allocation is not supported without IOMMU, falling back to contiguous buffer\n"); + } + /* set memory type and cache attribute from user side. */ exynos_gem->flags = flags; -- cgit v1.2.3 From 2f0f6dfcf925c3bdc6468599fa33b729fbd9247d Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Thu, 23 Nov 2017 18:32:06 +0900 Subject: drm/exynos: remove unnecessary descrptions Removed two descriptions to 'da_start' and 'da_space_size' from exynos_drm_private structure. These members don't exist anymore. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_drv.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h index c6847fa708fa..589d465a7f88 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.h +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h @@ -194,11 +194,6 @@ struct drm_exynos_file_private { /* * Exynos drm private structure. * - * @da_start: start address to device address space. - * with iommu, device address space starts from this address - * otherwise default one. - * @da_space_size: size of device address space. - * if 0 then default value is used for it. * @pending: the crtcs that have pending updates to finish * @lock: protect access to @pending * @wait: wait an atomic commit to finish -- cgit v1.2.3 From 1cd6ae355bb2092a6a511558334564cb1f4ffd43 Mon Sep 17 00:00:00 2001 From: Inki Dae Date: Thu, 23 Nov 2017 18:27:57 +0900 Subject: drm/exynos: remove unnecessary function declaration Removed exynos_drm_get_dma_device funtion declaration on top of exynos_drm_drv.c file. We can remove this declaration by moving the implementation of this function upwards. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 44 ++++++++++++++++----------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index a6ff3a538c8a..27e423b87266 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -37,8 +37,6 @@ #define DRIVER_MAJOR 1 #define DRIVER_MINOR 0 -static struct device *exynos_drm_get_dma_device(void); - int exynos_atomic_check(struct drm_device *dev, struct drm_atomic_state *state) { @@ -301,6 +299,27 @@ static struct component_match *exynos_drm_match_add(struct device *dev) return match ?: ERR_PTR(-ENODEV); } +static struct device *exynos_drm_get_dma_device(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) { + struct exynos_drm_driver_info *info = &exynos_drm_drivers[i]; + struct device *dev; + + if (!info->driver || !(info->flags & DRM_DMA_DEVICE)) + continue; + + while ((dev = bus_find_device(&platform_bus_type, NULL, + &info->driver->driver, + (void *)platform_bus_type.match))) { + put_device(dev); + return dev; + } + } + return NULL; +} + static int exynos_drm_bind(struct device *dev) { struct exynos_drm_private *private; @@ -469,27 +488,6 @@ static struct platform_driver exynos_drm_platform_driver = { }, }; -static struct device *exynos_drm_get_dma_device(void) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(exynos_drm_drivers); ++i) { - struct exynos_drm_driver_info *info = &exynos_drm_drivers[i]; - struct device *dev; - - if (!info->driver || !(info->flags & DRM_DMA_DEVICE)) - continue; - - while ((dev = bus_find_device(&platform_bus_type, NULL, - &info->driver->driver, - (void *)platform_bus_type.match))) { - put_device(dev); - return dev; - } - } - return NULL; -} - static void exynos_drm_unregister_devices(void) { int i; -- cgit v1.2.3 From ef78970ace74bb606e641a1f27ea36547716a775 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 22 Nov 2017 17:26:21 +0000 Subject: drm/i915: Call i915_gem_init_userptr() before taking struct_mutex We don't need struct_mutex to initialise userptr (it just allocates a workqueue for itself etc), but we do need struct_mutex later on in i915_gem_init() in order to feed requests onto the HW. This should break the chain [ 385.697902] ====================================================== [ 385.697907] WARNING: possible circular locking dependency detected [ 385.697913] 4.14.0-CI-Patchwork_7234+ #1 Tainted: G U [ 385.697917] ------------------------------------------------------ [ 385.697922] perf_pmu/2631 is trying to acquire lock: [ 385.697927] (&mm->mmap_sem){++++}, at: [] __might_fault+0x3e/0x90 [ 385.697941] but task is already holding lock: [ 385.697946] (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0xbc/0x1d0 [ 385.697957] which lock already depends on the new lock. [ 385.697963] the existing dependency chain (in reverse order) is: [ 385.697970] -> #4 (&cpuctx_mutex){+.+.}: [ 385.697980] __mutex_lock+0x86/0x9b0 [ 385.697985] perf_event_init_cpu+0x5a/0x90 [ 385.697991] perf_event_init+0x178/0x1a4 [ 385.697997] start_kernel+0x27f/0x3f1 [ 385.698003] verify_cpu+0x0/0xfb [ 385.698006] -> #3 (pmus_lock){+.+.}: [ 385.698015] __mutex_lock+0x86/0x9b0 [ 385.698020] perf_event_init_cpu+0x21/0x90 [ 385.698025] cpuhp_invoke_callback+0xca/0xc00 [ 385.698030] _cpu_up+0xa7/0x170 [ 385.698035] do_cpu_up+0x57/0x70 [ 385.698039] smp_init+0x62/0xa6 [ 385.698044] kernel_init_freeable+0x97/0x193 [ 385.698050] kernel_init+0xa/0x100 [ 385.698055] ret_from_fork+0x27/0x40 [ 385.698058] -> #2 (cpu_hotplug_lock.rw_sem){++++}: [ 385.698068] cpus_read_lock+0x39/0xa0 [ 385.698073] apply_workqueue_attrs+0x12/0x50 [ 385.698078] __alloc_workqueue_key+0x1d8/0x4d8 [ 385.698134] i915_gem_init_userptr+0x5f/0x80 [i915] [ 385.698176] i915_gem_init+0x7c/0x390 [i915] [ 385.698213] i915_driver_load+0x99e/0x15c0 [i915] [ 385.698250] i915_pci_probe+0x33/0x90 [i915] [ 385.698256] pci_device_probe+0xa1/0x130 [ 385.698262] driver_probe_device+0x293/0x440 [ 385.698267] __driver_attach+0xde/0xe0 [ 385.698272] bus_for_each_dev+0x5c/0x90 [ 385.698277] bus_add_driver+0x16d/0x260 [ 385.698282] driver_register+0x57/0xc0 [ 385.698287] do_one_initcall+0x3e/0x160 [ 385.698292] do_init_module+0x5b/0x1fa [ 385.698297] load_module+0x2374/0x2dc0 [ 385.698302] SyS_finit_module+0xaa/0xe0 [ 385.698307] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698311] -> #1 (&dev->struct_mutex){+.+.}: [ 385.698320] __mutex_lock+0x86/0x9b0 [ 385.698361] i915_mutex_lock_interruptible+0x4c/0x130 [i915] [ 385.698403] i915_gem_fault+0x206/0x760 [i915] [ 385.698409] __do_fault+0x1a/0x70 [ 385.698413] __handle_mm_fault+0x7c4/0xdb0 [ 385.698417] handle_mm_fault+0x154/0x300 [ 385.698440] __do_page_fault+0x2d6/0x570 [ 385.698445] page_fault+0x22/0x30 [ 385.698449] -> #0 (&mm->mmap_sem){++++}: [ 385.698459] lock_acquire+0xaf/0x200 [ 385.698464] __might_fault+0x68/0x90 [ 385.698470] _copy_to_user+0x1e/0x70 [ 385.698475] perf_read+0x1aa/0x290 [ 385.698480] __vfs_read+0x23/0x120 [ 385.698484] vfs_read+0xa3/0x150 [ 385.698488] SyS_read+0x45/0xb0 [ 385.698493] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698497] other info that might help us debug this: [ 385.698505] Chain exists of: &mm->mmap_sem --> pmus_lock --> &cpuctx_mutex [ 385.698517] Possible unsafe locking scenario: [ 385.698522] CPU0 CPU1 [ 385.698526] ---- ---- [ 385.698529] lock(&cpuctx_mutex); [ 385.698553] lock(pmus_lock); [ 385.698558] lock(&cpuctx_mutex); [ 385.698564] lock(&mm->mmap_sem); [ 385.698568] *** DEADLOCK *** [ 385.698574] 1 lock held by perf_pmu/2631: [ 385.698578] #0: (&cpuctx_mutex){+.+.}, at: [] perf_event_ctx_lock_nested+0xbc/0x1d0 [ 385.698589] stack backtrace: [ 385.698595] CPU: 3 PID: 2631 Comm: perf_pmu Tainted: G U 4.14.0-CI-Patchwork_7234+ #1 [ 385.698602] Hardware name: /NUC6CAYB, BIOS AYAPLCEL.86A.0040.2017.0619.1722 06/19/2017 [ 385.698609] Call Trace: [ 385.698615] dump_stack+0x5f/0x86 [ 385.698621] print_circular_bug.isra.18+0x1d0/0x2c0 [ 385.698627] __lock_acquire+0x19c3/0x1b60 [ 385.698634] ? generic_exec_single+0x77/0xe0 [ 385.698640] ? lock_acquire+0xaf/0x200 [ 385.698644] lock_acquire+0xaf/0x200 [ 385.698650] ? __might_fault+0x3e/0x90 [ 385.698655] __might_fault+0x68/0x90 [ 385.698660] ? __might_fault+0x3e/0x90 [ 385.698665] _copy_to_user+0x1e/0x70 [ 385.698670] perf_read+0x1aa/0x290 [ 385.698675] __vfs_read+0x23/0x120 [ 385.698682] ? __fget+0x101/0x1f0 [ 385.698686] vfs_read+0xa3/0x150 [ 385.698691] SyS_read+0x45/0xb0 [ 385.698696] entry_SYSCALL_64_fastpath+0x1c/0xb1 [ 385.698701] RIP: 0033:0x7ff1c46876ed [ 385.698705] RSP: 002b:00007fff13552f90 EFLAGS: 00000293 ORIG_RAX: 0000000000000000 [ 385.698712] RAX: ffffffffffffffda RBX: ffffc90000647ff0 RCX: 00007ff1c46876ed [ 385.698718] RDX: 0000000000000010 RSI: 00007fff13552fa0 RDI: 0000000000000005 [ 385.698723] RBP: 000056063d300580 R08: 0000000000000000 R09: 0000000000000060 [ 385.698729] R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000046 [ 385.698734] R13: 00007fff13552c6f R14: 00007ff1c6279d00 R15: 00007ff1c6279a40 Testcase: igt/perf_pmu Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20171122172621.16158-1-chris@chris-wilson.co.uk Reviewed-by: Tvrtko Ursulin (cherry picked from commit ee48700dd57d9ce783ec40f035b324d0b75632e4) Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 46bdea2de268..ad4050f7ab3b 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4948,8 +4948,6 @@ int i915_gem_init(struct drm_i915_private *dev_priv) { int ret; - mutex_lock(&dev_priv->drm.struct_mutex); - /* * We need to fallback to 4K pages since gvt gtt handling doesn't * support huge page entries - we will need to check either hypervisor @@ -4969,18 +4967,19 @@ int i915_gem_init(struct drm_i915_private *dev_priv) dev_priv->gt.cleanup_engine = intel_logical_ring_cleanup; } + ret = i915_gem_init_userptr(dev_priv); + if (ret) + return ret; + /* This is just a security blanket to placate dragons. * On some systems, we very sporadically observe that the first TLBs * used by the CS may be stale, despite us poking the TLB reset. If * we hold the forcewake during initialisation these problems * just magically go away. */ + mutex_lock(&dev_priv->drm.struct_mutex); intel_uncore_forcewake_get(dev_priv, FORCEWAKE_ALL); - ret = i915_gem_init_userptr(dev_priv); - if (ret) - goto out_unlock; - ret = i915_gem_init_ggtt(dev_priv); if (ret) goto out_unlock; -- cgit v1.2.3 From 5bfd40139d55790cbc8e56ad1ce4f974f1fa186d Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 22 Nov 2017 21:39:28 +0100 Subject: drm/vc4: Fix false positive WARN() backtrace on refcount_inc() usage With CONFIG_REFCOUNT_FULL enabled, refcount_inc() complains when it's passed a refcount object that has its counter set to 0. In this driver, this is a valid use case since we want to increment ->usecnt only when the BO object starts to be used by real HW components and this is definitely not the case when the BO is created. Fix the problem by using refcount_inc_not_zero() instead of refcount_inc() and fallback to refcount_set(1) when refcount_inc_not_zero() returns false. Note that this 2-steps operation is not racy here because the whole section is protected by a mutex which guarantees that the counter does not change between the refcount_inc_not_zero() and refcount_set() calls. Fixes: b9f19259b84d ("drm/vc4: Add the DRM_IOCTL_VC4_GEM_MADVISE ioctl") Reported-by: Stefan Wahren Signed-off-by: Boris Brezillon Acked-by: Eric Anholt Link: https://patchwork.freedesktop.org/patch/msgid/20171122203928.28135-1-boris.brezillon@free-electrons.com --- drivers/gpu/drm/vc4/vc4_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/vc4/vc4_bo.c b/drivers/gpu/drm/vc4/vc4_bo.c index 4ae45d7dac42..2decc8e2c79f 100644 --- a/drivers/gpu/drm/vc4/vc4_bo.c +++ b/drivers/gpu/drm/vc4/vc4_bo.c @@ -637,7 +637,8 @@ int vc4_bo_inc_usecnt(struct vc4_bo *bo) mutex_lock(&bo->madv_lock); switch (bo->madv) { case VC4_MADV_WILLNEED: - refcount_inc(&bo->usecnt); + if (!refcount_inc_not_zero(&bo->usecnt)) + refcount_set(&bo->usecnt, 1); ret = 0; break; case VC4_MADV_DONTNEED: -- cgit v1.2.3 From 7a8b70535037a7d8503d12c1a5abbbc8aa5d709a Mon Sep 17 00:00:00 2001 From: Radhakrishna Sripada Date: Wed, 6 Dec 2017 14:25:07 -0800 Subject: Revert "drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk" This reverts commit 8f067837c4b713ce2e69be95af7b2a5eb3bd7de8. HSD says "WA withdrawn. It was causing corruption with some images. WA is not strictly necessary since this bug just causes loss of FBC compression with some sizes and images, but doesn't break anything." Fixes: 8f067837c4b7 ("drm/i915: Display WA #1133 WaFbcSkipSegments:cnl, glk") Cc: Rodrigo Vivi Signed-off-by: Radhakrishna Sripada Signed-off-by: Rodrigo Vivi Link: https://patchwork.freedesktop.org/patch/msgid/20171117010825.23118-1-radhakrishna.sripada@intel.com (cherry picked from commit 0cfecb7c4b9b45ed1776162e132b43f92564f3f4) Signed-off-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_reg.h | 3 --- drivers/gpu/drm/i915/intel_pm.c | 13 ------------- 2 files changed, 16 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 68a58cce6ab1..3866c49bc390 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -2951,9 +2951,6 @@ enum i915_power_well_id { #define ILK_DPFC_CHICKEN _MMIO(0x43224) #define ILK_DPFC_DISABLE_DUMMY0 (1<<8) #define ILK_DPFC_NUKE_ON_ANY_MODIFICATION (1<<23) -#define GLK_SKIP_SEG_EN (1<<12) -#define GLK_SKIP_SEG_COUNT_MASK (3<<10) -#define GLK_SKIP_SEG_COUNT(x) ((x)<<10) #define ILK_FBC_RT_BASE _MMIO(0x2128) #define ILK_FBC_RT_VALID (1<<0) #define SNB_FBC_FRONT_BUFFER (1<<1) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index f4a4e9496893..f0d0dbab4150 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -124,7 +124,6 @@ static void bxt_init_clock_gating(struct drm_i915_private *dev_priv) static void glk_init_clock_gating(struct drm_i915_private *dev_priv) { - u32 val; gen9_init_clock_gating(dev_priv); /* @@ -144,11 +143,6 @@ static void glk_init_clock_gating(struct drm_i915_private *dev_priv) I915_WRITE(CHICKEN_MISC_2, val); } - /* Display WA #1133: WaFbcSkipSegments:glk */ - val = I915_READ(ILK_DPFC_CHICKEN); - val &= ~GLK_SKIP_SEG_COUNT_MASK; - val |= GLK_SKIP_SEG_EN | GLK_SKIP_SEG_COUNT(1); - I915_WRITE(ILK_DPFC_CHICKEN, val); } static void i915_pineview_get_mem_freq(struct drm_i915_private *dev_priv) @@ -8517,7 +8511,6 @@ static void cnp_init_clock_gating(struct drm_i915_private *dev_priv) static void cnl_init_clock_gating(struct drm_i915_private *dev_priv) { - u32 val; cnp_init_clock_gating(dev_priv); /* This is not an Wa. Enable for better image quality */ @@ -8537,12 +8530,6 @@ static void cnl_init_clock_gating(struct drm_i915_private *dev_priv) I915_WRITE(SLICE_UNIT_LEVEL_CLKGATE, I915_READ(SLICE_UNIT_LEVEL_CLKGATE) | SARBUNIT_CLKGATE_DIS); - - /* Display WA #1133: WaFbcSkipSegments:cnl */ - val = I915_READ(ILK_DPFC_CHICKEN); - val &= ~GLK_SKIP_SEG_COUNT_MASK; - val |= GLK_SKIP_SEG_EN | GLK_SKIP_SEG_COUNT(1); - I915_WRITE(ILK_DPFC_CHICKEN, val); } static void cfl_init_clock_gating(struct drm_i915_private *dev_priv) -- cgit v1.2.3 From 51ef7925e10688c57186d438e784532e063492e4 Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Thu, 23 Nov 2017 17:57:04 +0200 Subject: brcmfmac: Avoid build error with make W=1 When I run make W=1 on gcc (Debian 7.2.0-16) 7.2.0 I got an error for the first run, all next ones are okay. CC [M] drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c:2078: error: Cannot parse struct or union! scripts/Makefile.build:310: recipe for target 'drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.o' failed Seems like something happened with W=1 and wrong kernel doc format. As a quick fix remove dubious /** in the code. Signed-off-by: Andy Shevchenko Acked-by: Arend van Spriel Signed-off-by: Kalle Valo --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c index adf180f338ca..cdf9e4161592 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c @@ -2070,7 +2070,7 @@ static int brcmf_sdio_txpkt_hdalign(struct brcmf_sdio *bus, struct sk_buff *pkt) return head_pad; } -/** +/* * struct brcmf_skbuff_cb reserves first two bytes in sk_buff::cb for * bus layer usage. */ -- cgit v1.2.3 From 510353a63796d467b41237ab4f136136f68c297d Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Tue, 21 Nov 2017 08:49:36 +0100 Subject: drm/bridge: analogix dp: Fix runtime PM state in get_modes() callback get_modes() callback might be called asynchronously from the DRM core and it is not synchronized with bridge_enable(), which sets proper runtime PM state of the main DP device. Fix this by calling pm_runtime_get_sync() before calling drm_get_edid(), which in turn calls drm_dp_i2c_xfer() and analogix_dp_transfer() to ensure that main DP device is runtime active when doing any access to its registers. This fixes the following kernel issue on Samsung Exynos5250 Snow board: Unhandled fault: imprecise external abort (0x406) at 0x00000000 pgd = c0004000 [00000000] *pgd=00000000 Internal error: : 406 [#1] PREEMPT SMP ARM Modules linked in: CPU: 0 PID: 62 Comm: kworker/0:2 Not tainted 4.13.0-rc2-00364-g4a97a3da420b #3357 Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) Workqueue: events output_poll_execute task: edc14800 task.stack: edcb2000 PC is at analogix_dp_transfer+0x15c/0x2fc LR is at analogix_dp_transfer+0x134/0x2fc pc : [] lr : [] psr: 60000013 sp : edcb3be8 ip : 0000002a fp : 00000001 r10: 00000000 r9 : edcb3cd8 r8 : edcb3c40 r7 : 00000000 r6 : edd3b380 r5 : edd3b010 r4 : 00000064 r3 : 00000000 r2 : f0ad3000 r1 : edcb3c40 r0 : edd3b010 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none Control: 10c5387d Table: 4000406a DAC: 00000051 Process kworker/0:2 (pid: 62, stack limit = 0xedcb2210) Stack: (0xedcb3be8 to 0xedcb4000) [] (analogix_dp_transfer) from [] (drm_dp_i2c_do_msg+0x8c/0x2b4) [] (drm_dp_i2c_do_msg) from [] (drm_dp_i2c_xfer+0x98/0x214) [] (drm_dp_i2c_xfer) from [] (__i2c_transfer+0x140/0x29c) [] (__i2c_transfer) from [] (i2c_transfer+0x70/0xe4) [] (i2c_transfer) from [] (drm_do_probe_ddc_edid+0xb4/0x114) [] (drm_do_probe_ddc_edid) from [] (drm_probe_ddc+0x18/0x28) [] (drm_probe_ddc) from [] (drm_get_edid+0x124/0x2d4) [] (drm_get_edid) from [] (analogix_dp_get_modes+0x90/0x114) [] (analogix_dp_get_modes) from [] (drm_helper_probe_single_connector_modes+0x198/0x68c) [] (drm_helper_probe_single_connector_modes) from [] (drm_setup_crtcs+0x1b4/0xd18) [] (drm_setup_crtcs) from [] (drm_fb_helper_hotplug_event+0x94/0xd0) [] (drm_fb_helper_hotplug_event) from [] (drm_kms_helper_hotplug_event+0x24/0x28) [] (drm_kms_helper_hotplug_event) from [] (output_poll_execute+0x6c/0x174) [] (output_poll_execute) from [] (process_one_work+0x188/0x3fc) [] (process_one_work) from [] (worker_thread+0x30/0x4b8) [] (worker_thread) from [] (kthread+0x128/0x164) [] (kthread) from [] (ret_from_fork+0x14/0x24) Code: 0a000002 ea000009 e2544001 0a00004a (e59537c8) ---[ end trace cddc7919c79f7878 ]--- Reported-by: Misha Komarovskiy CC: stable@vger.kernel.org # v4.10+ Signed-off-by: Marek Szyprowski Signed-off-by: Archit Taneja Link: https://patchwork.freedesktop.org/patch/msgid/20171121074936.22520-1-m.szyprowski@samsung.com --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 5dd3f1cd074a..a8905049b9da 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -946,7 +946,9 @@ static int analogix_dp_get_modes(struct drm_connector *connector) return 0; } + pm_runtime_get_sync(dp->dev); edid = drm_get_edid(connector, &dp->aux.ddc); + pm_runtime_put(dp->dev); if (edid) { drm_mode_connector_update_edid_property(&dp->connector, edid); -- cgit v1.2.3 From 7eb781b1bbb7136fe78fb8c28c1c223c61fa32b5 Mon Sep 17 00:00:00 2001 From: weiping zhang Date: Wed, 6 Dec 2017 21:59:16 +0800 Subject: virtio_mmio: add cleanup for virtio_mmio_probe As mentioned at drivers/base/core.c: /* * NOTE: _Never_ directly free @dev after calling this function, even * if it returned an error! Always use put_device() to give up the * reference initialized in this function instead. */ so we don't free vm_dev until vm_dev.dev.release be called. Signed-off-by: weiping zhang Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- drivers/virtio/virtio_mmio.c | 51 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index 74dc7170fd35..ec401042a5d1 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -493,7 +493,16 @@ static const struct virtio_config_ops virtio_mmio_config_ops = { }; -static void virtio_mmio_release_dev_empty(struct device *_d) {} +static void virtio_mmio_release_dev(struct device *_d) +{ + struct virtio_device *vdev = + container_of(_d, struct virtio_device, dev); + struct virtio_mmio_device *vm_dev = + container_of(vdev, struct virtio_mmio_device, vdev); + struct platform_device *pdev = vm_dev->pdev; + + devm_kfree(&pdev->dev, vm_dev); +} /* Platform device */ @@ -513,25 +522,30 @@ static int virtio_mmio_probe(struct platform_device *pdev) return -EBUSY; vm_dev = devm_kzalloc(&pdev->dev, sizeof(*vm_dev), GFP_KERNEL); - if (!vm_dev) - return -ENOMEM; + if (!vm_dev) { + rc = -ENOMEM; + goto free_mem; + } vm_dev->vdev.dev.parent = &pdev->dev; - vm_dev->vdev.dev.release = virtio_mmio_release_dev_empty; + vm_dev->vdev.dev.release = virtio_mmio_release_dev; vm_dev->vdev.config = &virtio_mmio_config_ops; vm_dev->pdev = pdev; INIT_LIST_HEAD(&vm_dev->virtqueues); spin_lock_init(&vm_dev->lock); vm_dev->base = devm_ioremap(&pdev->dev, mem->start, resource_size(mem)); - if (vm_dev->base == NULL) - return -EFAULT; + if (vm_dev->base == NULL) { + rc = -EFAULT; + goto free_vmdev; + } /* Check magic value */ magic = readl(vm_dev->base + VIRTIO_MMIO_MAGIC_VALUE); if (magic != ('v' | 'i' << 8 | 'r' << 16 | 't' << 24)) { dev_warn(&pdev->dev, "Wrong magic value 0x%08lx!\n", magic); - return -ENODEV; + rc = -ENODEV; + goto unmap; } /* Check device version */ @@ -539,7 +553,8 @@ static int virtio_mmio_probe(struct platform_device *pdev) if (vm_dev->version < 1 || vm_dev->version > 2) { dev_err(&pdev->dev, "Version %ld not supported!\n", vm_dev->version); - return -ENXIO; + rc = -ENXIO; + goto unmap; } vm_dev->vdev.id.device = readl(vm_dev->base + VIRTIO_MMIO_DEVICE_ID); @@ -548,7 +563,8 @@ static int virtio_mmio_probe(struct platform_device *pdev) * virtio-mmio device with an ID 0 is a (dummy) placeholder * with no function. End probing now with no error reported. */ - return -ENODEV; + rc = -ENODEV; + goto unmap; } vm_dev->vdev.id.vendor = readl(vm_dev->base + VIRTIO_MMIO_VENDOR_ID); @@ -573,7 +589,22 @@ static int virtio_mmio_probe(struct platform_device *pdev) platform_set_drvdata(pdev, vm_dev); - return register_virtio_device(&vm_dev->vdev); + rc = register_virtio_device(&vm_dev->vdev); + if (rc) { + iounmap(vm_dev->base); + devm_release_mem_region(&pdev->dev, mem->start, + resource_size(mem)); + put_device(&vm_dev->vdev.dev); + } + return rc; +unmap: + iounmap(vm_dev->base); +free_mem: + devm_release_mem_region(&pdev->dev, mem->start, + resource_size(mem)); +free_vmdev: + devm_kfree(&pdev->dev, vm_dev); + return rc; } static int virtio_mmio_remove(struct platform_device *pdev) -- cgit v1.2.3 From 25f32223bce5c580e0392a176319a587d7a17e95 Mon Sep 17 00:00:00 2001 From: weiping zhang Date: Wed, 6 Dec 2017 21:59:32 +0800 Subject: virtio_mmio: add cleanup for virtio_mmio_remove cleanup all resource allocated by virtio_mmio_probe. Signed-off-by: weiping zhang Signed-off-by: Michael S. Tsirkin Reviewed-by: Cornelia Huck --- drivers/virtio/virtio_mmio.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers') diff --git a/drivers/virtio/virtio_mmio.c b/drivers/virtio/virtio_mmio.c index ec401042a5d1..a9192fe4f345 100644 --- a/drivers/virtio/virtio_mmio.c +++ b/drivers/virtio/virtio_mmio.c @@ -610,7 +610,13 @@ free_vmdev: static int virtio_mmio_remove(struct platform_device *pdev) { struct virtio_mmio_device *vm_dev = platform_get_drvdata(pdev); + struct resource *mem; + iounmap(vm_dev->base); + mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (mem) + devm_release_mem_region(&pdev->dev, mem->start, + resource_size(mem)); unregister_virtio_device(&vm_dev->vdev); return 0; -- cgit v1.2.3 From 03e9f8a05bce7330bcd9c5cc54c8e42d0fcbf993 Mon Sep 17 00:00:00 2001 From: Yunjian Wang Date: Mon, 4 Dec 2017 14:02:19 +0800 Subject: virtio_net: fix return value check in receive_mergeable() The function virtqueue_get_buf_ctx() could return NULL, the return value 'buf' need to be checked with NULL, not value 'ctx'. Signed-off-by: Yunjian Wang Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 511f8339fa96..7927e28f5336 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -714,7 +714,7 @@ static struct sk_buff *receive_mergeable(struct net_device *dev, int num_skb_frags; buf = virtqueue_get_buf_ctx(rq->vq, &len, &ctx); - if (unlikely(!ctx)) { + if (unlikely(!buf)) { pr_debug("%s: rx error: %d buffers out of %d missing\n", dev->name, num_buf, virtio16_to_cpu(vi->vdev, -- cgit v1.2.3 From 589bf32f09852041fbd3b7ce1a9e703f95c230ba Mon Sep 17 00:00:00 2001 From: Tobias Jordan Date: Wed, 6 Dec 2017 15:23:23 +0100 Subject: net: mvmdio: disable/unprepare clocks in EPROBE_DEFER case add appropriate calls to clk_disable_unprepare() by jumping to out_mdio in case orion_mdio_probe() returns -EPROBE_DEFER. Found by Linux Driver Verification project (linuxtesting.org). Fixes: 3d604da1e954 ("net: mvmdio: get and enable optional clock") Signed-off-by: Tobias Jordan Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/ethernet/marvell/mvmdio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c index c9798210fa0f..0495487f7b42 100644 --- a/drivers/net/ethernet/marvell/mvmdio.c +++ b/drivers/net/ethernet/marvell/mvmdio.c @@ -344,7 +344,8 @@ static int orion_mdio_probe(struct platform_device *pdev) dev->regs + MVMDIO_ERR_INT_MASK); } else if (dev->err_interrupt == -EPROBE_DEFER) { - return -EPROBE_DEFER; + ret = -EPROBE_DEFER; + goto out_mdio; } if (pdev->dev.of_node) -- cgit v1.2.3 From e46772a6946a7d1f3fbbc1415871851d6651f1d4 Mon Sep 17 00:00:00 2001 From: Branislav Radocaj Date: Thu, 7 Dec 2017 00:07:38 +0100 Subject: net: ethernet: arc: fix error handling in emac_rockchip_probe If clk_set_rate() fails, we should disable clk before return. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Branislav Radocaj Signed-off-by: David S. Miller --- drivers/net/ethernet/arc/emac_rockchip.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/arc/emac_rockchip.c b/drivers/net/ethernet/arc/emac_rockchip.c index e278e3d96ee0..c6163874e4e7 100644 --- a/drivers/net/ethernet/arc/emac_rockchip.c +++ b/drivers/net/ethernet/arc/emac_rockchip.c @@ -220,9 +220,11 @@ static int emac_rockchip_probe(struct platform_device *pdev) /* RMII TX/RX needs always a rate of 25MHz */ err = clk_set_rate(priv->macclk, 25000000); - if (err) + if (err) { dev_err(dev, "failed to change mac clock rate (%d)\n", err); + goto out_clk_disable_macclk; + } } err = arc_emac_probe(ndev, interface); @@ -232,7 +234,8 @@ static int emac_rockchip_probe(struct platform_device *pdev) } return 0; - +out_clk_disable_macclk: + clk_disable_unprepare(priv->macclk); out_regulator_disable: if (priv->regulator) regulator_disable(priv->regulator); -- cgit v1.2.3 From 3d5fdba1842bdd2eef29364c660558cb4cbb3fe0 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Thu, 7 Dec 2017 01:05:56 +0100 Subject: net: dsa: mv88e6xxx: Fix interrupt masking on removal When removing the interrupt handling code, we should mask the generation of interrupts. The code however unmasked all interrupts. This can then cause a new interrupt. We then get into a deadlock where the interrupt thread is waiting to run, and the code continues, trying to remove the interrupt handler, which means waiting for the thread to complete. On a UP machine this deadlocks. Fix so we really mask interrupts in the hardware. The same error is made in the error path when install the interrupt handling code. Fixes: 3460a5770ce9 ("net: dsa: mv88e6xxx: Mask g1 interrupts and free interrupt") Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6xxx/chip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 8171055fde7a..70004264f60d 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -339,7 +339,7 @@ static void mv88e6xxx_g1_irq_free(struct mv88e6xxx_chip *chip) u16 mask; mv88e6xxx_g1_read(chip, MV88E6XXX_G1_CTL1, &mask); - mask |= GENMASK(chip->g1_irq.nirqs, 0); + mask &= ~GENMASK(chip->g1_irq.nirqs, 0); mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask); free_irq(chip->irq, chip); @@ -395,7 +395,7 @@ static int mv88e6xxx_g1_irq_setup(struct mv88e6xxx_chip *chip) return 0; out_disable: - mask |= GENMASK(chip->g1_irq.nirqs, 0); + mask &= ~GENMASK(chip->g1_irq.nirqs, 0); mv88e6xxx_g1_write(chip, MV88E6XXX_G1_CTL1, mask); out_mapping: -- cgit v1.2.3 From 3126aeec5313565bfa19e2dd8fd7e3c3390514cb Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Thu, 7 Dec 2017 01:05:57 +0100 Subject: net: dsa: mv88e6xxx: Unregister MDIO bus on error path The MDIO busses need to be unregistered before they are freed, otherwise BUG() is called. Add a call to the unregister code if the registration fails, since we can have multiple busses, of which some may correctly register before one fails. This requires moving the code around a little. Fixes: a3c53be55c95 ("net: dsa: mv88e6xxx: Support multiple MDIO busses") Signed-off-by: Andrew Lunn Reviewed-by: Vivien Didelot Signed-off-by: David S. Miller --- drivers/net/dsa/mv88e6xxx/chip.c | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'drivers') diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 70004264f60d..66d33e97cbc5 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -2177,6 +2177,19 @@ static const struct of_device_id mv88e6xxx_mdio_external_match[] = { { }, }; +static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip) + +{ + struct mv88e6xxx_mdio_bus *mdio_bus; + struct mii_bus *bus; + + list_for_each_entry(mdio_bus, &chip->mdios, list) { + bus = mdio_bus->bus; + + mdiobus_unregister(bus); + } +} + static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip, struct device_node *np) { @@ -2201,27 +2214,16 @@ static int mv88e6xxx_mdios_register(struct mv88e6xxx_chip *chip, match = of_match_node(mv88e6xxx_mdio_external_match, child); if (match) { err = mv88e6xxx_mdio_register(chip, child, true); - if (err) + if (err) { + mv88e6xxx_mdios_unregister(chip); return err; + } } } return 0; } -static void mv88e6xxx_mdios_unregister(struct mv88e6xxx_chip *chip) - -{ - struct mv88e6xxx_mdio_bus *mdio_bus; - struct mii_bus *bus; - - list_for_each_entry(mdio_bus, &chip->mdios, list) { - bus = mdio_bus->bus; - - mdiobus_unregister(bus); - } -} - static int mv88e6xxx_get_eeprom_len(struct dsa_switch *ds) { struct mv88e6xxx_chip *chip = ds->priv; -- cgit v1.2.3 From a4abd7a80addb4a9547f7dfc7812566b60ec505c Mon Sep 17 00:00:00 2001 From: Bjørn Mork Date: Wed, 6 Dec 2017 20:21:24 +0100 Subject: usbnet: fix alignment for frames with no ethernet header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The qmi_wwan minidriver support a 'raw-ip' mode where frames are received without any ethernet header. This causes alignment issues because the skbs allocated by usbnet are "IP aligned". Fix by allowing minidrivers to disable the additional alignment offset. This is implemented using a per-device flag, since the same minidriver also supports 'ethernet' mode. Fixes: 32f7adf633b9 ("net: qmi_wwan: support "raw IP" mode") Reported-and-tested-by: Jay Foster Signed-off-by: Bjørn Mork Signed-off-by: David S. Miller --- drivers/net/usb/qmi_wwan.c | 2 ++ drivers/net/usb/usbnet.c | 5 ++++- include/linux/usb/usbnet.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/usb/qmi_wwan.c b/drivers/net/usb/qmi_wwan.c index c750cf7c042b..304ec6555cd8 100644 --- a/drivers/net/usb/qmi_wwan.c +++ b/drivers/net/usb/qmi_wwan.c @@ -261,9 +261,11 @@ static void qmi_wwan_netdev_setup(struct net_device *net) net->hard_header_len = 0; net->addr_len = 0; net->flags = IFF_POINTOPOINT | IFF_NOARP | IFF_MULTICAST; + set_bit(EVENT_NO_IP_ALIGN, &dev->flags); netdev_dbg(net, "mode: raw IP\n"); } else if (!net->header_ops) { /* don't bother if already set */ ether_setup(net); + clear_bit(EVENT_NO_IP_ALIGN, &dev->flags); netdev_dbg(net, "mode: Ethernet\n"); } diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c index 80348b6a8646..d56fe32bf48d 100644 --- a/drivers/net/usb/usbnet.c +++ b/drivers/net/usb/usbnet.c @@ -484,7 +484,10 @@ static int rx_submit (struct usbnet *dev, struct urb *urb, gfp_t flags) return -ENOLINK; } - skb = __netdev_alloc_skb_ip_align(dev->net, size, flags); + if (test_bit(EVENT_NO_IP_ALIGN, &dev->flags)) + skb = __netdev_alloc_skb(dev->net, size, flags); + else + skb = __netdev_alloc_skb_ip_align(dev->net, size, flags); if (!skb) { netif_dbg(dev, rx_err, dev->net, "no rx skb\n"); usbnet_defer_kevent (dev, EVENT_RX_MEMORY); diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index a69877734c4e..e2ec3582e549 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h @@ -82,6 +82,7 @@ struct usbnet { # define EVENT_RX_KILL 10 # define EVENT_LINK_CHANGE 11 # define EVENT_SET_RX_MODE 12 +# define EVENT_NO_IP_ALIGN 13 }; static inline struct usb_driver *driver_of(struct usb_interface *intf) -- cgit v1.2.3 From c7f33023308f3142433b7379718af5f0c2c322a6 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 5 Dec 2017 10:34:03 -0800 Subject: can: mcba_usb: cancel urb on -EPROTO When we unplug the device, we can see both -EPIPE and -EPROTO depending on exact timing and what system we run on. If we continue to resubmit URBs, they will immediately fail, and they can cause stalls, especially on slower CPUs. Fix this by not resubmitting on -EPROTO, as we already do on -EPIPE. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/mcba_usb.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers') diff --git a/drivers/net/can/usb/mcba_usb.c b/drivers/net/can/usb/mcba_usb.c index ef417dcddbf7..8d8c2086424d 100644 --- a/drivers/net/can/usb/mcba_usb.c +++ b/drivers/net/can/usb/mcba_usb.c @@ -593,6 +593,7 @@ static void mcba_usb_read_bulk_callback(struct urb *urb) case -ENOENT: case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return; -- cgit v1.2.3 From bd352e1adfe0d02d3ea7c8e3fb19183dc317e679 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 5 Dec 2017 11:15:47 -0800 Subject: can: ems_usb: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/ems_usb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index b3d02759c226..b00358297424 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -288,6 +288,8 @@ static void ems_usb_read_interrupt_callback(struct urb *urb) case -ECONNRESET: /* unlink */ case -ENOENT: + case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return; -- cgit v1.2.3 From 7a31ced3de06e9878e4f9c3abe8f87d9344d8144 Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 5 Dec 2017 11:15:48 -0800 Subject: can: esd_usb2: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/esd_usb2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index 9fdb0f0bfa06..c6dcf93675c0 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c @@ -393,6 +393,8 @@ static void esd_usb2_read_bulk_callback(struct urb *urb) break; case -ENOENT: + case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return; -- cgit v1.2.3 From 6aa8d5945502baf4687d80de59b7ac865e9e666b Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 5 Dec 2017 11:15:49 -0800 Subject: can: kvaser_usb: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/kvaser_usb.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/can/usb/kvaser_usb.c b/drivers/net/can/usb/kvaser_usb.c index f95945915d20..63587b8e6825 100644 --- a/drivers/net/can/usb/kvaser_usb.c +++ b/drivers/net/can/usb/kvaser_usb.c @@ -1326,6 +1326,8 @@ static void kvaser_usb_read_bulk_callback(struct urb *urb) case 0: break; case -ENOENT: + case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return; default: -- cgit v1.2.3 From 12147edc434c9e4c7c2f5fee2e5519b2e5ac34ce Mon Sep 17 00:00:00 2001 From: Martin Kelly Date: Tue, 5 Dec 2017 11:15:50 -0800 Subject: can: usb_8dev: cancel urb on -EPIPE and -EPROTO In mcba_usb, we have observed that when you unplug the device, the driver will endlessly resubmit failing URBs, which can cause CPU stalls. This issue is fixed in mcba_usb by catching the codes seen on device disconnect (-EPIPE and -EPROTO). This driver also resubmits in the case of -EPIPE and -EPROTO, so fix it in the same way. Signed-off-by: Martin Kelly Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/usb/usb_8dev.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') diff --git a/drivers/net/can/usb/usb_8dev.c b/drivers/net/can/usb/usb_8dev.c index d000cb62d6ae..27861c417c94 100644 --- a/drivers/net/can/usb/usb_8dev.c +++ b/drivers/net/can/usb/usb_8dev.c @@ -524,6 +524,8 @@ static void usb_8dev_read_bulk_callback(struct urb *urb) break; case -ENOENT: + case -EPIPE: + case -EPROTO: case -ESHUTDOWN: return; -- cgit v1.2.3 From 91785de6f94b58c3fb6664609e3682f011bd28d2 Mon Sep 17 00:00:00 2001 From: Stephane Grosjean Date: Thu, 7 Dec 2017 16:13:43 +0100 Subject: can: peak/pcie_fd: fix potential bug in restarting tx queue Don't rely on can_get_echo_skb() return value to wake the network tx queue up: can_get_echo_skb() returns 0 if the echo array slot was not occupied, but also when the DLC of the released echo frame was 0. Signed-off-by: Stephane Grosjean Cc: linux-stable Signed-off-by: Marc Kleine-Budde --- drivers/net/can/peak_canfd/peak_canfd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers') diff --git a/drivers/net/can/peak_canfd/peak_canfd.c b/drivers/net/can/peak_canfd/peak_canfd.c index 85268be0c913..55513411a82e 100644 --- a/drivers/net/can/peak_canfd/peak_canfd.c +++ b/drivers/net/can/peak_canfd/peak_canfd.c @@ -258,21 +258,18 @@ static int pucan_handle_can_rx(struct peak_canfd_priv *priv, /* if this frame is an echo, */ if ((rx_msg_flags & PUCAN_MSG_LOOPED_BACK) && !(rx_msg_flags & PUCAN_MSG_SELF_RECEIVE)) { - int n; unsigned long flags; spin_lock_irqsave(&priv->echo_lock, flags); - n = can_get_echo_skb(priv->ndev, msg->client); + can_get_echo_skb(priv->ndev, msg->client); spin_unlock_irqrestore(&priv->echo_lock, flags); /* count bytes of the echo instead of skb */ stats->tx_bytes += cf_len; stats->tx_packets++; - if (n) { - /* restart tx queue only if a slot is free */ - netif_wake_queue(priv->ndev); - } + /* restart tx queue (a slot is free) */ + netif_wake_queue(priv->ndev); return 0; } -- cgit v1.2.3 From 35e691eddca565f475ba69ff84ca0c9db3b3257b Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 8 Dec 2017 14:13:02 +0100 Subject: of: overlay: Fix out-of-bounds write in init_overlay_changeset() If an overlay has no "__symbols__" node, but it has nodes without "__overlay__" subnodes at the end (e.g. a "__fixups__" node), after filling in all fragments for nodes with "__overlay__" subnodes, "fragment = &fragments[cnt]" will point beyond the end of the allocated array. Hence writing to "fragment->overlay" will overwrite unallocated memory, which may lead to a crash later. Fix this by deferring both the assignment to "fragment" and the offending write afterwards until we know for sure the node has an "__overlay__" subnode, and thus a valid entry in "fragments[]". Fixes: 61b4de4e0b384f4a ("of: overlay: minor restructuring") Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring --- drivers/of/overlay.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index fcce5cdbe229..83bb2edfc65c 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -572,9 +572,10 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, cnt = 0; for_each_child_of_node(tree, node) { - fragment = &fragments[cnt]; - fragment->overlay = of_get_child_by_name(node, "__overlay__"); - if (fragment->overlay) { + overlay_node = of_get_child_by_name(node, "__overlay__"); + if (overlay_node) { + fragment = &fragments[cnt]; + fragment->overlay = overlay_node; fragment->target = find_target_node(node); if (!fragment->target) { of_node_put(fragment->overlay); -- cgit v1.2.3 From 589b754df3f37ca0a1f96fccde7f91c59266f38a Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Fri, 8 Dec 2017 14:13:03 +0100 Subject: of: overlay: Make node skipping in init_overlay_changeset() clearer Make it more clear that nodes without "__overlay__" subnodes are skipped, by reverting the logic and using continue. This also reduces indentation level. Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring --- drivers/of/overlay.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'drivers') diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c index 83bb2edfc65c..3981b7da4fa9 100644 --- a/drivers/of/overlay.c +++ b/drivers/of/overlay.c @@ -573,18 +573,19 @@ static int init_overlay_changeset(struct overlay_changeset *ovcs, cnt = 0; for_each_child_of_node(tree, node) { overlay_node = of_get_child_by_name(node, "__overlay__"); - if (overlay_node) { - fragment = &fragments[cnt]; - fragment->overlay = overlay_node; - fragment->target = find_target_node(node); - if (!fragment->target) { - of_node_put(fragment->overlay); - ret = -EINVAL; - goto err_free_fragments; - } + if (!overlay_node) + continue; - cnt++; + fragment = &fragments[cnt]; + fragment->overlay = overlay_node; + fragment->target = find_target_node(node); + if (!fragment->target) { + of_node_put(fragment->overlay); + ret = -EINVAL; + goto err_free_fragments; } + + cnt++; } /* -- cgit v1.2.3 From b6b5e8a691185606dfffff3198c89e3b4fd9d4f6 Mon Sep 17 00:00:00 2001 From: Claudiu Manoil Date: Thu, 7 Dec 2017 18:44:23 +0200 Subject: gianfar: Disable EEE autoneg by default This controller does not support EEE, but it may connect to a PHY which supports EEE and advertises EEE by default, while its link partner also advertises EEE. If this happens, the PHY enters low power mode when the traffic rate is low and causes packet loss. This patch disables EEE advertisement by default for any PHY that gianfar connects to, to prevent the above unwanted outcome. Signed-off-by: Shaohui Xie Tested-by: Yangbo Lu Signed-off-by: Claudiu Manoil Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/gianfar.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'drivers') diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c index 81a73af0df31..7f837006bb6a 100644 --- a/drivers/net/ethernet/freescale/gianfar.c +++ b/drivers/net/ethernet/freescale/gianfar.c @@ -1792,6 +1792,7 @@ static int init_phy(struct net_device *dev) GFAR_SUPPORTED_GBIT : 0; phy_interface_t interface; struct phy_device *phydev; + struct ethtool_eee edata; priv->oldlink = 0; priv->oldspeed = 0; @@ -1816,6 +1817,10 @@ static int init_phy(struct net_device *dev) /* Add support for flow control, but don't advertise it by default */ phydev->supported |= (SUPPORTED_Pause | SUPPORTED_Asym_Pause); + /* disable EEE autoneg, EEE not supported by eTSEC */ + memset(&edata, 0, sizeof(struct ethtool_eee)); + phy_ethtool_set_eee(phydev, &edata); + return 0; } -- cgit v1.2.3 From d4a7a8893d4cdbc89d79ac4aa704bf8d4b67b368 Mon Sep 17 00:00:00 2001 From: Bert Kenward Date: Thu, 7 Dec 2017 17:18:58 +0000 Subject: sfc: pass valid pointers from efx_enqueue_unwind The bytes_compl and pkts_compl pointers passed to efx_dequeue_buffers cannot be NULL. Add a paranoid warning to check this condition and fix the one case where they were NULL. efx_enqueue_unwind() is called very rarely, during error handling. Without this fix it would fail with a NULL pointer dereference in efx_dequeue_buffer, with efx_enqueue_skb in the call stack. Fixes: e9117e5099ea ("sfc: Firmware-Assisted TSO version 2") Reported-by: Jarod Wilson Signed-off-by: Bert Kenward Tested-by: Jarod Wilson Acked-by: Jarod Wilson Signed-off-by: David S. Miller --- drivers/net/ethernet/sfc/tx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c index 0ea7e16f2e6e..9937a2450e57 100644 --- a/drivers/net/ethernet/sfc/tx.c +++ b/drivers/net/ethernet/sfc/tx.c @@ -77,6 +77,7 @@ static void efx_dequeue_buffer(struct efx_tx_queue *tx_queue, } if (buffer->flags & EFX_TX_BUF_SKB) { + EFX_WARN_ON_PARANOID(!pkts_compl || !bytes_compl); (*pkts_compl)++; (*bytes_compl) += buffer->skb->len; dev_consume_skb_any((struct sk_buff *)buffer->skb); @@ -426,12 +427,14 @@ static int efx_tx_map_data(struct efx_tx_queue *tx_queue, struct sk_buff *skb, static void efx_enqueue_unwind(struct efx_tx_queue *tx_queue) { struct efx_tx_buffer *buffer; + unsigned int bytes_compl = 0; + unsigned int pkts_compl = 0; /* Work backwards until we hit the original insert pointer value */ while (tx_queue->insert_count != tx_queue->write_count) { --tx_queue->insert_count; buffer = __efx_tx_queue_get_insert_buffer(tx_queue); - efx_dequeue_buffer(tx_queue, buffer, NULL, NULL); + efx_dequeue_buffer(tx_queue, buffer, &pkts_compl, &bytes_compl); } } -- cgit v1.2.3 From 2edbdb3159d6f6bd3a9b6e7f789f2b879699a519 Mon Sep 17 00:00:00 2001 From: Calvin Owens Date: Fri, 8 Dec 2017 09:05:26 -0800 Subject: bnxt_en: Fix sources of spurious netpoll warnings After applying 2270bc5da3497945 ("bnxt_en: Fix netpoll handling") and 903649e718f80da2 ("bnxt_en: Improve -ENOMEM logic in NAPI poll loop."), we still see the following WARN fire: ------------[ cut here ]------------ WARNING: CPU: 0 PID: 1875170 at net/core/netpoll.c:165 netpoll_poll_dev+0x15a/0x160 bnxt_poll+0x0/0xd0 exceeded budget in poll Call Trace: [] dump_stack+0x4d/0x70 [] __warn+0xd3/0xf0 [] warn_slowpath_fmt+0x4f/0x60 [] netpoll_poll_dev+0x15a/0x160 [] netpoll_send_skb_on_dev+0x168/0x250 [] netpoll_send_udp+0x2dc/0x440 [] write_ext_msg+0x20e/0x250 [] call_console_drivers.constprop.23+0xa5/0x110 [] console_unlock+0x339/0x5b0 [] vprintk_emit+0x2c8/0x450 [] vprintk_default+0x1f/0x30 [] printk+0x48/0x50 [] edac_raw_mc_handle_error+0x563/0x5c0 [edac_core] [] edac_mc_handle_error+0x42b/0x6e0 [edac_core] [] sbridge_mce_output_error+0x410/0x10d0 [sb_edac] [] sbridge_check_error+0xac/0x130 [sb_edac] [] edac_mc_workq_function+0x3c/0x90 [edac_core] [] process_one_work+0x19b/0x480 [] worker_thread+0x6a/0x520 [] kthread+0xe4/0x100 [] ret_from_fork+0x22/0x40 This happens because we increment rx_pkts on -ENOMEM and -EIO, resulting in rx_pkts > 0. Fix this by only bumping rx_pkts if we were actually given a non-zero budget. Signed-off-by: Calvin Owens Acked-by: Michael Chan Signed-off-by: David S. Miller --- drivers/net/ethernet/broadcom/bnxt/bnxt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c index 28f5e94274ee..61ca4eb7c6fa 100644 --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c @@ -1883,7 +1883,7 @@ static int bnxt_poll_work(struct bnxt *bp, struct bnxt_napi *bnapi, int budget) * here forever if we consistently cannot allocate * buffers. */ - else if (rc == -ENOMEM) + else if (rc == -ENOMEM && budget) rx_pkts++; else if (rc == -EBUSY) /* partial completion */ break; @@ -1969,7 +1969,7 @@ static int bnxt_poll_nitroa0(struct napi_struct *napi, int budget) cpu_to_le32(RX_CMPL_ERRORS_CRC_ERROR); rc = bnxt_rx_pkt(bp, bnapi, &raw_cons, &event); - if (likely(rc == -EIO)) + if (likely(rc == -EIO) && budget) rx_pkts++; else if (rc == -EBUSY) /* partial completion */ break; -- cgit v1.2.3 From 8a7b741e76cd31b6000636f0391e67ba6793ad1c Mon Sep 17 00:00:00 2001 From: Antoine Tenart Date: Fri, 8 Dec 2017 10:24:20 +0100 Subject: net: mvpp2: fix the RSS table entry offset The macro used to access or set an RSS table entry was using an offset of 8, while it should use an offset of 0. This lead to wrongly configure the RSS table, not accessing the right entries. Fixes: 1d7d15d79fb4 ("net: mvpp2: initialize the RSS tables") Signed-off-by: Antoine Tenart Signed-off-by: David S. Miller --- drivers/net/ethernet/marvell/mvpp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/net/ethernet/marvell/mvpp2.c b/drivers/net/ethernet/marvell/mvpp2.c index fed2b2f909fc..634b2f41cc9e 100644 --- a/drivers/net/ethernet/marvell/mvpp2.c +++ b/drivers/net/ethernet/marvell/mvpp2.c @@ -85,7 +85,7 @@ /* RSS Registers */ #define MVPP22_RSS_INDEX 0x1500 -#define MVPP22_RSS_INDEX_TABLE_ENTRY(idx) ((idx) << 8) +#define MVPP22_RSS_INDEX_TABLE_ENTRY(idx) (idx) #define MVPP22_RSS_INDEX_TABLE(idx) ((idx) << 8) #define MVPP22_RSS_INDEX_QUEUE(idx) ((idx) << 16) #define MVPP22_RSS_TABLE_ENTRY 0x1508 -- cgit v1.2.3