Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: vim2m: print device name after registering device
@ 2025-02-19 19:05 Matthew Majewski
  2025-02-19 21:11 ` Shuah Khan
  2025-02-19 21:58 ` Uwe Kleine-Konig
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Majewski @ 2025-02-19 19:05 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Hans Verkuil, Uwe Kleine-Konig, Shuah Khan
  Cc: linux-media, linux-kernel, Matthew Majewski

Move the v4l2_info() call displaying the video device name after the
device is actually registered.

This fixes a bug where the driver was always displaying "/dev/video0"
since it was reading from the vfd before it was registered.

Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
---
 drivers/media/test-drivers/vim2m.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/media/test-drivers/vim2m.c b/drivers/media/test-drivers/vim2m.c
index 6c24dcf27eb0..0fe97e208c02 100644
--- a/drivers/media/test-drivers/vim2m.c
+++ b/drivers/media/test-drivers/vim2m.c
@@ -1314,9 +1314,6 @@ static int vim2m_probe(struct platform_device *pdev)
 	vfd->v4l2_dev = &dev->v4l2_dev;
 
 	video_set_drvdata(vfd, dev);
-	v4l2_info(&dev->v4l2_dev,
-		  "Device registered as /dev/video%d\n", vfd->num);
-
 	platform_set_drvdata(pdev, dev);
 
 	dev->m2m_dev = v4l2_m2m_init(&m2m_ops);
@@ -1343,6 +1340,9 @@ static int vim2m_probe(struct platform_device *pdev)
 		goto error_m2m;
 	}
 
+	v4l2_info(&dev->v4l2_dev,
+		  "Device registered as /dev/video%d\n", vfd->num);
+
 #ifdef CONFIG_MEDIA_CONTROLLER
 	ret = v4l2_m2m_register_media_controller(dev->m2m_dev, vfd,
 						 MEDIA_ENT_F_PROC_VIDEO_SCALER);
-- 
2.25.1


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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-19 19:05 [PATCH] media: vim2m: print device name after registering device Matthew Majewski
@ 2025-02-19 21:11 ` Shuah Khan
  2025-02-19 21:58 ` Uwe Kleine-Konig
  1 sibling, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2025-02-19 21:11 UTC (permalink / raw)
  To: Matthew Majewski, Mauro Carvalho Chehab, Hans Verkuil,
	Uwe Kleine-Konig
  Cc: linux-media, linux-kernel, Shuah Khan

On 2/19/25 12:05, Matthew Majewski wrote:
> Move the v4l2_info() call displaying the video device name after the
> device is actually registered.
> 
> This fixes a bug where the driver was always displaying "/dev/video0"
> since it was reading from the vfd before it was registered.
> 
> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
> ---

Thanks. Applied for 6.15-rc1 to be included in pull request to media
maintainer.

https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux.git/log/?h=vimc

thanks,
-- Shuah

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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-19 19:05 [PATCH] media: vim2m: print device name after registering device Matthew Majewski
  2025-02-19 21:11 ` Shuah Khan
@ 2025-02-19 21:58 ` Uwe Kleine-Konig
  2025-02-20  0:21   ` Shuah Khan
  1 sibling, 1 reply; 8+ messages in thread
From: Uwe Kleine-Konig @ 2025-02-19 21:58 UTC (permalink / raw)
  To: Matthew Majewski
  Cc: Mauro Carvalho Chehab, Hans Verkuil, Shuah Khan, linux-media,
	linux-kernel

[-- Attachment #1: Type: text/plain, Size: 431 bytes --]

On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
> Move the v4l2_info() call displaying the video device name after the
> device is actually registered.
> 
> This fixes a bug where the driver was always displaying "/dev/video0"
> since it was reading from the vfd before it was registered.
> 
> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>

A Fixes: tag would be great.

Best regards
Uwe

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-19 21:58 ` Uwe Kleine-Konig
@ 2025-02-20  0:21   ` Shuah Khan
  2025-02-20 15:29     ` Matthew Majewski
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2025-02-20  0:21 UTC (permalink / raw)
  To: Uwe Kleine-Konig, Matthew Majewski
  Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, linux-kernel,
	Shuah Khan

On 2/19/25 14:58, Uwe Kleine-Konig wrote:
> On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
>> Move the v4l2_info() call displaying the video device name after the
>> device is actually registered.
>>
>> This fixes a bug where the driver was always displaying "/dev/video0"
>> since it was reading from the vfd before it was registered.
>>
>> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
> 
> A Fixes: tag would be great.

Matthew, there is no need to resend the patch. Just send me the
Fixes tag and I will update the repo.

thanks,
-- Shuah

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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-20  0:21   ` Shuah Khan
@ 2025-02-20 15:29     ` Matthew Majewski
  2025-02-20 16:27       ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Matthew Majewski @ 2025-02-20 15:29 UTC (permalink / raw)
  To: Shuah Khan, Uwe Kleine-Konig
  Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, linux-kernel

On Wed, 2025-02-19 at 17:21 -0700, Shuah Khan wrote:
> On 2/19/25 14:58, Uwe Kleine-Konig wrote:
> > On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
> > > Move the v4l2_info() call displaying the video device name after
> > > the
> > > device is actually registered.
> > > 
> > > This fixes a bug where the driver was always displaying
> > > "/dev/video0"
> > > since it was reading from the vfd before it was registered.
> > > 
> > > Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
> > 
> > A Fixes: tag would be great.
> 
> Matthew, there is no need to resend the patch. Just send me the
> Fixes tag and I will update the repo.
> 
> 

Ok, here is the fixes tag:

