mirror of
https://github.com/tbsdtv/media_build.git
synced 2025-07-23 04:13:02 +02:00
Merge branch 'master' of git://linuxtv.org/media_build
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
# by summing the patches needed to backport to all kernel
|
||||
# versions higher or equal to the desired one. For example,
|
||||
# if this file has:
|
||||
# [3.255.255]
|
||||
# [3.255.1023]
|
||||
# add patch_for_upstream.patch
|
||||
# [2.6.38]
|
||||
# add patch_for_2.6.38.patch
|
||||
@@ -20,120 +20,126 @@
|
||||
# use linux/patches_for_kernel.pl <version>
|
||||
|
||||
# All supported versions need those patches
|
||||
[9.255.255]
|
||||
[9.255.1023]
|
||||
add api_version.patch
|
||||
add pr_fmt.patch
|
||||
add debug.patch
|
||||
add drx39xxj.patch
|
||||
add ccs.patch
|
||||
|
||||
[5.10.255]
|
||||
[5.11.1023]
|
||||
add v5.11_isa.patch
|
||||
|
||||
[5.10.1023]
|
||||
add v5.10_vb2_dma_buf_map.patch
|
||||
|
||||
[5.9.255]
|
||||
[5.9.1023]
|
||||
add v5.9_tasklet.patch
|
||||
add v5.9_netup_unidvb_devm_revert.patch
|
||||
|
||||
[5.7.255]
|
||||
[5.7.1023]
|
||||
add v5.7_mmap_read_lock.patch
|
||||
add v5.7_vm_map_ram.patch
|
||||
add v5.7_pin_user_pages.patch
|
||||
add v5.7_define_seq_attribute.patch
|
||||
|
||||
[5.6.255]
|
||||
[5.6.1023]
|
||||
add v5.6_pin_user_pages.patch
|
||||
add v5.6_const_fb_ops.patch
|
||||
add v5.6_pm_runtime_get_if_active.patch
|
||||
|
||||
[5.5.255]
|
||||
[5.5.1023]
|
||||
add v5.5_alsa_pcm_api_updates.patch
|
||||
add v5.5_memtype_h.patch
|
||||
add v5.5_dev_printk_h.patch
|
||||
add v5.5_vb2_kmap.patch
|
||||
|
||||
[5.4.255]
|
||||
[5.4.1023]
|
||||
add v5.4_revert_spi_transfer.patch
|
||||
add v5.4_async.patch
|
||||
|
||||
[5.1.255]
|
||||
[5.1.1023]
|
||||
add v5.1_vm_map_pages.patch
|
||||
add v5.1_devm_i2c_new_dummy_device.patch
|
||||
|
||||
[5.0.255]
|
||||
[5.0.1023]
|
||||
add v5.0_ipu3-cio2.patch
|
||||
add v5.0_time32.patch
|
||||
add v5.0_gpio.patch
|
||||
|
||||
[4.20.255]
|
||||
[4.20.1023]
|
||||
add v4.20_access_ok.patch
|
||||
|
||||
[4.18.255]
|
||||
[4.18.1023]
|
||||
add v4.18_fwnode_args_args.patch
|
||||
add v4.18_ccs_bitops.patch
|
||||
add v4.18_vb2_map_atomic.patch
|
||||
|
||||
[4.17.255]
|
||||
[4.17.1023]
|
||||
add v4.17_i2c_check_num_msgs.patch
|
||||
|
||||
[4.15.255]
|
||||
[4.16.1023]
|
||||
add v4.16_poll_requested_events.patch
|
||||
|
||||
[4.15.1023]
|
||||
add v4.15_pmdown_time.patch
|
||||
add v4.15_async.patch
|
||||
|
||||
[4.14.255]
|
||||
[4.14.1023]
|
||||
add v4.14_saa7146_timer_cast.patch
|
||||
add v4.14_module_param_call.patch
|
||||
add v4.14_fwnode_handle_get.patch
|
||||
delete v4.13_fwnode_graph_get_port_parent.patch
|
||||
|
||||
[4.13.255]
|
||||
[4.13.1023]
|
||||
add v4.13_remove_nospec_h.patch
|
||||
add v4.13_drmP.patch
|
||||
add v4.13_fwnode_graph_get_port_parent.patch
|
||||
|
||||
[4.12.255]
|
||||
[4.12.1023]
|
||||
add v4.12_revert_solo6x10_copykerneluser.patch
|
||||
|
||||
[4.11.255]
|
||||
[4.11.1023]
|
||||
add v4.11_drop_drm_file.patch
|
||||
add v4.11_vb2_kmap.patch
|
||||
add v4.11_pwc.patch
|
||||
|
||||
[4.10.255]
|
||||
[4.10.1023]
|
||||
add v4.10_sched_signal.patch
|
||||
add v4.10_fault_page.patch
|
||||
add v4.10_refcount.patch
|
||||
|
||||
[4.9.255]
|
||||
[4.9.1023]
|
||||
add v4.9_mm_address.patch
|
||||
add v4.9_dvb_net_max_mtu.patch
|
||||
add v4.9_probe_new.patch
|
||||
|
||||
[4.8.255]
|
||||
[4.8.1023]
|
||||
add v4.8_user_pages_flag.patch
|
||||
add v4.8_em28xx_bitfield.patch
|
||||
add v4.8_dma_map_resource.patch
|
||||
add v4.8_drm_crtc.patch
|
||||
|
||||
[4.7.255]
|
||||
[4.7.1023]
|
||||
add v4.7_dma_attrs.patch
|
||||
add v4.7_pci_alloc_irq_vectors.patch
|
||||
add v4.7_copy_to_user_warning.patch
|
||||
add v4.7_objtool_warning.patch
|
||||
|
||||
[4.6.255]
|
||||
[4.6.1023]
|
||||
add v4.6_i2c_mux.patch
|
||||
|
||||
[4.5.255]
|
||||
[4.5.1023]
|
||||
add v4.5_gpiochip_data_pointer.patch
|
||||
add v4.5_get_user_pages.patch
|
||||
add v4.5_uvc_super_plus.patch
|
||||
add v4.5_copy_to_user_warning.patch
|
||||
add v4.5_vb2_cpu_access.patch
|
||||
|
||||
[4.4.255]
|
||||
[4.4.1023]
|
||||
add v4.4_gpio_chip_parent.patch
|
||||
add v4.4_user_pages_flag.patch
|
||||
|
||||
[4.3.255]
|
||||
[4.3.1023]
|
||||
delete v4.4_user_pages_flag.patch
|
||||
add v4.3_bt87x_const_fix.patch
|
||||
|
13
backports/v4.16_poll_requested_events.patch
Normal file
13
backports/v4.16_poll_requested_events.patch
Normal file
@@ -0,0 +1,13 @@
|
||||
diff --git a/drivers/media/v4l2-core/v4l2-dev.c b/drivers/media/v4l2-core/v4l2-dev.c
|
||||
index 7d0edf3530be..fa846dd0434c 100644
|
||||
--- a/drivers/media/v4l2-core/v4l2-dev.c
|
||||
+++ b/drivers/media/v4l2-core/v4l2-dev.c
|
||||
@@ -352,7 +352,7 @@ static __poll_t v4l2_poll(struct file *filp, struct poll_table_struct *poll)
|
||||
if (vdev->dev_debug & V4L2_DEV_DEBUG_POLL)
|
||||
dprintk("%s: poll: %08x %08x\n",
|
||||
video_device_node_name(vdev), res,
|
||||
- poll_requested_events(poll));
|
||||
+ (u32)poll_requested_events(poll));
|
||||
return res;
|
||||
}
|
||||
|
@@ -1,24 +1,3 @@
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-memops.c b/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
index 6c029616977f..6e9e05153f4e 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
@@ -40,6 +40,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
|
||||
unsigned long first, last;
|
||||
unsigned long nr;
|
||||
struct frame_vector *vec;
|
||||
+ unsigned int flags = FOLL_FORCE | FOLL_WRITE;
|
||||
|
||||
first = start >> PAGE_SHIFT;
|
||||
last = (start + length - 1) >> PAGE_SHIFT;
|
||||
@@ -47,7 +48,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
|
||||
vec = frame_vector_create(nr);
|
||||
if (!vec)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
- ret = get_vaddr_frames(start & PAGE_MASK, nr, true, true, vec);
|
||||
+ ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec);
|
||||
if (ret < 0)
|
||||
goto out_destroy;
|
||||
/* We accept only complete set of PFNs */
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
index 16f4a9364747..b823e0a768d8 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
|
@@ -1,24 +1,3 @@
|
||||
diff --git a/drivers/media/common/videobuf2/videobuf2-memops.c b/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
index 6e9e05153f4e..6c029616977f 100644
|
||||
--- a/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
+++ b/drivers/media/common/videobuf2/videobuf2-memops.c
|
||||
@@ -40,7 +40,6 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
|
||||
unsigned long first, last;
|
||||
unsigned long nr;
|
||||
struct frame_vector *vec;
|
||||
- unsigned int flags = FOLL_FORCE | FOLL_WRITE;
|
||||
|
||||
first = start >> PAGE_SHIFT;
|
||||
last = (start + length - 1) >> PAGE_SHIFT;
|
||||
@@ -48,7 +47,7 @@ struct frame_vector *vb2_create_framevec(unsigned long start,
|
||||
vec = frame_vector_create(nr);
|
||||
if (!vec)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
- ret = get_vaddr_frames(start & PAGE_MASK, nr, flags, vec);
|
||||
+ ret = get_vaddr_frames(start & PAGE_MASK, nr, true, true, vec);
|
||||
if (ret < 0)
|
||||
goto out_destroy;
|
||||
/* We accept only complete set of PFNs */
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
index 5f8883031c9c..8cd24ffe9484 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
|
@@ -1,5 +1,17 @@
|
||||
diff --git a/drivers/media/i2c/imx334.c b/drivers/media/i2c/imx334.c
|
||||
index 07e31bc2ef18..6de124d50207 100644
|
||||
--- a/drivers/media/i2c/imx334.c
|
||||
+++ b/drivers/media/i2c/imx334.c
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <linux/i2c.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
+#include <linux/gpio/consumer.h>
|
||||
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-fwnode.h>
|
||||
diff --git a/drivers/media/i2c/ov5648.c b/drivers/media/i2c/ov5648.c
|
||||
index 609aa67b54ce..e8eaca154dac 100644
|
||||
index dfe38ab8224d..bdfb5693ed36 100644
|
||||
--- a/drivers/media/i2c/ov5648.c
|
||||
+++ b/drivers/media/i2c/ov5648.c
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -11,7 +23,7 @@ index 609aa67b54ce..e8eaca154dac 100644
|
||||
#include <media/v4l2-ctrls.h>
|
||||
#include <media/v4l2-device.h>
|
||||
diff --git a/drivers/media/i2c/ov8865.c b/drivers/media/i2c/ov8865.c
|
||||
index fda5a55979aa..5fcdbd03a74f 100644
|
||||
index 36a60fbc211d..db0bdd9ba2a4 100644
|
||||
--- a/drivers/media/i2c/ov8865.c
|
||||
+++ b/drivers/media/i2c/ov8865.c
|
||||
@@ -13,6 +13,7 @@
|
||||
|
49
backports/v5.11_isa.patch
Normal file
49
backports/v5.11_isa.patch
Normal file
@@ -0,0 +1,49 @@
|
||||
diff --git a/drivers/media/radio/radio-isa.c b/drivers/media/radio/radio-isa.c
|
||||
index c591c0851fa2..527f4c3b0ca4 100644
|
||||
--- a/drivers/media/radio/radio-isa.c
|
||||
+++ b/drivers/media/radio/radio-isa.c
|
||||
@@ -337,11 +337,13 @@ int radio_isa_probe(struct device *pdev, unsigned int dev)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(radio_isa_probe);
|
||||
|
||||
-void radio_isa_remove(struct device *pdev, unsigned int dev)
|
||||
+int radio_isa_remove(struct device *pdev, unsigned int dev)
|
||||
{
|
||||
struct radio_isa_card *isa = dev_get_drvdata(pdev);
|
||||
|
||||
radio_isa_common_remove(isa, isa->drv->region_size);
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(radio_isa_remove);
|
||||
|
||||
diff --git a/drivers/media/radio/radio-isa.h b/drivers/media/radio/radio-isa.h
|
||||
index c9159958203e..2f0736edfda8 100644
|
||||
--- a/drivers/media/radio/radio-isa.h
|
||||
+++ b/drivers/media/radio/radio-isa.h
|
||||
@@ -91,7 +91,7 @@ struct radio_isa_driver {
|
||||
|
||||
int radio_isa_match(struct device *pdev, unsigned int dev);
|
||||
int radio_isa_probe(struct device *pdev, unsigned int dev);
|
||||
-void radio_isa_remove(struct device *pdev, unsigned int dev);
|
||||
+int radio_isa_remove(struct device *pdev, unsigned int dev);
|
||||
#ifdef CONFIG_PNP
|
||||
int radio_isa_pnp_probe(struct pnp_dev *dev,
|
||||
const struct pnp_device_id *dev_id);
|
||||
diff --git a/drivers/media/radio/radio-sf16fmr2.c b/drivers/media/radio/radio-sf16fmr2.c
|
||||
index d0dde55b7930..0388894cfe41 100644
|
||||
--- a/drivers/media/radio/radio-sf16fmr2.c
|
||||
+++ b/drivers/media/radio/radio-sf16fmr2.c
|
||||
@@ -293,9 +293,11 @@ static void fmr2_remove(struct fmr2 *fmr2)
|
||||
kfree(fmr2);
|
||||
}
|
||||
|
||||
-static void fmr2_isa_remove(struct device *pdev, unsigned int ndev)
|
||||
+static int fmr2_isa_remove(struct device *pdev, unsigned int ndev)
|
||||
{
|
||||
fmr2_remove(dev_get_drvdata(pdev));
|
||||
+
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
static void fmr2_pnp_remove(struct pnp_dev *pdev)
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/drivers/media/i2c/tda1997x.c b/drivers/media/i2c/tda1997x.c
|
||||
index 5e68182001ec..31af163c9d5f 100644
|
||||
index 89bb7e6dc7a4..8060437ba2df 100644
|
||||
--- a/drivers/media/i2c/tda1997x.c
|
||||
+++ b/drivers/media/i2c/tda1997x.c
|
||||
@@ -2691,8 +2691,7 @@ static int tda1997x_probe(struct i2c_client *client,
|
||||
@@ -17,6 +17,6 @@ index 5e68182001ec..31af163c9d5f 100644
|
||||
v4l2_ctrl_handler_free(&state->hdl);
|
||||
regulator_bulk_disable(TDA1997X_NUM_SUPPLIES, state->supplies);
|
||||
+ i2c_unregister_device(state->client_cec);
|
||||
cancel_delayed_work(&state->delayed_work_enable_hpd);
|
||||
cancel_delayed_work_sync(&state->delayed_work_enable_hpd);
|
||||
mutex_destroy(&state->page_lock);
|
||||
mutex_destroy(&state->lock);
|
||||
|
@@ -1,5 +1,27 @@
|
||||
diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vector.c
|
||||
index 381158320a90..98f86fb44690 100644
|
||||
--- a/drivers/media/common/videobuf2/frame_vector.c
|
||||
+++ b/drivers/media/common/videobuf2/frame_vector.c
|
||||
@@ -57,7 +57,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
|
||||
goto out_unlocked;
|
||||
}
|
||||
|
||||
- mmap_read_lock(mm);
|
||||
+ down_read(&mm->mmap_sem);
|
||||
vec->got_ref = false;
|
||||
vec->is_pfns = true;
|
||||
ret = 0;
|
||||
@@ -83,7 +83,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
|
||||
break;
|
||||
} while (ret < nr_frames);
|
||||
out:
|
||||
- mmap_read_unlock(mm);
|
||||
+ up_read(&mm->mmap_sem);
|
||||
out_unlocked:
|
||||
if (!ret)
|
||||
ret = -EFAULT;
|
||||
diff --git a/drivers/media/pci/bt8xx/bt878.c b/drivers/media/pci/bt8xx/bt878.c
|
||||
index 79ba15a9385a..53af26ad1dfb 100644
|
||||
index 78dd35c9b65d..6dc9af18ff2e 100644
|
||||
--- a/drivers/media/pci/bt8xx/bt878.c
|
||||
+++ b/drivers/media/pci/bt8xx/bt878.c
|
||||
@@ -13,9 +13,9 @@
|
||||
@@ -14,7 +36,7 @@ index 79ba15a9385a..53af26ad1dfb 100644
|
||||
#include <linux/types.h>
|
||||
#include <linux/interrupt.h>
|
||||
diff --git a/drivers/media/pci/bt8xx/btcx-risc.c b/drivers/media/pci/bt8xx/btcx-risc.c
|
||||
index 51257980f539..1139a5ad2418 100644
|
||||
index b3179038b900..b20b1ba71cb0 100644
|
||||
--- a/drivers/media/pci/bt8xx/btcx-risc.c
|
||||
+++ b/drivers/media/pci/bt8xx/btcx-risc.c
|
||||
@@ -17,8 +17,8 @@
|
||||
@@ -28,7 +50,7 @@ index 51257980f539..1139a5ad2418 100644
|
||||
#include "btcx-risc.h"
|
||||
|
||||
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
|
||||
index 4af72826b006..fc8708047be8 100644
|
||||
index 32fa4a7fe76f..f7650cb8361e 100644
|
||||
--- a/drivers/media/pci/bt8xx/bttv-risc.c
|
||||
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
|
||||
@@ -20,8 +20,8 @@
|
||||
@@ -42,7 +64,7 @@ index 4af72826b006..fc8708047be8 100644
|
||||
|
||||
#include "bttvp.h"
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-core.c b/drivers/media/v4l2-core/videobuf-core.c
|
||||
index 5c91fc3e65b5..2686f03b322e 100644
|
||||
index 606a271bdd2d..8a64019170ea 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-core.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-core.c
|
||||
@@ -535,7 +535,7 @@ int videobuf_qbuf(struct videobuf_queue *q, struct v4l2_buffer *b)
|
||||
@@ -86,7 +108,7 @@ index 52312ce2ba05..aeb2f497c683 100644
|
||||
return ret;
|
||||
}
|
||||
diff --git a/drivers/media/v4l2-core/videobuf-dma-sg.c b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
index 46ff19df9f53..13b65ed9e74c 100644
|
||||
index 8dd0562de287..1160b42fcf9c 100644
|
||||
--- a/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
+++ b/drivers/media/v4l2-core/videobuf-dma-sg.c
|
||||
@@ -21,13 +21,13 @@
|
||||
@@ -116,7 +138,7 @@ index 46ff19df9f53..13b65ed9e74c 100644
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -533,7 +533,7 @@ static int __videobuf_iolock(struct videobuf_queue *q,
|
||||
@@ -535,7 +535,7 @@ static int __videobuf_iolock(struct videobuf_queue *q,
|
||||
} else {
|
||||
/* NOTE: HACK: videobuf_iolock on V4L2_MEMORY_MMAP
|
||||
buffers can only be called from videobuf_qbuf
|
||||
@@ -144,7 +166,7 @@ index 9b2443720ab0..f8bd5a369560 100644
|
||||
#include <media/videobuf-vmalloc.h>
|
||||
|
||||
diff --git a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
|
||||
index 4fb9bfdd2f4c..76d6e52b7af9 100644
|
||||
index f13af2329f48..525df72e313a 100644
|
||||
--- a/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
|
||||
+++ b/drivers/staging/media/atomisp/pci/hmm/hmm_bo.c
|
||||
@@ -896,9 +896,9 @@ static int alloc_user_pages(struct hmm_buffer_object *bo,
|
||||
|
@@ -1,3 +1,34 @@
|
||||
diff --git a/drivers/media/common/videobuf2/frame_vector.c b/drivers/media/common/videobuf2/frame_vector.c
|
||||
index 381158320a90..b7986c7f58ea 100644
|
||||
--- a/drivers/media/common/videobuf2/frame_vector.c
|
||||
+++ b/drivers/media/common/videobuf2/frame_vector.c
|
||||
@@ -48,7 +48,7 @@ int get_vaddr_frames(unsigned long start, unsigned int nr_frames,
|
||||
|
||||
start = untagged_addr(start);
|
||||
|
||||
- ret = pin_user_pages_fast(start, nr_frames,
|
||||
+ ret = get_user_pages_fast(start, nr_frames,
|
||||
FOLL_FORCE | FOLL_WRITE | FOLL_LONGTERM,
|
||||
(struct page **)(vec->ptrs));
|
||||
if (ret > 0) {
|
||||
@@ -105,6 +105,7 @@ EXPORT_SYMBOL(get_vaddr_frames);
|
||||
void put_vaddr_frames(struct frame_vector *vec)
|
||||
{
|
||||
struct page **pages;
|
||||
+ int i;
|
||||
|
||||
if (!vec->got_ref)
|
||||
goto out;
|
||||
@@ -117,7 +118,8 @@ void put_vaddr_frames(struct frame_vector *vec)
|
||||
if (WARN_ON(IS_ERR(pages)))
|
||||
goto out;
|
||||
|
||||
- unpin_user_pages(pages, vec->nr_frames);
|
||||
+ for (i = 0; i < vec->nr_frames; i++)
|
||||
+ put_page(pages[i]);
|
||||
vec->got_ref = false;
|
||||
out:
|
||||
vec->nr_frames = 0;
|
||||
diff --git a/drivers/media/pci/ivtv/ivtv-udma.c b/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
index 0d8372cc364a..5f8883031c9c 100644
|
||||
--- a/drivers/media/pci/ivtv/ivtv-udma.c
|
||||
|
@@ -79,7 +79,7 @@ todaytar:
|
||||
-rm -f $(PWD)/$(TODAY_TAR).bz2
|
||||
tar cf $(PWD)/$(TODAY_TAR) -C $(DIR) $(TARFILES)
|
||||
git --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\x22]),,g; s,([\x25\x5c]),\1\1,g' >git_log
|
||||
perl -e 'while (<>) { $$a=$$1 if (m/^\s*VERSION\s*=\s*(\d+)/); $$b=$$1 if (m/^\s*PATCHLEVEL\s*=\s*(\d+)/); $$c=$$1 if (m/^\s*SUBLEVEL\s*=\s*(\d+)/); } printf "#define V4L2_VERSION %d\n", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h
|
||||
perl -e 'while (<>) { $$a=$$1 if (m/^\s*VERSION\s*=\s*(\d+)/); $$b=$$1 if (m/^\s*PATCHLEVEL\s*=\s*(\d+)/); $$c=$$1 if (m/^\s*SUBLEVEL\s*=\s*(\d+)/); } printf "#define V4L2_VERSION %d\n", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h
|
||||
tar rvf $(PWD)/$(TODAY_TAR) git_log kernel_version.h
|
||||
|
||||
for i in $(TARDIR); do \
|
||||
@@ -98,7 +98,7 @@ tar:
|
||||
-rm -f $(PWD)/linux-media.tar.bz2
|
||||
tar cf $(PWD)/linux-media.tar -C $(DIR) $(TARFILES)
|
||||
git --git-dir $(DIR)/.git log --pretty=oneline -n3 |sed -r 's,([\x22]),,g; s,([\x25\x5c]),\1\1,g' >git_log
|
||||
perl -e 'while (<>) { $$a=$$1 if (m/^\s*VERSION\s*=\s*(\d+)/); $$b=$$1 if (m/^\s*PATCHLEVEL\s*=\s*(\d+)/); $$c=$$1 if (m/^\s*SUBLEVEL\s*=\s*(\d+)/); } printf "#define V4L2_VERSION %d\n", ((($$a) << 16) + (($$b) << 8) + ($$c))' $(DIR)/Makefile > kernel_version.h
|
||||
perl -e 'while (<>) { $$a=$$1 if (m/^\s*VERSION\s*=\s*(\d+)/); $$b=$$1 if (m/^\s*PATCHLEVEL\s*=\s*(\d+)/); $$c=$$1 if (m/^\s*SUBLEVEL\s*=\s*(\d+)/); } printf "#define V4L2_VERSION %d\n", ((($$a) << 16) + (($$b) << 8) + ($$c > 255 ? 255 : $$c))' $(DIR)/Makefile > kernel_version.h
|
||||
tar rvf $(PWD)/linux-media.tar git_log kernel_version.h
|
||||
for i in $(TARDIR); do \
|
||||
if [ "`echo $$i|grep Documentation`" = "" ]; then \
|
||||
|
@@ -22,6 +22,7 @@ sub kernel_version($) {
|
||||
$sublevel = 0;
|
||||
}
|
||||
$sublevel = 0 if ($sublevel == "");
|
||||
$sublevel = 255 if ($sublevel > 255);
|
||||
return ($version * 65536 + $patchlevel * 256 + $sublevel);
|
||||
}
|
||||
|
||||
|
@@ -291,7 +291,7 @@ sub sync_kernel_version()
|
||||
$c=$1 if (m/^\s*SUBLEVEL\s*=\s*(\d+)/);
|
||||
}
|
||||
close IN;
|
||||
$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c));
|
||||
$source_v4l_version = ((($a) << 16) + (($b) << 8) + ($c > 255 ? 255 : $c));
|
||||
|
||||
if (open IN, "kernel_version.h") {
|
||||
while (<IN>) {
|
||||
|
12
v4l/Makefile
12
v4l/Makefile
@@ -91,15 +91,9 @@ ifneq ($(filter $(no-makefile-media-targets), $(MAKECMDGOALS)),)
|
||||
endif
|
||||
endif
|
||||
|
||||
makefile-mm := 1
|
||||
ifeq ("$(wildcard $(obj)/frame_vector.c)","")
|
||||
makefile-mm := 0
|
||||
endif
|
||||
|
||||
# If version not yet detected, we can't create/have these files yet
|
||||
ifeq ($(KERNELRELEASE),)
|
||||
makefile-media := 0
|
||||
makefile-mm := 0
|
||||
dot-config := 0
|
||||
endif
|
||||
|
||||
@@ -111,9 +105,6 @@ ifeq ($(makefile-media),1)
|
||||
-include $(obj)/Makefile.media
|
||||
-include $(obj)/Makefile.sound
|
||||
endif
|
||||
ifeq ($(makefile-mm),1)
|
||||
-include $(obj)/Makefile.mm
|
||||
endif
|
||||
|
||||
-include $(obj)/.kconfig.dep
|
||||
|
||||
@@ -214,9 +205,6 @@ all:: default
|
||||
#################################################
|
||||
# installation invocation rules
|
||||
INSTALLDEPS :=
|
||||
ifeq ($(makefile-mm),1)
|
||||
INSTALLDEPS += mm-install
|
||||
endif
|
||||
ifeq ($(makefile-media),1)
|
||||
INSTALLDEPS += media-install
|
||||
endif
|
||||
|
@@ -1,28 +0,0 @@
|
||||
# From mm/Makefile
|
||||
|
||||
kver_ge = $(shell \
|
||||
echo test | awk ' \
|
||||
{if ($(VERSION) < $(1)) {print 0} else { \
|
||||
if ($(VERSION) > $(1)) {print 1} else { \
|
||||
if ($(PATCHLEVEL) < $(2)) {print 0} else { \
|
||||
if ($(PATCHLEVEL) >= $(2)) {print 1} \
|
||||
}}}}' \
|
||||
)
|
||||
|
||||
ifeq ($(call kver_ge,4,3),0)
|
||||
# Kernels prior to 4.3 require always frame_vector.ko
|
||||
CONFIG_FRAME_VECTOR := m
|
||||
endif
|
||||
|
||||
obj-$(CONFIG_FRAME_VECTOR) += frame_vector.o
|
||||
|
||||
KDIRA := /lib/modules/$(KERNELRELEASE)/kernel
|
||||
|
||||
mm-install install-mm::
|
||||
@dir="mm"; \
|
||||
files='frame_vector.ko'; \
|
||||
if [ -f $$files ]; then \
|
||||
echo -e "\nInstalling $(KDIRA)/$$dir files:"; \
|
||||
install -d $(KDIRA)/$$dir; \
|
||||
for i in $$files;do if [ -e $$i ]; then echo -n "$$i "; \
|
||||
install -m 644 -c $$i $(KDIRA)/$$dir; fi; done; echo; fi
|
53
v4l/compat.h
53
v4l/compat.h
@@ -1740,50 +1740,17 @@ static inline void kvfree(const void *addr)
|
||||
|
||||
#ifdef NEED_FRAME_VECTOR
|
||||
#include <linux/mm.h>
|
||||
#include <linux/err.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
/* Container for pinned pfns / pages */
|
||||
struct frame_vector {
|
||||
unsigned int nr_allocated; /* Number of frames we have space for */
|
||||
unsigned int nr_frames; /* Number of frames stored in ptrs array */
|
||||
bool got_ref; /* Did we pin pages by getting page ref? */
|
||||
bool is_pfns; /* Does array contain pages or pfns? */
|
||||
void *ptrs[0]; /* Array of pinned pfns / pages. Use
|
||||
* pfns_vector_pages() or pfns_vector_pfns()
|
||||
* for access */
|
||||
};
|
||||
|
||||
struct frame_vector *frame_vector_create(unsigned int nr_frames);
|
||||
void frame_vector_destroy(struct frame_vector *vec);
|
||||
int get_vaddr_frames(unsigned long start, unsigned int nr_pfns,
|
||||
bool write, bool force, struct frame_vector *vec);
|
||||
void put_vaddr_frames(struct frame_vector *vec);
|
||||
int frame_vector_to_pages(struct frame_vector *vec);
|
||||
void frame_vector_to_pfns(struct frame_vector *vec);
|
||||
|
||||
static inline unsigned int frame_vector_count(struct frame_vector *vec)
|
||||
{
|
||||
return vec->nr_frames;
|
||||
}
|
||||
|
||||
static inline struct page **frame_vector_pages(struct frame_vector *vec)
|
||||
{
|
||||
if (vec->is_pfns) {
|
||||
int err = frame_vector_to_pages(vec);
|
||||
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
}
|
||||
return (struct page **)(vec->ptrs);
|
||||
}
|
||||
|
||||
static inline unsigned long *frame_vector_pfns(struct frame_vector *vec)
|
||||
{
|
||||
if (!vec->is_pfns)
|
||||
frame_vector_to_pfns(vec);
|
||||
return (unsigned long *)(vec->ptrs);
|
||||
}
|
||||
#define frame_vector media_frame_vector
|
||||
#define frame_vector_create media_frame_vector_create
|
||||
#define frame_vector_destroy media_frame_vector_destroy
|
||||
#define get_vaddr_frames media_get_vaddr_frames
|
||||
#define put_vaddr_frames media_put_vaddr_frames
|
||||
#define frame_vector_to_pages media_frame_vector_to_pages
|
||||
#define frame_vector_to_pfns media_frame_vector_to_pfns
|
||||
#define frame_vector_count media_frame_vector_count
|
||||
#define frame_vector_pages media_frame_vector_pages
|
||||
#define frame_vector_pfns media_frame_vector_pfns
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -652,7 +652,7 @@ sub check_other_dependencies()
|
||||
check_files_for_func("of_property_read_u64_array", "NEED_PROP_READ_U64_ARRAY", "include/linux/of.h");
|
||||
check_files_for_func("module_pnp_driver", "NEED_MODULE_PNP_DRIVER", "include/linux/pnp.h");
|
||||
check_files_for_func("eth_zero_addr", "NEED_ETH_ZERO_ADDR", "include/linux/etherdevice.h");
|
||||
check_files_for_func("frame_vector_create", "NEED_FRAME_VECTOR", "include/linux/mm.h");
|
||||
check_files_for_func("frame_vector_create", "NEED_FRAME_VECTOR", "include/media/frame_vector.h");
|
||||
check_files_for_func("kvfree", "NEED_KVFREE", "include/linux/mm.h");
|
||||
check_files_for_func("kvzalloc", "NEED_KVZALLOC", "include/linux/mm.h");
|
||||
check_files_for_func("ktime_before", "NEED_KTIME_BEFORE", "include/linux/ktime.h");
|
||||
|
@@ -24,6 +24,7 @@ VIDEO_OMAP3
|
||||
[5.1]
|
||||
# Needs devm_clk_get_optional
|
||||
VIDEO_IMX274
|
||||
VIDEO_IMX258
|
||||
|
||||
[4.19.0]
|
||||
# Needs devm_regmap_init_sccb
|
||||
@@ -35,6 +36,8 @@ VIDEO_MAX9286
|
||||
[4.18.0]
|
||||
# Needs proc_create_single
|
||||
VIDEO_ZORAN
|
||||
# Needs dev_pm_domain_attach_by_id
|
||||
VIDEO_IMX8_JPEG
|
||||
|
||||
[4.17.0]
|
||||
# Needs devm_nvmem_register
|
||||
@@ -70,7 +73,6 @@ VIDEO_OV8856
|
||||
VIDEO_OV8865
|
||||
VIDEO_OV5648
|
||||
VIDEO_OV7251
|
||||
VIDEO_IMX258
|
||||
VIDEO_DW9807
|
||||
VIDEO_AK7375
|
||||
VIDEO_DW9807_VCM
|
||||
@@ -81,12 +83,14 @@ VIDEO_IMX355
|
||||
VIDEO_IMX290
|
||||
VIDEO_IMX214
|
||||
VIDEO_IMX219
|
||||
VIDEO_IMX334
|
||||
VIDEO_ST_MIPID02
|
||||
I2C_BCM2048
|
||||
VIDEO_HI556
|
||||
VIDEO_DW9714
|
||||
VIDEO_DW9768
|
||||
VIDEO_RDACM20
|
||||
VIDEO_RDACM21
|
||||
VIDEO_OV02A10
|
||||
|
||||
[4.9.0]
|
||||
|
Reference in New Issue
Block a user