All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sylwester Nawrocki <s.nawrocki@samsung.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, m.szyprowski@samsung.com,
	kyungmin.park@samsung.com, sw0312.kim@samsung.com,
	riverful.kim@samsung.com
Subject: Re: [PATCH v3 1/3] noon010pc30: Conversion to the media controller API
Date: Wed, 21 Sep 2011 15:54:07 +0200	[thread overview]
Message-ID: <4E79EC7F.2050003@samsung.com> (raw)
In-Reply-To: <201109210018.14185.laurent.pinchart@ideasonboard.com>

Hi Laurent,

thanks for the review.

On 09/21/2011 12:18 AM, Laurent Pinchart wrote:
> Hi Sylwester,
> 
> Thanks for the patch.
> 
> On Friday 16 September 2011 17:59:54 Sylwester Nawrocki wrote:
>> Replace g/s_mbus_fmt ops with the pad level get/set_fmt operations.
>> Add media entity initialization and set subdev flags so the host driver
>> creates a subdev device node for the driver.
>> A mutex was added for serializing the subdev operations. When setting
>> format is attempted during streaming an (EBUSY) error will be returned.
>>
>> After the device is powered up it will now remain in "power sleep"
>> mode until s_stream(1) is called. The "power sleep" mode is used
>> to suspend/resume frame generation at the sensor's output through
>> s_stream op.
>>
>> While at here simplify the colorspace parameter handling.
>>
>> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> 
> [snip]
> 
>> diff --git a/drivers/media/video/noon010pc30.c
>> b/drivers/media/video/noon010pc30.c index 35f722a..115d976 100644
>> --- a/drivers/media/video/noon010pc30.c
>> +++ b/drivers/media/video/noon010pc30.c
> 
> [snip]
> 
>> @@ -599,6 +641,22 @@ static int noon010_log_status(struct v4l2_subdev *sd)
>>  	return 0;
>>  }
>>
>> +static int noon010_open(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
>> +{
>> +	struct v4l2_mbus_framefmt *mf = v4l2_subdev_get_try_format(fh, 0);
>> +	struct noon010_info *info = to_noon010(sd);
>> +
>> +	mutex_lock(&info->lock);
>> +	noon010_get_current_fmt(to_noon010(sd), mf);
> 
> Should you initialize mf with a constant default format instead of retrieving 
> the current format from the sensor ? A non-constant default would probably 
> confuse userspace application.

Sure, I could change to it. But I don't quite see the problem, the applications
should call set_fmt(TRY) anyway, rather than relying on the format gotten right
after opening the device, shouldn't they ? Anyway I guess it's better to have
all drivers behaving consistently.


Regards,
-- 
Sylwester Nawrocki
Samsung Poland R&D Center

  reply	other threads:[~2011-09-21 13:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-16 15:59 [PATCH v3 0/3] Conversion of the NOON010PC30 sensor driver to media controller API Sylwester Nawrocki
2011-09-16 15:59 ` [PATCH v3 1/3] noon010pc30: Conversion to the " Sylwester Nawrocki
2011-09-16 16:17   ` Sylwester Nawrocki
2011-09-20 22:18   ` Laurent Pinchart
2011-09-21 13:54     ` Sylwester Nawrocki [this message]
2011-09-21 14:26     ` [PATCH v4] " Sylwester Nawrocki
2011-09-21 14:28       ` Laurent Pinchart
2011-09-16 15:59 ` [PATCH v3 2/3] noon010pc30: Improve s_power operation handling Sylwester Nawrocki
2011-09-16 15:59 ` [PATCH 3/3 (resend)] noon010pc30: Remove g_chip_ident operation handler Sylwester Nawrocki

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=4E79EC7F.2050003@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=riverful.kim@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.