Fixes: cf7f34777a5b4100a ("media: vim2m: Register video device after
setting up internals")

Thank you both for your time.

Best,
Matthew


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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-20 15:29     ` Matthew Majewski
@ 2025-02-20 16:27       ` Shuah Khan
  2025-03-06  8:37         ` Hans Verkuil
  0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2025-02-20 16:27 UTC (permalink / raw)
  To: Matthew Majewski, Uwe Kleine-Konig
  Cc: Mauro Carvalho Chehab, Hans Verkuil, linux-media, linux-kernel,
	Shuah Khan

On 2/20/25 08:29, Matthew Majewski wrote:
> On Wed, 2025-02-19 at 17:21 -0700, Shuah Khan wrote:
>> On 2/19/25 14:58, Uwe Kleine-Konig wrote:
>>> On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
>>>> Move the v4l2_info() call displaying the video device name after
>>>> the
>>>> device is actually registered.
>>>>
>>>> This fixes a bug where the driver was always displaying
>>>> "/dev/video0"
>>>> since it was reading from the vfd before it was registered.
>>>>
>>>> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
>>>
>>> A Fixes: tag would be great.
>>
>> Matthew, there is no need to resend the patch. Just send me the
>> Fixes tag and I will update the repo.
>>
>>
> 
> Ok, here is the fixes tag:
> 
> Fixes: cf7f34777a5b4100a ("media: vim2m: Register video device after
> setting up internals")
> 

Thank you. commit is now updated.

thanks,
-- Shuah


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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-02-20 16:27       ` Shuah Khan
@ 2025-03-06  8:37         ` Hans Verkuil
  2025-03-06 16:01           ` Shuah Khan
  0 siblings, 1 reply; 8+ messages in thread
From: Hans Verkuil @ 2025-03-06  8:37 UTC (permalink / raw)
  To: Shuah Khan, Matthew Majewski, Uwe Kleine-Konig
  Cc: Mauro Carvalho Chehab, linux-media, linux-kernel

Hi Shuah,

On 20/02/2025 17:27, Shuah Khan wrote:
> On 2/20/25 08:29, Matthew Majewski wrote:
>> On Wed, 2025-02-19 at 17:21 -0700, Shuah Khan wrote:
>>> On 2/19/25 14:58, Uwe Kleine-Konig wrote:
>>>> On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
>>>>> Move the v4l2_info() call displaying the video device name after
>>>>> the
>>>>> device is actually registered.
>>>>>
>>>>> This fixes a bug where the driver was always displaying
>>>>> "/dev/video0"
>>>>> since it was reading from the vfd before it was registered.
>>>>>
>>>>> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
>>>>
>>>> A Fixes: tag would be great.
>>>
>>> Matthew, there is no need to resend the patch. Just send me the
>>> Fixes tag and I will update the repo.
>>>
>>>
>>
>> Ok, here is the fixes tag:
>>
>> Fixes: cf7f34777a5b4100a ("media: vim2m: Register video device after
>> setting up internals")
>>
> 
> Thank you. commit is now updated.
> 
> thanks,
> -- Shuah
> 

Please post your PR today, if possible. Otherwise it might slip to the
v6.16. Alternatively, I can take this patch myself.

Also, why did you pick up this vim2m patch? I was a bit surprised by that.

Regards,

	Hans

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

* Re: [PATCH] media: vim2m: print device name after registering device
  2025-03-06  8:37         ` Hans Verkuil
@ 2025-03-06 16:01           ` Shuah Khan
  0 siblings, 0 replies; 8+ messages in thread
From: Shuah Khan @ 2025-03-06 16:01 UTC (permalink / raw)
  To: Hans Verkuil, Matthew Majewski, Uwe Kleine-Konig
  Cc: Mauro Carvalho Chehab, linux-media, linux-kernel, Shuah Khan

On 3/6/25 01:37, Hans Verkuil wrote:
> Hi Shuah,
> 
> On 20/02/2025 17:27, Shuah Khan wrote:
>> On 2/20/25 08:29, Matthew Majewski wrote:
>>> On Wed, 2025-02-19 at 17:21 -0700, Shuah Khan wrote:
>>>> On 2/19/25 14:58, Uwe Kleine-Konig wrote:
>>>>> On Wed, Feb 19, 2025 at 02:05:01PM -0500, Matthew Majewski wrote:
>>>>>> Move the v4l2_info() call displaying the video device name after
>>>>>> the
>>>>>> device is actually registered.
>>>>>>
>>>>>> This fixes a bug where the driver was always displaying
>>>>>> "/dev/video0"
>>>>>> since it was reading from the vfd before it was registered.
>>>>>>
>>>>>> Signed-off-by: Matthew Majewski <mattwmajewski@gmail.com>
>>>>>
>>>>> A Fixes: tag would be great.
>>>>
>>>> Matthew, there is no need to resend the patch. Just send me the
>>>> Fixes tag and I will update the repo.
>>>>
>>>>
>>>
>>> Ok, here is the fixes tag:
>>>
>>> Fixes: cf7f34777a5b4100a ("media: vim2m: Register video device after
>>> setting up internals")
>>>
>>
>> Thank you. commit is now updated.
>>
>> thanks,
>> -- Shuah
>>
> 
> Please post your PR today, if possible. Otherwise it might slip to the
> v6.16. Alternatively, I can take this patch myself.

Thanks for the reminder - I have to send a vimc PR

Please take this through your tree.

> 
> Also, why did you pick up this vim2m patch? I was a bit surprised by that.

By mistake - Blame it on jet lag - sorry. Explains why Matthew sent series
for my review.

thanks,
-- Shuah

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

end of thread, other threads:[~2025-03-06 16:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-19 19:05 [PATCH] media: vim2m: print device name after registering device Matthew Majewski
2025-02-19 21:11 ` Shuah Khan
2025-02-19 21:58 ` Uwe Kleine-Konig
2025-02-20  0:21   ` Shuah Khan
2025-02-20 15:29     ` Matthew Majewski
2025-02-20 16:27       ` Shuah Khan
2025-03-06  8:37         ` Hans Verkuil
2025-03-06 16:01           ` Shuah Khan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox