Hi Mauro, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [also build test WARNING on v4.16 next-20180406] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Mauro-Carvalho-Chehab/Make-all-media-drivers-build-with-COMPILE_TEST/20180406-163048 base: git://linuxtv.org/media_tree.git master config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=sparc64 All warnings (new ones prefixed by >>): In file included from arch/sparc/include/asm/page.h:8:0, from arch/sparc/include/asm/thread_info_64.h:27, from arch/sparc/include/asm/thread_info.h:5, from include/linux/thread_info.h:38, from include/asm-generic/preempt.h:5, from ./arch/sparc/include/generated/asm/preempt.h:1, from include/linux/preempt.h:81, from include/linux/spinlock.h:51, from include/linux/seqlock.h:36, from include/linux/time.h:6, from include/linux/stat.h:19, from include/linux/module.h:10, from drivers/media/platform/omap/omap_vout.c:33: drivers/media/platform/omap/omap_vout.c: In function 'omap_vout_get_userptr': drivers/media/platform/omap/omap_vout.c:209:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] *physp = virt_to_phys((void *)virtp); ^ arch/sparc/include/asm/page_64.h:147:36: note: in definition of macro '__pa' #define __pa(x) ((unsigned long)(x) - PAGE_OFFSET) ^ >> drivers/media/platform/omap/omap_vout.c:209:12: note: in expansion of macro 'virt_to_phys' *physp = virt_to_phys((void *)virtp); ^~~~~~~~~~~~ vim +/virt_to_phys +209 drivers/media/platform/omap/omap_vout.c 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 @33 #include <linux/module.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 34 #include <linux/vmalloc.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 35 #include <linux/sched.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 36 #include <linux/types.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 37 #include <linux/platform_device.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 38 #include <linux/irq.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 39 #include <linux/videodev2.h> 72915e85 drivers/media/video/omap/omap_vout.c Amber Jain 2011-07-07 40 #include <linux/dma-mapping.h> d1ee8878 drivers/media/video/omap/omap_vout.c Gary Thomas 2011-12-01 41 #include <linux/slab.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 42 dd880dd4 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-05-27 43 #include <media/videobuf-dma-contig.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 44 #include <media/v4l2-device.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 45 #include <media/v4l2-ioctl.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 46 6a1c9f6d drivers/media/platform/omap/omap_vout.c Tomi Valkeinen 2012-10-08 47 #include <video/omapvrfb.h> 781a1622 drivers/media/platform/omap/omap_vout.c Peter Ujfalusi 2016-05-27 48 #include <video/omapfb_dss.h> 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 49 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 50 #include "omap_voutlib.h" 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 51 #include "omap_voutdef.h" 445e258f drivers/media/video/omap/omap_vout.c Archit Taneja 2011-06-14 52 #include "omap_vout_vrfb.h" 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 53 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 54 MODULE_AUTHOR("Texas Instruments"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 55 MODULE_DESCRIPTION("OMAP Video for Linux Video out driver"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 56 MODULE_LICENSE("GPL"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 57 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 58 /* Driver Configuration macros */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 59 #define VOUT_NAME "omap_vout" 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 60 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 61 enum omap_vout_channels { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 62 OMAP_VIDEO1, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 63 OMAP_VIDEO2, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 64 }; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 65 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 66 static struct videobuf_queue_ops video_vbq_ops; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 67 /* Variables configurable through module params*/ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 68 static u32 video1_numbuffers = 3; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 69 static u32 video2_numbuffers = 3; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 70 static u32 video1_bufsize = OMAP_VOUT_MAX_BUF_SIZE; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 71 static u32 video2_bufsize = OMAP_VOUT_MAX_BUF_SIZE; 90ab5ee9 drivers/media/video/omap/omap_vout.c Rusty Russell 2012-01-13 72 static bool vid1_static_vrfb_alloc; 90ab5ee9 drivers/media/video/omap/omap_vout.c Rusty Russell 2012-01-13 73 static bool vid2_static_vrfb_alloc; 90ab5ee9 drivers/media/video/omap/omap_vout.c Rusty Russell 2012-01-13 74 static bool debug; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 75 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 76 /* Module parameters */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 77 module_param(video1_numbuffers, uint, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 78 MODULE_PARM_DESC(video1_numbuffers, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 79 "Number of buffers to be allocated at init time for Video1 device."); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 80 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 81 module_param(video2_numbuffers, uint, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 82 MODULE_PARM_DESC(video2_numbuffers, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 83 "Number of buffers to be allocated at init time for Video2 device."); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 84 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 85 module_param(video1_bufsize, uint, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 86 MODULE_PARM_DESC(video1_bufsize, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 87 "Size of the buffer to be allocated for video1 device"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 88 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 89 module_param(video2_bufsize, uint, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 90 MODULE_PARM_DESC(video2_bufsize, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 91 "Size of the buffer to be allocated for video2 device"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 92 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 93 module_param(vid1_static_vrfb_alloc, bool, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 94 MODULE_PARM_DESC(vid1_static_vrfb_alloc, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 95 "Static allocation of the VRFB buffer for video1 device"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 96 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 97 module_param(vid2_static_vrfb_alloc, bool, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 98 MODULE_PARM_DESC(vid2_static_vrfb_alloc, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 99 "Static allocation of the VRFB buffer for video2 device"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 100 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 101 module_param(debug, bool, S_IRUGO); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 102 MODULE_PARM_DESC(debug, "Debug level (0-1)"); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 103 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 104 /* list of image formats supported by OMAP2 video pipelines */ 0d334f7f drivers/media/video/omap/omap_vout.c Jesper Juhl 2011-07-09 105 static const struct v4l2_fmtdesc omap_formats[] = { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 106 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 107 /* Note: V4L2 defines RGB565 as: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 108 * 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 109 * Byte 0 Byte 1 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 110 * g2 g1 g0 r4 r3 r2 r1 r0 b4 b3 b2 b1 b0 g5 g4 g3 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 111 * 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 112 * We interpret RGB565 as: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 113 * 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 114 * Byte 0 Byte 1 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 115 * g2 g1 g0 b4 b3 b2 b1 b0 r4 r3 r2 r1 r0 g5 g4 g3 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 116 */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 117 .description = "RGB565, le", 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 118 .pixelformat = V4L2_PIX_FMT_RGB565, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 119 }, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 120 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 121 /* Note: V4L2 defines RGB32 as: RGB-8-8-8-8 we use 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 122 * this for RGB24 unpack mode, the last 8 bits are ignored 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 123 * */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 124 .description = "RGB32, le", 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 125 .pixelformat = V4L2_PIX_FMT_RGB32, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 126 }, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 127 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 128 /* Note: V4L2 defines RGB24 as: RGB-8-8-8 we use 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 129 * this for RGB24 packed mode 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 130 * 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 131 */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 132 .description = "RGB24, le", 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 133 .pixelformat = V4L2_PIX_FMT_RGB24, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 134 }, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 135 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 136 .description = "YUYV (YUV 4:2:2), packed", 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 137 .pixelformat = V4L2_PIX_FMT_YUYV, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 138 }, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 139 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 140 .description = "UYVY, packed", 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 141 .pixelformat = V4L2_PIX_FMT_UYVY, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 142 }, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 143 }; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 144 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 145 #define NUM_OUTPUT_FORMATS (ARRAY_SIZE(omap_formats)) 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 146 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 147 /* 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 148 * Try format 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 149 */ 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 150 static int omap_vout_try_format(struct v4l2_pix_format *pix) 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 151 { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 152 int ifmt, bpp = 0; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 153 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 154 pix->height = clamp(pix->height, (u32)VID_MIN_HEIGHT, 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 155 (u32)VID_MAX_HEIGHT); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 156 pix->width = clamp(pix->width, (u32)VID_MIN_WIDTH, (u32)VID_MAX_WIDTH); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 157 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 158 for (ifmt = 0; ifmt < NUM_OUTPUT_FORMATS; ifmt++) { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 159 if (pix->pixelformat == omap_formats[ifmt].pixelformat) 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 160 break; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 161 } 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 162 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 163 if (ifmt == NUM_OUTPUT_FORMATS) 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 164 ifmt = 0; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 165 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 166 pix->pixelformat = omap_formats[ifmt].pixelformat; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 167 pix->field = V4L2_FIELD_ANY; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 168 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 169 switch (pix->pixelformat) { 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 170 case V4L2_PIX_FMT_YUYV: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 171 case V4L2_PIX_FMT_UYVY: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 172 default: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 173 pix->colorspace = V4L2_COLORSPACE_JPEG; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 174 bpp = YUYV_BPP; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 175 break; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 176 case V4L2_PIX_FMT_RGB565: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 177 case V4L2_PIX_FMT_RGB565X: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 178 pix->colorspace = V4L2_COLORSPACE_SRGB; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 179 bpp = RGB565_BPP; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 180 break; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 181 case V4L2_PIX_FMT_RGB24: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 182 pix->colorspace = V4L2_COLORSPACE_SRGB; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 183 bpp = RGB24_BPP; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 184 break; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 185 case V4L2_PIX_FMT_RGB32: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 186 case V4L2_PIX_FMT_BGR32: 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 187 pix->colorspace = V4L2_COLORSPACE_SRGB; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 188 bpp = RGB32_BPP; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 189 break; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 190 } 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 191 pix->bytesperline = pix->width * bpp; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 192 pix->sizeimage = pix->bytesperline * pix->height; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 193 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 194 return bpp; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 195 } 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 196 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 197 /* 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 198 * omap_vout_get_userptr: Convert user space virtual address to physical 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 199 * address. 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 200 */ 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 201 static int omap_vout_get_userptr(struct videobuf_buffer *vb, u32 virtp, 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 202 u32 *physp) 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 203 { 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 204 struct frame_vector *vec; 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 205 int ret; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 206 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 207 /* For kernel direct-mapped memory, take the easy way */ 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 208 if (virtp >= PAGE_OFFSET) { 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 @209 *physp = virt_to_phys((void *)virtp); 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 210 return 0; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 211 } 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 212 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 213 vec = frame_vector_create(1); 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 214 if (!vec) 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 215 return -ENOMEM; 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 216 7f23b350 drivers/media/platform/omap/omap_vout.c Lorenzo Stoakes 2016-10-13 217 ret = get_vaddr_frames(virtp, 1, FOLL_WRITE, vec); 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 218 if (ret != 1) { 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 219 frame_vector_destroy(vec); 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 220 return -EINVAL; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 221 } 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 222 *physp = __pfn_to_phys(frame_vector_pfns(vec)[0]); 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 223 vb->priv = vec; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 224 8a677b6e drivers/media/platform/omap/omap_vout.c Jan Kara 2015-07-13 225 return 0; 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 226 } 5c7ab634 drivers/media/video/omap/omap_vout.c Vaibhav Hiremath 2010-04-11 227 :::::: The code at line 209 was first introduced by commit :::::: 8a677b6eddfc3127ea36a710838ecd20502b1cb9 [media] media: omap_vout: Convert omap_vout_uservirt_to_phys() to use get_vaddr_pfns() :::::: TO: Jan Kara <jack@xxxxxxx> :::::: CC: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip