All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues
       [not found] <CGME20201124084151eucas1p1040de475ecccbe9bff2d6bcac17e000d@eucas1p1.samsung.com>
@ 2020-11-24  8:41 ` Marek Szyprowski
  2020-11-24 11:32   ` Sylwester Nawrocki
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Szyprowski @ 2020-11-24  8:41 UTC (permalink / raw)
  To: linux-media, linux-samsung-soc
  Cc: Marek Szyprowski, Sylwester Nawrocki, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Mauro Carvalho Chehab, Hans Verkuil

Properly set device pointers in videobuf2 queues, so the videobuf2
debugging messages will be prefixed with the respective device name.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
This patch was previously sent as part of "[PATCH v2 0/4] Exynos4 media
drivers: adapt for the planned ARM IOMMU-DMA changes" patchset:
https://lore.kernel.org/linux-samsung-soc/20200918144833.14618-1-m.szyprowski@samsung.com/
The IOMMU related changes are still under review, but this change is
unrelated and it makes sense to aplly it separately.
---
 drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
index eba2b9f040df..4e50c342b322 100644
--- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
+++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
@@ -844,6 +844,7 @@ static int s5p_mfc_open(struct file *file)
 	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
 	q->drv_priv = &ctx->fh;
 	q->lock = &dev->mfc_mutex;
+	q->dev = &dev->plat_dev->dev;
 	if (vdev == dev->vfd_dec) {
 		q->io_modes = VB2_MMAP;
 		q->ops = get_dec_queue_ops();
@@ -871,6 +872,7 @@ static int s5p_mfc_open(struct file *file)
 	q->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE;
 	q->drv_priv = &ctx->fh;
 	q->lock = &dev->mfc_mutex;
+	q->dev = &dev->plat_dev->dev;
 	if (vdev == dev->vfd_dec) {
 		q->io_modes = VB2_MMAP;
 		q->ops = get_dec_queue_ops();
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues
  2020-11-24  8:41 ` [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues Marek Szyprowski
@ 2020-11-24 11:32   ` Sylwester Nawrocki
  2020-12-02  8:47     ` Hans Verkuil
  0 siblings, 1 reply; 3+ messages in thread
From: Sylwester Nawrocki @ 2020-11-24 11:32 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-media, linux-samsung-soc, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Mauro Carvalho Chehab, Hans Verkuil

On 11/24/20 09:41, Marek Szyprowski wrote:
> Properly set device pointers in videobuf2 queues, so the videobuf2
> debugging messages will be prefixed with the respective device name.
> 
> Signed-off-by: Marek Szyprowski<m.szyprowski@samsung.com>
> ---
> This patch was previously sent as part of "[PATCH v2 0/4] Exynos4 media
> drivers: adapt for the planned ARM IOMMU-DMA changes" patchset:
> https://lore.kernel.org/linux-samsung-soc/20200918144833.14618-1-m.szyprowski@samsung.com/
> The IOMMU related changes are still under review, but this change is
> unrelated and it makes sense to aplly it separately.
> ---
>   drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> index eba2b9f040df..4e50c342b322 100644
> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
> @@ -844,6 +844,7 @@ static int s5p_mfc_open(struct file *file)
>   	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
>   	q->drv_priv = &ctx->fh;
>   	q->lock = &dev->mfc_mutex;
> +	q->dev = &dev->plat_dev->dev;

I can't see where q->dev is used for debug logs, shouldn't we use
v4l2_queue_init_name() instead?

--
Regards,
Sylwester


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues
  2020-11-24 11:32   ` Sylwester Nawrocki
@ 2020-12-02  8:47     ` Hans Verkuil
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Verkuil @ 2020-12-02  8:47 UTC (permalink / raw)
  To: Sylwester Nawrocki, Marek Szyprowski
  Cc: linux-media, linux-samsung-soc, Krzysztof Kozlowski,
	Bartlomiej Zolnierkiewicz, Mauro Carvalho Chehab

On 24/11/2020 12:32, Sylwester Nawrocki wrote:
> On 11/24/20 09:41, Marek Szyprowski wrote:
>> Properly set device pointers in videobuf2 queues, so the videobuf2
>> debugging messages will be prefixed with the respective device name.
>>
>> Signed-off-by: Marek Szyprowski<m.szyprowski@samsung.com>
>> ---
>> This patch was previously sent as part of "[PATCH v2 0/4] Exynos4 media
>> drivers: adapt for the planned ARM IOMMU-DMA changes" patchset:
>> https://lore.kernel.org/linux-samsung-soc/20200918144833.14618-1-m.szyprowski@samsung.com/
>> The IOMMU related changes are still under review, but this change is
>> unrelated and it makes sense to aplly it separately.
>> ---
>>   drivers/media/platform/s5p-mfc/s5p_mfc.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> index eba2b9f040df..4e50c342b322 100644
>> --- a/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> +++ b/drivers/media/platform/s5p-mfc/s5p_mfc.c
>> @@ -844,6 +844,7 @@ static int s5p_mfc_open(struct file *file)
>>   	q->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE;
>>   	q->drv_priv = &ctx->fh;
>>   	q->lock = &dev->mfc_mutex;
>> +	q->dev = &dev->plat_dev->dev;
> 
> I can't see where q->dev is used for debug logs, shouldn't we use
> v4l2_queue_init_name() instead?

And also you don't need to set q->dev: this driver sets alloc_devs[],
and q->dev is only used if alloc_devs is not set. q->dev should probably
be renamed to alloc_dev since that's what it is used for: the device for
the allocation context.

To help debugging using v4l2_queue_init_name would probably be a better
approach.

Regards,

	Hans

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-02  8:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20201124084151eucas1p1040de475ecccbe9bff2d6bcac17e000d@eucas1p1.samsung.com>
2020-11-24  8:41 ` [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues Marek Szyprowski
2020-11-24 11:32   ` Sylwester Nawrocki
2020-12-02  8:47     ` Hans Verkuil

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.