Re: [Intel-gfx] [v2] drm/i915/fbdev: Enable late fbdev initial configuration

2018-04-23 Thread Jani Nikula
On Fri, 20 Apr 2018, Paul Menzel  wrote:
> Dear Jose,
>
>
> On 04/19/18 01:41, Souza, Jose wrote:
>> If the initial fbdev configuration(intel_fbdev_initial_config()) runs and
>
> Nit: Space before (.
>
>> there still no sink connected it will cause
>> drm_fb_helper_initial_config() to return 0 as no error happened(but
>> internally the return is -EAGAIN).
>
> Nit: Space before (.
>
>> Because no framebuffer was allocated, when a sink is connected
>> intel_fbdev_output_poll_changed() will not execute
>> drm_fb_helper_hotplug_event() that would trigger another try to do the
>> initial fbdev configuration.
>> 
>> So here allowing drm_fb_helper_hotplug_event() to be executed when there
>> is not frambebuffer allocated and fbdev was not setup yet.
>
> s/not/no/
> s/setup/set up/
>
>> This issue also happens when a MST DP sink is connected since boot, as
>> the MST topology is discovered in parallel if intel_fbdev_initial_config()
>> is executed before the first sink MST is discovered it will cause this
>> same issue.
>> 
>> This is a follow up patch of
>
> follow-up
>
>> https://patchwork.freedesktop.org/patch/196089/
>> 
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104158
>> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104425
>> Cc: Rodrigo Vivi 
>> Signed-off-by: Chris Wilson 
>> Signed-off-by: José Roberto de Souza 
>> ---
>> 
>> Changes from v1:
>> - not creating a dump framebuffer anymore, instead just allowing
>> drm_fb_helper_hotplug_event() to execute when fbdev is not setup yet.
>
> s/setup/set up/
>
>>   drivers/gpu/drm/i915/intel_fbdev.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c 
>> b/drivers/gpu/drm/i915/intel_fbdev.c
>> index 7d41d139341b..e9e02b58b7be 100644
>> --- a/drivers/gpu/drm/i915/intel_fbdev.c
>> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
>> @@ -807,7 +807,7 @@ void intel_fbdev_output_poll_changed(struct drm_device 
>> *dev)
>>  return;
>>   
>>  intel_fbdev_sync(ifbdev);
>> -if (ifbdev->vma)
>> +if (ifbdev->vma || ifbdev->helper.deferred_setup)
>>  drm_fb_helper_hotplug_event(>helper);
>>   }
>>   
>
> Tested-by: Paul Menzel 

Also from the bug,

Tested-by: frederik  # 4.15.17
Tested-by: Ian Pilcher 

>
>
> Kind regards,
>
> Paul
>
> ___
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx


Re: [Intel-gfx] [v2] drm/i915/fbdev: Enable late fbdev initial configuration

2018-04-20 Thread Paul Menzel

Dear Jose,


On 04/19/18 01:41, Souza, Jose wrote:

If the initial fbdev configuration(intel_fbdev_initial_config()) runs and


Nit: Space before (.


there still no sink connected it will cause
drm_fb_helper_initial_config() to return 0 as no error happened(but
internally the return is -EAGAIN).


Nit: Space before (.


Because no framebuffer was allocated, when a sink is connected
intel_fbdev_output_poll_changed() will not execute
drm_fb_helper_hotplug_event() that would trigger another try to do the
initial fbdev configuration.

So here allowing drm_fb_helper_hotplug_event() to be executed when there
is not frambebuffer allocated and fbdev was not setup yet.


s/not/no/
s/setup/set up/


This issue also happens when a MST DP sink is connected since boot, as
the MST topology is discovered in parallel if intel_fbdev_initial_config()
is executed before the first sink MST is discovered it will cause this
same issue.

This is a follow up patch of


follow-up


https://patchwork.freedesktop.org/patch/196089/

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104158
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104425
Cc: Rodrigo Vivi 
Signed-off-by: Chris Wilson 
Signed-off-by: José Roberto de Souza 
---

Changes from v1:
- not creating a dump framebuffer anymore, instead just allowing
drm_fb_helper_hotplug_event() to execute when fbdev is not setup yet.


s/setup/set up/


  drivers/gpu/drm/i915/intel_fbdev.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_fbdev.c 
b/drivers/gpu/drm/i915/intel_fbdev.c
index 7d41d139341b..e9e02b58b7be 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -807,7 +807,7 @@ void intel_fbdev_output_poll_changed(struct drm_device *dev)
return;
  
  	intel_fbdev_sync(ifbdev);

-   if (ifbdev->vma)
+   if (ifbdev->vma || ifbdev->helper.deferred_setup)
drm_fb_helper_hotplug_event(>helper);
  }
  


Tested-by: Paul Menzel 


Kind regards,

Paul



smime.p7s
Description: S/MIME Cryptographic Signature
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx