Re: [Intel-gfx] [v3] drm/i915/display: Force the state compute phase once to enable PSR

2020-02-06 Thread Jani Nikula
On Thu, 06 Feb 2020, "Souza, Jose"  wrote:
> Hi Ross
>
> I'm unable to reproduce this issue, could you share the complete dmesg?

Please file a bug at [1] and attach the dmesg there.

BR,
Jani.


[1] https://gitlab.freedesktop.org/drm/intel/issues/new


>
> On Wed, 2020-02-05 at 16:01 -0700, Ross Zwisler wrote:
>> On Mon, Jan 06, 2020 at 07:21:28AM -0800, José Roberto de Souza
>> wrote:
>> > Recent improvements in the state tracking in i915 caused PSR to not
>> > be
>> > enabled when reusing firmware/BIOS modeset, this is due to all
>> > initial
>> > commits returning ealier in intel_atomic_check() as needs_modeset()
>> > is always false.
>> > 
>> > To fix that here forcing the state compute phase in CRTC that is
>> > driving the eDP that supports PSR once. Enable or disable PSR do
>> > not
>> > require a fullmodeset, so user will still experience glitch free
>> > boot
>> > process plus the power savings that PSR brings.
>> > 
>> > It was tried to set mode_changed in intel_initial_commit() but at
>> > this point the connectors are not registered causing a crash when
>> > computing encoder state.
>> > 
>> > v2:
>> > - removed function return
>> > - change arguments to match intel_hdcp_atomic_check
>> > 
>> > v3:
>> > - replaced drm includes in intel_psr.h by forward declaration(Jani)
>> > 
>> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112253
>> > Reported-by: 
>> > Cc: Gwan-gyeong Mun 
>> > Cc: Jani Nikula 
>> > Signed-off-by: José Roberto de Souza 
>> > Reviewed-by: Gwan-gyeong Mun 
>> > ---
>> 
>> With the current linux/master:
>> 
>> 6992ca0dd017e Merge branch 'parisc-5.6-1' of
>> git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
>> 
>> my system fails to boot, and I bisected the failure to this
>> commit.   Here are
>> the relevant messages from dmesg, passed through kasan_symbolize.py:
>> 
>> i915 :00:02.0: vgaarb: deactivate vga console
>> [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
>> [drm] Driver supports precise vblank timestamp query.
>> resource sanity check: requesting [mem 0x000c-0x000d], which
>> spans more than PCI Bus :00 [mem 0x000c-0x000c3fff
>> window]
>> caller pci_map_rom+0x6a/0x17d mapping multiple BARs
>> i915 :00:02.0: Invalid PCI ROM data signature: expecting
>> 0x52494350, got 0xe937aa55
>> [drm] Failed to find VBIOS tables (VBT)
>> i915 :00:02.0: vgaarb: changed VGA decodes:
>> olddecodes=io+mem,decodes=io+mem:owns=io+mem
>> [ cut here ]
>> WARNING: CPU: 0 PID: 1 at
>> drivers/gpu/drm/drm_atomic.c:296[]
>> drm_atomic_get_crtc_state+0xf8/0x110 drivers/gpu/drm/drm_atomic.c:304
>> Modules linked in:
>> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc1-00573-
>> g60c6a14b489ba #31
>> Hardware name: GOOGLE Samus, BIOS  05/14/2019
>> RIP: 0010:drm_atomic_get_crtc_state+0xf8/0x110
>> Code: 89 2c 11 48 89 98 f0 01 00 00 48 8b 4d 20 8b 55 60 e8 5c aa 00
>> 00 48 8b 04 24 48 83 c4 08 5b 5d 41 5c c3 48 98 e9 4e ff ff
>>  ff <0f> 0b e9 28 ff ff ff 48 c7 c0 f4 ff ff ff e9 3b ff ff ff 0f 1f
>> 44
>> RSP: :ab4b80017970 EFLAGS: 00010246
>> RAX:  RBX: 93c1a69ca000 RCX: 93c1ab69b8c0
>> RDX: 002d RSI:  RDI: 93c1a69ca000
>> RBP: 93c1a6944000 R08: 0079 R09: 0079
>> R10: 002d R11: 0005 R12: 
>> R13: 93c1a6944000 R14: 0005 R15: 93c1a6979c00
>> FS:  () GS:93c1aec0()
>> knlGS:
>> CS:  0010 DS:  ES:  CR0: 80050033
>> CR2: 93c0f5201000 CR3: 0003b3e0c001 CR4: 003606f0
>> Call Trace:
>> []
>> drm_atomic_add_affected_connectors+0x2e/0x110
>> drivers/gpu/drm/drm_atomic.c:1046
>> [] drm_atomic_helper_check_modeset+0x4a1/0xa70
>> drivers/gpu/drm/drm_atomic_helper.c:703
>> [] intel_atomic_check+0x96/0x2510
>> drivers/gpu/drm/i915/display/intel_display.c:14603
>>  ?[< inline >] kmemdup ./include/linux/string.h:453
>>  ?[]
>> intel_digital_connector_duplicate_state+0x21/0x40
>> drivers/gpu/drm/i915/display/intel_atomic.c:171
>>  ?[< inline >] spin_unlock_irqrestore
>> ./include/linux/spinlock.h:393
>>  ?[] drm_connector_list_iter_next+0x88/0xb0
>> drivers/gpu/drm/drm_connector.c:689
>> [< inline >] sanitize_watermarks
>> drivers/gpu/drm/i915/display/intel_display.c:17359
>> [] intel_modeset_init+0x10a8/0x1d50
>> drivers/gpu/drm/i915/display/intel_display.c:17602
>> [< inline >] i915_driver_modeset_probe
>> drivers/gpu/drm/i915/i915_drv.c:311
>> [] i915_driver_probe+0xa4e/0x1410
>> drivers/gpu/drm/i915/i915_drv.c:1528
>>  ?[] __kernfs_new_node+0x159/0x1c0
>> fs/kernfs/dir.c:666
>> [] i915_pci_probe+0x54/0x138
>> 

Re: [Intel-gfx] [v3] drm/i915/display: Force the state compute phase once to enable PSR

2020-02-05 Thread Souza, Jose
Hi Ross

I'm unable to reproduce this issue, could you share the complete dmesg?

On Wed, 2020-02-05 at 16:01 -0700, Ross Zwisler wrote:
> On Mon, Jan 06, 2020 at 07:21:28AM -0800, José Roberto de Souza
> wrote:
> > Recent improvements in the state tracking in i915 caused PSR to not
> > be
> > enabled when reusing firmware/BIOS modeset, this is due to all
> > initial
> > commits returning ealier in intel_atomic_check() as needs_modeset()
> > is always false.
> > 
> > To fix that here forcing the state compute phase in CRTC that is
> > driving the eDP that supports PSR once. Enable or disable PSR do
> > not
> > require a fullmodeset, so user will still experience glitch free
> > boot
> > process plus the power savings that PSR brings.
> > 
> > It was tried to set mode_changed in intel_initial_commit() but at
> > this point the connectors are not registered causing a crash when
> > computing encoder state.
> > 
> > v2:
> > - removed function return
> > - change arguments to match intel_hdcp_atomic_check
> > 
> > v3:
> > - replaced drm includes in intel_psr.h by forward declaration(Jani)
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112253
> > Reported-by: 
> > Cc: Gwan-gyeong Mun 
> > Cc: Jani Nikula 
> > Signed-off-by: José Roberto de Souza 
> > Reviewed-by: Gwan-gyeong Mun 
> > ---
> 
> With the current linux/master:
> 
> 6992ca0dd017e Merge branch 'parisc-5.6-1' of
> git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux
> 
> my system fails to boot, and I bisected the failure to this
> commit.   Here are
> the relevant messages from dmesg, passed through kasan_symbolize.py:
> 
> i915 :00:02.0: vgaarb: deactivate vga console
> [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
> [drm] Driver supports precise vblank timestamp query.
> resource sanity check: requesting [mem 0x000c-0x000d], which
> spans more than PCI Bus :00 [mem 0x000c-0x000c3fff
> window]
> caller pci_map_rom+0x6a/0x17d mapping multiple BARs
> i915 :00:02.0: Invalid PCI ROM data signature: expecting
> 0x52494350, got 0xe937aa55
> [drm] Failed to find VBIOS tables (VBT)
> i915 :00:02.0: vgaarb: changed VGA decodes:
> olddecodes=io+mem,decodes=io+mem:owns=io+mem
> [ cut here ]
> WARNING: CPU: 0 PID: 1 at
> drivers/gpu/drm/drm_atomic.c:296[]
> drm_atomic_get_crtc_state+0xf8/0x110 drivers/gpu/drm/drm_atomic.c:304
> Modules linked in:
> CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc1-00573-
> g60c6a14b489ba #31
> Hardware name: GOOGLE Samus, BIOS  05/14/2019
> RIP: 0010:drm_atomic_get_crtc_state+0xf8/0x110
> Code: 89 2c 11 48 89 98 f0 01 00 00 48 8b 4d 20 8b 55 60 e8 5c aa 00
> 00 48 8b 04 24 48 83 c4 08 5b 5d 41 5c c3 48 98 e9 4e ff ff
>  ff <0f> 0b e9 28 ff ff ff 48 c7 c0 f4 ff ff ff e9 3b ff ff ff 0f 1f
> 44
> RSP: :ab4b80017970 EFLAGS: 00010246
> RAX:  RBX: 93c1a69ca000 RCX: 93c1ab69b8c0
> RDX: 002d RSI:  RDI: 93c1a69ca000
> RBP: 93c1a6944000 R08: 0079 R09: 0079
> R10: 002d R11: 0005 R12: 
> R13: 93c1a6944000 R14: 0005 R15: 93c1a6979c00
> FS:  () GS:93c1aec0()
> knlGS:
> CS:  0010 DS:  ES:  CR0: 80050033
> CR2: 93c0f5201000 CR3: 0003b3e0c001 CR4: 003606f0
> Call Trace:
> []
> drm_atomic_add_affected_connectors+0x2e/0x110
> drivers/gpu/drm/drm_atomic.c:1046
> [] drm_atomic_helper_check_modeset+0x4a1/0xa70
> drivers/gpu/drm/drm_atomic_helper.c:703
> [] intel_atomic_check+0x96/0x2510
> drivers/gpu/drm/i915/display/intel_display.c:14603
>  ?[< inline >] kmemdup ./include/linux/string.h:453
>  ?[]
> intel_digital_connector_duplicate_state+0x21/0x40
> drivers/gpu/drm/i915/display/intel_atomic.c:171
>  ?[< inline >] spin_unlock_irqrestore
> ./include/linux/spinlock.h:393
>  ?[] drm_connector_list_iter_next+0x88/0xb0
> drivers/gpu/drm/drm_connector.c:689
> [< inline >] sanitize_watermarks
> drivers/gpu/drm/i915/display/intel_display.c:17359
> [] intel_modeset_init+0x10a8/0x1d50
> drivers/gpu/drm/i915/display/intel_display.c:17602
> [< inline >] i915_driver_modeset_probe
> drivers/gpu/drm/i915/i915_drv.c:311
> [] i915_driver_probe+0xa4e/0x1410
> drivers/gpu/drm/i915/i915_drv.c:1528
>  ?[] __kernfs_new_node+0x159/0x1c0
> fs/kernfs/dir.c:666
> [] i915_pci_probe+0x54/0x138
> drivers/gpu/drm/i915/i915_pci.c:994
> [] local_pci_probe+0x42/0x80 drivers/pci/pci-
> driver.c:306
> [< inline >] pci_call_probe drivers/pci/pci-driver.c:361
> [< inline >] __pci_device_probe drivers/pci/pci-driver.c:386
> [] pci_device_probe+0x107/0x1a0