[PATCH] drm: simplify the locking in the GETCRTC ioctl

2017-03-28 Thread Daniel Vetter
No need to grab both plane and crtc locks at the same time, we can do them one after the other. If userspace races it'll get what it deserves either way. This removes another user of drm_modeset_lock_crtc. There's only one left. v2: Make sure all access to primary->state is properly protected (Ha

Re: [PATCH 01/19] drm: Wire up proper acquire ctx for plane functions

2017-03-28 Thread Daniel Vetter
On Tue, Mar 28, 2017 at 08:23:53AM +0200, Daniel Vetter wrote: > On Mon, Mar 27, 2017 at 04:12:05PM -0400, Harry Wentland wrote: > > On Wednesday, March 22, 2017 10:50:40 PM EDT Daniel Vetter wrote: > > > This is just prep work to get an acquire ctx into every place where we > > > call ->update_pla

[PATCH v6] drm: Add description for scdc variable

2017-03-28 Thread Shashank Sharma
This patch adds description about 'scdc' variable in drm_hdmi_info structure, to fix this warning during doc-build. "drm_connector.h:140: warning: No description found for parameter 'scdc'" V2: Rebase V3: Added extra * V4: Removed merged conflict V5: Removed extra line at start of structure (Dani

RE: [PATCH v5] drm: Add description for scdc variable

2017-03-28 Thread Sharma, Shashank
V6: https://patchwork.freedesktop.org/patch/146749/ Regards Shashank -Original Message- From: Daniel Vetter [mailto:daniel.vet...@ffwll.ch] On Behalf Of Daniel Vetter Sent: Tuesday, March 28, 2017 9:54 AM To: Sharma, Shashank Cc: dri-devel@lists.freedesktop.org; Daniel Vetter Subject: R

Re: [PATCH 01/11] drm/vmwgfx: Add universal plane support

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:00:54PM -0700, Sinclair Yeh wrote: > Universal support is prerequisite for atomic mode set. > > Explicitly create planes for the cursor and the primary FB. With > a functional cursor plane, the DRM will no longer use the legacy > cursor_set2 and cursor_move entry points

[Bug 100390] [steam] Grand Ages: Medieval crashes instantly

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100390 --- Comment #8 from Christoph Berliner --- That doesn't sound to bad, does it? At least it looks like the problem could be isolated. Thanks and I'm happily trying fixes as long they're not exhausting my capabilities. -- You are receiving this

[Bug 100392] Applications Requiring 3d accel fail to launch on Wayland after waking from sleep

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100392 --- Comment #3 from vkontog...@gmail.com --- Created attachment 130494 --> https://bugs.freedesktop.org/attachment.cgi?id=130494&action=edit dmesg output on crash -- You are receiving this mail because: You are the assignee for the bug.__

[Bug 100392] Applications Requiring 3d accel fail to launch on Wayland after waking from sleep

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100392 Michel Dänzer changed: What|Removed |Added Component|Drivers/Gallium/radeonsi|DRM/Radeon QA Contact|dri-devel

[Bug 100392] Applications Requiring 3d accel fail to launch on Wayland after waking from sleep

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100392 vkontog...@gmail.com changed: What|Removed |Added Attachment #130494|0 |1 is obsolete|

Re: [PATCH 03/11] drm/vmwgfx: Plane atomic state

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:00:56PM -0700, Sinclair Yeh wrote: > Add plane state handling functions. > > We have to keep track of a few plane states so we cannot use the > DRM helper for this. > > Created vmw_plane_state along with functions to reset, duplicate, > and destroty it. > > Signed-off-

Re: [PATCH 06/11] drm/vmwgfx: Add and connect plane helper functions

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:00:59PM -0700, Sinclair Yeh wrote: > Refactor previous FB and cursor plane update code into their > atomic counterparts: check, update, prepare, cleanup, and disable. > > These helpers won't be called until we flip on the atomic support > flag or set drm_crtc_funcs->set_

Re: [PATCH 07/11] drm/vmwgfx: Add and connect connector helper function

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:01:00PM -0700, Sinclair Yeh wrote: > Since the link between connector and encoder is always fixed in our case, > just return the one encoder. > > These helpers won't be called until we flip on the atomic support > flag or set drm_crtc_funcs->set_config to using the atomi

Re: [PATCH 08/11] drm/vmwgfx: Add and connect atomic state object check/commit

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:01:01PM -0700, Sinclair Yeh wrote: > This connects the main state object check and commit function. > > Signed-off-by: Sinclair Yeh > Signed-off-by: Thomas Hellstrom > Reviewed-by: Thomas Hellstrom > --- > drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 66 > +

Re: [PATCH 10/11] drm/vmwgfx: Switch over to internal atomic API for STDU

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:01:03PM -0700, Sinclair Yeh wrote: > Switch over to using internal atomic API for mode set. > > This removes the legacy set_config API, replacing it with > drm_atomic_helper_set_config(). The DRM helper will use various > vmwgfx-specific atomic functions to set a mode.

Re: [PATCH 11/11] drm/vmwgfx: Switch over to internal atomic API for SOU and LDU

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:01:04PM -0700, Sinclair Yeh wrote: > Switch over to internal atomic API. This completes the atomic > internal atomic switch for all the Display Units. > > Signed-off-by: Sinclair Yeh > Signed-off-by: Thomas Hellstrom > Reviewed-by: Thomas Hellstrom > --- > drivers/g

Re: [PATCH 00/11] Enable Atomic Mode Set on vmwgfx

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:00:53PM -0700, Sinclair Yeh wrote: > This series enables atomic mode set on vmwgfx. Developed in > collaboration with Thomas Hellstrom and the VMWare Graphics > Team. Yay! I've given it a quick read-thru and sprinkled some comments over a bunch of places. One top-level

Re: [PATCH 05/11] drm/vmwgfx: Add and connect CRTC helper functions

2017-03-28 Thread Daniel Vetter
On Mon, Mar 27, 2017 at 03:00:58PM -0700, Sinclair Yeh wrote: > Atomic mode set requires us to refactor existing vmw_stdu_crtc_set_config > code into sections that check the validity of the new mode, and sections > that actually program the hardware state. > > vmw_du_crtc_atomic_check() takes CRTC

Re: [PATCH v6] drm: Add description for scdc variable

2017-03-28 Thread Daniel Vetter
On Tue, Mar 28, 2017 at 10:06:19AM +0300, Shashank Sharma wrote: > This patch adds description about 'scdc' variable in drm_hdmi_info > structure, to fix this warning during doc-build. > > "drm_connector.h:140: warning: No description found for parameter 'scdc'" > > V2: Rebase > V3: Added extra *

[PATCH] drm/tilcdc: do the complete reset sequence if the LCDC is enabled

2017-03-28 Thread Emiliano Ingrassia
If the LCD controller was already enabled (e.g. by the bootloader), do the complete software reset sequence to avoid time out while loading the palette and a consequent time out waiting for vblank. Signed-off-by: Emiliano Ingrassia --- drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 23 ++

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-28 Thread Julien Isorce
Hi Michel, About the hard lockup, I noticed that I cannot have it with the following conditions: 1. soft lockup fix (the 0->i change which avoids infinite loop) 2. Your suggestion: (!(rbo->flags & RADEON_GEM_CPU_ACCESS) 3. radeon.gartsize=512 radeon.vramlimit=1024 (any other values above do not h

Re: [PATCH v5 3/5] drm/exynos: dsi: Fix the parse_dt function

2017-03-28 Thread Inki Dae
Merged. Thanks, Inki Dae 2017년 03월 22일 10:36에 Hoegeun Kwon 이(가) 쓴 글: > Hi inki, > > Could you check the this patch? > For reference, patch 1/5 and 2/5 have already been applied to Krzysztof tree. > > Best regards, > Hoegeun > > > On 03/08/2017 01:54 PM, Hoegeun Kwon wrote: >> The dsi + panel

Re: [PATCH] drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()

2017-03-28 Thread Thomas Hellstrom
Hi, On 03/28/2017 05:10 AM, Li Qiang wrote: > In vmw_surface_define_ioctl(), the 'num_sizes' is the sum of the > 'req->mip_levels' array. This array can be assigned any value from > the user space. As both the 'num_sizes' and the array is uint32_t, > it is easy to make 'num_sizes' overflow. The la

[PATCH] drm/ttm: Avoid calling drm_ht_remove from atomic context

2017-03-28 Thread Thomas Hellstrom
On recent kernels, calling drm_ht_remove triggers a might_sleep() warning from within vfree(). So avoid calling it from atomic context. The use-cases we fix here are both from destructors so there should be no concurrent use of the hash tables. Signed-off-by: Thomas Hellstrom Reviewed-by: Brian P

[PATCH] drm/vmwgfx: Remove getparam error message

2017-03-28 Thread Thomas Hellstrom
The mesa winsys sometimes uses unimplemented parameter requests to check for features. Remove the error message to avoid bloating the kernel log. Cc: Signed-off-by: Thomas Hellstrom Reviewed-by: Brian Paul Reviewed-by: Sinclair Yeh --- drivers/gpu/drm/vmwgfx/vmwgfx_ioctl.c | 2 -- 1 file chan

Re: [PATCH 2/3] dim: Review subcommand docs

2017-03-28 Thread Jani Nikula
On Mon, 27 Mar 2017, Daniel Vetter wrote: > Inspired by Jani's efforts to clean this up and structure it better. > > Signed-off-by: Daniel Vetter > --- > dim.rst | 20 ++-- > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/dim.rst b/dim.rst > index 2f8fda8c42a7.

Re: [PATCH 3/3] dim: Backronym

2017-03-28 Thread Jani Nikula
On Mon, 27 Mar 2017, Daniel Vetter wrote: > It's kinda beyond just drm-intel nowadays ... > > Idea from Jani on irc. Hah, it was a bit tongue-in-cheek, but works for me! Ack also on patch 1. BR, Jani. > > Signed-off-by: Daniel Vetter > --- > dim.rst | 6 +++--- > 1 file changed, 3 insertions

Re: [PATCH v4 2/8] drm/stm: Add STM32 LTDC driver

2017-03-28 Thread Yannick FERTRE
Hi Eric, manu thanks for your help. These patches have been push on DRM misc. I solve all issues & I will push a new version today(V5). I create a patch on drm_gem_cma_helper.h regarding DEFINE_DRM_GEM_CMA_FOPS & a patch on drm_fb_cma_helper to add new function to get physical address. Best rega

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-28 Thread Michel Dänzer
On 28/03/17 05:24 PM, Julien Isorce wrote: > Hi Michel, > > About the hard lockup, I noticed that I cannot have it with the > following conditions: > > 1. soft lockup fix (the 0->i change which avoids infinite loop) > 2. Your suggestion: (!(rbo->flags & RADEON_GEM_CPU_ACCESS) > 3. radeon.gartsize

[PATCH v5 03/10] dt-bindings: display: Add STM32 LTDC driver

2017-03-28 Thread Yannick Fertre
This patch adds documentation of device tree bindings for the STM32 LTDC (Lcd-Tft Display Controller). Acked-by: Rob Herring Signed-off-by: Yannick Fertre --- .../devicetree/bindings/display/st,stm32-ltdc.txt | 36 ++ 1 file changed, 36 insertions(+) create mode 100644 Doc

[PATCH v5 00/10] STM32 LCD-TFT display controller

2017-03-28 Thread Yannick Fertre
Version 5: - Add patch on drm_gem_cma_helper.h to udapte DEFINE_DRM_GEM_CMA_FOPS. - Add patch on drm_fb_cma_helper to add new function to get physical address. - Solve some typos & update ltdc driver including last remarks of Eric Anholt - Update commits of config patches. Version 4: - Update "amp

[PATCH v5 07/10] ARM: dts: stm32: Add ltdc support on stm32f429 MCU

2017-03-28 Thread Yannick Fertre
Add LTDC (Lcd-tft Display Controller) support. Signed-off-by: Yannick Fertre --- arch/arm/boot/dts/stm32f429.dtsi | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/stm32f429.dtsi b/arch/arm/boot/dts/stm32f429.dtsi index ee0da97..23debd9 100644 ---

[PATCH v5 05/10] dt-bindings: Add Ampire AM-480272H3TMQW-T01H panel

2017-03-28 Thread Yannick Fertre
This patch adds documentation of device tree bindings for the WVGA panel Ampire AM-480272H3TMQW-T01H. Acked-by: Rob Herring Signed-off-by: Yannick Fertre --- .../display/panel/ampire,am-480272h3tmqw-t01h.txt | 26 ++ 1 file changed, 26 insertions(+) create mode 100644 Doc

[PATCH v5 08/10] ARM: dts: stm32: Enable ltdc & simple panel on stm32f429-Eval board

2017-03-28 Thread Yannick Fertre
Enable ltdc & enable am-480272h3tmqw-t01h panel. Signed-off-by: Yannick Fertre --- arch/arm/boot/dts/stm32429i-eval.dts | 59 1 file changed, 59 insertions(+) diff --git a/arch/arm/boot/dts/stm32429i-eval.dts b/arch/arm/boot/dts/stm32429i-eval.dts index b30

[PATCH v5 04/10] drm/stm: Add STM32 LTDC driver

2017-03-28 Thread Yannick Fertre
This controller provides output signals to interface directly a variety of LCD and TFT panels. These output signals are: RGB signals (up to 24bpp), vertical & horizontal synchronisations, data enable and the pixel clock. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/Kconfig |3 +- d

[PATCH v5 06/10] drm/panel: simple: Add support for Ampire AM-480272H3TMQW-T01H

2017-03-28 Thread Yannick Fertre
Add simple-panel support for the Ampire AM-480272H3TMQW-T01H, which is a 4.3" WQVGA panel. Signed-off-by: Yannick Fertre --- drivers/gpu/drm/panel/panel-simple.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu

[PATCH v5 01/10] drm/cma: Update DEFINE_DRM_GEM_CMA_FOPS to add get_unmapped_area

2017-03-28 Thread Yannick Fertre
Missing field get_unmapped_area which is necessary with device without MMU Signed-off-by: Yannick Fertre --- include/drm/drm_gem_cma_helper.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h index f962d33..7320b14 100644 ---

[PATCH v5 02/10] drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()

2017-03-28 Thread Yannick Fertre
Add function drm_fb_cma_get_gem_addr() which return the physical address of framebuffer (1st pixel). This function will usually be called by plane callback (atomic_update). Signed-off-by: Yannick Fertre --- drivers/gpu/drm/drm_fb_cma_helper.c | 27 +++ include/drm/drm_fb_

[PATCH v5 09/10] ARM: configs: stm32: Add DRM support in STM32 defconfig

2017-03-28 Thread Yannick Fertre
This patch adds DRM (Direct Rendering Manager) support in stm32_defconfig file Signed-off-by: Yannick Fertre --- arch/arm/configs/stm32_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig index ac372e3..562d351 100644

[PATCH v5 10/10] ARM: configs: stm32: Add simple panel support in STM32 defconfig

2017-03-28 Thread Yannick Fertre
This patch adds simple panel support in stm32_defconfig file Signed-off-by: Yannick Fertre --- arch/arm/configs/stm32_defconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/stm32_defconfig b/arch/arm/configs/stm32_defconfig index 562d351..ae68d9f 100644 --- a/arch/arm/c

[Bug 100395] DC, Powerplay, Tonga, top screen flicker with current amd-staging-4.9

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100395 --- Comment #2 from Andy Furniss --- (In reply to Michel Dänzer from comment #1) > So this doesn't happen with amdgpu.dc=0? It's OK with amdgpu.dc=0 -- You are receiving this mail because: You are the assignee for the bug.

Re: [PATCHv2 01/31] drm/omap: work-around for errata i886

2017-03-28 Thread Tomi Valkeinen
On 28/03/17 08:45, Jyri Sarha wrote: > On 03/24/17 11:40, Tomi Valkeinen wrote: >> DRA7 errata i886 (FPDLink PLL Unlocks With Certain SoC PLL M/N Values) >> says that FPDLink is sensitive to jitter on the vout clock, and that low >> PLL M and N values result in more jitter than high M and N values.

[PATCH] drm/rockchip: fix Kconfig dependencies

2017-03-28 Thread Arnd Bergmann
A bug that I had fixed earlier just came back, with CONFIG_EXTCON=m, the rockchip drm driver will fail to link: drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_get_port_lanes': cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x30): undefined reference to `extcon_get_state' cdn-dp-core.c:(.

Re: [CRTC:24] vblank wait timed out

2017-03-28 Thread Martyn Welch
On Mon, Mar 27, 2017 at 12:11:12PM +0100, Martyn Welch wrote: > On Fri, Mar 24, 2017 at 11:42:53AM +0100, Philipp Zabel wrote: > > On Fri, 2017-03-24 at 10:24 +, Martyn Welch wrote: > > [...] > > > > Could you move to v4.9 or v4.10 and check if the four patches in > > > > https://git.pengutroni

Re: [PATCH] Revert "drm/radeon: Try evicting from CPU accessible to inaccessible VRAM first"

2017-03-28 Thread Julien Isorce
On 28 March 2017 at 10:36, Michel Dänzer wrote: > On 28/03/17 05:24 PM, Julien Isorce wrote: > > Hi Michel, > > > > About the hard lockup, I noticed that I cannot have it with the > > following conditions: > > > > 1. soft lockup fix (the 0->i change which avoids infinite loop) > > 2. Your suggest

[Bug 98629] OpenGL applications warns "MESA-LOADER: failed to retrieve device information"

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=98629 --- Comment #8 from Emil Velikov --- Hi Brian, The define is coming from the kernel's drmP.h. Perhaps we should have explicitly made it part of the public API/ABI, but that won't help here. In upstream the major is set in drm_core_init()'s regi

[Bug 100395] DC, Powerplay, Tonga, top screen flicker with current amd-staging-4.9

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=100395 --- Comment #3 from Andy Furniss --- Created attachment 130499 --> https://bugs.freedesktop.org/attachment.cgi?id=130499&action=edit dmesg dmesg attached, plus a link to an external video of what it looks like. As seen it's also visible when

Re: [PATCH] mm: Remove pointless might_sleep() in remove_vm_area().

2017-03-28 Thread Andrey Ryabinin
[+CC drm folks, see the following threads: http://lkml.kernel.org/r/201703232349.bgb95898.qhlvffomtfo...@i-love.sakura.ne.jp http://lkml.kernel.org/r/1490352808-7187-1-git-send-email-penguin-ker...@i-love.sakura.ne.jp ] On 03/24/2017 07:17 PM, Matthew Wilcox wrote: > On Fri, Mar

[PATCH] drm/vmwgfx: fix integer overflow in vmw_surface_define_ioctl()

2017-03-28 Thread Li Qiang
In vmw_surface_define_ioctl(), the 'num_sizes' is the sum of the 'req->mip_levels' array. This array can be assigned any value from the user space. As both the 'num_sizes' and the array is uint32_t, it is easy to make 'num_sizes' overflow. The later 'mip_levels' is used as the loop count. This can

Re: [PATCH 7/15] dt-bindings: display: sun4i: Add allwinner,tcon-channel property

2017-03-28 Thread Icenowy Zheng
2017年3月27日 上午5:11于 Maxime Ripard 写道: > > On Fri, Mar 17, 2017 at 11:34:45AM +0800, Chen-Yu Tsai wrote: > > On Thu, Mar 16, 2017 at 1:37 AM, Rob Herring wrote: > > > On Tue, Mar 07, 2017 at 09:56:26AM +0100, Maxime Ripard wrote: > > >> The Allwinner Timings Controller has two, mutually exclusiv

Re: [PATCH v5 3/5] drm/exynos: dsi: Fix the parse_dt function

2017-03-28 Thread Krzysztof Kozlowski
On Tue, Mar 28, 2017 at 11:26 AM, Inki Dae wrote: > Merged. Hi, I do not see the tag (with DT patches) merged by you which I provided to you before. These are essential for bisectability. Without them, kernel bisectability is broken. Did you merged the tag somewhere? Best regards, Krzysztof >

Re: [PATCH v6 1/3] drm_fourcc: Add new P010, P016 video format

2017-03-28 Thread Ayaka
從我的 iPad 傳送 > Clint Taylor 於 2017年3月28日 上午6:49 寫道: > >> On 03/26/2017 09:05 PM, Ayaka wrote: >> >> >> 從我的 iPad 傳送 >> Ander Conselvan De Oliveira 於 2017年3月14日 下午9:53 寫道: On Tue, 2017-03-07 at 04:27 +0800, Ayaka wrote: 從我的 iPad 傳送 >> Ville Syrjälä 於 2017

Re: [PATCH] mm: Remove pointless might_sleep() in remove_vm_area().

2017-03-28 Thread Tetsuo Handa
Andrey Ryabinin wrote: > It's safe to call vfree() from rcu callback as in any other interrupt context. > Commits you listed bellow didn't change anything in that respect. > They made impossible to call vfree() under stuff like > preempt_disable()/spin_lock() I still cannot catch. According to te

Re: [PATCH] drm/atomic: Introduce drm_atomic_helper_shutdown

2017-03-28 Thread Tomi Valkeinen
On 27/03/17 10:43, Daniel Vetter wrote: > With atomic we've stopped killing the entire CRTC when you the last > userspace reference for the framebuffer on the primary plane disappears, > but just shut down the primary plane. Assuming the driver can do that, we > fall back to full CRTC shutdown if

Re: [RFC v2 03/11] vb2: Move cache synchronisation from buffer done to dqbuf handler

2017-03-28 Thread Laurent Pinchart
Hi Shuah, On Monday 27 Mar 2017 15:27:36 Shuah Khan wrote: > On Thu, Dec 15, 2016 at 6:24 PM, Laurent Pinchart wrote: > > From: Sakari Ailus > > > > The cache synchronisation may be a time consuming operation and thus not > > best performed in an interrupt which is a typical context for > > vb2_

[PATCHv3 02/30] drm/omap: refactor CRTC HW property setup

2017-03-28 Thread Tomi Valkeinen
The current driver doesn't expose any of the CRTC HW properties like background color or transparency key, and sets them at CRTC enable time. Refactor this into a separate function and call that function from omap_crtc_atomic_flush(). This is the behavior we want when the properties can be configu

[PATCHv3 05/30] drm/omap: improve DPI clock selection on DRA7xx

2017-03-28 Thread Tomi Valkeinen
The clock source selection for the LCD outputs is too hardcoded at the moment. For example, LCD3 is set to use PLL2_1, and PLL2 doesn't exist on DRA72x SoCs. There are quite many ways to configure the clocks, even using HDMI PLL for LCD outputs, but enabling full configuration of the clocks is rat

[PATCHv3 01/30] drm/omap: work-around for errata i886

2017-03-28 Thread Tomi Valkeinen
DRA7 errata i886 (FPDLink PLL Unlocks With Certain SoC PLL M/N Values) says that FPDLink is sensitive to jitter on the vout clock, and that low PLL M and N values result in more jitter than high M and N values. This patch implements a workaround for the problem by changing the PLL setup to search

[PATCHv3 07/30] drm/omap: fix HDMI sync polarities

2017-03-28 Thread Tomi Valkeinen
While implementing writeback support, odd behavior of WBDELAYCOUNT was observed with the combination of WB capture and HDMI. The result of the debugging was that the HDMI sync polarities are not set correctly. The current code sets the sync polarities going from HDMI WP to DISPC according to the v

[PATCHv3 03/30] drm/omap: remove divider constraint from hsdiv

2017-03-28 Thread Tomi Valkeinen
The driver only uses even dividers for hsdiv when pclk >= 100MHz, as odd dividers can create uneven duty cycle. However, while this holds true for some dividers like DISPC's LCK and PCK dividers, it is not actually true for hsdiv. hsdiv always produces even duty cycle, so the constraint can be rem

[PATCHv3 04/30] drm/omap: decrease min width & height

2017-03-28 Thread Tomi Valkeinen
mode_config's min_width and min_height are both set to 32, which is overly restrictive. The real limits depend on whether we're configuring a crtc or a plane, but a limit of 8x2 is safe for both cases. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/omap_drv.c | 4 ++-- 1 file changed

[PATCHv3 10/30] drm/omap: output: use dev_err instead of DSSERR

2017-03-28 Thread Tomi Valkeinen
We don't have omapdss's custom error printing functions in the common omapdss-base module, to which we want to move output.c. This patch changes output.c to use dev_err instead of DSSERR so that it doesn't depend on DSSERR. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/output.c

[PATCHv3 06/30] drm/omap: Add support for render nodes

2017-03-28 Thread Tomi Valkeinen
From: Hemant Hariyani Add support for render nodes in omap driver and allow required ioctls to be accessible via render nodes. This enables unprivileged clients to allocate resources like GEM buffers for rendering their content into. Mode setting (KMS ioctls) is not allowed using render nodes. T

[PATCHv3 08/30] drm/omap: add omapdss-base.ko

2017-03-28 Thread Tomi Valkeinen
We are working towards enabling omapdss6, which will consists of a new dss, dispc and dpi drivers. omapdss6 will be a new module. The panel, encoder and omapdrm will need to use either the current omapdss driver or the new omapdss6 driver, depending on the platform. This will be implemented with a

[PATCHv3 13/30] drm/omap: move dispc related dss-feat funcs to dispc

2017-03-28 Thread Tomi Valkeinen
omapdrm still uses a few non-dispc functions: dss_feat_get_num_mgrs(), dss_feat_get_num_ovls() and dss_feat_get_supported_color_modes(). We want to provide omapdrm a single dispc_ops function pointer struct so that omapdrm will use either the current omapdss or the new omapdss6 driver depending on

[PATCHv3 00/30] drm/omap: miscallaneous improvements

2017-03-28 Thread Tomi Valkeinen
This is the third revision of this series. Note that this series depends on "drm/atomic: Introduce drm_atomic_helper_shutdown" which has not yet been merged to drm-next. The main changes in v3: - improve variable names in 'work-around for errata i886' - drop 'Init fbdev emulation only when we hav

[PATCHv3 12/30] drm/omap: move display, dss-of, output to omapdss-base

2017-03-28 Thread Tomi Valkeinen
This patch moves the common parts of omapdss to omapdss-base so that both the current omapdss driver and the new omapdss6 driver can use them. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/Makefile | 6 +++--- drivers/gpu/drm/omapdrm/dss/display.c | 2 -- drivers/gpu/drm/omapdrm

[PATCHv3 18/30] drm/omap: remove unused dispc_wb_enable & dispc_wb_is_enabled

2017-03-28 Thread Tomi Valkeinen
Remove two unused WB functions. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 10 -- drivers/gpu/drm/omapdrm/dss/dss.h | 2 -- 2 files changed, 12 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c index 7104

[PATCHv3 15/30] drm/omap: fill dispc_ops

2017-03-28 Thread Tomi Valkeinen
This patch changes the current omapdss driver to fill a dispc_ops struct and set it to omapdss-base. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 40 + 1 file changed, 40 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.

[PATCHv3 19/30] drm/omap: fix replication logic

2017-03-28 Thread Tomi Valkeinen
DSS uses "replication logic" to convert color components from smaller bit widths to bigger bit widths. Without replication logic, the color component would be shifted and the least significant bits would be left at 0, whereas with replication logic, the least significat bits will be filled with the

[PATCHv3 14/30] drm/omap: add dispc_ops

2017-03-28 Thread Tomi Valkeinen
We want to change the dispc API from plain functions to a struct with functions pointers, so that omapdrm can call either omapdss or omapdss6 depending on the platform. This patch adds 'struct dispc_ops' and adds functions to omapdss-base to set and get the ops. Signed-off-by: Tomi Valkeinen ---

[PATCHv3 16/30] drm/omap: use dispc_ops

2017-03-28 Thread Tomi Valkeinen
Change omapdrm to get dispc_ops and use that to call the dispc functions instead or direct function calls. The change is very straightforward. The only problem was in omap_crtc_init() which calls pipe2vbl(crtc), and at that point of time the crtc->dev link, which is used to get the dispc_ops, has

[PATCHv3 11/30] drm/omap: display: don't use dsi_get_pixel_size()

2017-03-28 Thread Tomi Valkeinen
display.c uses dsi_get_pixel_size() which is implemented in the DSI driver, and we won't have that in the omapdss-base module, to which we want to move display.c This patch changes display.c not to use dsi_get_pixel_size(). The call can be replaced with a simple check for OMAP_DSS_DSI_FMT_RGB565.

[PATCHv3 17/30] drm/omap: remove all EXPORT_SYMBOLs from dispc.c

2017-03-28 Thread Tomi Valkeinen
omapdrm now uses dispc_ops instead of direct function calls so we can remove all EXPORT_SYMBOLs from dispc. Most of the functions can also be made static, but a few are used outside dispc.c. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 84 +---

[PATCHv3 09/30] drm/omap: move dss_initialized to omapdss-base

2017-03-28 Thread Tomi Valkeinen
omapdss_is_initialized() is used to find out if omapdss has been probed successfully. This patch moves the related code to the common omapdss-base module, so that the same support will be there for both omapdss and omapdss6. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/base.c

[PATCHv3 22/30] drm/omap: Use omapdss_stack_is_ready() to check that the display stack is up

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi Instead of 'guessing' based on aliases of the status of the DSS drivers, use the new interface to check that all needed drivers are loaded. In this way we can be sure that all needed drivers are loaded so it is safe to continue the probing of omapdrm. This method will allow t

[PATCHv3 28/30] drm/omap: fix display SYNC/DE flags

2017-03-28 Thread Tomi Valkeinen
At the moment VSYNC/HSYNC/DE high/low flags set by the panel/encoder drivers get lost when the videotimings are translated to DRM's videomode, as DRM's mode does not have corresponding flags. DRM has bus-flags for this purpose, and while it lacks a few flags at the moment, it should be used here.

[PATCHv3 26/30] drm/omap: displays: panel-dpi: Support for handling backlight devices

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi The associated backlight device can be configured via DT by providing the phandle to the device. If the backlight device is configured, the driver can manage the backligt along with the panel's power state, iow it can turn on the backlight when the panel is enabled and turn

[PATCHv3 21/30] drm/omap: dss: Support for detecting display stack readiness

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi When omapdss is loaded (all core components are in place) create a list of devices used in the display graph. This list later can be used by omapdrm via the omapdss_stack_is_ready() function to check that these components are loaded. Based on this information, omapdrm can def

[PATCHv3 20/30] drm/omap: dss: Functions to check components in the display/output list

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi The functions can be used to check a component (by it's of_node) if it is part of the omapdss display or output list. If the component is found, it means that the driver is loaded. Signed-off-by: Peter Ujfalusi Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss

[PATCHv3 24/30] drm/omap: display: Add displays in sorted order to the panel_list

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi Keep the panel_list ordered according to aliases. The DRM connectors will be created following the panel_list. By keeping the list ordered the DRM connectors will be created in the same order regardless of the driver probe order. Signed-off-by: Peter Ujfalusi Signed-off-by:

[PATCHv3 27/30] drm/omap: dispc: improve debug print of display flags

2017-03-28 Thread Tomi Valkeinen
Instead of printing 0/1 for display flags like vsync high/low, use a tri-state print (-1/0/1) to indicate the "undefined" state. Signed-off-by: Tomi Valkeinen --- drivers/gpu/drm/omapdrm/dss/dispc.c | 20 +++- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCHv3 23/30] drm/omap: fix plane update warning when crtc is disabled

2017-03-28 Thread Tomi Valkeinen
If omap_plane_atomic_update() is called when the crtc is disabled, and the timings are zero, we'll see the following warning: omapdss DISPC error: cannot calculate scaling settings: pclk is zero omapdrm omapdrm.0: Failed to setup plane vid2 It shouldn't cause any issues, as the crtc is disabled s

[PATCHv3 29/30] drm/omap: use drm_atomic_helper_shutdown()

2017-03-28 Thread Tomi Valkeinen
Use drm_atomic_helper_shutdown() to ensure that all crtcs are disabled when unloading the driver. Signed-off-by: Tomi Valkeinen Cc: Daniel Vetter --- drivers/gpu/drm/omapdrm/omap_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c b/drivers/gpu/drm/o

[PATCHv3 25/30] drm/omap: poll only connectors where the connect/disconnect can be checked

2017-03-28 Thread Tomi Valkeinen
From: Peter Ujfalusi When the connector associated detect callback is not provided, we can not detect if the display is connected or disconnected. These displays does not support hot plug, they are always connected. Let DRM know that connectors w/o detect callback should not be polled. Signed-of

Re: [PATCH] drm/vmwgfx: Remove getparam error message

2017-03-28 Thread Gustavo Padovan
Hi Thomas, 2017-03-28 Thomas Hellstrom : > The mesa winsys sometimes uses unimplemented parameter requests to > check for features. Remove the error message to avoid bloating the > kernel log. > > Cc: > Signed-off-by: Thomas Hellstrom > Reviewed-by: Brian Paul > Reviewed-by: Sinclair Yeh > -

[PATCHv3 30/30] drm/omap: fix crash on module unload

2017-03-28 Thread Tomi Valkeinen
When unloading omapdrm we get a NULL pointer deref in omap_drm_irq_uninstall(). This is caused by: 967dd48417874dd25491a4e933648f394a64f70f ("drm: remove drm_vblank_no_hw_counter assignment from driver code") We shut down all the crtcs at unload time before calling omap_drm_irq_uninstall, so the

Re: [PATCH v4 1/6] drm: bridge: dw-hdmi: Extract PHY interrupt setup to a function

2017-03-28 Thread Neil Armstrong
On 03/22/2017 02:53 PM, Jose Abreu wrote: > Hi Neil, > > > On 21-03-2017 15:12, Neil Armstrong wrote: >> From: Laurent Pinchart >> >> In preparation for adding PHY operations to handle RX SENSE and HPD, >> group all the PHY interrupt setup code in a single location and extract >> it to a separat

Re: [PATCH 1/2] drm/bridge: ti-tfp410: support hpd via gpio

2017-03-28 Thread Jyri Sarha
On 03/27/17 08:58, Archit Taneja wrote: > Hi, > > On 03/07/2017 03:21 AM, Christopher Spinrath wrote: >> Hi Fabio, >> >> On 03/06/2017 10:46 PM, Fabio Estevam wrote: >>> Hi Christopher, >>> >>> On Mon, Mar 6, 2017 at 6:40 PM, >>> wrote: From: Christopher Spinrath On some boards t

[PATCH] drm: mali-dp: remove unused variable

2017-03-28 Thread Arnd Bergmann
The newly introduced function causes a harmless build warning: drivers/gpu/drm/arm/malidp_planes.c: In function 'malidp_plane_atomic_print_state': drivers/gpu/drm/arm/malidp_planes.c:98:23: error: unused variable 'mp' [-Werror=unused-variable] The variable serves no purpose here and can be remo

Re: [PATCH] drm/atomic: Introduce drm_atomic_helper_shutdown

2017-03-28 Thread Daniel Vetter
On Tue, Mar 28, 2017 at 03:18:36PM +0300, Tomi Valkeinen wrote: > On 27/03/17 10:43, Daniel Vetter wrote: > > > With atomic we've stopped killing the entire CRTC when you the last > > userspace reference for the framebuffer on the primary plane disappears, > > but just shut down the primary plane.

[Bug 92248] [KBL/SKL/BYT/BXT] igt/kms_plane_scaling fail

2017-03-28 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=92248 Maarten Lankhorst changed: What|Removed |Added Status|NEEDINFO|REOPENED --- Comment #32 from Maarte

Re: [PATCH] drm: mali-dp: remove unused variable

2017-03-28 Thread Liviu Dudau
On Tue, Mar 28, 2017 at 04:07:58PM +0200, Arnd Bergmann wrote: > The newly introduced function causes a harmless build warning: > > drivers/gpu/drm/arm/malidp_planes.c: In function > 'malidp_plane_atomic_print_state': > drivers/gpu/drm/arm/malidp_planes.c:98:23: error: unused variable 'mp' > [-W

Re: [PATCH] drm: simplify the locking in the GETCRTC ioctl

2017-03-28 Thread Harry Wentland
Reviewed-by: Harry Wentland Harry On 2017-03-28 03:01 AM, Daniel Vetter wrote: No need to grab both plane and crtc locks at the same time, we can do them one after the other. If userspace races it'll get what it deserves either way. This removes another user of drm_modeset_lock_crtc. There's

Re: [PATCH 01/19] drm: Wire up proper acquire ctx for plane functions

2017-03-28 Thread Harry Wentland
On 2017-03-28 03:02 AM, Daniel Vetter wrote: On Tue, Mar 28, 2017 at 08:23:53AM +0200, Daniel Vetter wrote: On Mon, Mar 27, 2017 at 04:12:05PM -0400, Harry Wentland wrote: On Wednesday, March 22, 2017 10:50:40 PM EDT Daniel Vetter wrote: This is just prep work to get an acquire ctx into ever

Re: [PATCH 41/41] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip

2017-03-28 Thread Javier Martinez Canillas
Hello Doug, On 03/22/2017 12:59 PM, Doug Anderson wrote: > Hi, > > On Wed, Mar 22, 2017 at 3:57 AM, Andrzej Hajda wrote: >> On 10.03.2017 05:32, Sean Paul wrote: >>> From: Douglas Anderson >>> >>> The comments in analogix_dp_init_aux() claim that we're disabling aux >>> channel retries, but the

Re: [PATCH libdrm] xf86drm: remove memory leaks in drmGetBusid/drmGetReservedContextList

2017-03-28 Thread Nicolai Hähnle
On 27.03.2017 04:09, Seung-Woo Kim wrote: In error path of drmGetBusid() and drmGetReservedContextList(), there are memory leaks for error path. So this removes them. Signed-off-by: Seung-Woo Kim Reviewed-by: Nicolai Hähnle --- xf86drm.c | 18 -- 1 files changed, 12 ins

[PATCH 1/3] drm/doc: remove standard connector props from the csv file

2017-03-28 Thread Daniel Vetter
They're properly documented in drm_connector.c now, and this csv file is a horrible mess. Better to remove it. Signed-off-by: Daniel Vetter --- Documentation/gpu/kms-properties.csv | 5 - 1 file changed, 5 deletions(-) diff --git a/Documentation/gpu/kms-properties.csv b/Documentation/gpu/k

[PATCH 3/3] drm: document the all the atomic iterators

2017-03-28 Thread Daniel Vetter
Mostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately. Cc: Harry Wentland Cc: Maarten Lankhorst Signed-off-by: Daniel Vetter --- inc

[PATCH 2/3] drm: Document kms locking a bit better

2017-03-28 Thread Daniel Vetter
The rules are getting real hard, better to dump my brain into text a bit. This is by far not complete, but I think I reasonable start at least. Some of the older kms structures would need a full doc review anyway ... Cc: Harry Wentland Reviewed-by: Harry Wentland Cc: Maarten Lankhorst Signed-o

Re: [PATCH 3/3] drm: document the all the atomic iterators

2017-03-28 Thread Alex Deucher
On Tue, Mar 28, 2017 at 11:53 AM, Daniel Vetter wrote: > Mostly because I want the links from the newly-added @state functions > to work. But I think explaining when they're useful and that the > implicit one is deprecated is good either way. Slightly repetitive > unfortunately. > > Cc: Harry Went

  1   2   >