From: Sakari Ailus <sakari.ailus@iki.fi>
To: Todor Tomov <todor.tomov@linaro.org>
Cc: mchehab@kernel.org, hans.verkuil@cisco.com,
javier@osg.samsung.com, s.nawrocki@samsung.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v3 10/23] media: camss: Add VFE files
Date: Fri, 4 Aug 2017 21:02:54 +0300 [thread overview]
Message-ID: <33862f4e-6608-32d9-1759-4bd371d5b1dc@iki.fi> (raw)
In-Reply-To: <cdcdda84-56d3-56cb-969c-a7dde7c6a12b@linaro.org>
Hi Todor,
Todor Tomov wrote:
> Hi Sakari,
>
> Thank you for the review.
>
> On 20.07.2017 17:59, Sakari Ailus wrote:
>> Hi Todor,
>>
>> On Mon, Jul 17, 2017 at 01:33:36PM +0300, Todor Tomov wrote:
>>> These files control the VFE module. The VFE has different input interfaces.
>>> The PIX input interface feeds the input data to an image processing pipeline.
>>> Three RDI input interfaces bypass the image processing pipeline. The VFE also
>>> contains the AXI bus interface which writes the output data to memory.
>>>
>>> RDI interfaces are supported in this version. PIX interface is not supported.
>>>
>>> Signed-off-by: Todor Tomov <todor.tomov@linaro.org>
>>> ---
>>> drivers/media/platform/qcom/camss-8x16/camss-vfe.c | 1913 ++++++++++++++++++++
>>> drivers/media/platform/qcom/camss-8x16/camss-vfe.h | 114 ++
>>> 2 files changed, 2027 insertions(+)
>>> create mode 100644 drivers/media/platform/qcom/camss-8x16/camss-vfe.c
>>> create mode 100644 drivers/media/platform/qcom/camss-8x16/camss-vfe.h
>>>
>>> diff --git a/drivers/media/platform/qcom/camss-8x16/camss-vfe.c b/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
>>> new file mode 100644
>>> index 0000000..b6dd29b
>>> --- /dev/null
>>> +++ b/drivers/media/platform/qcom/camss-8x16/camss-vfe.c
>>> @@ -0,0 +1,1913 @@
>
> <snip>
>
>>> +
>>> +static void vfe_set_qos(struct vfe_device *vfe)
>>> +{
>>> + u32 val = 0xaaa5aaa5;
>>> + u32 val7 = 0x0001aaa5;
>>
>> Huh. What do these mean? :-)
>
> For these here I don't have understanding of the values. I'll remove the magic
> values here and on all the other places but these here I'll just move to a #define.
If there is no documentation then I guess that's all that can be done.
Works for me.
>
>>
>>> +
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_0);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_1);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_2);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_3);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_4);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_5);
>>> + writel_relaxed(val, vfe->base + VFE_0_BUS_BDG_QOS_CFG_6);
>>> + writel_relaxed(val7, vfe->base + VFE_0_BUS_BDG_QOS_CFG_7);
>>> +}
>>> +
>
> <snip>
>
>>> +
>>> +/*
>>> + * msm_vfe_subdev_init - Initialize VFE device structure and resources
>>> + * @vfe: VFE device
>>> + * @res: VFE module resources table
>>> + *
>>> + * Return 0 on success or a negative error code otherwise
>>> + */
>>> +int msm_vfe_subdev_init(struct vfe_device *vfe, const struct resources *res)
>>> +{
>>> + struct device *dev = to_device(vfe);
>>> + struct platform_device *pdev = to_platform_device(dev);
>>> + struct resource *r;
>>> + struct camss *camss = to_camss(vfe);
>>> +
>>> + int i;
>>> + int ret;
>>> +
>>> + mutex_init(&vfe->power_lock);
>>> + vfe->power_count = 0;
>>> +
>>> + mutex_init(&vfe->stream_lock);
>>> + vfe->stream_count = 0;
>>> +
>>> + spin_lock_init(&vfe->output_lock);
>>> +
>>> + vfe->id = 0;
>>> + vfe->reg_update = 0;
>>> +
>>> + for (i = VFE_LINE_RDI0; i <= VFE_LINE_RDI2; i++) {
>>> + vfe->line[i].video_out.type =
>>> + V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
>>> + vfe->line[i].video_out.camss = camss;
>>> + vfe->line[i].id = i;
>>> + }
>>> +
>>> + /* Memory */
>>> +
>>> + r = platform_get_resource_byname(pdev, IORESOURCE_MEM, res->reg[0]);
>>> + vfe->base = devm_ioremap_resource(dev, r);
>>> + if (IS_ERR(vfe->base)) {
>>> + dev_err(dev, "could not map memory\n");
>>
>> mutex_destroy() for bothof the mutexes. The same below.
>>
>> Do you have a corresponding cleanup function?
>
> msm_vfe_subdev_init() and msm_vfe_register_entities() are called on probe().
> msm_vfe_unregister_entities() is called on remove() - this is the cleanup
> function. The mutexes are destroyed there. Is there something else that you
> are concerned about?
What about the error case above then? Where are the mutexes destroyed?
--
Sakari Ailus
sakari.ailus@iki.fi
next prev parent reply other threads:[~2017-08-05 8:02 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-17 10:33 [PATCH v3 00/23] Qualcomm 8x16 Camera Subsystem driver Todor Tomov
2017-07-17 10:33 ` [PATCH v3 01/23] [media] media: Make parameter of media_entity_remote_pad() const Todor Tomov
2017-07-17 10:33 ` [PATCH v3 02/23] [media] v4l2-mediabus: Add helper functions Todor Tomov
2017-07-17 10:33 ` [PATCH v3 03/23] v4l: Add packed Bayer raw12 pixel formats Todor Tomov
2017-07-17 10:33 ` [PATCH v3 04/23] dt-bindings: media: Binding document for Qualcomm Camera subsystem driver Todor Tomov
2017-07-20 10:13 ` Sakari Ailus
2017-08-04 11:54 ` Todor Tomov
2017-08-05 8:19 ` Sakari Ailus
2017-07-20 10:15 ` Sakari Ailus
2017-07-24 16:43 ` Rob Herring
2017-07-17 10:33 ` [PATCH v3 05/23] MAINTAINERS: Add " Todor Tomov
2017-07-17 10:33 ` [PATCH v3 06/23] doc: media/v4l-drivers: Add Qualcomm Camera Subsystem driver document Todor Tomov
2017-07-17 10:33 ` [PATCH v3 07/23] media: camss: Add CSIPHY files Todor Tomov
2017-07-20 12:15 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 08/23] media: camss: Add CSID files Todor Tomov
2017-07-20 14:13 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 09/23] media: camss: Add ISPIF files Todor Tomov
2017-07-20 14:51 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 10/23] media: camss: Add VFE files Todor Tomov
2017-07-20 14:59 ` Sakari Ailus
2017-07-25 14:02 ` Todor Tomov
2017-08-04 18:02 ` Sakari Ailus [this message]
2017-08-07 6:49 ` Todor Tomov
2017-07-17 10:33 ` [PATCH v3 11/23] media: camss: Add files which handle the video device nodes Todor Tomov
2017-07-17 10:33 ` [PATCH v3 12/23] media: camms: Add core files Todor Tomov
2017-07-19 10:44 ` Hans Verkuil
2017-07-17 10:33 ` [PATCH v3 13/23] media: camss: Enable building Todor Tomov
2017-07-19 13:17 ` kbuild test robot
2017-07-17 10:33 ` [PATCH v3 14/23] camss: vfe: Format conversion support using PIX interface Todor Tomov
2017-07-20 15:11 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 15/23] doc: media/v4l-drivers: Qualcomm Camera Subsystem - PIX Interface Todor Tomov
2017-07-20 15:13 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 16/23] camss: vfe: Support for frame padding Todor Tomov
2017-07-20 15:17 ` Sakari Ailus
2018-09-03 15:38 ` Todor Tomov
2018-09-13 15:04 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 17/23] camss: vfe: Add interface for scaling Todor Tomov
2017-07-20 15:20 ` Sakari Ailus
2017-07-25 15:36 ` Todor Tomov
2017-08-04 17:59 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 18/23] camss: vfe: Configure scaler module in VFE Todor Tomov
2017-07-17 10:33 ` [PATCH v3 19/23] camss: vfe: Add interface for cropping Todor Tomov
2017-07-17 10:33 ` [PATCH v3 20/23] camss: vfe: Configure crop module in VFE Todor Tomov
2017-07-17 10:33 ` [PATCH v3 21/23] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Scale and crop Todor Tomov
2017-07-17 10:33 ` [PATCH v3 22/23] camss: Use optimal clock frequency rates Todor Tomov
2017-07-19 15:59 ` kbuild test robot
2017-07-21 7:55 ` Todor Tomov
2017-07-20 15:23 ` Sakari Ailus
2017-07-17 10:33 ` [PATCH v3 23/23] doc: media/v4l-drivers: Qualcomm Camera Subsystem - Media graph Todor Tomov
2017-07-19 10:54 ` [PATCH v3 00/23] Qualcomm 8x16 Camera Subsystem driver Hans Verkuil
2017-07-21 7:39 ` Todor Tomov
2017-07-31 9:20 ` Hans Verkuil
2017-07-20 15:25 ` Sakari Ailus
2017-07-21 7:50 ` Todor Tomov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=33862f4e-6608-32d9-1759-4bd371d5b1dc@iki.fi \
--to=sakari.ailus@iki.fi \
--cc=hans.verkuil@cisco.com \
--cc=javier@osg.samsung.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=s.nawrocki@samsung.com \
--cc=todor.tomov@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®