[Intel-gfx] [PATCH v2] drm/i915: Try EDID bitbanging on HDMI after failed read

2017-12-31 Thread Stefan Brüns
The ACK/NACK implementation as found in e.g. the G965 has the falling clock edge and the release of the data line after the ACK for the received byte happen at the same time. This is conformant with the I2C specification, which allows a zero hold time, see footnote [3]: "A device must internally p

Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2017-12-31 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2017-12-31 16:52:36) > I see lockdep is configured (though I'm not familiar with the feature; > the config came with it, and I made oldconfig), but I'll need to > recompile for kasan. > > I'll do that over the next few days, but once done, what would I get > back to y

Re: [Intel-gfx] PROBLEM: i915 causes complete desktop freezes in 4.15-rc5

2017-12-31 Thread Chris Wilson
Quoting Alexandru Chirvasitu (2017-12-30 17:31:32) > Short description: I get freezes of my desktop completely eliminating > mouse / keyboard functionality. > > I’m on an UltraLap 5330, Processor: i7-7500U, Memory: 32 GB DDR4-2133 > Video Card: Intel HD (included). It's running Void linux 64 bit.

Re: [Intel-gfx] [RFC 4/7] drm/prime: Clear drm_gem_object->dma_buf on release

2017-12-31 Thread Chris Wilson
Quoting Noralf Trønnes (2017-12-31 13:58:40) > Clear the pointer so the buffer can be re-exported. Otherwise use > after free happens in the next call to drm_gem_prime_handle_to_fd(). > > Signed-off-by: Noralf Trønnes > --- > drivers/gpu/drm/drm_prime.c | 1 + > 1 file changed, 1 insertion(+) >

[Intel-gfx] [RFC 5/7] drm: Handle fbdev emulation in core

2017-12-31 Thread Noralf Trønnes
Prepare for generic fbdev emulation by letting DRM core work directly with the fbdev compatibility layer. This is done by adding new fbdev helper vtable callbacks for restore, hotplug_event, unregister and release. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_file.c | 12 +++

[Intel-gfx] [RFC 7/7] drm/vc4: Test generic fbdev emulation

2017-12-31 Thread Noralf Trønnes
Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/vc4/vc4_drv.c | 3 --- drivers/gpu/drm/vc4/vc4_kms.c | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index ceb385fd69c5..ef8a2d3a6d1f 100644 --- a/drivers/gpu/drm

[Intel-gfx] [RFC 4/7] drm/prime: Clear drm_gem_object->dma_buf on release

2017-12-31 Thread Noralf Trønnes
Clear the pointer so the buffer can be re-exported. Otherwise use after free happens in the next call to drm_gem_prime_handle_to_fd(). Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_prime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/d

[Intel-gfx] [RFC 2/7] drm/fb-helper: Ensure driver module is pinned in fb_open()

2017-12-31 Thread Noralf Trønnes
If struct fb_ops is defined in a library like cma, fb_open() and fbcon takes a ref on the library instead of the driver module. Use fb_ops.fb_open/fb_release to ensure that the driver module is pinned. Add drm_fb_helper_fb_open() and drm_fb_helper_fb_release() to DRM_FB_HELPER_DEFAULT_OPS(). Sign

[Intel-gfx] [RFC 3/7] drm/fb-helper: Don't restore if fbdev is not in use

2017-12-31 Thread Noralf Trønnes
Keep track of fbdev users and only restore fbdev in drm_fb_helper_restore_fbdev_mode_unlocked() when in use. This avoids fbdev being restored in drm_driver.last_close when nothing uses it. Additionally fbdev is turned off when the last user is closing. fbcon is a user in this context. Signed-off-b

[Intel-gfx] [RFC 0/7] drm: Add generic fbdev emulation

2017-12-31 Thread Noralf Trønnes
This patchset explores the possibility of having generic fbdev emulation in DRM for drivers that supports dumb buffers which they can export. I was about to polish up my 'vmalloc BO helper' series, which has fbdev support, when this idea[1] of Laurent popped into my mind: Ideally I'd like to re

[Intel-gfx] [RFC 6/7] drm/fb-helper: Add generic fbdev emulation

2017-12-31 Thread Noralf Trønnes
Add generic fbdev emulation which uses a drm_file to get a dumb_buffer and drm_framebuffer. The buffer is exported and vmap/mmap called on the dma-buf. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 289 include/drm/drm_fb_helper.h

[Intel-gfx] [RFC 1/7] drm: provide management functions for drm_file

2017-12-31 Thread Noralf Trønnes
From: David Herrmann Rather than doing drm_file allocation/destruction right in the fops, lets provide separate helpers. This decouples drm_file management from the still-mandatory drm-fops. It prepares for use of drm_file without the fops, both by possible separate fops implementations and APIs