[PATCH 8/8] media: vidc: enable building of the video codec driver

2016-08-22 Thread Stanimir Varbanov
This adds changes in v4l2 platform directory to include the vidc driver and show it in kernel config. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/platform/Kconfig

Re: [PATCH 2/8] media: vidc: adding core part and helper functions

2016-08-22 Thread Stanimir Varbanov
Hi Hans, Thanks for the express comments! >> + >> +struct vidc_core { >> +struct list_head list; >> +void __iomem *base; >> +int irq; >> +struct clk *clks[VIDC_CLKS_NUM_MAX]; >> +struct mutex lock; >> +struct hfi_core hfi; >> +struct video_device vdev_dec; >> +st

Re: [PATCH 3/8] media: vidc: decoder: add video decoder files

2016-08-23 Thread Stanimir Varbanov
Hi Hans, Thanks for the valuable comments! >> + >> +static int vdec_g_fmt(struct file *file, void *fh, struct v4l2_format *f) >> +{ >> +struct vidc_inst *inst = to_inst(file); >> +const struct vidc_format *fmt = NULL; >> +struct v4l2_pix_format_mplane *pixmp = &f->fmt.pix_mp; >> + >

Re: [PATCH 2/8] media: vidc: adding core part and helper functions

2016-08-25 Thread Stanimir Varbanov
Hi Bjorn, Thanks for the review and comments! On 08/23/2016 05:50 AM, Bjorn Andersson wrote: > On Mon 22 Aug 06:13 PDT 2016, Stanimir Varbanov wrote: > > Hi Stan, > >> This adds core part of the vidc driver common helper functions >> used by encoder and decoder specif

Re: [PATCH 5/8] media: vidc: add Host Firmware Interface (HFI)

2016-08-26 Thread Stanimir Varbanov
Hi Bjorn, Thanks for the comments! On 08/23/2016 06:25 AM, Bjorn Andersson wrote: > On Mon 22 Aug 06:13 PDT 2016, Stanimir Varbanov wrote: > >> This is the implementation of HFI. It is loaded with the >> responsibility to comunicate with the firmware through an >>

Re: [PATCH 3/8] media: vidc: decoder: add video decoder files

2016-08-29 Thread Stanimir Varbanov
Hi Hans, +static int vdec_start_streaming(struct vb2_queue *q, unsigned int count) +{ + struct vidc_inst *inst = vb2_get_drv_priv(q); + struct hfi_core *hfi = &inst->core->hfi; + struct device *dev = inst->core->dev; + struct hfi_buffer_requirements bufreq;

Re: [PATCH 0/8] Qualcomm video decoder/encoder driver

2016-09-07 Thread Stanimir Varbanov
Hi Hans, On 09/05/2016 05:47 PM, Hans Verkuil wrote: > On 08/22/2016 03:13 PM, Stanimir Varbanov wrote: >> This patchset introduces a basic support for Qualcomm video >> acceleration hardware used for video stream decoding/encoding. >> The video IP can found on various q

[PATCH v2 8/8] media: vidc: enable building of the video codec driver

2016-09-07 Thread Stanimir Varbanov
This adds changes in v4l2 platform directory to include the vidc driver and show it in kernel config. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/media/platform/Kconfig

[PATCH v2 0/8] Qualcomm video decoder/encoder driver

2016-09-07 Thread Stanimir Varbanov
ted) Buffer ioctls: test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK Test input 0: Total: 43, Succeeded: 43, Failed: 0, Warnings: 0 Stanimir Varbanov (8): doc: DT: vidc: binding document for Qualcomm video driver media: vidc: adding core p

[PATCH v2 6/8] media: vidc: add Venus HFI files

2016-09-07 Thread Stanimir Varbanov
Here is the implementation of Venus video accelerator low-level functionality. It contanins code which setup the registers and startup uthe processor, allocate and manipulates with the shared memory used for sending commands and receiving messages. Signed-off-by: Stanimir Varbanov --- drivers

[PATCH v2 4/8] media: vidc: encoder: add video encoder files

2016-09-07 Thread Stanimir Varbanov
This adds encoder part of the driver plus encoder controls. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/vidc/venc.c | 1252 + drivers/media/platform/qcom/vidc/venc.h | 29 + drivers/media/platform/qcom/vidc/venc_ctrls.c | 396

[PATCH v2 7/8] media: vidc: add Makefiles and Kconfig files

2016-09-07 Thread Stanimir Varbanov
Makefile and Kconfig files to build the video codec driver. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/Kconfig | 8 drivers/media/platform/qcom/Makefile | 6 ++ drivers/media/platform/qcom/vidc/Makefile | 15 +++ 3 files changed, 29

[PATCH v2 5/8] media: vidc: add Host Firmware Interface (HFI)

2016-09-07 Thread Stanimir Varbanov
session and core initialisation. - hfi_cmds has packetization operations which preparing packets to be send from host to firmware. - hfi_msgs takes care of messages sent from firmware to the host. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/vidc/hfi.c| 617

[PATCH v2 3/8] media: vidc: decoder: add video decoder files

2016-09-07 Thread Stanimir Varbanov
This consists of video decoder implementation plus decoder controls. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/vidc/vdec.c | 1091 + drivers/media/platform/qcom/vidc/vdec.h | 29 + drivers/media/platform/qcom/vidc/vdec_ctrls.c | 200

[PATCH v2 1/8] doc: DT: vidc: binding document for Qualcomm video driver

2016-09-07 Thread Stanimir Varbanov
Adds binding document for vidc video encoder/decoder driver Cc: Rob Herring Cc: Mark Rutland Cc: devicet...@vger.kernel.org Signed-off-by: Stanimir Varbanov --- .../devicetree/bindings/media/qcom,vidc.txt| 61 ++ 1 file changed, 61 insertions(+) create mode 100644

[PATCH v2 2/8] media: vidc: adding core part and helper functions

2016-09-07 Thread Stanimir Varbanov
count of instances and resolutions it selects the best clock rate for the video core. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/vidc/core.c| 559 ++ drivers/media/platform/qcom/vidc/core.h| 207 ++ drivers/media/platform/qcom

Re: [PATCH v2 1/8] doc: DT: vidc: binding document for Qualcomm video driver

2016-09-26 Thread Stanimir Varbanov
Hi Rob, Thanks for the review! On 09/16/2016 05:19 PM, Rob Herring wrote: > On Wed, Sep 07, 2016 at 02:37:02PM +0300, Stanimir Varbanov wrote: >> Adds binding document for vidc video encoder/decoder driver >> >> Cc: Rob Herring >> Cc: Mark Rutland >> Cc: dev

Re: [PATCH v2 3/8] media: vidc: decoder: add video decoder files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, Thanks for the comments! On 09/19/2016 01:04 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This consists of video decoder implementation plus decoder >> controls. >> >> Signed-off-by: Stanimir Varbanov >> --- >>

Re: [PATCH v2 3/8] media: vidc: decoder: add video decoder files

2016-09-28 Thread Stanimir Varbanov
Hi, On 09/19/2016 01:12 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This consists of video decoder implementation plus decoder >> controls. >> >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media

Re: [PATCH v2 4/8] media: vidc: encoder: add video encoder files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, On 09/19/2016 01:15 PM, Hans Verkuil wrote: > Many of my review comments for the decoder apply to the encoder as well, > so I won't repeat those. Sure, will address them too. > > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> This adds encoder part of

Re: [PATCH v2 7/8] media: vidc: add Makefiles and Kconfig files

2016-09-28 Thread Stanimir Varbanov
Hi Hans, On 09/19/2016 01:35 PM, Hans Verkuil wrote: > On 09/07/2016 01:37 PM, Stanimir Varbanov wrote: >> Makefile and Kconfig files to build the video codec driver. >> >> Signed-off-by: Stanimir Varbanov >> --- >> drivers/media/platform/qcom/Kconfig

Re: [PATCH v3 1/4] venus: firmware: add routine to reset ARM9

2018-07-25 Thread Stanimir Varbanov
Hi Vikash, On 07/04/2018 10:06 PM, Vikash Garodia wrote: > Add routine to reset the ARM9 and brings it out of reset. Also > abstract the Venus CPU state handling with a new function. This > is in preparation to add PIL functionality in venus driver. > > Signed-off-by: Vikash Garodia > --- > dri

Re: [PATCH v3 2/4] venus: firmware: move load firmware in a separate function

2018-07-25 Thread Stanimir Varbanov
Hi Vikash, On 07/04/2018 10:06 PM, Vikash Garodia wrote: > Separate firmware loading part into a new function. I cannot apply this patch in order to test the series. > > Signed-off-by: Vikash Garodia > --- > drivers/media/platform/qcom/venus/core.c | 4 +- > drivers/media/platform/qcom/v

Re: [PATCH v3 3/4] venus: firmware: add no TZ boot and shutdown routine

2018-07-25 Thread Stanimir Varbanov
Hi Vikash, On 07/04/2018 10:06 PM, Vikash Garodia wrote: > Video hardware is mainly comprised of vcodec subsystem and video > control subsystem. Video control has ARM9 which executes the video > firmware instructions whereas vcodec does the video frame processing. > This change adds support to loa

Re: [PATCH v3 1/4] venus: firmware: add routine to reset ARM9

2018-07-25 Thread Stanimir Varbanov
Hi, On 07/04/2018 10:06 PM, Vikash Garodia wrote: > Add routine to reset the ARM9 and brings it out of reset. Also > abstract the Venus CPU state handling with a new function. This > is in preparation to add PIL functionality in venus driver. > > Signed-off-by: Vikash Garodia > --- > drivers/me

[PATCH 4/4] venus: firmware: register separate platform_device for firmware loader

2018-08-22 Thread Stanimir Varbanov
This registers a firmware platform_device and associate it with video-firmware DT subnode. Then calls dma configure to initialize dma and iommu. Signed-off-by: Stanimir Varbanov --- .../devicetree/bindings/media/qcom,venus.txt | 13 +- drivers/media/platform/qcom/venus/core.c

Re: [PATCH 4/4] venus: firmware: register separate platform_device for firmware loader

2018-08-22 Thread Stanimir Varbanov
Hi Vikash, Could you give a try below patch on your environment? You should keep your 1/4 to 3/4 patches and replace your 4/4 with the below one. You have to drop the compatible string in firmware DT subnode (keep only iommus). On 08/22/2018 03:34 PM, Stanimir Varbanov wrote: > This register

Re: [PATCH v3] vb2: check for sane values from queue_setup

2018-09-12 Thread Stanimir Varbanov
Hi, On 09/11/2018 03:46 PM, Johan Fjeldtvedt wrote: > Warn and return error from the reqbufs ioctl when driver sets 0 number > of planes or 0 as plane sizes, as these values don't make any sense. typo: planes -> buffers > Checking this here stops obviously wrong values from propagating > further

Re: [PATCH] media: venus: support VB2_USERPTR IO mode

2018-10-11 Thread Stanimir Varbanov
Hi Alex, On 10/11/2018 09:50 AM, Alexandre Courbot wrote: > Please ignore this patch - I did not notice that a similar one has > been sent before. The difference is that you made it for decoder as well. Do you need userptr for decoder? -- regards, Stan

Re: [PATCH 0/2] Clarify H.264 loop filter offset controls and fix them for coda

2018-11-28 Thread Stanimir Varbanov
Hi Philipp, On 11/28/18 3:01 PM, Philipp Zabel wrote: > Hi, > > the coda driver handles the H.264 loop filter alpha/beta offset controls > incorrectly. When trying to fix them, I noticed that the documentation > is not clear about what these values actually are. > > From the value range of -6 to

Re: [PATCH] media: venus: Support V4L2 QP parameters in Venus encoder

2018-11-29 Thread Stanimir Varbanov
Hi Kelvin, Thanks for the patch! On 11/12/18 12:59 PM, Kelvin Lawson wrote: > Support V4L2 QP parameters in Venus encoder: > * V4L2_CID_MPEG_VIDEO_H264_I_FRAME_QP > * V4L2_CID_MPEG_VIDEO_H264_B_FRAME_QP > * V4L2_CID_MPEG_VIDEO_H264_MIN_QP > * V4L2_CID_MPEG_VIDEO_H264_MAX_QP > > Signed-off-by

Re: [PATCH v2] media: venus: Support V4L2 QP parameters in Venus encoder

2018-12-07 Thread Stanimir Varbanov
; > Signed-off-by: Kelvin Lawson > --- > drivers/media/platform/qcom/venus/venc.c | 19 +++ > 1 file changed, 19 insertions(+) Acked-by: Stanimir Varbanov -- regards, Stan

Re: [PATCH] media: venus: Add support for H265 controls required by gstreamer V4L2 H265 module

2018-12-07 Thread Stanimir Varbanov
Hi Kelvin, Thanks for the patch! On 11/30/18 7:31 PM, Kelvin Lawson wrote: > Add support for V4L2_CID_MPEG_VIDEO_HEVC_PROFILE and > V4L2_CID_MPEG_VIDEO_HEVC_LEVEL controls required by gstreamer V4L2 H265 > encoder module. > > Signed-off-by: Kelvin Lawson > --- > drivers/media/platform/qcom/ven

Re: [PATCH] venus: vdec: fix decoded data size

2018-10-05 Thread Stanimir Varbanov
Hi Vikash, please, increment the version of the patch next time. This one must be v2. On 10/03/2018 02:30 PM, Vikash Garodia wrote: > Exisiting code returns the max of the decoded size and buffer size. s/Exisiting/Existing > It turns out that buffer size is always greater due to hardware > alig

Re: [PATCH v2] venus: vdec: fix decoded data size

2018-10-08 Thread Stanimir Varbanov
0, bytesused ? : opb_sz); > vb->planes[0].data_offset = data_offset; > vb->timestamp = timestamp_us * NSEC_PER_USEC; > vbuf->sequence = inst->sequence_cap++; > Acked-by: Stanimir Varbanov -- regards, Stan

Re: [PATCH] media: venus: handle peak bitrate set property

2018-10-09 Thread Stanimir Varbanov
Hi Malathi, Thanks for the patch! On 10/09/2018 10:51 AM, Malathi Gottam wrote: > Max bitrate property is not supported for venus version 4xx. > Add a version check for the same. I'd like to avoid version checks in this layer of the driver. Could just black-list this property in pkt_session_set_

Re: [PATCH] media: venus: queue initial buffers

2018-10-09 Thread Stanimir Varbanov
Hi Malathi, On 10/09/2018 10:50 AM, Malathi Gottam wrote: > Buffers can be queued to driver before the planes are > set to start streaming. Queue those buffers to firmware > once start streaming is called on both the planes. yes and this is done in venus_helper_m2m_device_run mem2mem operation wh

Re: [PATCH] media: venus: add support for key frame

2018-10-12 Thread Stanimir Varbanov
Hi Alex, On 10/12/2018 08:26 AM, Alexandre Courbot wrote: > On Tue, Oct 9, 2018 at 4:54 PM Malathi Gottam wrote: >> >> When client requests for a keyframe, set the property >> to hardware to generate the sync frame. >> >> Signed-off-by: Malathi Gottam >> --- >> drivers/media/platform/qcom/venus

Re: [PATCH] media: venus: add support for key frame

2018-10-12 Thread Stanimir Varbanov
On 10/12/2018 11:06 AM, Alexandre Courbot wrote: > On Fri, Oct 12, 2018 at 4:37 PM Stanimir Varbanov > wrote: >> >> Hi Alex, >> >> On 10/12/2018 08:26 AM, Alexandre Courbot wrote: >>> On Tue, Oct 9, 2018 at 4:54 PM Malathi Gottam >>> wrote: &g

Re: [PATCH] media: venus: add support for selection rectangles

2018-10-16 Thread Stanimir Varbanov
Hi Malathi, On 10/09/2018 10:53 AM, Malathi Gottam wrote: > Handles target type crop by setting the new active rectangle > to hardware. The new rectangle should be within YUV size. > > Signed-off-by: Malathi Gottam > --- > drivers/media/platform/qcom/venus/venc.c | 19 +-- > 1 f

Re: [PATCH v11 0/5] Venus updates - PIL

2018-10-17 Thread Stanimir Varbanov
e subnode in documentation. >> * renames the flag suggesting the presence of tz and update code >>   accordingly. >> >> Stanimir Varbanov (1): >>   venus: firmware: register separate platform_device for firmware loader >> >> Vikash Garodia (4): >>   venus: firmw

Re: [PATCH v11 1/5] venus: firmware: add routine to reset ARM9

2018-10-17 Thread Stanimir Varbanov
Hi Vikash, On 10/08/2018 04:32 PM, Vikash Garodia wrote: > Add routine to reset the ARM9 and brings it out of reset. Also > abstract the Venus CPU state handling with a new function. This > is in preparation to add PIL functionality in venus driver. > > Signed-off-by: Vikash Garodia > --- > dri

Re: [PATCH v11 0/5] Venus updates - PIL

2018-10-17 Thread Stanimir Varbanov
Hi Vikash, Thanks for the patches and patience! On 10/08/2018 04:32 PM, Vikash Garodia wrote: > This version of the series > * extends the description of firmware subnode in documentation. > * renames the flag suggesting the presence of tz and update code > accordingly. > >

Re: [PATCH v12 0/5] Venus updates - PIL

2018-10-17 Thread Stanimir Varbanov
Vikash, thanks for the patches! On 10/17/2018 04:18 PM, Vikash Garodia wrote: > This version of the series > * updates the tz flag to unsigned > > Stanimir Varbanov (1): > venus: firmware: register separate platform_device for firmware loader > > Vikash Garodia (4): >

Re: [PATCH v11 1/5] venus: firmware: add routine to reset ARM9

2018-10-18 Thread Stanimir Varbanov
Hi Joe, On 10/18/2018 04:42 AM, Joe Perches wrote: > On Wed, 2018-10-17 at 11:49 +0300, Stanimir Varbanov wrote: >> On 10/08/2018 04:32 PM, Vikash Garodia wrote: >>> Add routine to reset the ARM9 and brings it out of reset. Also >>> abstract the Venus CPU state handlin

Re: [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface

2018-10-29 Thread Stanimir Varbanov
Hi Tomasz, On 10/22/2018 05:48 PM, Tomasz Figa wrote: > Due to complexity of the video decoding process, the V4L2 drivers of > stateful decoder hardware require specific sequences of V4L2 API calls > to be followed. These include capability enumeration, initialization, > decoding, seek, pause, dyn

Re: [PATCH] media: venus: dynamic handling of bitrate

2018-11-01 Thread Stanimir Varbanov
Hi Malathi, Thanks for the patch! On 10/31/18 9:42 AM, Malathi Gottam wrote: > Any request for a change in bitrate after both planes > are streamed on is handled by setting the target bitrate > property to hardware. > > Signed-off-by: Malathi Gottam > --- > drivers/media/platform/qcom/venus/ve

Re: [PATCH v2] media: venus: handle peak bitrate set property

2018-11-01 Thread Stanimir Varbanov
rty(struct venus_inst > *inst, u32 ptype, > pkt = (struct hfi_session_set_property_pkt *)packet; > > ret = pkt_session_set_property(pkt, inst, ptype, pdata); > + if (ret == -ENOTSUPP) > + return 0; > if (ret) > return ret; > Acked-by: Stanimir Varbanov -- regards, Stan

Re: [PATCH] media: venus: queue initial buffers

2018-11-01 Thread Stanimir Varbanov
Hi, On 10/20/18 10:50 AM, mgot...@codeaurora.org wrote: > On 2018-10-09 20:47, Stanimir Varbanov wrote: >> Hi Malathi, >> >> On 10/09/2018 10:50 AM, Malathi Gottam wrote: >>> Buffers can be queued to driver before the planes are >>> set to start streaming. Q

Re: [PATCH] media: venus: add support for USERPTR to queue

2018-11-01 Thread Stanimir Varbanov
return ret; > > dst_vq->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; > - dst_vq->io_modes = VB2_MMAP | VB2_DMABUF; > + dst_vq->io_modes = VB2_MMAP | VB2_USERPTR | VB2_DMABUF; > dst_vq->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; > dst_vq->ops = &venc_vb2_ops; > dst_vq->mem_ops = &vb2_dma_sg_memops; > Acked-by: Stanimir Varbanov -- regards, Stan

Re: [PATCH] media: venus: add support for selection rectangles

2018-11-01 Thread Stanimir Varbanov
Hi Malathi, On 11/1/18 3:10 PM, mgot...@codeaurora.org wrote: > On 2018-10-16 15:11, Stanimir Varbanov wrote: >> Hi Malathi, >> >> On 10/09/2018 10:53 AM, Malathi Gottam wrote: >>> Handles target type crop by setting the new active rectangle >>> to hardware.

Re: [PATCH] media: venus: dynamic handling of bitrate

2018-11-01 Thread Stanimir Varbanov
On 11/1/18 4:31 PM, Tomasz Figa wrote: > On Thu, Nov 1, 2018 at 11:23 PM Vikash Garodia > wrote: >> >> On 2018-11-01 19:23, Tomasz Figa wrote: >>> On Thu, Nov 1, 2018 at 10:01 PM wrote: >>>> >>>> On 2018-11-01 17:48, Stanimir Varbanov wrote:

Re: [PATCH v1 5/5] media: venus: update number of bytes used field properly for EOS frames

2018-11-08 Thread Stanimir Varbanov
Hi, On 9/29/18 3:00 PM, Srinu Gorle wrote: > - In video decoder session, update number of bytes used for > yuv buffers appropriately for EOS buffers. > > Signed-off-by: Srinu Gorle > --- > drivers/media/platform/qcom/venus/vdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) NACK,

Re: [PATCH v1 3/5] media: venus: do not destroy video session during queue setup

2018-11-09 Thread Stanimir Varbanov
Hi Srinu, On 9/29/18 3:00 PM, Srinu Gorle wrote: > - open and close video sessions for plane properties is incorrect. Could you rephrase this statement? I really don't understand what you mean. > - add check to ensure, same instance persist from driver open to close. This assumption is wrong. T

Re: [PATCH] media: venus: change the default value of GOP size

2018-11-12 Thread Stanimir Varbanov
> Signed-off-by: Malathi Gottam > --- > drivers/media/platform/qcom/venus/venc_ctrls.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Sounds reasonable : Acked-by: Stanimir Varbanov > diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c > b/drivers/

Re: [PATCH v1 5/5] media: venus: update number of bytes used field properly for EOS frames

2018-11-12 Thread Stanimir Varbanov
Hi Alex, On 11/12/18 10:12 AM, Alexandre Courbot wrote: > Hi Stan, > > On Thu, Nov 8, 2018 at 7:16 PM Stanimir Varbanov > wrote: >> >> Hi, >> >> On 9/29/18 3:00 PM, Srinu Gorle wrote: >>> - In video decoder session, update number of bytes used for &g

Re: [PATCH] media: venus: amend buffer size for bitstream plane

2018-11-12 Thread Stanimir Varbanov
Hi Malathi, Thanks for the patch! On 10/9/18 10:52 AM, Malathi Gottam wrote: > For lower resolutions, incase of encoder, the compressed > frame size is more than half of the corresponding input > YUV. Keep the size as same as YUV considering worst case. > > Signed-off-by: Malathi Gottam > --- >

Re: [PATCH] media: venus: amend buffer size for bitstream plane

2018-11-12 Thread Stanimir Varbanov
Hi Tomasz, On 10/23/2018 05:50 AM, Tomasz Figa wrote: > Hi Malathi, > > On Tue, Oct 9, 2018 at 4:58 PM Malathi Gottam wrote: >> >> For lower resolutions, incase of encoder, the compressed >> frame size is more than half of the corresponding input >> YUV. Keep the size as same as YUV considering

Re: [PATCH v2 1/2] media: docs-rst: Document memory-to-memory video decoder interface

2018-11-12 Thread Stanimir Varbanov
Hi Tomasz, On 10/22/18 5:48 PM, Tomasz Figa wrote: > Due to complexity of the video decoding process, the V4L2 drivers of > stateful decoder hardware require specific sequences of V4L2 API calls > to be followed. These include capability enumeration, initialization, > decoding, seek, pause, dynami

Re: [PATCH] media: venus: amend buffer size for bitstream plane

2018-11-13 Thread Stanimir Varbanov
Hi Malathi, On 11/13/18 9:28 AM, mgot...@codeaurora.org wrote: > On 2018-11-12 18:04, Stanimir Varbanov wrote: >> Hi Tomasz, >> >> On 10/23/2018 05:50 AM, Tomasz Figa wrote: >>> Hi Malathi, >>> >>> On Tue, Oct 9, 2018 at 4:58 PM Malathi Gottam >

Re: [PATCH] media: venus: amend buffer size for bitstream plane

2018-11-13 Thread Stanimir Varbanov
Hi Tomasz, On 11/13/18 11:13 AM, Tomasz Figa wrote: > On Tue, Nov 13, 2018 at 5:12 PM Stanimir Varbanov > wrote: >> >> Hi Malathi, >> >> On 11/13/18 9:28 AM, mgot...@codeaurora.org wrote: >>> On 2018-11-12 18:04, Stanimir Varbanov wrote: >>>>

Re: [PATCH v2] media: venus: dynamic handling of bitrate

2018-11-15 Thread Stanimir Varbanov
a/platform/qcom/venus/venc_ctrls.c | 15 +++ > 1 file changed, 15 insertions(+) Acked-by: Stanimir Varbanov > > diff --git a/drivers/media/platform/qcom/venus/venc_ctrls.c > b/drivers/media/platform/qcom/venus/venc_ctrls.c > index 45910172..f90a34e 100644 >

Re: [PATCH] media: venus: fix reported size of 0-length buffers

2018-11-26 Thread Stanimir Varbanov
Hi Alex, On 11/22/18 10:31 AM, Alexandre Courbot wrote: > On Fri, Nov 16, 2018 at 1:49 AM Nicolas Dufresne wrote: >> >> Le mercredi 14 novembre 2018 à 13:12 +0900, Alexandre Courbot a écrit : >>> On Wed, Nov 14, 2018 at 3:54 AM Nicolas Dufresne >>> wrote: Le mar. 13 nov. 2018 04

Re: [PATCH v2] media: venus: amend buffer size for bitstream plane

2018-11-26 Thread Stanimir Varbanov
> const struct venus_format *fmt; > + __u32 sizeimage; please use u32 for kernel internal variables. Otherwise looks good to me: Acked-by: Stanimir Varbanov > > memset(pfmt[0].reserved, 0, sizeof(pfmt[0].reserved)); > memset(pixmp->reserved, 0, siz

Re: [PATCH] media: venus: fix reported size of 0-length buffers

2018-11-26 Thread Stanimir Varbanov
e to believe that the buffer actually contains useful data. Fix > this by passing the number of bytes reported used by the firmware. > > Signed-off-by: Alexandre Courbot > --- > drivers/media/platform/qcom/venus/vdec.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-

Re: [PATCH v3] media: venus: amend buffer size for bitstream plane

2018-11-26 Thread Stanimir Varbanov
a/platform/qcom/venus/venc.c | 13 + > 1 file changed, 9 insertions(+), 4 deletions(-) Acked-by: Stanimir Varbanov > > diff --git a/drivers/media/platform/qcom/venus/venc.c > b/drivers/media/platform/qcom/venus/venc.c > index ce85962..e43dd3d 100644 > --- a/drivers/m

Re: [PATCH v3] media: venus: amend buffer size for bitstream plane

2018-11-26 Thread Stanimir Varbanov
Hi Hans, On 11/26/18 3:37 PM, Hans Verkuil wrote: > On 11/26/2018 11:12 AM, Malathi Gottam wrote: >> Accept the buffer size requested by client and compare it >> against driver calculated size and set the maximum to >> bitstream plane. >> >> Signed-off-by: Malathi Gottam > > Sorry, this isn't al

Re: [PATCH] arm64: dts: sdm845: add video nodes

2018-11-27 Thread Stanimir Varbanov
Hi Alex, On 11/27/18 9:31 AM, Alexandre Courbot wrote: > On Tue, Nov 20, 2018 at 7:08 PM Malathi Gottam wrote: >> >> This adds video nodes to sdm845 based on the examples >> in the bindings. >> >> Signed-off-by: Malathi Gottam >> --- >> arch/arm64/boot/dts/qcom/sdm845.dtsi | 34

Re: [PATCH v3] media: venus: add support for key frame

2018-11-29 Thread Stanimir Varbanov
Hi Tomasz, On 11/3/18 5:01 AM, Tomasz Figa wrote: > Hi Malathi, > > On Fri, Nov 2, 2018 at 9:58 PM Malathi Gottam wrote: >> >> When client requests for a keyframe, set the property >> to hardware to generate the sync frame. >> >> Signed-off-by: Malathi Gottam >> --- >> drivers/media/platform/q

Re: [PATCH v3] media: venus: add support for key frame

2018-12-07 Thread Stanimir Varbanov
Hi Hans, On 11/29/18 9:40 PM, Tomasz Figa wrote: > On Thu, Nov 29, 2018 at 3:10 AM wrote: >> >> >> Hi Stan, >> >> On 2018-11-29 16:01, Stanimir Varbanov wrote: >>> Hi Tomasz, >>> >>> On 11/3/18 5:01 AM, Tomasz Figa wrote: >>>

Re: [PATCH 1/1] media: venus: core: Set dma maximum segment size

2018-12-07 Thread Stanimir Varbanov
egments. > So, initialize the max segment size properly to weed out this warning. > > Based on a similar patch sent by Sean Paul for mdss: > https://patchwork.kernel.org/patch/10671457/ > > Signed-off-by: Vivek Gautam > --- > drivers/media/platform/qcom/venus/core.c | 8 > 1 file changed, 8 insertions(+) Acked-by: Stanimir Varbanov -- regards, Stan

[PATCH 4/4] venus: helpers: drop setting of timestap invalid flag

2019-01-09 Thread Stanimir Varbanov
The zero timestap is really a valid so not sure why I discarded it. Fix that mistake by drop the code which checks for zero timestamp. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/media/platform

[PATCH 0/4] Venus various fixes

2019-01-09 Thread Stanimir Varbanov
Hello, Here are four various fixes for venus driver. Comments are welcome! regards, Stan Stanimir Varbanov (4): venus: firmware: check fw size against DT memory region size venus: core: corect maximum hardware load for sdm845 venus: core: correct frequency table for sdm845 venus

[PATCH 2/4] venus: core: corect maximum hardware load for sdm845

2019-01-09 Thread Stanimir Varbanov
This corects maximum hardware load constant in per SoC resources for sdm845 aka Venus v4. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/core.c b/drivers/media

[PATCH 1/4] venus: firmware: check fw size against DT memory region size

2019-01-09 Thread Stanimir Varbanov
firmware size is smaller than provided by DT memory region. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/firmware.c | 54 +++- 2 files changed, 31 insertions(+), 24 deletions(-) diff --git a/drivers

[PATCH 3/4] venus: core: correct frequency table for sdm845

2019-01-09 Thread Stanimir Varbanov
This corrects clock frequency table rates to be in sync with video clock controller frequency table. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/qcom/venus

Re: [PATCH] arm64: dts: sdm845: add video nodes

2019-01-16 Thread Stanimir Varbanov
Hi Alex, On 11/27/18 10:24 AM, Stanimir Varbanov wrote: > Hi Alex, > > On 11/27/18 9:31 AM, Alexandre Courbot wrote: >> On Tue, Nov 20, 2018 at 7:08 PM Malathi Gottam >> wrote: >>> >>> This adds video nodes to sdm845 based on the examples >>>

[RFC PATCH] media/doc: Allow sizeimage to be set by v4l clients

2019-01-16 Thread Stanimir Varbanov
This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage field description to allow v4l clients to set bigger image size in case of variable length compressed data. Signed-off-by: Stanimir Varbanov --- Documentation/media/uapi/v4l/pixfmt-v4l2-mplane.rst | 5 - Documentation/media

[PATCH 00/10] Venus stateful Codec API

2019-01-17 Thread Stanimir Varbanov
welcome! regards, Stan [1] https://patchwork.kernel.org/patch/10652199/ [2] https://chromium.googlesource.com/chromium/src/+/lkgr/docs/media/gpu/vdatest_usage.md [3] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1894510.html Stanimir Varbanov (10): venus: hfi_cmds: add more not

[PATCH 02/10] venus: helpers: fix dynamic buffer mode for v4

2019-01-17 Thread Stanimir Varbanov
Venus v4 doesn't send ALLOC_MODE property and thus parser doesn't recognize it as dynamic buffer (for OUTPUT/OUTPUT2 type of buffers) make it obvious in the helper function. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 7 +++ 1 file

[PATCH 06/10] venus: hfi: return an error if session_init is already called

2019-01-17 Thread Stanimir Varbanov
This makes hfi_session_init to return an error when it is already called without a call to hfi_session_deinit. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers

[PATCH 10/10] venus: dec: make decoder compliant with stateful codec API

2019-01-17 Thread Stanimir Varbanov
,out) just flush buffers but doesn't stop the session. The other major change is that now the capture and output queues are completely separated. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h| 20 +- drivers/media/platform/qcom/venus/helpers.c | 23 +- dr

[PATCH 01/10] venus: hfi_cmds: add more not-implemented properties

2019-01-17 Thread Stanimir Varbanov
Add two more not-implemented properties for Venus v4. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_cmds.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi_cmds.c b/drivers/media/platform/qcom/venus/hfi_cmds.c index

[PATCH 08/10] venus: vdec_ctrls: get real minimum buffers for capture

2019-01-17 Thread Stanimir Varbanov
: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec_ctrls.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/vdec_ctrls.c b/drivers/media/platform/qcom/venus/vdec_ctrls.c index f4604b0cd57e..e1da87bf52bc 100644 --- a/drivers/media

[PATCH 03/10] venus: helpers: export few helper functions

2019-01-17 Thread Stanimir Varbanov
Here we export few helper function to use them from decoder to implement more granular control needed for stateful Codec API compliance. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 29 - drivers/media/platform/qcom/venus/helpers.h | 7

[PATCH 07/10] venus: helpers: add three more helper functions

2019-01-17 Thread Stanimir Varbanov
This adds three more helper functions: * for internal buffers reallocation, applicable when we are doing dynamic resolution change * for initial buffer processing of capture and output queue buffer types All of them will be needed for stateful Codec API support. Signed-off-by: Stanimir

[PATCH 05/10] venus: hfi: export few HFI functions

2019-01-17 Thread Stanimir Varbanov
Export few HFI functions to use them from decoder to implement more granular control needed for stateful Codec API compliance. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/platform/qcom/venus

[PATCH 04/10] venus: hfi: add type argument to hfi flush function

2019-01-17 Thread Stanimir Varbanov
Make hfi_flush function to receive an argument for the type of flush. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi.c | 4 ++-- drivers/media/platform/qcom/venus/hfi.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/qcom

[PATCH 09/10] venus: vdec: allow bigger sizeimage set by clients

2019-01-17 Thread Stanimir Varbanov
In most of the cases the client will know better what could be the maximum size for compressed data buffers. Change the driver to permit the user to set bigger size for the compressed buffer but make reasonable sanitation. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus

[PATCH] venus: enc: fix enum_frameintervals

2019-01-18 Thread Stanimir Varbanov
off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 32cff294582f..8c939af0a1f6 100644 --- a/drivers

Re: [PATCH 1/4] venus: firmware: check fw size against DT memory region size

2019-01-18 Thread Stanimir Varbanov
Hi Alex, If you have time please review this patch, I'd like to send a pull request for this series. On 1/9/19 10:46 AM, Stanimir Varbanov wrote: > By historical reasons we defined firmware memory size to be 6MB even > that the firmware size for all supported Venus versions is 5M

Re: [RFC PATCH] media/doc: Allow sizeimage to be set by v4l clients

2019-01-21 Thread Stanimir Varbanov
Hi Hans, On 1/18/19 11:13 AM, Hans Verkuil wrote: > On 1/16/19 1:37 PM, Stanimir Varbanov wrote: >> This changes v4l2_pix_format and v4l2_plane_pix_format sizeimage >> field description to allow v4l clients to set bigger image size >> in case of variable length compressed d

[PATCH v2] venus: enc: fix enum_frameintervals

2019-01-22 Thread Stanimir Varbanov
off-by: Stanimir Varbanov --- v2: replace DIV_ROUND_UP with do_div and make roundup manually drivers/media/platform/qcom/venus/venc.c | 19 ++- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom

Re: [PATCH 1/4] venus: firmware: check fw size against DT memory region size

2019-01-23 Thread Stanimir Varbanov
Hi Alex, Thanks for the review! On 1/23/19 8:10 AM, Alexandre Courbot wrote: > Sorry for the delayed review! >_< > > On Wed, Jan 9, 2019 at 5:46 PM Stanimir Varbanov > wrote: >> >> By historical reasons we defined firmware memory size to be 6MB even >> that

[PATCH v2 4/4] venus: helpers: drop setting of timestamp invalid flag

2019-01-23 Thread Stanimir Varbanov
The zero timestamp is really valid so fix that mistake by dropping the code which checks for zero timestamp. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 3 --- 1 file changed, 3 deletions

[PATCH v2 0/4] Venus various fixes

2019-01-23 Thread Stanimir Varbanov
Hello, Changes in v2: * in 1/4 make 'mapped' const - Alex * fixed typos in 2/4 and 4/4 - Alex * added Reviewed-by and Tested-by tags regards, Stan Stanimir Varbanov (4): venus: firmware: check fw size against DT memory region size venus: core: correct maximum hardware load

[PATCH v2 1/4] venus: firmware: check fw size against DT memory region size

2019-01-23 Thread Stanimir Varbanov
firmware size is smaller than provided by DT memory region. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/platform/qcom/venus/firmware.c | 53 +++- 2 files changed

[PATCH v2 2/4] venus: core: correct maximum hardware load for sdm845

2019-01-23 Thread Stanimir Varbanov
This correct maximum hardware load constant in per SoC resources for sdm845 aka Venus v4. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 3/4] venus: core: correct frequency table for sdm845

2019-01-23 Thread Stanimir Varbanov
This corrects clock frequency table rates to be in sync with video clock controller frequency table. Reviewed-by: Alexandre Courbot Tested-by: Alexandre Courbot Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.c | 10 ++ 1 file changed, 6 insertions(+), 4

[GIT PULL for v5.1] Venus various fixes

2019-01-23 Thread Stanimir Varbanov
/media_tree.git venus-fixes for you to fetch changes up to 3394284578dc961bbf14cb9393b6ccf2dd733d03: venus: helpers: drop setting of timestamp invalid flag (2019-01-23 12:25:02 +0200) Stanimir Varbanov (4): venus: firmware

  1   2   3   4   5   >