Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 and BAYER configurations of CSI

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Guennadi Liakhovetski
Date: Wednesday, December 1, 2010 - 11:54 am

On Sun, 28 Nov 2010, Alberto Panizzo wrote:


s/were/where/


Ok, so far mx3_camera has only been used with mt9m022 and mt9t031 sensors 
(from what I can see in the mainline), both are bayer. It can also work 
with monochrome cameras, and that would be the IPU_PIX_FMT_GENERIC case 
too. So, I wouldn't mind removing the rest, and only adding / fixing what 
you've now tested / implemented with your omnivision sensor. If anyone is 
using mx3_camera with any other formats and thinks, that they work - 
please, shout now. I'll probably also post a separate mail with this 
warning.


make it even simpler: s/xlate->host_fmt/fmt/g


Are these two really 1 sample per pixel?


Let's just do the following:

s32 soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf)
{
	switch (mf->packing) {
	case SOC_MBUS_PACKING_NONE:
	case SOC_MBUS_PACKING_EXTEND16:
		return 1;
	case SOC_MBUS_PACKING_2X8_PADHI:
	case SOC_MBUS_PACKING_2X8_PADLO:
		return 2;
	}
	return -EINVAL;
}
EXPORT_SYMBOL(soc_mbus_samples_per_pixel);

in drivers/media/video/soc_mediabus.c, agree?


		width *= soc_mbus_samples_per_pixel(fmt);
		BUG_ON((int)width < 0);


If after all the above changed your set up still works, we're cool!;)

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH 1/3] soc_camera: Add the ability to bind regula ..., Guennadi Liakhovetski, (Sun Nov 28, 12:05 pm)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Tue Nov 30, 7:31 am)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Wed Dec 1, 11:54 am)
Re: [PATCH 3/3] V4L2: Add a v4l2-subdev (soc-camera) drive ..., Guennadi Liakhovetski, (Wed Dec 1, 4:32 pm)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Sat Dec 18, 9:24 am)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Thu Dec 30, 12:38 pm)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Mon Jan 3, 9:24 am)
Re: [PATCH 2/3] mx3_camera: Support correctly the YUV222 a ..., Guennadi Liakhovetski, (Mon Jan 3, 12:37 pm)