Re: [PATCH] media: platform: s5p-mfc: properly assign device to both vb2 queues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
>> ---
>> 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@xxxxxxxxxxx/
>> 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



[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux