summaryrefslogtreecommitdiff
path: root/drivers/media/platform/chips-media/coda-jpeg.c
AgeCommit message (Collapse)AuthorFilesLines
2023-11-16media: platform: chips-media: Move Coda to separate folderSebastian Fricke1-1547/+0
Prepare the folder structure for a second Chips&Media driver. Move the Coda driver to a sub-directory. Signed-off-by: Sebastian Fricke <sebastian.fricke@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-10-24media: coda: jpeg: Add check for kmallocJiasheng Jiang1-2/+8
As kmalloc can return NULL pointer, it should be better to check the return value and return error, same as coda_jpeg_decode_header. Fixes: 96f6f62c4656 ("media: coda: jpeg: add CODA960 JPEG encoder support") Signed-off-by: Jiasheng Jiang <jiasheng@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
2022-09-24media: coda: jpeg: drop coda9_jpeg_dec_huff_setup() return valuePhilipp Zabel1-10/+3
coda9_jpeg_dec_huff_setup() never returns anything but 0. Drop return value and superfluous error handling at the call site. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-24media: coda: jpeg: improve header parse error messagePhilipp Zabel1-4/+2
If JPEG header parsing fails, output a single message instead of two messages that say the same thing. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-24media: coda: jpeg: set buffer error flag when header parsing failsPhilipp Zabel1-1/+1
If decoding fails because the output buffer does not contain a valid header, set the error flag on the returned capture buffer. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-24media: coda: add JPEG downscale supportPhilipp Zabel1-1/+9
The JPEG decoder in the CODA960 VPU can downscale images while decoding, with a factor of 1/2, 1/4, or 1/8. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-04-24media: coda: consolidate job_finish calls on decoder prepare_run failurePhilipp Zabel1-5/+1
If the decoder prepare_run callback returns an error, the hardware is never started and v4l2_m2m_job_finish() is called immediately, currently in every error path. Remove the duplicated job_finish calls from the error paths and reuse the v4l2_m2m_job_finish() at the end of coda_pic_run_work instead. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
2022-03-18media: platform: rename coda/ to chips-media/Mauro Carvalho Chehab1-0/+1546
As the end goal is to have platform drivers split by vendor, rename coda/ to chips-media/. Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>