diff mbox series

[v2,5/9] drm/nouveau: Implement switcheroo reprobe with drm_client_dev_hotplug()

Message ID 20240812083000.337744-6-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm/{amdgpu,nouveau}: Remove old fbdev hooks | expand

Commit Message

Thomas Zimmermann Aug. 12, 2024, 8:28 a.m. UTC
Replace the call to drm_fb_helper_output_poll_changed() with a call
to drm_client_dev_hotplug(). It is equivalent in functionality, but
uses the DRM client infrastructure.

v2:
- fix commit description

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/nouveau/nouveau_vga.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Danilo Krummrich Aug. 12, 2024, 12:17 p.m. UTC | #1
On 8/12/24 10:28 AM, Thomas Zimmermann wrote:
> Replace the call to drm_fb_helper_output_poll_changed() with a call
> to drm_client_dev_hotplug(). It is equivalent in functionality, but
> uses the DRM client infrastructure.
> 
> v2:
> - fix commit description
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Acked-by: Danilo Krummrich <dakr@kernel.org>

> ---
>   drivers/gpu/drm/nouveau/nouveau_vga.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
> index ee637f1fe03d..ab4e11dc0b8a 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
> @@ -58,8 +58,9 @@ static void
>   nouveau_switcheroo_reprobe(struct pci_dev *pdev)
>   {
>   	struct nouveau_drm *drm = pci_get_drvdata(pdev);
> +	struct drm_device *dev = drm->dev;
>   
> -	drm_fb_helper_output_poll_changed(drm->dev);
> +	drm_client_dev_hotplug(dev);
>   }
>   
>   static bool
Thomas Zimmermann Aug. 12, 2024, 12:34 p.m. UTC | #2
Hi

Am 12.08.24 um 14:17 schrieb Danilo Krummrich:
> On 8/12/24 10:28 AM, Thomas Zimmermann wrote:
>> Replace the call to drm_fb_helper_output_poll_changed() with a call
>> to drm_client_dev_hotplug(). It is equivalent in functionality, but
>> uses the DRM client infrastructure.
>>
>> v2:
>> - fix commit description
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Acked-by: Danilo Krummrich <dakr@kernel.org>

Thanks for the acks. Can I merge the nouveau patches through drm-misc-next?

Best regards
Thomas

>
>> ---
>>   drivers/gpu/drm/nouveau/nouveau_vga.c | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c 
>> b/drivers/gpu/drm/nouveau/nouveau_vga.c
>> index ee637f1fe03d..ab4e11dc0b8a 100644
>> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
>> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
>> @@ -58,8 +58,9 @@ static void
>>   nouveau_switcheroo_reprobe(struct pci_dev *pdev)
>>   {
>>       struct nouveau_drm *drm = pci_get_drvdata(pdev);
>> +    struct drm_device *dev = drm->dev;
>>   -    drm_fb_helper_output_poll_changed(drm->dev);
>> +    drm_client_dev_hotplug(dev);
>>   }
>>     static bool
Danilo Krummrich Aug. 12, 2024, 6:55 p.m. UTC | #3
On 8/12/24 2:34 PM, Thomas Zimmermann wrote:
> Hi
> 
> Am 12.08.24 um 14:17 schrieb Danilo Krummrich:
>> On 8/12/24 10:28 AM, Thomas Zimmermann wrote:
>>> Replace the call to drm_fb_helper_output_poll_changed() with a call
>>> to drm_client_dev_hotplug(). It is equivalent in functionality, but
>>> uses the DRM client infrastructure.
>>>
>>> v2:
>>> - fix commit description
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>>
>> Acked-by: Danilo Krummrich <dakr@kernel.org>
> 
> Thanks for the acks. Can I merge the nouveau patches through drm-misc-next?

Sure.

> 
> Best regards
> Thomas
> 
>>
>>> ---
>>>   drivers/gpu/drm/nouveau/nouveau_vga.c | 3 ++-
>>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
>>> index ee637f1fe03d..ab4e11dc0b8a 100644
>>> --- a/drivers/gpu/drm/nouveau/nouveau_vga.c
>>> +++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
>>> @@ -58,8 +58,9 @@ static void
>>>   nouveau_switcheroo_reprobe(struct pci_dev *pdev)
>>>   {
>>>       struct nouveau_drm *drm = pci_get_drvdata(pdev);
>>> +    struct drm_device *dev = drm->dev;
>>>   -    drm_fb_helper_output_poll_changed(drm->dev);
>>> +    drm_client_dev_hotplug(dev);
>>>   }
>>>     static bool
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/nouveau/nouveau_vga.c b/drivers/gpu/drm/nouveau/nouveau_vga.c
index ee637f1fe03d..ab4e11dc0b8a 100644
--- a/drivers/gpu/drm/nouveau/nouveau_vga.c
+++ b/drivers/gpu/drm/nouveau/nouveau_vga.c
@@ -58,8 +58,9 @@  static void
 nouveau_switcheroo_reprobe(struct pci_dev *pdev)
 {
 	struct nouveau_drm *drm = pci_get_drvdata(pdev);
+	struct drm_device *dev = drm->dev;
 
-	drm_fb_helper_output_poll_changed(drm->dev);
+	drm_client_dev_hotplug(dev);
 }
 
 static bool