linux-samsung-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Tomasz Figa <tfiga@chromium.org>, Jonathan Bakker <xc-racer2@live.ca>
Cc: kyungmin.park@samsung.com, mchehab@kernel.org, kgene@kernel.org,
	krzk@kernel.org, linux-media@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 04/11] media: exynos4-is: Correct missing entity function initialization
Date: Wed, 8 Jul 2020 17:34:29 +0200	[thread overview]
Message-ID: <afe50670-2452-2fe6-d0cc-0e1f83497873@samsung.com> (raw)
In-Reply-To: <20200707180917.GD2621465@chromium.org>

Hi,

On 07.07.2020 20:09, Tomasz Figa wrote:
> On Sat, Apr 25, 2020 at 07:26:43PM -0700, Jonathan Bakker wrote:
>> Commit bae4500399c4 ("[media] exynos4-is: Add missing entity function
>> initialization") tried to suppress the warnings such as
>>
>> s5p-fimc-md camera: Entity type for entity FIMC.0 was not initialized!
>>
>> However, this didn't work in all cases.  Correct this by calling the set
>> function earlier.
>>
>> Fixes: bae4500399c4 ("exynos4-is: Add missing entity function initialization")
>> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
>> ---
>>  drivers/media/platform/exynos4-is/fimc-capture.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)

> Thank you for the patch. Please see my comments inline.

>> diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c
>> index 705f182330ca..86c233e2f2c9 100644
>> --- a/drivers/media/platform/exynos4-is/fimc-capture.c
>> +++ b/drivers/media/platform/exynos4-is/fimc-capture.c
>> @@ -1799,7 +1799,6 @@ static int fimc_register_capture_device(struct fimc_dev *fimc,
>>  	vid_cap->wb_fmt.code = fmt->mbus_code;
>>  
>>  	vid_cap->vd_pad.flags = MEDIA_PAD_FL_SINK;
>> -	vfd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;

I think we should leave above line as is, or perhaps change the function
to MEDIA_ENT_F_PROC_VIDEO_COMPOSER and...

> Isn't vfd->entity above a different entity than sd->entity below? If so,
> this line must stay.
> 
>>  	ret = media_entity_pads_init(&vfd->entity, 1, &vid_cap->vd_pad);
>>  	if (ret)
>>  		goto err_free_ctx;
>> @@ -1898,6 +1897,7 @@ int fimc_initialize_capture_subdev(struct fimc_dev *fimc)
>>  		return ret;
>>  
>>  	sd->entity.ops = &fimc_sd_media_ops;
>> +	sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER;

...also add an assignment like this.

vfd->entity and sd->entity are different entities, vfd->entity corresponds to
the capture video node and sd->entity is the capture subdevice media entity. 

> My understanding is that this is the capture subdev and not the scaler.
> Looking at the other drivers, MEDIA_ENT_F_PROC_VIDEO_PIXEL_FORMATTER
> could be the right function to use here.

Scaling can also be configured on that subdev, actually both functions would
be valid.

-- 
Regards,
Sylwester

  reply	other threads:[~2020-07-08 15:34 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20200426022650.10355-1-xc-racer2@live.ca>
2020-04-26  2:26 ` [PATCH 01/11] media: exynos4-is: Remove static driver data for S5PV210 FIMC variants Jonathan Bakker
2020-07-07 17:33   ` Tomasz Figa
2020-07-08 14:45   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 02/11] media: exynos4-is: Request syscon only if ISP writeback is present Jonathan Bakker
2020-07-07 17:34   ` Tomasz Figa
2020-07-08 14:47   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 03/11] media: exynos4-is: Fix nullptr when no CSIS device present Jonathan Bakker
2020-07-07 17:55   ` Tomasz Figa
2020-07-08 15:11     ` Sylwester Nawrocki
2020-07-11 16:27       ` Jonathan Bakker
2020-07-08 14:49   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 04/11] media: exynos4-is: Correct missing entity function initialization Jonathan Bakker
2020-07-07 18:09   ` Tomasz Figa
2020-07-08 15:34     ` Sylwester Nawrocki [this message]
2020-07-11 16:35       ` Jonathan Bakker
2020-04-26  2:26 ` [PATCH 05/11] media: exynos4-is: Improve support for sensors with multiple pads Jonathan Bakker
2020-07-07 18:13   ` Tomasz Figa
2020-07-11 18:21     ` Jonathan Bakker
2020-04-26  2:26 ` [PATCH 06/11] media: exynos4-is: Properly set JPEG options when not using CSIS Jonathan Bakker
2020-07-07 18:23   ` Tomasz Figa
2020-07-08 15:45     ` Sylwester Nawrocki
2020-07-11 16:43       ` Jonathan Bakker
2020-07-08 15:46   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 07/11] media: exynos4-is: Add support for multiple sensors on one port Jonathan Bakker
2020-07-07 18:36   ` Tomasz Figa
2020-07-11 16:48     ` Jonathan Bakker
2020-04-26  2:26 ` [PATCH 08/11] media: exynos4-is: Remove inh_sensor_ctrls Jonathan Bakker
2020-07-07 18:37   ` Tomasz Figa
2020-07-08 15:47   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 09/11] media: exynos4-is: Remove unused struct member input_index Jonathan Bakker
2020-07-07 18:38   ` Tomasz Figa
2020-07-08 15:49   ` Sylwester Nawrocki
2020-04-26  2:26 ` [PATCH 10/11] media: exynos4-is: Prevent duplicate call to media_pipeline_stop Jonathan Bakker
2020-07-07 18:44   ` Tomasz Figa
2020-07-11 18:17     ` Jonathan Bakker
2020-07-20 13:10       ` Tomasz Figa
2020-07-24 23:46         ` Jonathan Bakker
2020-07-27 13:48           ` Tomasz Figa
2020-04-26  2:26 ` [PATCH 11/11] media: exynos4-is: Correct parallel port probing Jonathan Bakker
2020-07-07 18:48   ` Tomasz Figa
2020-07-08 16:15   ` Sylwester Nawrocki
2020-07-11 18:18     ` Jonathan Bakker

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=afe50670-2452-2fe6-d0cc-0e1f83497873@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=kgene@kernel.org \
    --cc=krzk@kernel.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=tfiga@chromium.org \
    --cc=xc-racer2@live.ca \
    /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;
as well as URLs for NNTP newsgroup(s).